CN110806910A - Method and system for optimizing carousel map and electronic equipment - Google Patents

Method and system for optimizing carousel map and electronic equipment Download PDF

Info

Publication number
CN110806910A
CN110806910A CN201810791873.7A CN201810791873A CN110806910A CN 110806910 A CN110806910 A CN 110806910A CN 201810791873 A CN201810791873 A CN 201810791873A CN 110806910 A CN110806910 A CN 110806910A
Authority
CN
China
Prior art keywords
imageview
picture
control
imageview control
pictures
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810791873.7A
Other languages
Chinese (zh)
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.)
Shenzhen Honghe Innovation Information Technology Co Ltd
Original Assignee
Shenzhen Honghe Innovation Information 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 Shenzhen Honghe Innovation Information Technology Co Ltd filed Critical Shenzhen Honghe Innovation Information Technology Co Ltd
Priority to CN201810791873.7A priority Critical patent/CN110806910A/en
Publication of CN110806910A publication Critical patent/CN110806910A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The invention discloses a method and a system for optimizing a carousel map and electronic equipment, wherein the optimization method comprises the following steps: for the condition of at least four pictures, creating at least four ImageView controls for circularly processing the at least four pictures which are sequentially arranged; and deleting the picture loaded by the ImageView control last time before the ImageView control is preloaded with the next picture. The optimization system comprises: the ImageView control creating module is used for creating at least four ImageView controls; and the ImageView control management module is used for circularly processing at least four pictures which are sequentially arranged by utilizing the created at least four ImageView controls. According to the method and the system, the cyclic use of the ImageView control can be realized, and the viewed pictures can be deleted and released in time, so that the normal loading and carousel display of a plurality of pictures can be realized, and the utilization rate of the system is improved.

Description

Method and system for optimizing carousel map and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a carousel optimization method and system, and an electronic device.
Background
At present, carousel control of an Android system is realized by using view page turning tools, viewpage, ImageView picture display control, and Glide picture loading frame. The ViewPager tool can realize page loading and page left-right sliding, the ImageView control can realize display of pictures on the page, and the Glide framework realizes processing of loading, caching and the like of the pictures.
When the method is used, the carousel view control creates ImageView controls of corresponding quantity according to the quantity of the pictures under the path according to the set picture resource path, loads all the pictures through a Glide framework, caches the data of all the pictures in a memory, and then adapts the created ImageView controls to a ViewPager tool to realize page sliding.
Because the number of the ImageView controls is established according to the number of the pictures, the loaded picture data is cached in the memory, and the corresponding memory space is not released after the pictures are played, the problem of insufficient memory occurs when too many (more than one hundred) pictures are loaded, and the subsequent pictures cannot be loaded normally.
Disclosure of Invention
In view of this, the present invention provides a carousel graph optimization method and system, and an electronic device, which can implement normal loading and carousel display of multiple pictures.
Based on the above purpose, the invention provides an optimization method of a carousel image, and for the case of at least four pictures, at least four ImageView controls are created for circularly processing at least four pictures arranged in sequence.
Optionally, before the ImageView control is preloaded with the next picture, the picture loaded by the ImageView control last time is deleted.
Optionally, a first ImageView control, a second ImageView control, a third ImageView control and a fourth ImageView control are created, the first ImageView control loads a first picture, the second ImageView control loads a second picture, and the third ImageView control loads a third picture; when the page slides to a third picture, preloading a fourth picture by the fourth ImageView control, and temporarily not using the first ImageView control; when the page slides to a fourth picture, deleting the first picture, preloading the first ImageView control to a fifth picture, and temporarily not using the second ImageView control; and repeating the steps of the first ImageView control, the second ImageView control, the third ImageView control and the fourth ImageView control to circularly process at least four pictures which are sequentially arranged.
The embodiment of the invention provides an optimization system of a carousel map, which comprises:
the ImageView control creating module is used for creating at least four ImageView controls;
and the ImageView control management module is used for circularly processing at least four pictures which are sequentially arranged by utilizing the created at least four ImageView controls.
An embodiment of the present invention provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to be executed by the at least one processor to enable the at least one processor to perform a method of optimizing the carousel map.
An embodiment of the present invention provides a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps of the method for optimizing a carousel map.
As can be seen from the above description, according to the carousel image optimization method and system and the electronic device provided by the invention, for the case of at least four pictures, at least four ImageView controls are created for circularly processing the at least four pictures arranged in sequence. According to the method and the system, the cyclic use of the ImageView control can be realized, and the viewed pictures can be deleted and released in time, so that the normal loading and carousel display of a plurality of pictures can be realized, and the utilization rate of the system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating the rules for loading a page by a conventional ViewPager tool;
FIG. 2 is a schematic illustration of a method according to an embodiment of the present invention;
fig. 3 is a block diagram of a system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Fig. 1 is a schematic diagram illustrating the rule of loading a page by a conventional ViewPager tool. As shown, assume that five pages v1-v5 are shown, and that five pages may be swiped side-to-side. According to the rule that the ViewPager tool loads the page, the ViewPager tool loads the page v1 firstly and simultaneously preloads the page v 2; when sliding to page v2 (the current load page), continuing to preload page v 3; when sliding to page v3, preload page v4 and remove page v 1; when sliding to page v4, preload page v5, remove page v 2. As can be seen, according to the rule of the ViewPager tool, for the condition that the page number is greater than or equal to four pages, the ViewPager tool needs to operate at least four pages, including loading the current page, preloading the next page, retaining the previous page, and removing the previous page.
Based on the rule that the ViewPager tool loads the page, the optimization method of the carousel image disclosed by the invention is to create at least four ImageView controls for circularly processing at least four images which are sequentially arranged under the condition that the number of the images is more than or equal to four.
FIG. 2 is a schematic diagram of a method according to an embodiment of the present invention. As shown, assuming that one hundred pictures p0-p99 are shown, according to the method of the present invention, four ImageView controls I0, I1, I2, I3 are first created for loop processing the first picture, the second picture, the third picture, and the fourth picture arranged in sequence. In the embodiment of the invention, the second picture is the current loaded picture, the first picture is the previous picture, the third picture is the next picture, and the fourth picture is the preloaded next picture.
As shown, ImageView control I0 loads picture p0, ImageView control I1 loads picture p1, ImageView control I2 loads picture p 2; when the page slides to the picture p2, the ImageView control I3 preloads the picture p3 and removes the ImageView control I0 (the ImageView control I0 is not used for the moment), and at the moment, the ImageView controls I1, I2 and I3 are in an occupied state; when the page slides to a picture p3, deleting a picture p0 of an ImageView control I0 loaded and cached last time, releasing the memory space occupied by the picture p0, preloading the picture p4 by using the ImageView control I0, and removing the ImageView control I1 (the ImageView control I1 is not used for the moment), wherein at the moment, the ImageView controls I2, I3 and I0 are in an occupied state; when the page slides to the picture p4, the picture p1 of the last time the ImageView control I1 loaded the cache is deleted, the memory space occupied by the picture p1 is released, then the picture p5 is preloaded by using the ImageView control I1, and the ImageView control I2 is removed. By analogy, the recycling of the four ImageView controls can be realized by adopting a mode of dividing the subscript of the picture by the remainder of 4; meanwhile, before the ImageView control preloads the next picture, the picture loaded and cached last time is deleted and the memory is released, so that the problem of memory overflow is solved, and the normal carousel display function of multiple pictures can be ensured.
Fig. 3 is a system composition block diagram according to an embodiment of the present invention, and as shown in the drawing, the system for optimizing a carousel map according to an embodiment of the present invention includes an ImageView control creation module and an ImageView control management module.
The ImageView control creating module is used for creating at least four ImageView controls;
and the ImageView control management module is used for circularly processing at least four pictures which are sequentially arranged by utilizing the created at least four ImageView controls.
Based on the above purpose, an embodiment of an apparatus for performing the method for optimizing a carousel map is further provided in the embodiments of the present invention. The device comprises:
one or more processors, and a memory.
The apparatus for performing the method for optimizing a carousel map may further include: an input device and an output device.
The processor, memory, input device, and output device may be connected by a bus or other means.
The memory, which is a non-volatile computer-readable storage medium, may be used to store a non-volatile software program, a non-volatile computer-executable program, and modules, such as program instructions/modules corresponding to the optimization method of the carousel map in the embodiment of the present invention (for example, the ImageView control creation module and the ImageView control management module shown in fig. 3). The processor executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory, that is, the method for optimizing the carousel map of the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of an apparatus performing the optimization method of the carousel map, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory remotely located from the processor, and these remote memories may be connected to the member user behavior monitoring device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means may receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus performing the carousel map optimization method. The output device may include a display device such as a display screen.
The one or more modules are stored in the memory and when executed by the one or more processors perform the method for optimizing a carousel map in any of the method embodiments described above. The technical effect of the embodiment of the device for executing the optimization method of the carousel map is the same as or similar to that of any method embodiment.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the list item operation in any method embodiment. Embodiments of the non-transitory computer storage medium may be the same or similar in technical effect to any of the method embodiments described above.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program that can be stored in a computer-readable storage medium and that, when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The technical effect of the embodiment of the computer program is the same as or similar to that of any of the method embodiments described above.
Furthermore, the apparatuses, devices, etc. described in the present disclosure may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television, etc., and may also be large terminal devices, such as a server, etc., and therefore the scope of protection of the present disclosure should not be limited to a specific type of apparatus, device. The client disclosed by the present disclosure may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
Furthermore, the method according to the present disclosure may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method of the present disclosure.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
In addition, well known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the invention. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present invention is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The embodiments of the invention are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (6)

