CN108549562A - A kind of method and device of image load - Google Patents

A kind of method and device of image load Download PDF

Info

Publication number
CN108549562A
CN108549562A CN201810220488.7A CN201810220488A CN108549562A CN 108549562 A CN108549562 A CN 108549562A CN 201810220488 A CN201810220488 A CN 201810220488A CN 108549562 A CN108549562 A CN 108549562A
Authority
CN
China
Prior art keywords
described image
image
application interface
application
load
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
CN201810220488.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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810220488.7A priority Critical patent/CN108549562A/en
Publication of CN108549562A publication Critical patent/CN108549562A/en
Priority to TW108100045A priority patent/TW201939275A/en
Priority to PCT/CN2019/071871 priority patent/WO2019174394A1/en
Pending legal-status Critical Current

Links

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

This application discloses a kind of method and devices of image load, mobile terminal is when according to the instruction for starting application, after the sub-line journey for creating the main thread for loading the application and load application interface, if the image for needing to render to the application interface can not be obtained by ImageView controls from buffering, the image is not first then rendered in the application interface, but when ImageView controls obtain the image in the asynchronous nonvolatile memory from the mobile terminal and then will be in the image rendering to the application interface.

Description

A kind of method and device of image load
Technical field
This application involves the method and devices that information technology field more particularly to a kind of image load.
Background technology
Operating system (Operating System, OS) refers to management and the calculating of control computer hardware and software resource Machine program, usual other software all could must in a device be run under the support of operating system.
Currently, operating system common in mobile terminal includes:Android (Android), iOS etc..Wherein, for Need the image loaded can be when the application is installed, from peace for the application program run in android system, in application interface Mobile terminal local is obtained and stored in tall and erect installation kit (AndroidPackage, APK).So as to when this application start when, can According to the storage address of the image, the image is locally obtained from mobile terminal and is rendered in the interface of the application.
Specifically, the control of display image primary in android system is image views (ImageView) control, answer ImageView controls can be used with program, from acquisition for mobile terminal image resource, and loaded and displayed.Wherein, ImageView is controlled When obtaining image resource the operating method of typing array (TypedArray) class may be used, according to image resource in part It indexes (Index), image resource is obtained from mobile terminal.After obtaining the image resource, class to be instantiated as to grasp The object of work.And in order to manage the image resource of acquisition, generally also need to define with scene (Context) class The usage scenario of ImageView controls.In addition, in order to reduce the time needed for load image, using usually passing through LoadDrawable methods obtain image.LoadDrawable methods can be first based in obtaining image process Data cached and image resource the Index of DrawableCache judges whether the image of acquisition in need provides in caching Source if it is not, determining the storage address of image resource again, and passes through if so, directly obtaining the image resource from caching and returning It executes disk read-write operation the image resource is loaded into caching, then data cached by image based on DrawableCache Resource returns.
ImageView controls when obtaining image resource, it is all kinds of between relationship can be as shown in Figure 1.Wherein, it is seen that resource The executable operation of class (Resources) is load image, load theme and the image money for returning to DrawableCache cachings Source.Context classes, which are then defined, can return to Resources under the scene and can draw object (Drawable). The image resource or object that are obtained from Resources classes are then returned to ImageView classes by TypedArray classes.And ImageView classes then according to the image resource of acquisition or object, are rendered on interface.
But the process of load application interface has main thread execution in the prior art, this makes main thread in sound Using family operation when be likely to occur interim card or do not react situations such as.As it can be seen that the method for existing load image, existing causes Using interim card or unresponsive situation, lead to poor user experience.
Invention content
This specification embodiment provides a kind of method and device of image load, is answered for solve to install in mobile terminal It is to be synchronized to execute by the main thread of processing user's operation with the process of application interface on startup, is loaded, leads to load image When the problem of being likely to occur main thread interim card or unresponsive situation, leading to poor user experience.
This specification embodiment uses following technical proposals:
A kind of method of image load, including:
Mobile terminal receives the enabled instruction for application;
According to the enabled instruction, the main thread of the application, and the sub-line journey of load application interface is respectively created;
When the sub-line journey is in the image in loading the application interface according to image views control, judging whether can be with Described image is obtained from caching;
If so, described image is rendered in the application interface;
If it is not, described image is not rendered in the application interface then, and it is asynchronous from institute in described image view control It states after obtaining described image in the nonvolatile memory of mobile terminal, described image is rendered in the application interface.
A kind of device of image load, including:
Receiving module, mobile terminal receive the enabled instruction for application;
According to the enabled instruction main thread of the application is respectively created, and load application interface in creation module Sub-line journey;
Load-on module is judged, when image of the sub-line journey in loading the application interface according to image views control When, judge whether that described image can be obtained from caching, if so, described image is rendered in the application interface, if it is not, Described image is not rendered in the application interface then, and asynchronous from the non-of the mobile terminal in described image view control After obtaining described image in volatile memory, described image is rendered in the application interface.
A kind of mobile terminal, wherein the mobile terminal includes:One or more processors and memory, memory are deposited Program is contained, and is configured to execute following steps by one or more processors:
Receive the enabled instruction for application;
According to the enabled instruction, the main thread of the application, and the sub-line journey of load application interface is respectively created;
When the sub-line journey is in the image in loading the application interface according to image views control, judging whether can be with Described image is obtained from caching;
If so, described image is rendered in the application interface;
If it is not, described image is not rendered in the application interface then, and it is asynchronous from institute in described image view control It states after obtaining described image in the nonvolatile memory of mobile terminal, described image is rendered in the application interface.
Above-mentioned at least one technical solution that this specification embodiment uses can reach following advantageous effect:
The method and device provided by this specification, mobile terminal create load when according to the instruction for starting application After the main thread of the application and the sub-line journey of load application interface, if can not be by ImageView controls from buffering The image for needing to render to the application interface is obtained, then does not first render the image in the application interface, but works as ImageView Control obtains the image in the asynchronous nonvolatile memory from the mobile terminal and then answers the image rendering to this With in interface.When that can not obtain image from caching, sub-line journey can not render the image in application interface first, and subsequently lead to Asynchronous mode is crossed, then image is read from the nonvolatile memory of mobile terminal.Since the load of application interface is for answering Use influence is smaller, and main thread interim card can be caused using being difficult with, so the method that this specification provides, passes through wound Sub-line journey is built to execute the mode of load application interface, the case where main thread is influenced by load image is avoided and occurs so that application Image is influenced to reduce in by load application interface in use, improves user experience.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please do not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is the schematic diagram of the relationship between ImageView controls are all kinds of when obtaining image resource;
Fig. 2 is the flow diagram for the image load that this specification embodiment provides;
Fig. 3 is the process schematic that page instance loads application interface;
Fig. 4 is the ImageView controls that provide of this specification when obtaining image resource, it is all kinds of between relationship;
Fig. 5 is a kind of structural schematic diagram of the device for image load that this specification embodiment provides;
Fig. 6 is a kind of structural schematic diagram for mobile terminal that this specification embodiment provides.
Specific implementation mode
To keep the purpose, technical scheme and advantage of this specification clearer, it is embodied below in conjunction with this specification Technical scheme is clearly and completely described in example and corresponding attached drawing.Obviously, described embodiment is only this Shen Please a part of the embodiment, instead of all the embodiments.Based on the embodiment in specification, those of ordinary skill in the art are not having There is the every other embodiment obtained under the premise of making creative work, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical solution that each embodiment of the application provides is described in detail.
Fig. 2 is a kind of process for image load that specification embodiment provides, and specifically may include following steps:
S100:Mobile terminal receives the enabled instruction for application.
In this specification one or more embodiment, the image loading procedure as the aforementioned, can be specifically to movement The loading procedure of image in the application interface of application has been installed in terminal.It therefore, specifically can be by this explanation of mobile terminal execution The process for the image load that book provides, wherein the mobile terminal can be the equipment such as mobile phone, tablet computer, and this specification is to this It does not limit.
In addition, since the image of load is the image in application interface, the image that this specification provides loaded Journey can also be divided into according to the chronological order of load image and obtain image resource and the image resource is rendered to application Two steps in interface.
Specifically, in the present specification, mobile terminal is in the operation that can receive user, then when user needs to start some In application, the mobile terminal can receive the enabled instruction for the application, and execute the operation of subsequent step.Wherein, user Which kind of operation is specifically executed on mobile terminals to start application, and this specification does not limit.For example, when mobile terminal supports language When sound control, which can make to receive audio input by user, and has received to be directed to according to audio determination and answer Enabled instruction, or when the user clicks application icon in the system interface of mobile terminal when, grasped according to the click of user Make, determines the enabled instruction, etc. having received for the application.
It should be noted that system used in the mobile terminal can be specifically Android (Android) system.Also, Concrete form this specification of the enabled instruction does not also limit, and can be arranged as required to.
S102:According to the enabled instruction, the main thread of the application, and the sub-line of load application interface is respectively created Journey.
In the present specification, mobile terminal can be created according to the enabled instruction and be loaded after receiving enabled instruction The main thread of the application.Also, in order to show that the application interface of the application, mobile terminal can also be created on the screen of the mobile terminal The sub-line journey for loading the application interface is built, is applied with load to avoid being performed simultaneously load application interface in same thread The task of (for example, response user's operation) causes using there is situations such as interim card.
The sub-line journey can be created by main thread in the present specification.Specifically, when the main thread loads in application, can first obtain Take the code of the application.Wherein, the content for creating the sub-line journey for loading application interface is may include in the code so that the master Thread go to load application interface make, can create sub-line journey with by the sub-line journey load application interface in image.When So, a variety of methods for creating sub-line journey exist in the prior art, this specification does not limit the mode that the sub-line journey creates, and has Body can be configured as needed.
In addition, thread after creation, can obtain corresponding code and run under normal conditions.Then, as long as creating Sub-line journey, the step of can subsequent load image being executed by the sub-line journey.Then the sub-line journey can be obtained first and be loaded in the application The code of application interface, the Code obtaining to run the load application interface need the image loaded and arrive the image rendering In application interface.
S104:When the sub-line journey is in the image in loading the application interface according to image views control, judgement is It is no to then follow the steps S108 if not if so, thening follow the steps S106 from caching acquisition described image.
In the present specification, the sub-line journey of the load application interface can obtain the code that application interface is loaded in the application, To configure classes of pages (Activity) to page instance according to the parameter carried in the code, and should with page instance load Application interface.Wherein, the process of page instance load application interface can be as shown in Figure 3.
Fig. 3 is the process schematic that page instance loads application interface.The page instance can be first with according to advance in application Corresponding parameter is passed to view layout loader by the parameter for loading application interface of configuration respectively (Layoutinflater) in class and page window (Window) class, good corresponding example is configured.And then by having configured Window examples need the content for each window filled into Layoutinflater example transmission applications interface.Then, by Layoutinflater exemplary configuration view generation device (Factory) example obtains the image needed to render in application interface, Activity examples are transferred to by Window examples again, thus by the application interface according to the layout configured in the code of application And picture is shown.
The process schematic of application interface is loaded by page instance shown in Fig. 3, it is seen that sub-line journey is being obtained using boundary When needing the image loaded in face, it can specifically be obtained by view generation device.Also, in the present specification, Factory can To obtain the image by ImageView controls.Then it can determine input by obtaining the code in the application about load image The parameter of the ImageView controls.
In addition, since usually when configuring ImageView controls, which is to pass through loadDrawable Method obtains data from Resources.And if there is no the Index of the image in caching, and can additionally execute disk reading Extract operation obtains the image, and the case where being competed with main thread so as to cause sub-line journey occurs.
Therefore, in the present specification, which can be by loadDrawable methods from the money of compatible skin Image is obtained in source class (SkinCompatResources).Wherein, SkinCompatResources has the image uncached When, it can first return to null character (Null).Although then ImageView controls do not get the image, will not hold at once Row disk read operation obtains the image, the case where competition so as to avoid sub-line journey and main thread.
Then, judge whether to obtain image from caching in the present specification, can be specifically to judge Whether the result that SkinCompatResources is returned is not Null.It is no to then follow the steps if so then execute step S106 S108。
Specifically, ImageView controls can be by TypedArray and Context to SkinCompatResources The request for initiating acquisition image, wherein carries the Index of the image in the request.And according to SkinCompatResources The data of return, the step of determining subsequent execution.As shown in Figure 4.Fig. 4 is that the ImageView controls that this specification provides are obtaining When taking image resource, it is all kinds of between relationship.
S106:Described image is rendered in the application interface.
In this specification embodiment, if that SkinCompatResources returns is not Null, illustrate to pass through LoadDrawable methods need the image loaded from being obtained in application interface in SkinCompatResources, then the sub-line Journey can be according to Fig.3, process complete the process of load image by the image rendering to the application interface.
S108:Described image is not rendered in the application interface, and asynchronous from described in described image view control After obtaining described image in the nonvolatile memory of mobile terminal, described image is rendered in the application interface.
In the present specification, if SkinCompatResources returns are Null, illustrate to pass through loadDrawable Method can not obtain the image, then the sub-line journey can execute the behaviour of subsequent step in Fig. 3 using Null as the image obtained Make.That due to Factory returns is Null, and Layoutinflater can not provide corresponding View to Window, then It can then be needed to load the image in the application interface without the image in the application interface that Activity is shown at this time It is not rendered into application interface.
In addition, since the image for needing to load still has not been obtained, it can be by SkinCompatResources according to the image Index determine storage address of the image in the mobile terminal, later according to the storage address execute read-write task, from And obtain the image.And it is getting the image and then is being answered the image rendering to this according to the process of existing load image With in interface.Wherein, the Index of the image can be transferred to the Factory by LayoutInfalter by Avctivity In.And when Factory calls ImageView control load images, it is transmitted to SkinCompatResources's.
Since SkinCompatResources can not be first return Null, and later after caching obtains image Disk read operation is executed again and obtains the image, therefore the process for executing disk read operation is asynchronous progress.It can contract The loading velocity of short application interface reduces the feelings for causing user that can not be operated to application due to waiting for application interface load Condition occurs.For example, it is assumed that application interface does not load out, then user can not be according to the layout of button in application interface or icon It is operated, still, it is assumed that if only only having parts of images not load out in application interface, user still can be in application interface The part of load out is operated.
Wherein, which is the storage address according to the image, from the non-volatile memories of the mobile terminal The image is obtained in device.Specifically, the nonvolatile memory of the mobile terminal can be read-only memory (Read-Only Memory, ROM), for example, the nonvolatile memory of the mobile terminal can be flash memory (Flash memory).
Based on image loading procedure shown in Fig. 2, mobile terminal, can phase after receiving for the enabled instruction of application The main thread for creating the application answered and the sub-line journey for loading application interface, if the sub-line journey can not pass through later When ImageView controls obtain image from caching, then the figure is not first rendered in the application interface according to the null character of return Picture, but wait for ImageView controls are asynchronous to get the image and then will be in the image rendering to application interface.Wherein, Since the process that ImageView controls obtain image does not generate variation, there is no need to the self-defined classes for obtaining image, can be direct Using basic ImageView controls, programming cost is reduced.Also, by obtaining image money from SkinCompatResources Source so that even if failing from the rendering that can proceed with application interface if caching acquisition image, and subsequently through asynchronous execution Disk read operation obtains the image.It can be seen that the method provided by this specification, since image in load application interface can be by Sub-line journey asynchronous execution, thus avoid the prior art by main thread synchronize execute load application interface process when, cause Application interim card or the case where can not answer, improve user experience.
It should be noted that the executive agent of each step of this specification embodiment institute providing method may each be same and set It is standby, alternatively, this method is also by distinct device as executive agent.For example, the executive agent of step S100 and step S102 can be with Executive agent for equipment 1, step S102 can be equipment 2;Alternatively, the executive agent of step S100 can be equipment 1, step The executive agent of S102 and step S104 can be equipment 2;Etc..It is above-mentioned that this specification specific embodiment is described. Other embodiments are within the scope of the appended claims.In some cases, the action recorded in detail in the claims or step It suddenly can be according to being executed different from the sequence in embodiment and desired result still may be implemented.In addition, in the accompanying drawings The process of description, which not necessarily requires the particular order shown or consecutive order, could realize desired result.In certain embodiment party In formula, multitasking and parallel processing is also possible or it may be advantageous.
Based on the method for image shown in Fig. 2 load, this specification embodiment also provides a kind of device of image load, such as Shown in Fig. 5.
Fig. 5 is a kind of structural schematic diagram of the device for image load that this specification embodiment provides, and described device includes:
Receiving module 200, mobile terminal receive the enabled instruction for application;
The main thread of the application is respectively created according to the enabled instruction in creation module 202, and boundary is applied in load The sub-line journey in face;
Load-on module 204 is judged, when figure of the sub-line journey in loading the application interface according to image views control When picture, judge whether that described image can be obtained from caching, if so, described image is rendered in the application interface, if It is no, then described image is not rendered in the application interface, and asynchronous from the mobile terminal in described image view control Nonvolatile memory in obtain described image after, described image is rendered in the application interface.
The judgement load-on module 204, the sub-line journey are configured to load the application according to the code of the application The page instance at interface, so that the page instance, by view generation device example, control described image view control loads institute State the image in application interface.
The judgement load-on module 204, according to described image view control obtain described image as a result, judge whether can To obtain described image from caching.
The judgement load-on module 204 is determined according to the null character that described image view control returns not in the application Described image is rendered in interface.
The judgement load-on module 204, described image view control is by asynchronous execution disk read operation, according to described The storage address of image obtains described image from the nonvolatile memory of the mobile terminal.
Based on the method for the image load described in Fig. 2, this specification, which corresponds to, provides a kind of mobile terminal, as shown in fig. 6, its In, the mobile terminal includes:One or more processors and memory, memory have program stored therein, and be configured to by One or more processors execute following steps:
Receive the enabled instruction for application;
According to the enabled instruction, the main thread of the application, and the sub-line journey of load application interface is respectively created;
When the sub-line journey is in the image in loading the application interface according to image views control, judging whether can be with Described image is obtained from caching;
If so, described image is rendered in the application interface;
If it is not, described image is not rendered in the application interface then, and it is asynchronous from institute in described image view control It states after obtaining described image in the nonvolatile memory of mobile terminal, described image is rendered in the application interface.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit is realized can in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described There is also other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, group Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage device.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method Part explanation.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (11)

1. a kind of method of image load, including:
Mobile terminal receives the enabled instruction for application;
According to the enabled instruction, the main thread of the application, and the sub-line journey of load application interface is respectively created;
When the sub-line journey is in the image in loading the application interface according to image views control, judge whether to obtain from caching Take described image;
If so, described image is rendered in the application interface;
If it is not, described image is not rendered in the application interface then, and it is asynchronous from the shifting in described image view control After obtaining described image in the nonvolatile memory of dynamic terminal, described image is rendered in the application interface.
2. the method as described in claim 1, the sub-line journey is in loading the application interface according to image views control Image specifically includes:
The sub-line journey is configured to load the page instance of the application interface, so that described according to the code of the application Page instance loads the image in the application interface by view generation device example, control described image view control.
3. method as claimed in claim 2 judges whether that described image can be obtained from caching, specifically includes:
According to described image view control acquisition described image as a result, judging whether that described image can be obtained from caching.
4. method as claimed in claim 3 does not render described image in the application interface, specifically includes:
According to the null character that described image view control returns, determination does not render described image in the application interface.
5. method as claimed in claim 3, described image view control is asynchronous to deposit from the non-volatile of the mobile terminal Described image is obtained in reservoir, is specifically included:
Described image view control is by asynchronous execution disk read operation, according to the storage address of described image, from the shifting Described image is obtained in the nonvolatile memory of dynamic terminal.
6. a kind of device of image load, including:
Receiving module, mobile terminal receive the enabled instruction for application;
The main thread of the application, and the sub-line of load application interface is respectively created according to the enabled instruction in creation module Journey;
Judge load-on module, when the sub-line journey is in the image in loading the application interface according to image views control, sentences It is disconnected whether to obtain described image from caching, if so, described image is rendered in the application interface, if it is not, then not Described image is rendered in the application interface, and asynchronous from the non-volatile of the mobile terminal in described image view control Property memory in obtain described image after, described image is rendered in the application interface.
7. device as claimed in claim 6, the judgement load-on module, the sub-line journey are matched according to the code of the application The page instance for loading the application interface is set, so that the page instance is by view generation device example, described in control Image views control loads the image in the application interface.
8. device as claimed in claim 7, the judgement load-on module obtain described image according to described image view control As a result, judging whether that described image can be obtained from caching.
9. device as claimed in claim 7, the judgement load-on module, the empty word returned according to described image view control Symbol, determination do not render described image in the application interface.
10. device as claimed in claim 7, the judgement load-on module, described image view control pass through asynchronous execution magnetic Disk read operation obtains the figure according to the storage address of described image from the nonvolatile memory of the mobile terminal Picture.
11. a kind of mobile terminal, wherein the mobile terminal includes:One or more processors and memory, memory storage There is program, and is configured to execute following steps by one or more processors:
Receive the enabled instruction for application;
According to the enabled instruction, the main thread of the application, and the sub-line journey of load application interface is respectively created;
When the sub-line journey is in the image in loading the application interface according to image views control, judge whether to postpone Deposit acquisition described image;
If so, described image is rendered in the application interface;
If it is not, described image is not rendered in the application interface then, and it is asynchronous from the shifting in described image view control After obtaining described image in the nonvolatile memory of dynamic terminal, described image is rendered in the application interface.
CN201810220488.7A 2018-03-16 2018-03-16 A kind of method and device of image load Pending CN108549562A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201810220488.7A CN108549562A (en) 2018-03-16 2018-03-16 A kind of method and device of image load
TW108100045A TW201939275A (en) 2018-03-16 2019-01-02 Image loading method and apparatus
PCT/CN2019/071871 WO2019174394A1 (en) 2018-03-16 2019-01-16 Image loading method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810220488.7A CN108549562A (en) 2018-03-16 2018-03-16 A kind of method and device of image load

Publications (1)

Publication Number Publication Date
CN108549562A true CN108549562A (en) 2018-09-18

Family

ID=63516557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810220488.7A Pending CN108549562A (en) 2018-03-16 2018-03-16 A kind of method and device of image load

Country Status (3)

Country Link
CN (1) CN108549562A (en)
TW (1) TW201939275A (en)
WO (1) WO2019174394A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109801210A (en) * 2019-01-31 2019-05-24 北京字节跳动网络技术有限公司 Image processing method, device, electronic equipment and computer readable storage medium
WO2019174394A1 (en) * 2018-03-16 2019-09-19 阿里巴巴集团控股有限公司 Image loading method and apparatus
CN110399582A (en) * 2019-07-30 2019-11-01 北京三快在线科技有限公司 A kind of method and device of page presentation
CN111459570A (en) * 2020-03-30 2020-07-28 掌阅科技股份有限公司 PDF plug-in loading method, electronic equipment and computer storage medium
CN112825538A (en) * 2019-11-20 2021-05-21 Oppo(重庆)智能科技有限公司 Application starting method and device and terminal equipment
CN113535307A (en) * 2021-07-23 2021-10-22 深圳小湃科技有限公司 Interface loading method and device and storage medium
CN113838182A (en) * 2021-11-24 2021-12-24 之江实验室 Multithreading-based magnetic resonance 3D image large data volume rendering method and system
CN113886228A (en) * 2021-09-26 2022-01-04 北京三快在线科技有限公司 Compatibility detection method and device, storage medium and electronic equipment
CN114489641A (en) * 2021-12-31 2022-05-13 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
WO2022206709A1 (en) * 2021-03-30 2022-10-06 华为技术有限公司 Component loading method for application and related apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902318A (en) * 2012-12-30 2014-07-02 青岛海尔软件有限公司 Android platform based image loading method
US20140198118A1 (en) * 2011-09-29 2014-07-17 Tencent Technology (Shenzhen) Company Limited Image browsing method, system and computer storage medium
CN104657380A (en) * 2013-11-20 2015-05-27 青岛海信移动通信技术股份有限公司 Picture loading method and device
CN105389159A (en) * 2014-09-03 2016-03-09 优视科技有限公司 Picture rendering method, device and mobile terminal
CN105549820A (en) * 2015-12-11 2016-05-04 魅族科技(中国)有限公司 Graphic user interface display method and terminal
US20160124916A1 (en) * 2013-06-26 2016-05-05 Verizon Patent And Licensing Inc. Image decoding method and apparatus for browser
CN107102846A (en) * 2016-02-19 2017-08-29 青岛海信移动通信技术股份有限公司 A kind of Application Program Interface display methods and terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834544B (en) * 2015-05-04 2018-03-13 广州杰赛科技股份有限公司 Data load method and device
CN105740222A (en) * 2016-03-01 2016-07-06 广州阿里巴巴文学信息技术有限公司 Method and device used for reader typesetting, reader and electronic device
CN108549562A (en) * 2018-03-16 2018-09-18 阿里巴巴集团控股有限公司 A kind of method and device of image load

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140198118A1 (en) * 2011-09-29 2014-07-17 Tencent Technology (Shenzhen) Company Limited Image browsing method, system and computer storage medium
CN103902318A (en) * 2012-12-30 2014-07-02 青岛海尔软件有限公司 Android platform based image loading method
US20160124916A1 (en) * 2013-06-26 2016-05-05 Verizon Patent And Licensing Inc. Image decoding method and apparatus for browser
CN104657380A (en) * 2013-11-20 2015-05-27 青岛海信移动通信技术股份有限公司 Picture loading method and device
CN105389159A (en) * 2014-09-03 2016-03-09 优视科技有限公司 Picture rendering method, device and mobile terminal
CN105549820A (en) * 2015-12-11 2016-05-04 魅族科技(中国)有限公司 Graphic user interface display method and terminal
CN107102846A (en) * 2016-02-19 2017-08-29 青岛海信移动通信技术股份有限公司 A kind of Application Program Interface display methods and terminal

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174394A1 (en) * 2018-03-16 2019-09-19 阿里巴巴集团控股有限公司 Image loading method and apparatus
CN109801210A (en) * 2019-01-31 2019-05-24 北京字节跳动网络技术有限公司 Image processing method, device, electronic equipment and computer readable storage medium
CN110399582A (en) * 2019-07-30 2019-11-01 北京三快在线科技有限公司 A kind of method and device of page presentation
CN112825538A (en) * 2019-11-20 2021-05-21 Oppo(重庆)智能科技有限公司 Application starting method and device and terminal equipment
CN112825538B (en) * 2019-11-20 2022-04-12 Oppo(重庆)智能科技有限公司 Application starting method and device, terminal equipment and storage medium
CN111459570A (en) * 2020-03-30 2020-07-28 掌阅科技股份有限公司 PDF plug-in loading method, electronic equipment and computer storage medium
CN111459570B (en) * 2020-03-30 2023-03-17 掌阅科技股份有限公司 PDF plug-in loading method, electronic equipment and computer storage medium
WO2022206709A1 (en) * 2021-03-30 2022-10-06 华为技术有限公司 Component loading method for application and related apparatus
CN113535307A (en) * 2021-07-23 2021-10-22 深圳小湃科技有限公司 Interface loading method and device and storage medium
CN113886228B (en) * 2021-09-26 2022-11-04 北京三快在线科技有限公司 Compatibility detection method and device, storage medium and electronic equipment
CN113886228A (en) * 2021-09-26 2022-01-04 北京三快在线科技有限公司 Compatibility detection method and device, storage medium and electronic equipment
CN113838182A (en) * 2021-11-24 2021-12-24 之江实验室 Multithreading-based magnetic resonance 3D image large data volume rendering method and system
CN114489641B (en) * 2021-12-31 2022-11-08 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN114489641A (en) * 2021-12-31 2022-05-13 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2019174394A1 (en) 2019-09-19
TW201939275A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
CN108549562A (en) A kind of method and device of image load
CN113259224B (en) Method and device for sending customer service data
CN107045438B (en) Application top view processing method, device and component
CN108628688B (en) Message processing method, device and equipment
CN111885082B (en) Web application package processing method, device and equipment
CN108282518A (en) A kind of customer terminal webpage generation method and device
CN110496395B (en) Component operation method, system and equipment for illusion engine
WO2019179243A1 (en) Information display method, apparatus and device
CN108764864A (en) A kind of method, apparatus and equipment for configuring payment flow, executing payment flow
CN109684573B (en) Target picture display method and device, storage medium and electronic equipment
CN107479868B (en) Interface loading method, device and equipment
CN110020231A (en) Webpage capture method and device thereof
WO2021143371A1 (en) Method, apparatus, and device for generating applet page
CN109947643A (en) A kind of configuration method, device and the equipment of the experimental program based on A/B test
CN111861454B (en) Method and device for displaying unique identifier of digital object
CN107678805A (en) The call method and device of a kind of application programming interfaces
CN110262749A (en) A kind of web page operation method, apparatus, container, equipment and medium
CN106970872B (en) Information point burying method and device
CN109144600A (en) A kind of operation method of application program, equipment and computer-readable medium
CN107908552A (en) A kind of test method based on link, device and equipment
CN111538667A (en) Page testing method and device
CN116302230A (en) Page display method, device and equipment
CN108769152A (en) Service flushing policy registration, service refresh requests method, apparatus and equipment
CN116016227A (en) Micro-service system arrangement visualization method, device and medium based on Docker compound
CN112000329B (en) Data display method, device, equipment and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180918

RJ01 Rejection of invention patent application after publication