CN110032421A - The management method of atlas, device, terminal and storage medium in memory - Google Patents

The management method of atlas, device, terminal and storage medium in memory Download PDF

Info

Publication number
CN110032421A
CN110032421A CN201910314714.2A CN201910314714A CN110032421A CN 110032421 A CN110032421 A CN 110032421A CN 201910314714 A CN201910314714 A CN 201910314714A CN 110032421 A CN110032421 A CN 110032421A
Authority
CN
China
Prior art keywords
atlas
memory
user interface
picture
alternative
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.)
Granted
Application number
CN201910314714.2A
Other languages
Chinese (zh)
Other versions
CN110032421B (en
Inventor
张德嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910314714.2A priority Critical patent/CN110032421B/en
Publication of CN110032421A publication Critical patent/CN110032421A/en
Application granted granted Critical
Publication of CN110032421B publication Critical patent/CN110032421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application discloses management method, device, terminal and the storage mediums of atlas in a kind of memory, are related to field of computer technology.The management method of atlas in memory disclosed in the present application, terminal can be when receiving the instruction for closing user interface, only cancel display user interface on a display screen, without deleting atlas belonging to the picture shown in the user interface from memory, i.e., the alternative atlas that included picture is not shown in any user interface can be loaded in memory.Therefore, when terminal receives again open the instruction of the user interface and show the user interface, the alternative atlas loaded in memory can be directly based upon and directly show picture in the user interface, to reduce the number of atlas load, improve the efficiency for opening user interface.Also, when the number of alternative atlas is greater than number threshold value, terminal can delete at least one alternative atlas, occupy the higher normal use for influencing the terminal to avoid memory headroom.

Description

The management method of atlas, device, terminal and storage medium in memory
Technical field
This application involves field of computer technology, in particular to the management method of atlas in a kind of memory, device, terminal and Storage medium.
Background technique
User interface (user interface, UI) as the function of application program is more and more abundant, in application program More and more, the picture that each user interface can be shown is also more and more.In general, can store application in the hard disk of terminal Multiple atlas of program, each atlas may include multiple pictures, and multiple picture is displayed at least one user In interface.
In the related technology, terminal is during running application program, can be with when receiving the instruction for opening user interface Atlas belonging to picture that the user interface can be shown is loaded onto memory from hard disk, to show in the user interface Diagram piece.When terminal receives the instruction for closing user interface, belonging to the picture which can be shown Atlas deleted from memory.
But if terminal frequently receives the instruction of the same user interface opened or closed, the user interface institute energy Atlas belonging to the picture enough shown also can be frequently loaded onto memory, and the when consumption of the load atlas is higher.
Summary of the invention
This application provides management method, device, terminal and the storage mediums of atlas in a kind of memory, can solve correlation The when consumption that atlas is loaded in technology is higher.The technical solution is as follows:
On the one hand, a kind of management method of atlas in memory is provided, which comprises
In response to closing the instruction of the first user interface of application program, cancels and show first user interface;
Determine that alternative atlas, picture included by the alternative atlas are not shown in from the atlas loaded in memory In any user interface of the application program;
If the number of alternative atlas described in the memory is greater than number threshold value, at least one described alternative atlas is deleted, Make the number of alternative atlas described in the memory no more than the number threshold value.
On the other hand, a kind of managing device of atlas in memory is provided, described device includes:
Cancel display module, for the instruction of the first user interface in response to closing application program, cancels described in display First user interface;
Determining module, for determining alternative atlas from the atlas loaded in memory, included by the alternative atlas Picture is not shown in any user interface of the application program;
Removing module deletes at least one if the number for alternative atlas described in the memory is greater than number threshold value The alternative atlas makes the number of alternative atlas described in the memory no more than the number threshold value.
Another aspect provides a kind of terminal, and the terminal includes processor and memory, is stored in the memory At least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, institute Code set or instruction set is stated to be loaded as the processor and execute the manager to realize atlas in memory described in above-mentioned aspect Method.
In another aspect, providing a kind of computer readable storage medium, at least one finger is stored in the storage medium Enable, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or Instruction set is as processor loads and executes to realize the management method such as atlas in the memory as described in terms of above-mentioned.
Technical solution bring beneficial effect provided by the present application at least may include:
This application provides management method, device, terminal and the storage medium of atlas in a kind of memory, terminal can connect When receiving the instruction for closing user interface, only cancel display user interface on a display screen, without will show in the user interface Atlas belonging to the picture shown is deleted from memory, i.e., can be loaded with included picture in memory and be not shown in any use The alternative atlas at family interface.Therefore, when terminal receives again open the instruction of the user interface and show the user interface, The alternative atlas loaded in memory can be directly based upon and directly show picture in the user interface, added to reduce atlas The number of load avoids the when consumption of load atlas, improves the efficiency for opening user interface.Also, work as the number of alternative atlas When greater than number threshold value, terminal can delete at least one alternative atlas, occupy higher influence terminal to avoid memory headroom Normal use.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the schematic diagram of the application scenarios of the management method of atlas in a kind of memory provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the management method of atlas in a kind of memory provided in an embodiment of the present invention;
Fig. 3 is the flow chart of the management method of atlas in another memory provided in an embodiment of the present invention;
Fig. 4 is the relation schematic diagram of each component in a kind of application program provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of user interface provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of another user interface provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of another user interface provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of the managing device of atlas in a kind of memory provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of determining module provided in an embodiment of the present invention;
Figure 10 is the structural schematic diagram of the managing device of atlas in another memory provided in an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
In the related technology, user interface included by the application program of game class is more, and each user interface (can also claim For UI panel or the UI page) picture that can show is also more.Currently, the application program of game class generally uses Unity (a kind of game engine) is developed.Using Unity exploitation game class application program when, can by it is multiple be used for show with Picture (generally two-dimensional bitmap) in the interface of family is packaged in an atlas, and the file format of the atlas can be compressed package Format, such as can be resource cluster (AssetBundle) format.And it is possible to which the interface data of each user interface is packaged In an interface compression packet.Record has the user interface can in the dependent file of the interface compression packet of each user interface The atlas list of the affiliated atlas of the picture of display, which can be a default body (prefab), in the atlas list The mark for each picture that record has the mark of atlas and atlas includes, therefore the interface compression packet of each user interface It includes atlas belonging to picture that the user interface can be shown that load, which relies on item,.Wherein, user interface can be shown Picture may belong to an atlas, also may belong to multiple and different atlas, that is to say, each user interface can quote one Or multiple atlas.
Correspondingly, terminal during running application program, before loading some user interface, needs first to load this Atlas cited in the user interface is loaded onto interior by atlas belonging to the picture that user interface can be shown from hard disk It deposits.Atlas cited in the user interface can be deleted from memory when closing user interface, that is, unload the figure by terminal Collection.Therefore, if terminal frequently receives the instruction of load or the closing of the same user interface, figure cited in the user interface Collection also can cause the when consumption for loading atlas higher, the process resource of occupied terminal processor is more by frequent load or unload.
The management method of atlas in memory provided in an embodiment of the present invention, terminal close the instruction of user interface receiving When, it can only cancel on a display screen and show the user interface, without figure belonging to the picture that will be shown in the user interface Collection is deleted from memory.It therefore, can when terminal receives again open the instruction of the user interface and show the user interface Picture directly is shown in the user interface to be directly based upon the atlas loaded in memory, to reduce time of atlas load Number avoids the when consumption of load atlas, improves the efficiency for opening user interface.
Also, when the number of atlas alternative in memory is greater than number threshold value, terminal can delete at least one alternative figure Collection influences the normal use of the terminal so as to avoid alternative atlas from occupying excessive memory headroom.
Referring to FIG. 1, it illustrates the application scenarios of the management method of atlas in memory provided in an embodiment of the present invention Schematic diagram.The management method of atlas can be applied in terminal 00 in the memory.With reference to Fig. 1, which can be intelligent hand Machine, alternatively, the terminal 00 or computer, tablet computer, wearable device or mobile unit etc., the embodiment of the present invention Without limitation to the type of the terminal 00.
In embodiments of the present invention, application program 01 can be installed in terminal 00, which is capable of providing more A user interface.It can store the interface data of multiple user interfaces of the application program 01 in the hard disk of terminal 00, and Multiple atlas, each atlas may include multiple pictures, and multiple picture is displayed at least the one of application program 01 In a user interface.Wherein, the interface data of each user interface and each atlas can be with the file formats of compressed package Storage, such as can be with the stored in file format of AssetBundle.Some user interface of terminal in display application program 01 When, atlas belonging to the interface data of the user interface and the picture of the current desired display of the user interface can be added It is loaded onto memory, to show the user interface and show picture in the user interface.
Optionally, which can be game class application program, or may be instant messaging class, shopping class Or the other kinds of application program such as multimedia class.
Referring to FIG. 2, it illustrates the flow charts of the management method of atlas in memory provided by one embodiment of the present invention. The present embodiment is applied to terminal 00 shown in FIG. 1 with the management method of atlas in the memory to illustrate.With reference to Fig. 2, the party Method may include:
Step 101, in response to close application program the first user interface instruction, cancel show first user circle Face.
In embodiments of the present invention, terminal receive close the first user interface instruction when, can only by this first User interface cancels display from the display screen of terminal, without atlas belonging to the picture that will be shown in first user interface from It is deleted in memory.That is atlas belonging to first user interface picture shown before cancelling display, in the first user interface Cancelling can remain in memory after showing, so that terminal receives the finger for opening first user interface again When enabling and showing first user interface, it can be shown directly in first user interface based on the atlas loaded in the memory Diagram piece avoids the when consumption of load atlas to reduce the number of atlas load, improves the effect for opening user interface Rate.Wherein, the first user interface can be any user interface in application program.
Optionally, in embodiments of the present invention, after the first user interface is cancelled display by terminal from the display screen of terminal, The interface data of first user interface can also be retained in memory, to receive unlatching first user circle again When the instruction in face, which can be directly displayed based on the interface data loaded in the memory.
Step 102 determines alternative atlas from the atlas loaded in memory, and picture included by the alternative atlas is not It is shown in any user interface of the application program.
In embodiments of the present invention, it since terminal is after closing user interface, can't will be shown in the user interface Atlas belonging to picture is deleted from memory, therefore in the atlas loaded in memory, and picture included by the atlas of part can be with It is shown in some user interface, picture included by another part atlas is not shown in any user interface, and terminal can It is determined as alternative atlas with the atlas that included picture is not shown in any user interface.
It is exemplary, it is assumed that in the atlas loaded in memory, picture included by the first atlas is merely able to be shown in first In user interface, then after terminal closes first user interface based on the out code of first user interface, this can be determined Picture included by first atlas is not shown in any user interface of application program, and then can be true by first atlas It is set to alternative atlas.
If the number of alternative atlas is greater than number threshold value in step 103, memory, at least one alternative atlas is deleted, this is made The number of alternative atlas is not more than the number threshold value in memory.
In embodiments of the present invention, terminal can alternatively be schemed in real-time statistics memory during application program is run The number of collection, and whether the number for detecting alternative atlas is greater than number threshold value.When the number for detecting alternative atlas in memory is big When number threshold value, terminal can delete at least one alternative atlas, make the number of alternative atlas in the memory no more than this Number threshold value.
Wherein, which can be preconfigured by the developer of application program, for example, the number threshold value can To be recorded in the installation kit of application program.Also, developer can be directed to the characteristics of different application programs, be adjusted flexibly The number threshold value.
It is exemplary, it is assumed that the number threshold value is 2, if terminal detects that the number of alternative atlas in current memory is 1, nothing Alternative atlas need to be deleted.If terminal detects that the number of alternative atlas in memory is 3, an alternative atlas can be deleted, is made The number for obtaining alternative atlas in memory remains 2, and the memory headroom for avoiding atlas from occupying is larger.
Since the picture in alternative atlas is not shown in any user interface, by one in these alternative atlas Or multiple deletions have no effect on currently in the user interface of the display screen display of terminal.Also, delete at least one alternative figure Collection makes the number of alternative atlas in the memory no more than the number threshold value, can reduce the quantity of the atlas loaded in memory, keep away The memory headroom for exempting from atlas occupancy is larger.When the number of alternative atlas is not more than the number threshold value, alternative atlas can be protected It stays in memory, so as to reduce the when consumption for being again turned on user interface under the premise of not influencing terminal and normally showing, with And reduce the process resource of the processor occupied.
Optionally, it when the number of terminal alternative atlas in detecting memory is greater than number threshold value, can be washed in a pan using caching It eliminates algorithm and deletes at least one alternative atlas.The caching life cycle algorithm may include: least recently used algorithm (least Recently used, LRU), least commonly using algorithm (least frequently used, LFU), adaptive cache replace Algorithm (adaptive replacement cache, ARC), fifo algorithm (first-in first-out, FIFO) or Nearest most-often used algorithm (most recently used, MRU) etc..
In conclusion terminal can receive the embodiment of the invention provides a kind of management method of atlas in memory When closing the instruction of user interface, only cancel display user interface on a display screen, without will show in the user interface Atlas belonging to picture is deleted from memory, i.e., can be loaded with included picture in memory and be not shown in any user circle The alternative atlas in face.Therefore, the instruction of the user interface is opened and when showing the user interface when terminal receives again, it can be with It is directly based upon the alternative atlas loaded in memory and directly shows picture in the user interface, to reduce atlas load Number avoids the when consumption of load atlas, improves the efficiency for opening user interface.Also, when the number of alternative atlas is greater than When number threshold value, terminal can delete at least one alternative atlas, occupy higher influence terminal just to avoid memory headroom It is often used.
Fig. 3 is the flow chart of the management method of atlas in another memory provided in an embodiment of the present invention.The present embodiment with The management method of atlas is applied to terminal 00 shown in FIG. 1 to illustrate in the memory.With reference to Fig. 3 as can be seen that this method May include:
Step 201, in response to the instruction of the displaying target picture in second user interface, according to the picture of the Target Photo The mark of the atlas recorded in component determines atlas belonging to the Target Photo.
In embodiments of the present invention, each picture in application program is corresponding with a picture component, and picture component can be with For its corresponding picture to be displayed in the user interface.Also, the picture component pair is can recorde in each picture component The mark of atlas belonging to the picture answered.Therefore terminal receives in second user interface after the instruction of displaying target picture, The mark of the atlas recorded in the corresponding picture component of the available Target Photo, and the atlas that the mark indicates is determined as Atlas belonging to the Target Photo.Wherein, the mark of atlas can be recorded in the form of character string, and the mark of atlas can be Title or number of atlas etc..
Optionally, Target Photo can refer to that terminal is receiving the instruction for opening second user interface, and show second After user interface, the picture of display needed for the second user interface is initial.Correspondingly, the displaying target figure in second user interface The instruction of piece can be with the instruction for the unlatching second user interface.
Alternatively, when the second user interface is the interface that can be scrolled, the Target Photo can not be this second The picture shown needed for user interface is initial, but instruction of the terminal based on the rolling second user interface received, rolling should Behind second user interface, the picture that is shown in interface after the scrolling.Correspondingly, the finger of displaying target picture in the user interface Enable the instruction i.e. to be triggered by the scroll operation.
Or when the picture in second user interface is blocked by another user interface, if terminal is based on receiving Closing another user interface instruction, cancel after showing another user interface, then quilt in the second user interface The picture that another user interface is blocked can be shown again.At this point, Target Photo can refer to that terminal closes this another After user interface, the picture that is shown in second user interface again.Correspondingly, the displaying target picture in second user interface Instruction be to close the instruction of another user interface.
It is exemplary, it is assumed that terminal receives the instruction that the first picture is shown in second user interface, and terminal is got The corresponding picture component of first picture in the mark of atlas that records are as follows: atlas 1, then terminal can indicate the atlas 1 Atlas be determined as atlas belonging to the first picture.
It in embodiments of the present invention, may include that the user interface can be shown in the interface data of each user interface The corresponding picture component of each picture.When terminal shows picture in the user interface, in order to determine belonging to the picture Atlas can record figure belonging to the corresponding picture of picture component in the development process of application program in picture component The mark of collection.
Fig. 4 is the relation schematic diagram of each component in a kind of application program provided in an embodiment of the present invention.With reference to Fig. 4, user Interface 10 meets relationship (1) with the relationship of picture component 20: the corresponding picture of each picture that user interface 10 can be shown Component 20 is recorded in the interface data of user interface 10.The relationship of picture component 20 and picture 30 meets relationship (2): picture Component 20 is used to show picture 30 in user interface.Picture 30 and the relationship of atlas list 40 meet relationship (3): the picture 30 Identification record in the atlas list 40 of its affiliated atlas, picture 30 mark can be picture title.Atlas list 40 Meet relationship (4) with the relationship of atlas 50: figure indicated by the picture identification recorded in atlas list 40 and the atlas list 40 Piece 30 can be packaged in atlas 50.User interface 10 and the relationship of atlas list 40 meet relationship (5): the two decouples, that is, uses The atlas list 40 for the affiliated atlas of picture that the user interface 10 can be shown is not recorded in the dependent file at family interface 10.Figure Relationship between piece component 20 and atlas list 40 meets relationship (6): can recorde corresponding one in each picture component 20 The mark of atlas belonging to a picture, the identification record of the atlas is in atlas list 40.Between picture component 20 and atlas 50 Relationship meet relationship (7): can recorde the mark of atlas belonging to a corresponding picture in each picture component 20.
In embodiments of the present invention, developer can first generate compressed package format during development and application program Atlas.The process of the generation atlas may include: the picture 30 that determining each atlas 50 includes, and include by each atlas 50 Picture 30 mark and the atlas 50 identification record in the atlas list 40 of the atlas 50.Table 1 is implementation of the present invention A kind of atlas list that example provides, reference table 1, atlas are identified as atlas_chat, include 34 pictures in the atlas, wherein First picture (i.e. Element 0) is identified as common_bagbaitou1, the last one picture (i.e. Element 33) It is identified as main_liaotiandi.Thus one, when needing to show the picture 30 in some atlas 50 in user interface 10 When, terminal can be according to the mark of the atlas 50 and the mark of picture 30, the picture 30 shown needed for determining from memory, and will The picture 30 is shown in user interface 10.
Further, the picture identification that can will be recorded in the atlas list 40 of each atlas 50 and the atlas list 40 Indicated picture 30 is packaged, and obtains the atlas 50 of compressed package format (such as AssetBundle format).
Table 1
Developer can also be deleted in application program in the process of development in the dependent file of each user interface 10 Correlative code that is to say with releasing dependence of the interface compression packet of each user interface 10 to atlas list 40 by user circle Face 10 and atlas list 40 decouple, so that being not necessarily to the pre-loaded user interface 10 when loading user interface 10 Atlas 50 belonging to all pictures 30 that can be shown avoids occupying excessive memory.When deleting atlas 50 from memory, It may not need the interface data for deleting the user interface 10 for quoting the atlas 50, so that it is guaranteed that when being again turned on the user interface, Can based on memory in the interface data that has loaded, directly display user interface.
When generating the interface compression packet of user interface, corresponding 20 inheriting tradition of picture component of each picture 30 can be made Picture component (image component) function, also, developer can create one in the code of each picture component 20 For recording the field of the mark of atlas 50, the mark of atlas 50 belonging to the corresponding picture 30 of picture component 20 is obtained, and The field is written into the mark of the atlas 50.When terminal shows picture 30 in user interface 10 by picture component 20 as a result, Atlas 50 belonging to the picture 30 can be determined according to the mark recorded in the picture component 20.
Step 202 detects whether atlas belonging to the Target Photo has loaded in memory.
In embodiments of the present invention, after terminal determines atlas belonging to Target Photo, the Target Photo institute can first be detected Whether the atlas of category has loaded in memory.If atlas belonging to Target Photo has loaded in memory, step can be executed Rapid 203;If atlas belonging to Target Photo does not load in memory, step 204 can be executed.
Step 203, based on the atlas loaded in the second user interface displaying target picture.
If atlas belonging to the Target Photo has loaded in memory, terminal can be based on the atlas (example loaded Such as alternative atlas) the displaying target picture directly in the second user interface, it is shown in second user interface so as to improve Show the efficiency of Target Photo, improves user experience.
Atlas belonging to the Target Photo is loaded onto memory from hard disk by step 204, to show in second user interface The Target Photo.
If atlas belonging to the Target Photo does not load in memory, terminal can be by atlas belonging to the Target Photo It is loaded onto memory from hard disk, to show the Target Photo in second user interface.
Optionally, terminal starting application program when, can EMS memory occupation in the application program is larger or user's use compared with The interface data at frequent certain customers interface is loaded onto memory from hard disk in advance, so that terminal is receiving these user interfaces In some user interface open command when, only need to load atlas belonging to the picture of current desired display in the user interface, Without loading the interface data of the user interface, consumed when reducing load, better user experience.
When terminal receives the open command of some user interface, if the interface data of the user interface is not loaded also Into memory, then terminal can be by the picture institute of current desired display in the interface data of the user interface and the user interface The atlas of category is loaded onto memory, to show the Target Photo in the user interface.
It is exemplary, it is assumed that terminal detects that the atlas that atlas 1 is identified as belonging to Target Photo does not load in memory, then The atlas that this can be identified as to atlas 1 is loaded from hard disk in memory, so as to show the Target Photo in the user interface.
Step 205, in response to close application program the first user interface instruction, cancel show first user circle Face.
In embodiments of the present invention, atlas belonging to first user interface picture shown before cancelling display, First user interface cancel display after can remain in memory so that terminal receive again unlatching this first The instruction of user interface and when showing first user interface, can based on the atlas loaded in the memory directly this first Picture is shown in user interface, to reduce the number of atlas load, avoids the when consumption of load atlas, and improving unlatching should The efficiency of first user interface.Wherein, which can be the same user interface with second user interface.
The reference number of each atlas in the atlas loaded in step 206, statistics memory.
In embodiments of the present invention, the reference number of each atlas can refer to the user interface for being shown in application program In picture, belong to the number of the picture of the atlas.Wherein, the initial value of the reference number of each atlas is zero, and terminal can be with After application program operation, based on the instruction for showing picture in the user interface or cancelling display picture received, in real time Count and record the reference number of each atlas in memory.
For each atlas in the atlas that has loaded in memory, terminal can should in response to the display in any user interface The instruction for the picture that atlas includes increases the reference number of the atlas primary.Also, terminal can be in response in any user The instruction for cancelling the picture for showing that the atlas includes in interface is reduced the reference number of the atlas primary.It that is to say, for every A atlas, each picture in the atlas is shown once in any user interface, can increase the reference number of the atlas Once.Each picture in the atlas cancels display once in any user interface, can subtract the reference number of the atlas It is few primary.
For example, terminal receives the instruction of the displaying target picture in second user interface, and after showing the Target Photo, The reference number of atlas belonging to the Target Photo can be increased primary.Terminal is received to cancel in second user interface and be shown Show the instruction of Target Photo, and cancel show the Target Photo after, can be by the reference number of atlas belonging to the Target Photo It reduces primary.
According to above-mentioned analysis it is found that quoting the more atlas of number, illustrate have more in picture included in the atlas Picture be displayed in the user interface.The atlas that number is zero is quoted, illustrates that all pictures included in the atlas are not shown Show in the user interface.
It is exemplary, it is assumed that include 10 pictures in some atlas, if terminal receives the display in a user interface and is somebody's turn to do The instruction of first picture in 10 pictures, then terminal can show first picture in the user interface, and can be with The reference number of the atlas is increased by 1 time.If terminal is received shows in 10 pictures second in the user interface again The instruction of picture, then terminal can show second picture in the user interface, and can be by the reference of the atlas time Number is further added by 1 time.If terminal receives the instruction for showing first picture in 10 pictures in another user interface again, Then terminal can show first picture in another user interface, and the reference number of the atlas can be further added by 1 time.If terminal receives the instruction cancelled in another user interface and show first picture in 10 pictures, eventually again First picture can be cancelled display by end from another user interface, and the reference number of the atlas can be reduced 1 It is secondary.
It should be noted that since terminal can be cancelled when receiving the instruction for closing user interface and show the user Picture shown by interface, therefore the instruction for cancelling displaying target picture in the user interface can be to close the user interface Instruction.Alternatively, terminal can be in the finger for receiving scroll user interface when user interface is the interface that can be scrolled It enables, and after rolling the user interface, cancels display portion picture, therefore cancel the instruction of displaying target picture in the user interface It can be the instruction of the rolling user interface.Or due to when terminal receive open another user interface instruction simultaneously When showing another user interface, the user interface shown before this may be blocked, leads to cancel showing the user interface In part picture, therefore in the user interface cancel displaying target picture instruction can also for open another user interface Instruction.
It should also be noted that, whether terminal can be activated according to the corresponding picture component of picture included in atlas To determine whether the picture is displayed in the user interface, and then update the reference number of atlas belonging to the picture.For example, when eventually When end starts some picture corresponding picture component, it can determine that the corresponding picture of picture component is displayed in the user interface, Therefore the reference number of atlas belonging to the picture can be increased primary.When terminal closes the corresponding picture component of some picture When, then it can determine that the corresponding picture of picture component is not shown in user interface, therefore can be by figure belonging to the picture The reference number of collection reduces primary.
Step 207, will in the atlas that loaded in memory quote number be zero atlas be determined as alternative atlas.
During the reference number for each atlas that terminal has loaded in real-time statistics memory, number can will be quoted The atlas for being zero is determined as alternative atlas.It that is to say that the atlas that can be not shown in included picture in user interface is true It is set to alternative atlas.
Step 208, using least recently used algorithm, sequentially record reference number is zero in cache list alternative figure The mark of collection.
In embodiments of the present invention, terminal can also safeguard that a cache list, terminal are determined to quote in its memory It, can be by the identification record of the alternative atlas in the cache list after the alternative atlas that number is zero.Also, terminal can adopt With lru algorithm, the mark for the alternative atlas that sequentially record reference number is zero in cache list.It that is to say, most for terminal The alternative atlas closely determined, terminal can be by the identification records of the alternative atlas in the first place of cache list.
Optionally, when terminal receives the instruction for opening application program, cache list first can be initialized as sky table, i.e., Any element is not contained in the cache list, the memory headroom that alternative atlas occupies at this time is 0M (million).
Fig. 5 is a kind of schematic diagram of user interface provided in an embodiment of the present invention.Assuming that the user interface is answered for game class With the knapsack interface of program, the picture that can be shown in the knapsack interface belongs to the atlas for being identified as atlas 1.If terminal connects The instruction for opening the knapsack interface is received, and shows m as shown in Figure 5 (m is greater than 1 integer) a figure in the knapsack interface After piece, then the reference number that this can be identified as to the atlas of atlas 1 increases m times.At this point, due to the atlas for being identified as atlas 1 Reference number be not zero, therefore cache list is still empty table.
Further, if terminal receive close the knapsack interface instruction, and cancel show the knapsack interface after, due to The m picture shown before the knapsack interface is cancelled display, therefore this can be identified as drawing for the atlas of atlas 1 by terminal It is reduced m times with number.At this point, the reference number for being identified as the atlas of atlas 1 is 0 time, this can be identified as atlas 1 by terminal Atlas is determined as alternative atlas, and can be by the identification record of the atlas in cache list.At this point, cache list can update For { atlas 1 }, an element is contained in the cache list.Assuming that the memory headroom that each atlas of application program occupies is 1M, The memory headroom that then the alternative atlas in memory occupies at this time is 1M.
Fig. 6 is the schematic diagram of another user interface provided in an embodiment of the present invention.Assuming that the user interface is game class The set interface of application program, the picture that can be shown in the set interface belong to the atlas for being identified as atlas 2.If terminal The instruction for opening the set interface is received, and shows that n as shown in FIG. 6 (n is greater than 1 integer) is a in the set interface After picture, then the reference number that this can be identified as to the atlas of atlas 2 increases n times.At this point, due to the figure for being identified as atlas 2 The reference number of collection is not zero, cannot be by the identification record of the atlas in cache list, therefore cache list is still { atlas 1 }, the memory headroom that alternative atlas occupies in memory is still 1M.
Further, if terminal receive close the setting atlas instruction, and cancel show the set interface after, due to The n picture shown before the set interface is cancelled display, therefore this can be identified as drawing for the atlas of atlas 2 by terminal N times are reduced with number.At this point, the reference number for being identified as the atlas of atlas 2 is 0 time, this can be identified as atlas 2 by terminal Atlas is determined as alternative atlas, and can be by the identification record of the atlas in the first place of cache list.At this point, cache list can be with It is updated to { atlas 2, atlas 1 }, containing there are two element in the cache list, the memory headroom that alternative atlas occupies in memory is 2M。
If terminal receives the instruction for opening knapsack interface again, the knapsack interface is shown, and show in the knapsack interface M picture as shown in Figure 5 can increase to m times due to being identified as the reference number of atlas of atlas 1 at this time, the atlas It quotes number and is greater than zero.Therefore, terminal can delete the mark of the atlas in cache list, and cache list can be updated to { atlas 2 }, an element is contained in the cache list, and the memory headroom that alternative atlas occupies is 1M.Also, again due to terminal When receiving the instruction for opening the knapsack interface, this be identified as the atlas of atlas 1 alternately atlas still load in memory, because When this terminal shows the m picture in the knapsack interface, without reloading the atlas, reduction is again turned on knapsack interface When consume.
If terminal receives the instruction for closing the knapsack interface again, and cancels and show the knapsack interface, then can will mark Know: atlas 1 is newly recorded in cache list, and by the mark: atlas 1 is recorded in the first place of cache list, at this time caching column Table can be updated to { atlas 1, atlas 2 }, and element, the memory headroom that alternative atlas occupies are containing there are two in the cache list 2M。
Whether the number of alternative atlas is greater than number threshold value in step 209, detection memory.
In embodiments of the present invention, terminal can alternatively be schemed in real-time statistics memory during application program is run The number of collection, and whether the number for detecting alternative atlas is greater than number threshold value.For example, terminal can be in real-time detection cache list The number (number for the element for including in cache list) of the mark of record, and using the number as atlas alternative in memory Number.
If the number of alternative atlas is not more than number threshold value in memory, terminal deletes the behaviour of alternative atlas without executing Make, and can continue to count the number of alternative atlas in memory, it can continues to execute step 206;If alternative atlas in memory Number be greater than number threshold value, then can execute step 210.
Step 210 is deleted in cache list positioned at the alternative atlas that at least one mark of last bit is indicated.
When terminal detects the number of alternative atlas in memory greater than number threshold value, terminal can be deleted in cache list The alternative atlas indicated positioned at least one mark of last bit, makes the number of alternative atlas in the memory no more than the number threshold Value.Correspondingly, terminal can delete the mark of the alternative atlas of deletion from cache list.
Since user is when using application program, it will usually be carried out in a short time to several common user interfaces frequent What access, i.e. terminal may frequently receive the same user interface opens or closes instruction.Therefore in the embodiment of the present invention In, the mark of alternative atlas is sequentially recorded in cache list using lru algorithm, it can be ensured that the newest alternative atlas determined The first place of cache list can be located at, i.e. the mark of atlas cited in the user interface closed recently of user can be located at caching The first place of list.Correspondingly, when deleting the alternative atlas at least one the mark instruction for being located at cache list last bit, it can be true Atlas cited in the user interface that warranty family was opened recently will not be deleted, it can be retained in memory.When user again When secondary unlatching user interface, the atlas loaded in memory can be directly based upon and directly show picture in the user interface.
It is possible thereby to avoid frequently loading or deleting atlas (i.e. high temperature cited in the user interface that user often accesses Atlas), reduce open user interface when consume, improve the hit rate of atlas.
It is exemplary, it is assumed that number threshold value is 2, i.e., the capacity of cache list is 2.Fig. 7 be it is provided in an embodiment of the present invention again A kind of schematic diagram of user interface.Assuming that the user interface is the map interface of game class application program, institute in the map interface The picture that can be shown belongs to the atlas for being identified as atlas 3.If terminal receives the instruction for opening the map interface, and at this After showing h as shown in Figure 7 (h is greater than 1 integer) a picture in map interface, then this can be identified as to the figure of atlas 3 The reference number of collection increases h times.At this point, since the reference number for the atlas for being identified as atlas 3 is not zero, cannot the atlas mark Knowledge is recorded in cache list, therefore cache list is still { atlas 1, atlas 2 }, the memory headroom that alternative atlas occupies in memory It is still 2M.
Further, if terminal receive close the map atlas instruction, and cancel show the map interface after, due to The h picture shown before the map interface is cancelled display, therefore this can be identified as drawing for the atlas of atlas 3 by terminal It is reduced h times with number.At this point, the reference number for being identified as the atlas of atlas 3 is 0 time, this can be identified as atlas 3 by terminal Atlas is determined as alternative atlas.It has been more than the number threshold value 2 of setting, therefore terminal can since the number of alternative atlas at this time is 3 First to delete the mark atlas 2 for being located at last bit in the cache list, the mark atlas 3 of the atlas is then recorded in this again and is delayed Deposit the first place of list.Cache list can be updated to { atlas 3, atlas 1 } at this time, still be contained in the cache list there are two element, The memory headroom that alternative atlas occupies in memory is 2M.
It should be noted that while terminal is located at the mark atlas 2 of last bit in deleting the cache list, it can should Setting atlas indicated by mark atlas 2 is also deleted from memory, so that alternative atlas be avoided to occupy excessive memory headroom.Cause This, if terminal receives the instruction for opening set interface again, the Target Photo institute that needs again to show the set interface The atlas of category is loaded onto memory from hard disk.
It should be noted that the sequencing of the step of method provided in an embodiment of the present invention can carry out appropriate adjustment, Step according to circumstances can also accordingly be increased and decreased.Such as step 205 can execute before step 203 or step 204, step 206 can also execute to step 208 before step 203 or step 204, and step 209 and step 210 can also be in steps 208 It executes before.Anyone skilled in the art within the technical scope of the present application, can readily occur in variation Method, should all cover within the scope of protection of this application, therefore repeat no more.
In conclusion terminal can receive the embodiment of the invention provides a kind of management method of atlas in memory When closing the instruction of user interface, only cancel display user interface on a display screen, without will show in the user interface Atlas belonging to picture is deleted from memory, i.e., can be loaded with included picture in memory and be not shown in any user circle The alternative atlas in face.Therefore, the instruction of the user interface is opened and when showing the user interface when terminal receives again, it can be with It is directly based upon the alternative atlas loaded in memory and directly shows picture in the user interface, to reduce atlas load Number avoids the when consumption of load atlas, improves the efficiency for opening user interface.Also, when the number of alternative atlas is greater than When number threshold value, terminal can delete at least one alternative atlas, occupy higher influence terminal just to avoid memory headroom It is often used.
Fig. 8 is the managing device of atlas in a kind of memory provided in an embodiment of the present invention, with reference to Fig. 8 as can be seen that the dress It sets and may include:
Cancel display module 401, which can be used for the first user in response to closing application program The instruction at interface is cancelled and shows first user interface.
Determining module 402, the determining module 402 can be used for the determining alternative atlas from the atlas loaded in memory, Picture included by the alternative atlas is not shown in any user interface of the application program.
Removing module 403, if the number that the removing module 403 can be used for the alternative atlas of this in the memory is greater than number threshold Value, deletes at least one alternative atlas, makes the number of the alternative atlas of this in the memory no more than the number threshold value.
Fig. 9 is a kind of structural schematic diagram of determining module provided in an embodiment of the present invention.With reference to Fig. 9, the determining module 402, may include:
Statistic submodule 4021, the statistic submodule 4021 can be used for counting each figure in the atlas loaded in memory The reference number of collection, which can refer in the picture for the user interface for being shown in application program, belong to the atlas The number of picture.
Determine submodule 4022, in the atlas which can be used for have loaded in the memory, reference The atlas that number is zero is determined as alternative atlas.
Optionally, the statistic submodule 4021, can be used for:
For each atlas in the atlas that has been loaded in memory, in response to showing that the atlas includes in any user interface Picture instruction, the reference number of the atlas is increased primary.
For each atlas in the atlas that has loaded in memory, the atlas is shown in response to cancelling in any user interface Including picture instruction, the reference number of the atlas is reduced primary.
Wherein, the initial value of the reference number of each atlas is zero.
Figure 10 is the structural schematic diagram of the managing device of atlas in another memory provided in an embodiment of the present invention.With reference to figure 10, which can also include:
Loading module 404, in response to the instruction of the displaying target picture in second user interface, if belonging to the Target Photo Atlas do not load in memory, then atlas belonging to the Target Photo is loaded onto the memory from hard disk, in user circle The Target Photo is shown in face.
Optionally, which can be also used for: atlas belonging to the Target Photo is being loaded onto this from hard disk Before memory, according to the mark of the atlas recorded in the picture component of the Target Photo, atlas belonging to the Target Photo is determined;
Wherein, the picture component is for the Target Photo to be displayed in the user interface.
Optionally, removing module 403 can be used for: using caching life cycle algorithm, delete at least one alternative atlas.It should Caching life cycle algorithm can be least recently used algorithm.
Optionally, as shown in Figure 10, which can also include:
Logging modle 405, for use least recently used algorithm, sequentially recorded in cache list determine it is alternative The mark of atlas.
Removing module 403 can be also used for deleting standby indicated by least one mark in cache list positioned at last bit Select atlas.
In conclusion the device is receiving pass the embodiment of the invention provides a kind of managing device of atlas in memory When closing the instruction of user interface, only cancel display user interface on a display screen, without the figure that will be shown in the user interface Atlas belonging to piece is deleted from memory.Therefore, when terminal again receive open the user interface instruction and show the use When the interface of family, the alternative atlas loaded in memory can be directly based upon and directly show picture in the user interface, to subtract The number for having lacked atlas load avoids the when consumption of load atlas, improves the efficiency for opening user interface.Also, alternative The number of atlas be greater than number threshold value when, delete at least one alternative atlas, can to avoid the terminal EMS memory occupation compared with Gao Ying Ring the normal use of the terminal.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description It with the specific work process of module, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Figure 11 shows the structural block diagram of the terminal 500 of an illustrative embodiment of the invention offer.The terminal 500 can be with It is: smart phone, tablet computer, laptop or desktop computer.Terminal 500 is also possible to referred to as user equipment, portable Other titles such as terminal, laptop terminal, terminal console.
In general, terminal 500 includes: processor 501 and memory 502.
Processor 501 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 501 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 501 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 501 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 502 may include one or more computer readable storage mediums, which can To be non-transient.Memory 502 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 502 can Storage medium is read for storing at least one instruction, at least one instruction performed by processor 501 for realizing this Shen Please in embodiment of the method provide memory in atlas management method.
In some embodiments, terminal 500 is also optional includes: peripheral device interface 503 and at least one peripheral equipment. It can be connected by bus or signal wire between processor 501, memory 502 and peripheral device interface 503.Each peripheral equipment It can be connected by bus, signal wire or circuit board with peripheral device interface 503.Specifically, peripheral equipment includes: radio circuit 504, at least one of touch display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509.
Peripheral device interface 503 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 501 and memory 502.In some embodiments, processor 501, memory 502 and peripheral equipment Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer Any one or two in peripheral equipment interface 503 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 504 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 504 wraps It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 504 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but is not limited to: Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless office Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 504 may be used also To include the related circuit of NFC (Near Field Communication, wireless near field communication), the application is not subject to this It limits.
Display screen 505 is for showing user interface.The user interface may include figure, text, icon, video and other Any combination.When display screen 505 is touch display screen, display screen 505 also have acquisition display screen 505 surface or The ability of the touch signal of surface.The touch signal can be used as control signal and be input to processor 501 and be handled.This When, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or soft keyboard.Some In embodiment, display screen 505 can be one, and the front panel of terminal 500 is arranged;In further embodiments, display screen 505 can Think at least two, is separately positioned on the different surfaces of terminal 500 or in foldover design;In still other embodiments, display screen 505 can be flexible display screen, be arranged on the curved surface of terminal 500 or on fold plane.Even, display screen 505 can be with It is arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can use LCD (Liquid Crystal Display, liquid crystal display), the materials system such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) It is standby.
CCD camera assembly 506 is for acquiring image or video.Optionally, CCD camera assembly 506 include front camera and Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped Camera shooting function.In some embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 507 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will Sound wave, which is converted to electric signal and is input to processor 501, to be handled, or is input to radio circuit 504 to realize voice communication. For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 500 to be multiple.Mike Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 501 or radio circuit will to be come from 504 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 507 can also include Earphone jack.
Positioning component 508 is used for the current geographic position of positioning terminal 500, to realize navigation or LBS (Location Based Service, location based service).Positioning component 508 can be the GPS (Global based on the U.S. Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union The positioning component of Galileo system.
Power supply 509 is used to be powered for the various components in terminal 500.Power supply 509 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can support wired charging Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 500 further includes having one or more sensors 510.The one or more sensors 510 include but is not limited to: acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, Optical sensor 515 and proximity sensor 516.
The acceleration that acceleration transducer 511 can detecte in three reference axis of the coordinate system established with terminal 500 is big It is small.For example, acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 501 can With the acceleration of gravity signal acquired according to acceleration transducer 511, touch display screen 505 is controlled with transverse views or longitudinal view Figure carries out the display of user interface.Acceleration transducer 511 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 512 can detecte body direction and the rotational angle of terminal 500, and gyro sensor 512 can To cooperate with acquisition user to act the 3D of terminal 500 with acceleration transducer 511.Processor 501 is according to gyro sensor 512 The data of acquisition, following function may be implemented: action induction (for example changing user interface according to the tilt operation of user) is clapped Image stabilization, game control and inertial navigation when taking the photograph.
The lower layer of side frame and/or touch display screen 505 in terminal 500 can be set in pressure sensor 513.Work as pressure When the side frame of terminal 500 is arranged in sensor 513, user can detecte to the gripping signal of terminal 500, by processor 501 Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 513 acquires.When the setting of pressure sensor 513 exists When the lower layer of touch display screen 505, the pressure operation of touch display screen 505 is realized to user according to user by processor 501 Operability control on interface is controlled.Operability control includes button control, scroll bar control, icon control, dish At least one of single control part.
Fingerprint sensor 514 is used to acquire the fingerprint of user, collected according to fingerprint sensor 514 by processor 501 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of collected fingerprint recognition user.It is identifying When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 501 Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Terminal can be set in fingerprint sensor 514 500 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 500, fingerprint sensor 514 can be with It is integrated with physical button or manufacturer Logo.
Optical sensor 515 is for acquiring ambient light intensity.In one embodiment, processor 501 can be according to optics The ambient light intensity that sensor 515 acquires controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 505 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 505 is bright Degree.In another embodiment, the ambient light intensity that processor 501 can also be acquired according to optical sensor 515, dynamic adjust The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor are generally arranged at the front panel of terminal 500.Proximity sensor 516 For acquiring the distance between the front of user Yu terminal 500.In one embodiment, when proximity sensor 516 detects use When family and the distance between the front of terminal 500 gradually become smaller, touch display screen 505 is controlled from bright screen state by processor 501 It is switched to breath screen state;When proximity sensor 516 detects user and the distance between the front of terminal 500 becomes larger, Touch display screen 505 is controlled by processor 501 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 500 of structure shown in Figure 11, can wrap It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
The embodiment of the invention provides a kind of computer readable storage medium, which is stored at least one finger It enables, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or the instruction set Loaded by processor and executed the management method to realize atlas in memory provided by the above embodiment.
The foregoing is merely the alternative embodiments of the application, not to limit the application, it is all in spirit herein and Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.

Claims (15)

1. the management method of atlas in a kind of memory, which is characterized in that the described method includes:
In response to closing the instruction of the first user interface of application program, cancels and show first user interface;
Determine that alternative atlas, picture included by the alternative atlas are not shown in described from the atlas loaded in memory In any user interface of application program;
If the number of alternative atlas described in the memory is greater than number threshold value, at least one described alternative atlas is deleted, institute is made The number of alternative atlas described in memory is stated no more than the number threshold value.
2. the method according to claim 1, wherein described determine alternative figure from the atlas loaded in memory Collection, comprising:
The reference number of each atlas, the reference number of each atlas refer to display in the atlas loaded in statistics memory In the picture of the user interface of the application program, belong to the number of the picture of the atlas;
By in the atlas loaded in the memory, the atlas that reference number is zero is determined as alternative atlas.
3. according to the method described in claim 2, it is characterized in that, described count each atlas in the atlas loaded in memory Reference number, comprising:
For each atlas in the atlas that has been loaded in memory, in response to showing that the atlas includes in any user interface The instruction of picture increases the reference number of the atlas primary;
For each atlas in the atlas that has loaded in memory, the atlas packet is shown in response to cancelling in any user interface The instruction of the picture included is reduced the reference number of the atlas primary;
Wherein, the initial value of the reference number of each atlas is zero.
4. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
In response to the instruction of the displaying target picture in second user interface, if atlas belonging to the Target Photo does not load In memory, then atlas belonging to the Target Photo is loaded onto the memory from hard disk, in the second user interface Show the Target Photo.
5. according to the method described in claim 4, it is characterized in that, atlas belonging to the Target Photo is loaded from hard disk Before to the memory, the method also includes:
According to the mark of the atlas recorded in the picture component of the Target Photo, atlas belonging to the Target Photo is determined.
6. method according to any one of claims 1 to 3, which is characterized in that described at least one described alternative atlas of deletion, Include:
Using caching life cycle algorithm, at least one described alternative atlas is deleted.
7. according to the method described in claim 6, it is characterized in that, the caching life cycle algorithm is least recently used algorithm.
8. the method according to the description of claim 7 is characterized in that being determined alternatively from the atlas loaded in memory described After atlas, the method also includes:
Using the least recently used algorithm, the mark for the alternative atlas determined sequentially is recorded in cache list;
It is described to use caching life cycle algorithm, delete at least one described alternative atlas, comprising:
It deletes in the cache list positioned at the alternative atlas that at least one mark of last bit is indicated.
9. the managing device of atlas in a kind of memory, which is characterized in that described device includes:
Cancel display module, for the instruction of the first user interface in response to closing application program, cancels display described first User interface;
Determining module, for determining alternative atlas, picture included by the alternative atlas from the atlas loaded in memory It is not shown in any user interface of the application program;
Removing module is deleted described at least one if the number for alternative atlas described in the memory is greater than number threshold value Alternative atlas makes the number of alternative atlas described in the memory no more than the number threshold value.
10. device according to claim 9, which is characterized in that the determining module, comprising:
Statistic submodule, for counting the reference number of each atlas in the atlas loaded in memory, each atlas Reference number refers in the picture for the user interface for being shown in the application program, belongs to the number of the picture of the atlas;
Determine submodule, in the atlas for will load in the memory, the atlas that reference number is zero is determined as alternatively scheming Collection.
11. device according to claim 10, which is characterized in that the statistic submodule is used for:
For each atlas in the atlas that has been loaded in memory, in response to showing that the atlas includes in any user interface The instruction of picture increases the reference number of the atlas primary;
For each atlas in the atlas that has loaded in memory, the atlas packet is shown in response to cancelling in any user interface The instruction of the picture included is reduced the reference number of the atlas primary;
Wherein, the initial value of the reference number of each atlas is zero.
12. according to any device of claim 9 to 11, which is characterized in that described device further include:
Loading module, for the instruction in response to the displaying target picture in second user interface, if belonging to the Target Photo Atlas do not load in memory, then atlas belonging to the Target Photo is loaded onto the memory from hard disk, described The Target Photo is shown in second user interface.
13. device according to claim 12, which is characterized in that the loading module is also used to: by the target figure Before atlas belonging to piece is loaded onto the memory from hard disk, according to the atlas recorded in the picture component of the Target Photo Mark, determines atlas belonging to the Target Photo.
14. a kind of terminal, which is characterized in that the terminal includes processor and memory, is stored at least in the memory One instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the generation Code collection or instruction set are loaded by the processor and are executed to realize atlas in memory as described in any of the claims 1 to 8 Management method.
15. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium A few Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or instruction Collection is loaded by processor and is executed the management method to realize atlas in memory as described in any of the claims 1 to 8.
CN201910314714.2A 2019-04-18 2019-04-18 Method and device for managing atlas in memory, terminal and storage medium Active CN110032421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910314714.2A CN110032421B (en) 2019-04-18 2019-04-18 Method and device for managing atlas in memory, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910314714.2A CN110032421B (en) 2019-04-18 2019-04-18 Method and device for managing atlas in memory, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110032421A true CN110032421A (en) 2019-07-19
CN110032421B CN110032421B (en) 2021-09-28

Family

ID=67239051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910314714.2A Active CN110032421B (en) 2019-04-18 2019-04-18 Method and device for managing atlas in memory, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110032421B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130792A (en) * 2023-10-26 2023-11-28 腾讯科技(深圳)有限公司 Processing method, device, equipment and storage medium for cache object

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5640496A (en) * 1991-02-04 1997-06-17 Medical Instrumentation And Diagnostics Corp. (Midco) Method and apparatus for management of image data by linked lists of pixel values
US20050206658A1 (en) * 2004-03-18 2005-09-22 Joshua Fagans Manipulation of image content using various image representations
KR20060058570A (en) * 2004-11-25 2006-05-30 엘지전자 주식회사 Photographing status management method for mobile communication terminal with camera function
US20100030815A1 (en) * 2008-07-30 2010-02-04 Canon Kabushiki Kaisha Image file management method and image file management apparatus
CN101895635A (en) * 2010-07-15 2010-11-24 优视科技有限公司 Mobile terminal-based image converting method and device
CN102081650A (en) * 2010-12-29 2011-06-01 上海网达软件有限公司 Method for rapidly displaying user interface of embedded type platform
CN102541605A (en) * 2011-12-30 2012-07-04 Tcl集团股份有限公司 Method and device for picture loading based on Android system
CN103077014A (en) * 2012-12-25 2013-05-01 深圳Tcl新技术有限公司 Method and device for recovering pictures based on life cycle of interface
US20160057381A1 (en) * 2013-03-29 2016-02-25 Rakuten, Inc. Video processing system, video processing method, and program
CN105446814A (en) * 2014-09-30 2016-03-30 青岛海信移动通信技术股份有限公司 Cache recovery method and device
US20160323369A1 (en) * 2009-10-13 2016-11-03 Huawei Digital Technologies(Cheng Du) Co., Limited Method and apparatus for buffering and obtaining resources, resource buffering system
CN106959898A (en) * 2017-03-27 2017-07-18 广州优视网络科技有限公司 Reduce method, device and the mobile terminal of EMS memory occupation
CN107122454A (en) * 2017-04-26 2017-09-01 努比亚技术有限公司 A kind of image cache sweep-out method, equipment and computer-readable recording medium
CN107656699A (en) * 2017-08-18 2018-02-02 上海车音智能科技有限公司 Picture call method and device
CN107918529A (en) * 2017-11-29 2018-04-17 广东欧珀移动通信有限公司 Image processing method and device, computer equipment, computer-readable recording medium
CN108762916A (en) * 2018-05-03 2018-11-06 北京五八信息技术有限公司 A kind of EMS memory management process, device, equipment and computer readable storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5640496A (en) * 1991-02-04 1997-06-17 Medical Instrumentation And Diagnostics Corp. (Midco) Method and apparatus for management of image data by linked lists of pixel values
US20050206658A1 (en) * 2004-03-18 2005-09-22 Joshua Fagans Manipulation of image content using various image representations
KR20060058570A (en) * 2004-11-25 2006-05-30 엘지전자 주식회사 Photographing status management method for mobile communication terminal with camera function
US20100030815A1 (en) * 2008-07-30 2010-02-04 Canon Kabushiki Kaisha Image file management method and image file management apparatus
US20160323369A1 (en) * 2009-10-13 2016-11-03 Huawei Digital Technologies(Cheng Du) Co., Limited Method and apparatus for buffering and obtaining resources, resource buffering system
CN101895635A (en) * 2010-07-15 2010-11-24 优视科技有限公司 Mobile terminal-based image converting method and device
CN102081650A (en) * 2010-12-29 2011-06-01 上海网达软件有限公司 Method for rapidly displaying user interface of embedded type platform
CN102541605A (en) * 2011-12-30 2012-07-04 Tcl集团股份有限公司 Method and device for picture loading based on Android system
CN103077014A (en) * 2012-12-25 2013-05-01 深圳Tcl新技术有限公司 Method and device for recovering pictures based on life cycle of interface
US20160057381A1 (en) * 2013-03-29 2016-02-25 Rakuten, Inc. Video processing system, video processing method, and program
CN105446814A (en) * 2014-09-30 2016-03-30 青岛海信移动通信技术股份有限公司 Cache recovery method and device
CN106959898A (en) * 2017-03-27 2017-07-18 广州优视网络科技有限公司 Reduce method, device and the mobile terminal of EMS memory occupation
CN107122454A (en) * 2017-04-26 2017-09-01 努比亚技术有限公司 A kind of image cache sweep-out method, equipment and computer-readable recording medium
CN107656699A (en) * 2017-08-18 2018-02-02 上海车音智能科技有限公司 Picture call method and device
CN107918529A (en) * 2017-11-29 2018-04-17 广东欧珀移动通信有限公司 Image processing method and device, computer equipment, computer-readable recording medium
CN108762916A (en) * 2018-05-03 2018-11-06 北京五八信息技术有限公司 A kind of EMS memory management process, device, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130792A (en) * 2023-10-26 2023-11-28 腾讯科技(深圳)有限公司 Processing method, device, equipment and storage medium for cache object
CN117130792B (en) * 2023-10-26 2024-02-20 腾讯科技(深圳)有限公司 Processing method, device, equipment and storage medium for cache object

Also Published As

Publication number Publication date
CN110032421B (en) 2021-09-28

Similar Documents

Publication Publication Date Title
WO2021036628A1 (en) Touch-control method for device with folding screen, and folding-screen device
CN111543042B (en) Notification message processing method and electronic equipment
CN108536463A (en) Obtain method, apparatus, equipment and the computer readable storage medium of resource packet
CN113722087B (en) Virtual memory management method and electronic equipment
CN113806105A (en) Message processing method and device, electronic equipment and readable storage medium
CN111897487B (en) Method, device, electronic equipment and medium for managing data
JP2024515462A (en) Method and electronic device for performing drawing operations by an application
CN110673944B (en) Method and device for executing task
WO2021185352A1 (en) Version upgrade method and related apparatus
WO2021190524A1 (en) Screenshot processing method, graphic user interface and terminal
CN110045958A (en) Data texturing generation method, device, storage medium and equipment
CN110032421A (en) The management method of atlas, device, terminal and storage medium in memory
WO2023273766A1 (en) Compilation optimization method and apparatus
CN111275607A (en) Interface display method and device, computer equipment and storage medium
CN114489471B (en) Input and output processing method and electronic equipment
CN110321059A (en) Data processing method, device and computer readable storage medium
CN115344537A (en) Storage space allocation method and device, file system and storage medium
CN113485969B (en) Storage fragmentation method and device, terminal and computer storage medium
WO2022033355A1 (en) Mail processing method and electronic device
CN111711841B (en) Image frame playing method, device, terminal and storage medium
CN110851435B (en) Data storage method and device
CN113495770A (en) Method, device, terminal and storage medium for displaying application page
CN111897488B (en) Method, device, electronic equipment and medium for managing data
CN111198729B (en) Static resource loading method and device, computer equipment and storage medium
CN113285853B (en) Log reporting method, device, terminal 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