CN110647702B - Picture preloading method and device, electronic equipment and readable medium - Google Patents
Picture preloading method and device, electronic equipment and readable medium Download PDFInfo
- Publication number
- CN110647702B CN110647702B CN201910867088.XA CN201910867088A CN110647702B CN 110647702 B CN110647702 B CN 110647702B CN 201910867088 A CN201910867088 A CN 201910867088A CN 110647702 B CN110647702 B CN 110647702B
- Authority
- CN
- China
- Prior art keywords
- picture
- target picture
- reduced
- target
- loading
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000012545 processing Methods 0.000 claims abstract description 57
- 230000008569 process Effects 0.000 claims abstract description 25
- 230000004044 response Effects 0.000 claims abstract description 11
- 238000004590 computer program Methods 0.000 claims description 14
- 230000009467 reduction Effects 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 11
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000036316 preload Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000036651 mood Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
- Image Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the disclosure discloses a picture preloading method and device, electronic equipment and a readable medium. The method comprises the following steps: in response to the target picture viewing event, preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture; loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture; and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying. By adopting the technical scheme provided by the embodiment of the disclosure, the aim of displaying the dynamic fuzzy effect of the reduced picture for the user in the loading process of the target picture can be achieved.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of picture processing, and in particular relates to a picture preloading method, a picture preloading device, an electronic device and a readable medium.
Background
At present, with the gradually strong functions of the intelligent mobile terminal, the functions are integrated into the lives of the vast users. The user can browse information through various application programs or webpage pages of the intelligent terminal, and the effect that the user can know the things in the day without going out can be achieved. In the case of various page views by a user, page contents often include a text part and a picture part. For the text part, the loading can be completed quickly because the data transmission quantity is small. For the picture part, because the data transmission quantity is large, the loading is generally not completed at the moment of opening the page, and if the network condition of the mobile terminal is not good, the loading is often performed for a long time. However, for the reading of the page content by the user, the picture loading is stuck, which affects the browsing experience of the user and even generates a boring mood. Therefore, how to provide a smooth picture loading manner for a user in a picture loading process has become a technical problem that needs to be solved by people in the industry urgently.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for preloading pictures, electronic equipment and a readable medium, so as to achieve the purpose of displaying the dynamic fuzzy effect of a reduced picture for a user in the loading process of a target picture.
In a first aspect, an embodiment of the present disclosure provides a method for preloading a picture, where the method includes:
in response to a target picture viewing event, preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying.
Optionally, the blurring processing and displaying the reduced picture according to the loading progress of the target picture includes:
acquiring the loading progress of the target picture;
and determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture.
Optionally, obtaining the loading progress of the target picture includes:
and determining the loading progress of the target picture by calling the data loading amount of the target picture assembly and the total data amount of the target picture.
Optionally, determining a gaussian blur degree parameter according to the loading progress, and performing gaussian blur processing on the reduced picture according to the determined gaussian blur degree parameter and displaying the reduced picture, including:
determining that the fuzzy radius is gradually reduced according to the gradual increase of the loading progress, so that the result of the fuzzy processing on the reduced picture is from fuzzy to clear and is displayed;
or,
and determining that the fuzzy degree is gradually reduced according to the gradual increase of the loading progress, so that the fuzzy processing result of the reduced picture is from fuzzy to clear and is displayed.
Optionally, before preloading the reduced picture of the target picture from the storage end of the target picture, the method further includes:
and sending a reduced picture acquisition request of the target picture to a storage terminal of the target picture so as to receive data of the reduced picture.
Optionally, after sending the request for obtaining the reduced picture of the target picture to the storage of the target picture, the method further includes:
and if the information that the reduced picture does not exist is returned by the storage end of the target picture, sending a reduced picture generation request of the target picture to the storage end of the target picture, so that the storage end of the target picture performs resolution reduction processing on the target picture based on the generation request, and returning the data of the obtained reduced picture.
In a second aspect, an embodiment of the present disclosure further provides an apparatus for preloading pictures, where the apparatus includes:
the reduced picture preloading module is used for responding to the target picture viewing event and preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
the process display module is used for loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
and the target picture display module is used for replacing the blurred reduced picture with the target picture for displaying if the target picture is loaded.
Optionally, the process display module is specifically configured to:
acquiring the loading progress of the target picture;
and determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture.
In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements a method for preloading pictures according to an embodiment of the present disclosure when executing the computer program.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for preloading pictures according to the embodiments of the present disclosure.
According to the technical scheme provided by the embodiment of the disclosure, in response to a target picture viewing event, a reduced picture of a target picture is preloaded from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture; loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture; and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying. By adopting the technical scheme provided by the disclosure, the aim of displaying the dynamic fuzzy effect of the reduced picture for the user in the loading process of the target picture can be fulfilled.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flowchart of a method for preloading pictures provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for preloading pictures provided by an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an apparatus for preloading pictures according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a method for preloading pictures provided by an embodiment of the present disclosure, where the present embodiment is applicable to a situation where page content on an electronic device is loaded and displayed, and the method may be executed by an apparatus for preloading pictures provided by an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware, and may be integrated in an electronic device such as an intelligent terminal.
As shown in fig. 1, the method for preloading pictures includes:
s110, responding to a target picture viewing event, and preloading a reduced picture of the target picture from a storage terminal of the target picture; and the reduced picture of the target picture is obtained by reducing the resolution of the target picture.
When a user opens a page through the intelligent terminal, if the page contains a picture, the user can determine that the user needs to view the picture in the page, and then the user can determine that the user needs to view the picture as a target picture viewing event. Since the page is opened based on the network support, the target picture is loaded through the network, in this case, if the user opens the page, the text content is displayed completely, and the picture cannot be loaded completely in time, the page picture loading is blocked. For example, only a small area on the top of a picture is displayed, and a small area can be loaded again after a long time, which is very bad for the user's page browsing experience, and if picture information is important, the user can only wait for the picture loading to complete to browse the picture information, which affects the user's page browsing time.
In order to solve the problem, the method and the device adopt the mode that when a target picture viewing event is responded, the reduced picture of the target picture is preloaded from the storage end of the target picture. The storage end of the target picture may be a server, or may be a picture storage location of other local devices. After a user opens a certain page, if a picture exists in the page, the server often returns a picture link through a network, and the picture link can point to a storage position of the picture and can be used for the terminal to load the picture. In the technical scheme, whether a reduced picture exists in the storage position of the target picture can be determined in the process of loading the target picture or loading the target picture, and if yes, the reduced picture can be preloaded. And the reduced picture of the target picture is obtained by reducing the resolution of the target picture. For example, the resolution of the original picture is 1080P, and the resolution of the downscaled picture may be 270P. The advantage of this arrangement is that the effect of quickly displaying the picture content in the page can be achieved by preloading the reduced pictures.
S120, loading the target picture; and carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture.
Since the resolution of the reduced picture is reduced, the picture content therein is blurred or the picture information is lost, and if the user needs a relatively clear picture content, preloading the reduced picture cannot meet the user's needs. Therefore, the target picture can be loaded in the preloading process or after the preloading is finished. In the technical solution, the blur processing may be performed on the reduced picture according to the loading progress of the target picture, for example, as the loading progress of the target picture changes, the sharpness of the blur processing of the reduced picture also changes, for example, from very blurred to gradual sharp, or from a larger blur radius to a smaller blur radius. The algorithm for blurring the reduced picture may be gaussian blur, mean blur, median blur, and the like. Therefore, in the loading process of the target picture, the dynamic fuzzy effect of the reduced picture can be displayed for the user, the display of the picture information is accelerated on the premise that the user browses the whole content of the page, and the target picture is loaded so as to meet the requirement of the user on detailed browsing of the picture information.
In the technical scheme, in the process of loading the target picture, the reduced picture can be subjected to fuzzy processing and displayed according to the loading progress of the target picture. The fuzzy processing has the advantages that the fuzzy processing parameters can be controlled, the reduced picture is displayed to the user from fuzzy to clear, the user can perceive the content of the current picture or the loaded picture, and the effect of dynamic display of the picture is achieved.
And S130, if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying.
And when the target picture is detected to be loaded completely, replacing the blurred reduced picture with the target picture for displaying. Through the replacement operation, the originally fuzzy picture can be replaced by a clear picture for the user to view.
In this embodiment, optionally, before preloading a reduced picture of a target picture from a storage end of the target picture, the method further includes: and sending a reduced picture acquisition request of the target picture to a storage terminal of the target picture so as to receive data of the reduced picture. The reduced picture can be loaded from the storage end of the target picture in a form of sending a reduced picture acquisition request of the target picture to the storage end of the target picture. The target picture storage end simultaneously has the target picture and the reduced picture of the target picture. If the target picture is directly recorded, the problem that the user is delayed in viewing the picture in the page can be caused, so that the request for obtaining the reduced picture can be preferentially sent before the target picture is loaded, the reduced picture is provided by the storage terminal for the terminal equipment to pre-load and display, and the purpose that the rough content of the picture in the page can be quickly provided for the user is achieved.
According to the technical scheme provided by the embodiment of the disclosure, in response to a target picture viewing event, a reduced picture of a target picture is preloaded from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture; loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture; and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying. By adopting the technical scheme provided by the disclosure, the aim of displaying the dynamic fuzzy effect of the reduced picture for the user in the loading process of the target picture can be fulfilled.
On the basis of the above technical solution, optionally, the blurring processing and displaying the reduced picture according to the loading progress of the target picture includes: acquiring the loading progress of the target picture; and determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture. Wherein the loading progress of the target picture can be represented by a percentage of loading, for example, 10%, 20%, and so on. In the scheme, the fuzzy degree parameter can be set to include 3-10 levels, and the fuzzy degree parameter is correspondingly reduced when the loading progress of the target picture is increased. Therefore, the process that the picture is blurred to be clear can be reduced along with the loading of the target picture, and the use experience of a user in the process of browsing the page can be improved.
On the basis of the above technical solutions, optionally, the obtaining of the loading progress of the target picture includes: and determining the loading progress of the target picture by calling the data loading quantity of the target picture assembly and the total data quantity of the target picture. The target picture component can be a component used for loading the target picture and displaying the target picture on a page. The text and pictures in the page may be loaded and displayed by different components. In this embodiment, the component describing the reduced picture may be a target picture component, or a reduced picture component having the same display position and range in the page as the target picture component may be separately constructed. Wherein the reduced picture assembly acts as a subcomponent of the target picture assembly such that the display of the reduced picture assembly content can be canceled after the target picture assembly loading is complete. Additionally, the target picture element can also be a subcomponent of the reduced picture element, such that the display of the reduced picture element content can be overlaid after the target picture element has been loaded. The technical scheme has the advantage that the effect of monitoring the loading progress of the target picture component can be achieved.
On the basis of the foregoing technical solutions, optionally, determining a gaussian blur degree parameter according to the loading progress, and performing gaussian blur processing on the reduced picture according to the determined gaussian blur degree parameter and displaying the reduced picture, including: determining that the fuzzy radius is gradually reduced according to the gradual increase of the loading progress, so that the result of the fuzzy processing on the reduced picture is from fuzzy to clear and is displayed; or determining that the blurring degree is gradually reduced according to the gradual increase of the loading progress, so that the blurring processing result of the reduced picture is from blurring to being clear and is displayed. For the control of the fuzzy degree, the fuzzy radius can be controlled to be gradually reduced to enable the display of the reduced picture to be gradually clear. The blur level parameter may also be controlled to determine. For example, through gaussian blur, the magnitude of each weight in the convolution matrix can be determined to determine the degree parameter of gaussian blur. According to the technical scheme, the dynamic display process from blurring to clearness can be carried out on the reduced picture in the target picture loading process through the arrangement, the phenomenon of pause can not occur, and the browsing experience of a user on the page is improved.
Fig. 2 is a flowchart of a method for preloading pictures according to an embodiment of the present disclosure. On the basis of the scheme, the scheme is specifically optimized as follows: after sending the reduced picture acquisition request of the target picture to the storage terminal of the target picture, the method further comprises: if the information that the reduced picture does not exist is returned by the storage end of the received target picture, sending a reduced picture generation request of the target picture to the storage end of the target picture, so that the storage end of the target picture performs resolution reduction processing on the target picture based on the generation request, and returning the data of the obtained reduced picture.
As shown in fig. 2, the method for preloading pictures includes:
s210, responding to a target picture viewing event, and sending a reduced picture acquisition request of the target picture to a storage terminal of the target picture; and performs S220 or S230.
After detecting the target picture viewing event, the intelligent terminal can send a reduced picture acquisition request of the target picture to the storage terminal of the target picture, and further determine which specific flow in the following branches goes to according to data returned by the storage terminal.
S220, if the information that the reduced picture does not exist is returned by the storage end of the target picture, sending a reduced picture generation request of the target picture to the storage end of the target picture, so that the storage end of the target picture performs resolution reduction processing on the target picture based on the generation request, and returning the data of the obtained reduced picture.
If the information of the reduced picture does not exist in the received data display storage end, a reduced picture generation request of the target picture can be further sent to the storage end of the target picture, so that the storage end of the target picture performs resolution reduction processing on the target picture based on the generation request, and returns the obtained data of the reduced picture. The technical scheme is suitable for the condition that only the target picture exists in the storage terminal, and under the condition, the reduced picture can be generated and preloaded when the target picture is accessed for the first time. And reserving the reduced picture at a storage end for preloading use of the intelligent terminal in the subsequent target picture browsing process.
And S230, if the data of the reduced picture is received, loading the obtained reduced picture.
If the data of the reduced picture can be received, the reduced picture can be completely loaded to achieve the purpose of preloading.
S240, loading the target picture; and carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture.
And S250, if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying.
The present embodiment provides a scheme for determining whether to send a reduced picture generation request to the storage side of the target picture according to the received content on the basis of the above-mentioned embodiments, and by such a setting, an effect that a reduced picture can be generated based on the target picture when the storage side first accepts access can be achieved.
Fig. 3 is a schematic structural diagram of an apparatus for preloading pictures according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus includes:
a reduced picture preloading module 310, configured to preload a reduced picture of a target picture from a storage of the target picture in response to a target picture viewing event; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
a process display module 320, configured to load the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
and a target picture display module 330, configured to replace the blurred reduced picture with the target picture for display if the target picture is loaded.
According to the technical scheme provided by the embodiment of the disclosure, in response to a target picture viewing event, a reduced picture of a target picture is preloaded from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture; loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture; and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying. By adopting the technical scheme provided by the disclosure, the aim of displaying the dynamic fuzzy effect of the reduced picture for the user in the loading process of the target picture can be fulfilled.
On the basis of the above technical solution, optionally, the process display module is specifically configured to:
acquiring the loading progress of the target picture;
and determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture.
The product can execute the method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. Referring now to FIG. 4, a block diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 406 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 406 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 409, or from the storage means 406, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform: in response to a target picture viewing event, preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture; loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture; and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, [ example one ] there is provided a method of picture preloading, the method comprising:
in response to a target picture viewing event, preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
and if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying.
According to one or more embodiments of the present disclosure, an [ example two ] provides a method for preloading a picture, in which a reduced picture is blurred and displayed according to a loading progress of a target picture, the method including:
acquiring the loading progress of the target picture;
and determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture.
According to one or more embodiments of the present disclosure, [ example three ] there is provided a method for preloading pictures, acquiring a loading progress of the target picture, including:
and determining the loading progress of the target picture by calling the data loading amount of the target picture assembly and the total data amount of the target picture.
According to one or more embodiments of the present disclosure, an [ example four ] provides a method for preloading a picture, wherein a gaussian blur degree parameter is determined according to the loading progress, and the reduced picture is subjected to gaussian blur processing and displayed according to the determined gaussian blur degree parameter, including:
determining that the fuzzy radius is gradually reduced according to the gradual increase of the loading progress, so that the result of the fuzzy processing on the reduced picture is from fuzzy to clear and is displayed;
or,
and determining that the fuzzy degree is gradually reduced according to the gradual increase of the loading progress, so that the fuzzy processing result of the reduced picture is from fuzzy to clear and is displayed.
According to one or more embodiments of the present disclosure, [ example five ] there is provided a picture preloading method, before preloading a reduced picture of a target picture from a storage side of the target picture, the method further comprising:
and sending a reduced picture acquisition request of the target picture to a storage terminal of the target picture so as to receive data of the reduced picture.
According to one or more embodiments of the present disclosure, [ example six ] there is provided a method of picture preloading, which further includes, after sending a reduced picture acquisition request of a target picture to a storage side of the target picture:
and if the information that the reduced picture does not exist is returned by the storage end of the target picture, sending a reduced picture generation request of the target picture to the storage end of the target picture, so that the storage end of the target picture performs resolution reduction processing on the target picture based on the generation request, and returning the data of the obtained reduced picture.
According to one or more embodiments of the present disclosure, [ example seven ] there is provided an apparatus for picture preloading, comprising:
the reduced picture preloading module is used for responding to the target picture viewing event and preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
the process display module is used for loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
and the target picture display module is used for replacing the blurred reduced picture with the target picture for display if the target picture is loaded.
According to one or more embodiments of the present disclosure, [ example eight ] there is provided an apparatus for picture preloading, where the process display module is specifically configured to:
acquiring the loading progress of the target picture;
and determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (7)
1. A method for preloading pictures, comprising:
in response to a target picture viewing event, preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
if the target picture is loaded, replacing the blurred reduced picture with the target picture for displaying;
the fuzzy processing is carried out on the reduced picture according to the loading progress of the target picture, and the displaying comprises the following steps:
acquiring the loading progress of the target picture;
determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture;
the preloading of the reduced picture of the target picture from the storage terminal of the target picture in response to the target picture viewing event comprises:
if only a target picture exists in a storage end of the target picture, generating a reduced picture of the target picture when the target picture is accessed for the first time, preloading the reduced picture of the target picture, and reserving the reduced picture of the target picture in the storage end;
determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture, wherein the method comprises the following steps:
determining that the fuzzy radius is gradually reduced according to the gradual increase of the loading progress, so that the result of the fuzzy processing on the reduced picture is from fuzzy to clear and is displayed;
or,
and determining that the fuzzy degree is gradually reduced according to the gradual increase of the loading progress, so that the fuzzy processing result of the reduced picture is from fuzzy to clear and is displayed.
2. The method of claim 1, wherein obtaining the loading progress of the target picture comprises:
and determining the loading progress of the target picture by calling the data loading amount of the target picture assembly and the total data amount of the target picture.
3. The method of claim 1, wherein before preloading the downscaled picture of the target picture from the storage of the target picture, the method further comprises:
and sending a reduced picture acquisition request of the target picture to a storage terminal of the target picture so as to receive data of the reduced picture.
4. The method of claim 3, wherein after sending the downscaled picture taking request of the target picture to the storage of the target picture, the method further comprises:
if the information that the reduced picture does not exist is returned by the storage end of the received target picture, sending a reduced picture generation request of the target picture to the storage end of the target picture, so that the storage end of the target picture performs resolution reduction processing on the target picture based on the generation request, and returning the data of the obtained reduced picture.
5. An apparatus for pre-loading pictures, comprising:
the reduced picture preloading module is used for responding to the target picture viewing event and preloading a reduced picture of the target picture from a storage terminal of the target picture; the reduced picture of the target picture is obtained by reducing the resolution of the target picture;
the process display module is used for loading the target picture; carrying out fuzzy processing on the reduced picture according to the loading progress of the target picture and displaying the reduced picture;
the target picture display module is used for replacing the blurred reduced picture with the target picture for displaying if the target picture is loaded;
the process display module is specifically configured to:
acquiring the loading progress of the target picture;
determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture;
the preloading of the reduced picture of the target picture from the storage terminal of the target picture in response to the target picture viewing event comprises:
if only a target picture exists in a storage end of the target picture, generating a reduced picture of the target picture when the target picture is accessed for the first time, preloading the reduced picture of the target picture, and reserving the reduced picture of the target picture in the storage end;
determining a Gaussian blur degree parameter according to the loading progress, and performing Gaussian blur processing on the reduced picture according to the determined Gaussian blur degree parameter and displaying the reduced picture, wherein the method comprises the following steps:
determining that the fuzzy radius is gradually reduced according to the gradual increase of the loading progress, so that the result of the fuzzy processing on the reduced picture is from fuzzy to clear and is displayed;
or,
and determining that the fuzzy degree is gradually reduced according to the gradual increase of the loading progress, so that the fuzzy processing result of the reduced picture is from fuzzy to clear and is displayed.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for picture preloading according to any of claims 1-4 when executing the computer program.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of picture preloading according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910867088.XA CN110647702B (en) | 2019-09-12 | 2019-09-12 | Picture preloading method and device, electronic equipment and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910867088.XA CN110647702B (en) | 2019-09-12 | 2019-09-12 | Picture preloading method and device, electronic equipment and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110647702A CN110647702A (en) | 2020-01-03 |
CN110647702B true CN110647702B (en) | 2022-06-17 |
Family
ID=68991845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910867088.XA Active CN110647702B (en) | 2019-09-12 | 2019-09-12 | Picture preloading method and device, electronic equipment and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110647702B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111770385A (en) * | 2020-07-23 | 2020-10-13 | 北京字节跳动网络技术有限公司 | Card display method and device, electronic equipment and medium |
CN113791777B (en) * | 2020-07-28 | 2024-06-14 | 北京沃东天骏信息技术有限公司 | Picture display method and device, computer readable storage medium and electronic equipment |
CN113569177A (en) * | 2021-07-16 | 2021-10-29 | 上海淇玥信息技术有限公司 | Method and device for optimizing skipped web pages and electronic equipment |
CN117170761A (en) * | 2022-10-11 | 2023-12-05 | 深圳Tcl新技术有限公司 | Image display method, device, terminal equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102253942A (en) * | 2010-05-21 | 2011-11-23 | 腾讯数码(天津)有限公司 | Image display method and equipment |
CN102682026A (en) * | 2011-03-16 | 2012-09-19 | 腾讯科技(深圳)有限公司 | Photo browsing method and client side |
CN103399802A (en) * | 2013-07-30 | 2013-11-20 | Tcl集团股份有限公司 | Method and device for preloading of picture |
CN106874485A (en) * | 2017-02-20 | 2017-06-20 | 郑州云海信息技术有限公司 | The method and picture that a kind of picture is presented are presented device |
CN108268578A (en) * | 2017-01-19 | 2018-07-10 | 优视科技有限公司 | The method and system of Web page picture loading |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015023378A (en) * | 2013-07-18 | 2015-02-02 | キヤノン株式会社 | Image processing apparatus, image processing method and program |
US9652896B1 (en) * | 2015-10-30 | 2017-05-16 | Snap Inc. | Image based tracking in augmented reality systems |
CN107343144A (en) * | 2017-07-10 | 2017-11-10 | 广东欧珀移动通信有限公司 | Dual camera switching handling method, device and its equipment |
-
2019
- 2019-09-12 CN CN201910867088.XA patent/CN110647702B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102253942A (en) * | 2010-05-21 | 2011-11-23 | 腾讯数码(天津)有限公司 | Image display method and equipment |
CN102682026A (en) * | 2011-03-16 | 2012-09-19 | 腾讯科技(深圳)有限公司 | Photo browsing method and client side |
CN103399802A (en) * | 2013-07-30 | 2013-11-20 | Tcl集团股份有限公司 | Method and device for preloading of picture |
CN108268578A (en) * | 2017-01-19 | 2018-07-10 | 优视科技有限公司 | The method and system of Web page picture loading |
CN106874485A (en) * | 2017-02-20 | 2017-06-20 | 郑州云海信息技术有限公司 | The method and picture that a kind of picture is presented are presented device |
Also Published As
Publication number | Publication date |
---|---|
CN110647702A (en) | 2020-01-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110647702B (en) | Picture preloading method and device, electronic equipment and readable medium | |
CN111510760B (en) | Video information display method and device, storage medium and electronic equipment | |
CN112272226B (en) | Picture loading method and device and readable storage medium | |
CN110658961B (en) | Information display method and device and electronic equipment | |
CN111258736B (en) | Information processing method and device and electronic equipment | |
CN111459364B (en) | Icon updating method and device and electronic equipment | |
CN113157153A (en) | Content sharing method and device, electronic equipment and computer readable storage medium | |
CN109614195B (en) | Method, device and equipment for preloading list items and storage medium | |
CN110781437A (en) | Method and device for acquiring webpage image loading duration and electronic equipment | |
CN110633434A (en) | Page caching method and device, electronic equipment and storage medium | |
CN111246228A (en) | Method, device, medium and electronic equipment for updating gift resources of live broadcast room | |
CN112256371A (en) | Method and device for displaying information and electronic equipment | |
CN112486783B (en) | Progress bar display method and device | |
CN111596992B (en) | Navigation bar display method and device and electronic equipment | |
CN112579218B (en) | User interface display method and device, computer readable medium and electronic equipment | |
CN111177634A (en) | Multi-language supporting file content loading method, device, equipment and medium | |
CN111273884A (en) | Image display method and device and electronic equipment | |
CN114528433B (en) | Template selection method and device, electronic equipment and storage medium | |
CN111258582B (en) | Window rendering method and device, computer equipment and storage medium | |
CN110807114B (en) | Method, device, terminal and storage medium for picture display | |
CN113779461A (en) | Data loading method and device and electronic equipment | |
CN110795670A (en) | Webpage image monitoring method and device, electronic equipment and readable storage medium | |
CN113961280A (en) | View display method and device, electronic equipment and computer-readable storage medium | |
CN111212302A (en) | Method and device for determining video definition, electronic equipment and storage medium | |
CN111581562A (en) | Resource refreshing display method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230419 Address after: Room 802, Information Building, 13 Linyin North Street, Pinggu District, Beijing, 101299 Patentee after: Beijing youzhuju Network Technology Co.,Ltd. Address before: No. 715, 7th floor, building 3, 52 Zhongguancun South Street, Haidian District, Beijing 100081 Patentee before: Beijing infinite light field technology Co.,Ltd. |