1. The optimization method of the carousel pictures is characterized in that for the condition of at least four pictures, at least four ImageView controls are created and used for circularly processing at least four pictures which are sequentially arranged.
2. The optimization method of claim 1, wherein a last loaded picture of the ImageView control is deleted before the ImageView control is preloaded with a next picture.
3. The optimization method of claim 2, wherein a first ImageView control, a second ImageView control, a third ImageView control and a fourth ImageView control are created, wherein the first ImageView control loads a first picture, the second ImageView control loads a second picture, and the third ImageView control loads a third picture; when the page slides to a third picture, preloading a fourth picture by the fourth ImageView control, and temporarily not using the first ImageView control; when the page slides to a fourth picture, deleting the first picture, preloading the first ImageView control to a fifth picture, and temporarily not using the second ImageView control; and repeating the steps of the first ImageView control, the second ImageView control, the third ImageView control and the fourth ImageView control to circularly process at least four pictures which are sequentially arranged.
4. A carousel graph optimization system, comprising:
the ImageView control creating module is used for creating at least four ImageView controls;
and the ImageView control management module is used for circularly processing at least four pictures which are sequentially arranged by utilizing the created at least four ImageView controls.
5. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of any one of claims 1-3.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1-3.
CN201810791873.7A 2018-07-18 2018-07-18 Method and system for optimizing carousel map and electronic equipment Pending CN110806910A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810791873.7A CN110806910A (en) 2018-07-18 2018-07-18 Method and system for optimizing carousel map and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810791873.7A CN110806910A (en) 2018-07-18 2018-07-18 Method and system for optimizing carousel map and electronic equipment

Publications (1)

Publication Number Publication Date
CN110806910A true CN110806910A (en) 2020-02-18

Family

ID=69486561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810791873.7A Pending CN110806910A (en) 2018-07-18 2018-07-18 Method and system for optimizing carousel map and electronic equipment

Country Status (1)

Country Link
CN (1) CN110806910A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857481A (en) * 2020-07-24 2020-10-30 京东方科技集团股份有限公司 Image display method, apparatus and storage medium
CN114489881A (en) * 2021-12-14 2022-05-13 中国平安财产保险股份有限公司 Image processing method, device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060225059A1 (en) * 2001-03-07 2006-10-05 Freescale Semiconductor, Inc. Method and device for creating and using pre-internalized program files
CN104268221A (en) * 2014-09-25 2015-01-07 车智互联(北京)科技有限公司 Page turning method and page turning system based on Ios system WebView
CN104793945A (en) * 2015-04-27 2015-07-22 深圳市美贝壳科技有限公司 Large-batch picture displaying method for preventing memory overflow and device thereof
CN105045592A (en) * 2015-07-24 2015-11-11 北京金山安全软件有限公司 Picture display method and device
CN105446763A (en) * 2014-09-30 2016-03-30 Tcl集团股份有限公司 Picture loading and displaying method and system
CN107463313A (en) * 2017-08-10 2017-12-12 四川长虹电器股份有限公司 A kind of method of preloaded list

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060225059A1 (en) * 2001-03-07 2006-10-05 Freescale Semiconductor, Inc. Method and device for creating and using pre-internalized program files
CN104268221A (en) * 2014-09-25 2015-01-07 车智互联(北京)科技有限公司 Page turning method and page turning system based on Ios system WebView
CN105446763A (en) * 2014-09-30 2016-03-30 Tcl集团股份有限公司 Picture loading and displaying method and system
CN104793945A (en) * 2015-04-27 2015-07-22 深圳市美贝壳科技有限公司 Large-batch picture displaying method for preventing memory overflow and device thereof
CN105045592A (en) * 2015-07-24 2015-11-11 北京金山安全软件有限公司 Picture display method and device
CN107463313A (en) * 2017-08-10 2017-12-12 四川长虹电器股份有限公司 A kind of method of preloaded list

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857481A (en) * 2020-07-24 2020-10-30 京东方科技集团股份有限公司 Image display method, apparatus and storage medium
CN114489881A (en) * 2021-12-14 2022-05-13 中国平安财产保险股份有限公司 Image processing method, device and medium

Similar Documents

Publication Publication Date Title
US20140301663A1 (en) Systems and Methods for Image Processing
CN107479868B (en) Interface loading method, device and equipment
US10395056B2 (en) Protecting privacy of digital images
CN110806910A (en) Method and system for optimizing carousel map and electronic equipment
CN104104995A (en) Image display method and device
CN104391618A (en) Method and device for loading pictures
US8856216B2 (en) Method and apparatus for efficiently performing file services using cloud computing
EP2997715B1 (en) Transmitting information based on reading speed
CN113468118B (en) File increment storage method, device and storage medium based on blockchain
US20170060887A1 (en) On demand file sync
CN106411718B (en) Data synchronization method and device based on instant messaging application
US10082956B2 (en) Method and apparatus for downloading data including a progress bar indicating progress of downloading
CN113096218A (en) Dynamic image playing method, device, storage medium and computer equipment
CN110602163A (en) File uploading method and device
CN110765738A (en) System and method for generating card number and electronic equipment
CN111382560A (en) Courseware making method and system and electronic equipment
CN107357808B (en) Data management method, device and equipment
CN112100553B (en) Webpage configuration method and device, electronic equipment and storage medium
CN110807300A (en) Image processing method and device, electronic equipment and medium
CN109388726A (en) A kind of image display method, device, equipment and computer-readable medium
CN111200621A (en) Ad hoc network method and device, and electronic device
CN111190529A (en) Keyboard input method and device and electronic equipment
CN111190529B (en) Keyboard input method and device and electronic equipment
CN110908567B (en) Terminal assistant device and method and electronic equipment
CN111385491A (en) Image superposition method and device and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200218

RJ01 Rejection of invention patent application after publication