CN111966262B - Picture display method and computing device - Google Patents

Picture display method and computing device Download PDF

Info

Publication number
CN111966262B
CN111966262B CN202011143318.7A CN202011143318A CN111966262B CN 111966262 B CN111966262 B CN 111966262B CN 202011143318 A CN202011143318 A CN 202011143318A CN 111966262 B CN111966262 B CN 111966262B
Authority
CN
China
Prior art keywords
thumbnails
pictures
computing device
threshold
thumbnail
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011143318.7A
Other languages
Chinese (zh)
Other versions
CN111966262A (en
Inventor
刘明航
崔湛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202011143318.7A priority Critical patent/CN111966262B/en
Priority to CN202210126246.8A priority patent/CN114371798A/en
Publication of CN111966262A publication Critical patent/CN111966262A/en
Application granted granted Critical
Publication of CN111966262B publication Critical patent/CN111966262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a picture display method, which is executed in a computing device, wherein the computing device is suitable for displaying a plurality of pictures arranged based on a preset sequence, and the method comprises the following steps: determining a first threshold number of pictures to be displayed, and loading a second threshold number of pictures including the pictures to be displayed to a system memory of the computing equipment, wherein the second threshold is larger than the first threshold; generating corresponding second threshold value thumbnails based on the second threshold value pictures, and displaying first threshold value thumbnails corresponding to the first threshold value pictures to be displayed on a screen of the computing equipment; storing the generated second threshold number of thumbnails to a storage device of the computing device; in response to a user switching operation on the thumbnails, determining new first threshold number of thumbnails to be displayed, and displaying the new first threshold number of thumbnails on a screen of the computing device. The invention also discloses corresponding computing equipment. The picture display method is beneficial to improving the loading and display efficiency of the thumbnail.

Description

Picture display method and computing device
Technical Field
The invention relates to the technical field of computers and internet, in particular to a picture display method and a computing device.
Background
With the continuous development and improvement of computer technology, network technology and display technology, the requirements and demands for picture display are increasing. Today, in the field of picture parsing, pictures are previewed basically in thumbnail form. For software for displaying pictures such as pictures and photo albums in a computer, a large number of thumbnails are generated and loaded quickly, so that the large number of thumbnails can be displayed quickly. And a large amount of computer resources are occupied for generating the thumbnail.
In the existing software such as a picture viewing and photo album, when a picture is initially displayed, a plurality of pictures are previewed in a thumbnail mode. For the case that a large number of thumbnails need to be loaded at one time, a large amount of memory and CPU operation need to be consumed for loading and processing the thumbnails. For example, when 1000 pictures are stored in the local folder, according to the prior art, the 1000 pictures are usually all loaded at one time and processed into thumbnails, which inevitably consumes a large amount of memory and CPU computing power, which not only results in huge memory usage and slow application program loading, but also affects loading of the main interface, and user experience is poor.
Therefore, a picture display method is needed to solve the problems in the above technical solutions.
Disclosure of Invention
To this end, the present invention provides a picture display method in an attempt to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a picture display method executed in a computing device adapted to present a plurality of pictures arranged based on a predetermined order, the method comprising: determining a first threshold number of pictures to be displayed, and loading a total second threshold number of pictures to be displayed, before the pictures to be displayed and after the pictures to be displayed to a system memory of a computing device, wherein the second threshold is larger than the first threshold; generating corresponding second threshold value thumbnails based on the second threshold value pictures, and displaying first threshold value thumbnails corresponding to the first threshold value pictures to be displayed on a screen of the computing equipment; storing the generated second threshold number of thumbnails to a storage device of the computing device; and in response to the switching operation of the thumbnails by the user, determining new first threshold thumbnails to be displayed, and displaying the new first threshold thumbnails on the screen of the computing device.
Optionally, in the picture display method according to the present invention, after generating the corresponding second threshold number of thumbnails, the method includes the steps of: determining a current index value corresponding to each thumbnail based on the arrangement sequence of the second threshold number of pictures; displaying a first threshold number of thumbnails includes: and displaying the first threshold thumbnails based on the size sequence of the current index value corresponding to each thumbnail.
Optionally, in the picture display method according to the present invention, when the new first threshold number of thumbnails displayed on the screen of the computing device includes a thumbnail with the smallest current index value, the method further includes the steps of: loading a second threshold number of pictures before the picture corresponding to the thumbnail with the minimum current index value to a system memory; generating, based on the second threshold number of pictures, a second threshold number of thumbnails before the thumbnail with the smallest current index value for display on a screen of a computing device.
Optionally, in the picture display method according to the present invention, the minimum current index value is 1, and the maximum current index value is a second threshold; when the new first threshold number of thumbnails displayed on the screen of the computing device includes a thumbnail with the smallest current index value, the method further comprises the steps of: adding a second threshold value to the current index value of each thumbnail to generate a new index value; after generating a second threshold number of thumbnails before the thumbnail with the minimum current index value, the method comprises the following steps: and determining the index value corresponding to each thumbnail before the thumbnail with the minimum current index value.
Optionally, in the picture display method according to the present invention, when the new first threshold number of thumbnails displayed on the screen of the computing device includes a thumbnail with a largest current index value, the method further includes the steps of: loading a second threshold number of pictures after the picture corresponding to the thumbnail with the maximum current index value to a system memory; generating, based on the second threshold number of pictures, a second threshold number of thumbnails subsequent to the thumbnail with the largest current index value for display on a screen of a computing device.
Optionally, in the picture display method according to the present invention, after generating a second threshold number of thumbnails subsequent to the thumbnail whose current index value is the largest, the method includes the steps of: and determining the index value corresponding to each thumbnail after the thumbnail with the maximum current index value.
Optionally, in the picture display method according to the present invention, the step of loading the second threshold number of pictures into the system memory includes: acquiring paths of all pictures, and storing the paths of all the pictures into a system memory; loading the second threshold number of pictures to system memory based on the respective picture paths.
Optionally, in the picture display method according to the present invention, the step of loading the second threshold number of pictures into the system memory includes: and loading a previous part of pictures in the second threshold number of pictures based on a first thread, and loading a next part of pictures in the second threshold number of pictures based on a second thread.
Optionally, in the picture display method according to the present invention, generating the thumbnail based on the picture includes: cutting the picture to generate a thumbnail with a preset resolution; after generating the thumbnail based on the picture, the method comprises the following steps: and storing the thumbnail to a storage device.
Optionally, in the picture display method according to the present invention, the step of storing the thumbnail image in the storage device includes: determining an MD5 value for a picture file corresponding to the thumbnail; and storing the thumbnail to the storage device by taking the MD5 Value of the picture file as a key Value and the thumbnail as a Value.
Optionally, in the picture display method according to the present invention, after loading a second threshold number of pictures into the system memory, and generating corresponding second threshold number of thumbnails based on the second threshold number of pictures, the method further includes the steps of: the number of thumbnails present in the system memory is determined, and if the number of thumbnails exceeds a predetermined number, the first generated second threshold number of thumbnails is deleted.
Optionally, in the picture display method according to the present invention, after determining the first threshold number of pictures to be displayed, the method further includes the steps of: judging whether the storage equipment comprises the to-be-displayed picture, and thumbnails corresponding to a total number of second threshold pictures before and after the to-be-displayed picture; and if so, directly loading the second threshold number of thumbnails in the storage device to the system memory.
According to an aspect of the present invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the picture display method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the technical scheme of the invention, when a plurality of thumbnails (for example, a first threshold number) are displayed, only a second threshold number of pictures, the number of which is greater than the first threshold number, are initially loaded into a system memory, for example, a second threshold number of original pictures are loaded into the system memory, and corresponding second threshold number of thumbnails are generated. And when the thumbnails in the current system memory cannot meet the display requirement, dynamically loading corresponding original pictures according to the actual loading requirement to generate new thumbnails with a second threshold value based on the switching condition of the thumbnails by the user. Therefore, the method and the device have the advantages that the original pictures are loaded in sections to generate the thumbnails, excessive occupation of a processor and an internal memory caused by loading a large number of original pictures to generate the thumbnails at one time is avoided, and the loading and displaying efficiency of the thumbnails is improved.
Further, according to the technical scheme of the invention, after the thumbnail is generated each time, the generated thumbnail is stored in the local storage device of the computing device, so that when the thumbnails need to be displayed again, the thumbnails can be directly loaded from the local storage device without loading the original picture again to generate the thumbnail. Therefore, the original pictures are prevented from being loaded in batch and processed every time the thumbnails are displayed, the time for loading and processing the original pictures is saved, and the efficiency of loading and displaying the thumbnails is further improved.
In addition, the invention also controls the total number of the thumbnails loaded in the system memory not to exceed the preset number, thus ensuring that the loaded thumbnails do not occupy larger space of the system memory and being beneficial to reducing the occupied space of the memory.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention; and
fig. 2 shows a flow diagram of a picture display method 200 according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic block diagram of an example computing device 100.
As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (UP), a microcontroller (UC), a digital information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 can be arranged to execute instructions on an operating system with program data 124 by one or more processors 104.
Computing device 100 also includes a storage device 132, storage device 132 including removable storage 136 and non-removable storage 138.
Computing device 100 may also include a storage interface bus 134. The storage interface bus 134 enables communication from the storage devices 132 (e.g., removable storage 136 and non-removable storage 138) to the basic configuration 102 via the bus/interface controller 130. At least a portion of the operating system 120, applications 122, and data 124 may be stored on removable storage 136 and/or non-removable storage 138, and loaded into system memory 106 via storage interface bus 134 and executed by the one or more processors 104 when the computing device 100 is powered on or the applications 122 are to be executed.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in a manner that encodes information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a personal computer including both desktop and notebook computer configurations. Of course, computing device 100 may also be implemented as part of a small-form factor portable (or mobile) electronic device such as a cellular telephone, a digital camera, a Personal Digital Assistant (PDA), a personal media player device, a wireless web-watch device, a personal headset, an application specific device, or a hybrid device that include any of the above functions. And may even be implemented as a server, such as a file server, a database server, an application server, a WEB server, and so forth. The embodiments of the present invention are not limited thereto.
In an embodiment according to the invention, the computing device 100 is configured to perform a picture display method 200 according to the invention. Among other things, the application 122 of the computing device 100 includes a plurality of program instructions for executing the picture display method 200 according to the present invention.
Fig. 2 shows a flow diagram of a picture display method 200 according to an embodiment of the invention.
It should be noted that, in the embodiment according to the present invention, one or more applications suitable for displaying pictures reside in the computing device 100, and the applications may load the pictures stored locally in the computing device 100 for presentation, such as a photo album; the application may also request a server to obtain a network picture for presentation, such as various browsers. When the application is used for displaying the pictures, the pictures are previewed in the form of thumbnails initially, namely, the thumbnails corresponding to the multiple pictures are displayed.
As described above with reference to FIG. 1, system memory 106 and storage device 132 are included in computing device 100. System memory 106 is a storage device that is relatively fast to access and loses its stored content when the computing device is powered down, and is therefore also referred to as memory. The storage device 132 has a low access speed, but has a large capacity and is a nonvolatile storage device, i.e., data can still be retained without loss after the computing device is powered off, and therefore is also referred to as an external storage device (e.g., a hard disk, etc.) of the computing device. After the computing device 100 is powered up, the contents of the application are typically loaded from the storage device 132 into the system memory 106, and then the processor is utilized to execute the instructions of the application to complete the operation of the application. In addition, the same is true of data (e.g., pictures) in the application, and some data that needs to be retained for a long time or cached for a long time may be stored in the storage device 132. While intermediate data that is needed during application execution (data that is no longer needed at application restart) may be stored in system memory 106 to facilitate the application obtaining such intermediate data at a faster rate.
According to one embodiment, the computing device 100 is adapted to present on its screen a thumbnail corresponding to the first threshold number of pictures. Here, the present invention does not limit the specific numerical value of the first threshold, and the first threshold may be determined according to the size of the area for displaying the picture on the screen and the size of the thumbnail.
As shown in fig. 2, the method 200 begins at step S210.
In step S210, a first threshold number of pictures to be displayed is determined, and the pictures to be displayed, a total of a second threshold number of pictures before and after the pictures to be displayed are loaded to the system memory 106 of the computing device. Here, the loaded picture refers to an original-sized picture. The first threshold number of pictures to be displayed is determined, for example, when the application is started, and the first threshold number of pictures to be displayed is a picture corresponding to a first threshold number of thumbnails currently suitable for being displayed on the screen, and the first threshold number of pictures to be displayed will be displayed in a preview manner in the form of thumbnails. It should be further noted that the second threshold is greater than the first threshold, that is, the number of pictures loaded is greater than the number of pictures to be displayed when the pictures are initially loaded, and the loaded second threshold number of pictures includes not only the first threshold number of pictures to be displayed, but also a plurality of pictures before and after the first threshold number of pictures to be displayed.
In one embodiment, the first threshold is, for example, 20, and the second threshold is, for example, 50, although the invention is not limited to this particular value.
It should be noted that the computing device may display a plurality of pictures arranged based on a predetermined sequence, and the sources of the plurality of pictures are not limited in the present invention, and the pictures may be pictures stored locally in the computing device, or network pictures stored in a network server.
In one embodiment, the storage device 132 of the computing device has stored therein a plurality of original-sized pictures (hereinafter referred to simply as "original pictures"), which are arranged based on a predetermined order, and which are initially adapted to be displayed in thumbnail form on the screen of the computing device. An application in the computing device (an application adapted to display pictures) may then process the original picture by loading one or more original pictures in the storage device 132 into the system memory 106, for example, cropping the original picture to obtain a thumbnail corresponding to the original picture, so as to present a plurality of thumbnails corresponding to the plurality of original pictures on a screen of the computing device.
In one embodiment, prior to loading the original pictures, computing device 100 obtains paths for all original pictures suitable for display in an application of the computing device and stores the paths for all original pictures in system memory 106. In this way, when a picture is loaded, the corresponding original picture may be loaded to system memory 106 based on the picture path in system memory 106.
Subsequently, in step S220, the loaded second threshold number of original pictures are processed so as to generate corresponding second threshold number of thumbnails based on the second threshold number of original pictures. Here, the processing of the original picture is a process of performing cropping processing on the original picture to generate a thumbnail of a predetermined resolution. A first threshold number of thumbnails, including within the second threshold number of thumbnails, corresponding to the first threshold number of pictures to be displayed are then displayed on the screen of the computing device. It should be noted that the generated second threshold number of thumbnails are arranged in the system memory based on the arrangement order of the original pictures, and the presented first threshold number of thumbnails are also presented on the screen based on the arrangement order of the corresponding first threshold number of original pictures. That is, the arrangement order of the thumbnails and the presentation order on the screen are kept consistent with the arrangement order of the original pictures.
According to the embodiment of the present invention, after the second threshold number of original pictures are processed to generate the corresponding second threshold number of thumbnails, step S230 is further executed. In step S230, the generated second threshold number of thumbnails is stored to the storage device 132 of the computing device. Here, by loading the original picture and storing the thumbnail obtained by processing the original picture in the storage device 132 local to the computing device, when the thumbnail needs to be displayed next time, the thumbnail in the storage device 132 can be directly loaded to the system memory 106, and then the thumbnail can be displayed without loading the original picture again and processing the original picture to generate the thumbnail. Therefore, the original pictures are prevented from being loaded in batches and processed every time the thumbnails are displayed, the time for loading and processing the original pictures is saved, and the thumbnail loading and displaying efficiency is improved.
Specifically, after determining the first threshold number of pictures to be displayed in step S210, it is first determined whether the storage device 132 includes thumbnails corresponding to the pictures to be displayed, the pictures before the pictures to be displayed, and the pictures after the pictures to be displayed, and if so, the thumbnails in the storage device 132 of the second threshold number of pictures are directly loaded into the system memory 106, without loading and processing the original pictures to generate thumbnails. If not, the original picture needs to be loaded into system memory 106 and processed to generate a thumbnail.
In one embodiment, when storing the thumbnail to the storage device 132, the thumbnail is stored to the storage device by determining the MD5 Value of the picture file corresponding to the thumbnail, and then, using the MD5 Value of the picture file as a key Value and the thumbnail as a Value.
Subsequently, in step S240, in response to a switching operation of the thumbnails by the user, such as a sliding operation, a clicking operation, or the like, a new first threshold number of thumbnails to be displayed is determined based on the switching operation, and the new first threshold number of thumbnails are displayed on the screen of the computing device.
It should be noted that the system memory 106 of the computing device stores the second threshold number of pre-loaded thumbnails, and the first threshold number of thumbnails is initially displayed. When the user switches the thumbnail display, the second threshold number of thumbnails in system memory 106 may include a new first threshold number of thumbnails to be displayed, so that the new first threshold number of thumbnails may be displayed directly.
According to one embodiment, after the respective second threshold number of thumbnails are initially generated (in step S220), the current index value (i.e., the initial index value) corresponding to each thumbnail is also determined based on the arrangement order of the second threshold number of original pictures. Here, the generated arrangement order of the second threshold number of thumbnails is kept consistent with the arrangement order of the original pictures, that is, the thumbnails arranged earlier have smaller index values and thumbnails arranged later have larger index values, based on the predetermined order arrangement.
For example, in a second threshold number of thumbnails arranged based on a predetermined order, the current index value corresponding to the first thumbnail is 1, and the current index value corresponding to the last thumbnail is the second threshold. That is to say, in the initially generated thumbnails with the second threshold, the minimum current index value is 1, the maximum current index value is the second threshold, the value range of the current index value is [1, the second threshold ], and the index value is an integer. In other words, the current index values corresponding to the initially generated second threshold number of thumbnails are {1,2,3, … second threshold }, respectively.
When the first threshold number of thumbnails are displayed on the screen of the computing device, the first threshold number of thumbnails are also displayed based on the size sequence of the current index value corresponding to each thumbnail, namely, the index value corresponding to the thumbnail arranged more front is smaller, and the index value corresponding to the thumbnail arranged more back is larger.
According to one embodiment, when the new first threshold number of thumbnails displayed on the screen of the computing device includes a thumbnail with the smallest current index value, that is, the first thumbnail of the second threshold number of thumbnails initially generated and arranged based on a predetermined order has been presented on the screen, since there is no thumbnail in front of the thumbnail with the smallest index value, in this case, the corresponding original picture is loaded as needed to generate a plurality of thumbnails in front of the thumbnail with the smallest current index value.
Specifically, a second threshold number of original pictures before the original picture corresponding to the thumbnail with the minimum current index value are loaded to the system memory 106 based on the corresponding picture path in the system memory 106, and a new second threshold number of thumbnails before the thumbnail with the minimum current index value are generated based on the newly loaded second threshold number of original pictures, that is, the original pictures are cropped to generate thumbnails with a predetermined resolution. In this way, one or more thumbnails before the thumbnail with the smallest current index value can be displayed on the screen of the computing device based on the switching operation of the thumbnails by the user. It should be noted that, the newly generated second threshold number of thumbnails is also stored in the storage device, so that the thumbnails can be directly loaded from the storage device when the thumbnails are displayed next time.
In one embodiment, when the new first threshold number of thumbnails displayed on the screen of the computing device include thumbnails with the smallest current index value, a second threshold value is added to the current index value of each thumbnail, and new index values are generated, i.e., corresponding new index values are respectively generated for the initially generated second threshold number of thumbnails. It should be understood that the new index value intervals corresponding to the initially generated second threshold number of thumbnails are [1+ second threshold, second threshold x 2], that is, the new index values corresponding to the initially generated second threshold number of thumbnails are {1+ second threshold, 2+ second threshold, 3+ second threshold, … second threshold x 2}, respectively.
After generating a second threshold number of thumbnails before the thumbnail with the smallest current index value, determining the index value corresponding to each thumbnail (newly generated thumbnail) before the thumbnail with the smallest current index value. Here, the range of the index value corresponding to the newly generated thumbnail is [1, second threshold ], that is, the index values corresponding to the newly generated thumbnails of the second threshold are {1,2,3, … second threshold }, respectively.
According to one embodiment, when a new first threshold number of thumbnails displayed on a screen of a computing device includes a thumbnail with a largest current index value, that is, the last thumbnail in a second threshold number of thumbnails initially generated and arranged based on a predetermined order has been presented on the screen, since there is no thumbnail behind the thumbnail with the largest index value, in this case, the corresponding original pictures are loaded as needed to generate a plurality of thumbnails behind the thumbnail with the largest current index value.
Specifically, based on the corresponding picture path in the system memory 106, the second threshold number of original pictures after the original picture corresponding to the thumbnail with the largest current index value are loaded into the system memory 106, and based on the newly loaded second threshold number of original pictures, new second threshold number of thumbnails after the thumbnail with the largest current index value are generated, that is, the original pictures are subjected to cropping processing to generate thumbnails with a predetermined resolution. In this way, one or more thumbnails subsequent to the thumbnail with the largest current index value may be displayed on the screen of the computing device based on a user's switching operation of the thumbnails. It should be noted that the newly generated second threshold number of thumbnails is also stored in the storage device so that the thumbnails can be loaded directly from the storage device the next time they are displayed. That is, each time a thumbnail is generated, the generated thumbnail is stored in a storage device local to the computing device for the next direct load display.
In one embodiment, after generating a second threshold number of thumbnails following the thumbnail with the largest current index value, the index value corresponding to each thumbnail (newly generated thumbnail) following the thumbnail with the largest current index value is determined. Here, the range of the index values corresponding to the thumbnails subsequent to the thumbnail having the largest current index value is [1+ second threshold, second threshold x 2], that is, the index values corresponding to the newly generated second threshold thumbnails are {1+ second threshold, 2+ second threshold, 3+ second threshold, … second threshold x 2}, respectively.
In an embodiment according to the present invention, each time the second threshold number of original pictures are loaded into the system memory 106 (including the initially loaded second threshold number of original pictures and the subsequently loaded new second threshold number of original pictures), a previous part of the second threshold number of original pictures (e.g., the first 25 pictures) may be loaded based on the first thread, and a subsequent part of the second threshold number of original pictures (e.g., the second 25 pictures) may be loaded based on the second thread. Therefore, the two threads are used for loading a part of original pictures respectively, and the loading efficiency is improved.
In an embodiment according to the present invention, after each time a second threshold number of original pictures are loaded into the system memory 106 and a corresponding second threshold number of thumbnails are generated based on the second threshold number of original pictures, the number of thumbnails currently stored in the system memory 106 is also determined, it is determined whether the number of thumbnails exceeds a predetermined number, and if the number of thumbnails exceeds the predetermined number, the first loaded and generated second threshold number of thumbnails is deleted. Here, the present invention does not limit the specific number of the predetermined number, and the predetermined number may be determined based on the specific configuration of the system memory. In one embodiment, the predetermined number is, for example, 300.
It should be appreciated that the present invention loads or generates only the second threshold number of thumbnails to the system memory at a time, and further controls the total number of thumbnails loaded in the system memory 106 to not exceed the predetermined number, which ensures that the loaded thumbnails do not occupy a large space in the system memory 106, and is beneficial to reducing the memory footprint.
According to the picture display method 200 of the present invention, when displaying a plurality of thumbnails (e.g., a first threshold number), only a second threshold number of pictures, which is greater than the first threshold number, is initially loaded into the system memory, e.g., the second threshold number of original pictures is loaded to generate the corresponding thumbnail. And when the thumbnails in the current system memory cannot meet the display requirement, dynamically loading corresponding original images according to the actual loading requirement based on the switching condition of the thumbnails by the user, and generating new thumbnails with a second threshold value. Therefore, the original pictures are loaded and the thumbnails are generated based on the batch, excessive occupation of a processor and an internal memory caused by loading a large number of all original pictures and generating the thumbnails at one time is avoided, and the thumbnail loading and displaying efficiency is improved.
Further, after the thumbnail is generated each time, the generated thumbnail is stored in a local storage device of the computing device, so that when the thumbnails need to be displayed again, the thumbnails can be directly loaded from the local storage device and displayed without loading the original picture again to generate the thumbnail. Therefore, the original pictures are prevented from being loaded in batch and processed every time the thumbnails are displayed, the time for loading and processing the original pictures is saved, and the efficiency of loading and displaying the thumbnails is further improved.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the multilingual spam-text recognition method of the present invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (5)

1. A picture display method, executed in a computing device comprising a system memory and a storage device, one or more applications in the computing device being adapted to present a plurality of pictures arranged based on a predetermined order, wherein the applications are adapted to fetch the pictures for presentation from the computing device locally or from a server, wherein the computing device is adapted to present thumbnails of a first threshold number of pictures on a screen of the computing device, the method comprising:
obtaining paths of all pictures suitable for displaying in an application of a computing device, and storing the paths of all pictures in a system memory of the computing device;
determining a first threshold number of pictures to be displayed, wherein the first threshold number of pictures to be displayed are pictures corresponding to a first threshold number of thumbnails suitable for being displayed on the screen;
judging whether the storage equipment comprises the to-be-displayed picture, and thumbnails corresponding to a total number of second threshold pictures before and after the to-be-displayed picture;
if so, directly loading a second threshold number of thumbnails in the storage device to a system memory;
if not, loading the picture to be displayed, a total second threshold number of pictures before the picture to be displayed and after the picture to be displayed to a system memory of a computing device based on a picture path in the system memory, the second threshold being greater than the first threshold;
generating corresponding second threshold value thumbnails based on the second threshold value pictures, determining a current index value corresponding to each thumbnail based on the arrangement sequence of the second threshold value pictures, and displaying first threshold value thumbnails corresponding to the first threshold value pictures to be displayed on a screen of a computing device based on the size sequence of the current index value corresponding to each thumbnail;
storing the generated second threshold number of thumbnails to a storage device of the computing device;
determining the current number of thumbnails in a system memory, and deleting the first generated second threshold number of thumbnails if the number of thumbnails exceeds a predetermined number; and
in response to the switching operation of the user on the thumbnails, determining new first threshold thumbnails to be displayed, and displaying the new first threshold thumbnails on a screen of the computing device;
when the new first threshold number of thumbnails displayed on the screen of the computing device includes a thumbnail with the smallest current index value:
adding a second threshold value to the current index value of each thumbnail to generate a new index value;
loading a second threshold number of pictures before the picture corresponding to the thumbnail with the minimum current index value into a system memory based on the picture path in the system memory, generating a second threshold number of thumbnails before the thumbnail with the minimum current index value based on the second threshold number of pictures, and determining an index value corresponding to each generated thumbnail for displaying on a screen of a computing device.
2. The method of claim 1, wherein the current index value is a minimum of 1 and a maximum of a second threshold.
3. The method of claim 1, wherein when the new first threshold number of thumbnails displayed on the screen of the computing device includes a thumbnail with a largest current index value, further comprising the steps of:
loading a second threshold number of pictures after the picture corresponding to the thumbnail with the maximum current index value to a system memory;
generating, based on the second threshold number of pictures, a second threshold number of thumbnails subsequent to the thumbnail with the largest current index value for display on a screen of a computing device;
and determining the index value corresponding to each thumbnail after the thumbnail with the maximum current index value.
4. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-3.
5. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-3.
CN202011143318.7A 2020-10-23 2020-10-23 Picture display method and computing device Active CN111966262B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011143318.7A CN111966262B (en) 2020-10-23 2020-10-23 Picture display method and computing device
CN202210126246.8A CN114371798A (en) 2020-10-23 2020-10-23 Picture display method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011143318.7A CN111966262B (en) 2020-10-23 2020-10-23 Picture display method and computing device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210126246.8A Division CN114371798A (en) 2020-10-23 2020-10-23 Picture display method and computing device

Publications (2)

Publication Number Publication Date
CN111966262A CN111966262A (en) 2020-11-20
CN111966262B true CN111966262B (en) 2022-03-18

Family

ID=73387218

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202011143318.7A Active CN111966262B (en) 2020-10-23 2020-10-23 Picture display method and computing device
CN202210126246.8A Pending CN114371798A (en) 2020-10-23 2020-10-23 Picture display method and computing device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210126246.8A Pending CN114371798A (en) 2020-10-23 2020-10-23 Picture display method and computing device

Country Status (1)

Country Link
CN (2) CN111966262B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407087B (en) * 2021-08-23 2022-04-01 成都统信软件技术有限公司 Picture processing method, computing device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794567A (en) * 2010-02-10 2010-08-04 中兴通讯股份有限公司 Method and terminal for loading pictures
CN108255941A (en) * 2017-12-08 2018-07-06 佛吉亚好帮手电子科技有限公司 A kind of method of the raising picture loading velocity of low EMS memory occupation

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768662B (en) * 2011-05-05 2016-02-10 阿里巴巴集团控股有限公司 A kind of method and apparatus Loaded Image
CN102629254A (en) * 2012-02-29 2012-08-08 惠州市德赛西威汽车电子有限公司 Method for rapidly reading pictures
US8983237B2 (en) * 2012-08-22 2015-03-17 Adobe Systems Incorporated Non-destructive collaborative editing
CN104793945B (en) * 2015-04-27 2018-03-13 深圳市美贝壳科技有限公司 The high-volume image display method and its device for preventing internal memory from overflowing
CN105335526A (en) * 2015-12-04 2016-02-17 北京京东尚科信息技术有限公司 Image loading method and device
CN105653135B (en) * 2015-12-31 2019-02-19 北京金山安全软件有限公司 Picture display method and device and electronic equipment
CN105843517A (en) * 2016-03-14 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal total graph displaying method and system
CN110058764A (en) * 2016-03-21 2019-07-26 青岛海信移动通信技术股份有限公司 A kind of picture loading method, device and terminal
CN106681667B (en) * 2017-01-09 2020-07-17 北京安云世纪科技有限公司 Picture display method and device and mobile terminal
CN106940722B (en) * 2017-03-16 2020-07-10 海信视像科技股份有限公司 Picture display method and device
CN109271543B (en) * 2018-09-26 2021-03-26 Oppo广东移动通信有限公司 Thumbnail display method and device, terminal and computer-readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794567A (en) * 2010-02-10 2010-08-04 中兴通讯股份有限公司 Method and terminal for loading pictures
CN108255941A (en) * 2017-12-08 2018-07-06 佛吉亚好帮手电子科技有限公司 A kind of method of the raising picture loading velocity of low EMS memory occupation

Also Published As

Publication number Publication date
CN111966262A (en) 2020-11-20
CN114371798A (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN112000417B (en) Control method for window display effect and computing device
CN112328925B (en) Page data loading method, device, equipment and storage medium
CN112765108B (en) Document loading method, computing device and readable storage medium
CN110609718A (en) Picture loading method and device, electronic equipment and readable storage medium
CN111966262B (en) Picture display method and computing device
CN114416252A (en) Window display method and device, computing equipment and storage medium
CN110209447A (en) A kind of list page data display method and list page data presentation device
CN111507067A (en) Acquisition method for displaying formula picture, and method and device for transferring formula picture
CN113742297A (en) File preview method, computing device and storage medium
CN111414383B (en) Data request method, data processing system and computing device
CN110598026B (en) Display method and device of picture list and terminal equipment
CN114422502B (en) Resource downloading method, computing device and storage medium
CN107508705B (en) Resource tree construction method of HTTP element and computing equipment
CN113312130B (en) Window display method and computing device
CN114546678A (en) Method for copying and pasting data, computing equipment and readable storage medium
CN115016717A (en) Address bar-based interaction method and computing device
CN114510306B (en) Taskbar display method and device and computing equipment
CN114510457A (en) File positioning display method, computing device and storage medium
CN113741777B (en) Method for opening file based on drag operation, computing device and storage medium
CN114884974B (en) Data multiplexing method, system and computing device
CN113360634B (en) Keyword searching method, computing device and storage medium
CN113655941B (en) Text content full selection method, apparatus, computing device and readable storage medium
CN112269538B (en) Data reading method, device, equipment and medium
CN113127123B (en) Window effect generation method and computing device
CN116506421A (en) File downloading method, system, computing device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant