CN105630411A - Memory management method and apparatus - Google Patents

Memory management method and apparatus Download PDF

Info

Publication number
CN105630411A
CN105630411A CN201510956780.1A CN201510956780A CN105630411A CN 105630411 A CN105630411 A CN 105630411A CN 201510956780 A CN201510956780 A CN 201510956780A CN 105630411 A CN105630411 A CN 105630411A
Authority
CN
China
Prior art keywords
page
tabular array
page node
node
viewport
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
CN201510956780.1A
Other languages
Chinese (zh)
Other versions
CN105630411B (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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510956780.1A priority Critical patent/CN105630411B/en
Publication of CN105630411A publication Critical patent/CN105630411A/en
Application granted granted Critical
Publication of CN105630411B publication Critical patent/CN105630411B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0626Reducing size or complexity of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device

Abstract

The invention provides a memory management method and apparatus, and belongs to the technical field of terminals. The method comprises the steps of according to a first page node, loading a first array list corresponding to the first page node to a memory and rendering the first page node; when a rolling operation of a specified page is detected, according to a second page node, loading a second array list corresponding to the second page node to the memory and rendering the second page node; and recovering a memory occupied by a third array list in the first array list, wherein the third array list is rendered data of a page node no longer displayed in a visible viewport after rolling. According to the memory management method and apparatus, page data displayed in the visible viewport and not used for rendering can be recovered in a display process of the specified page, so that the memory consumption can be reduced and the stability of terminal operation can be improved.

Description

EMS memory management process and device
Technical field
It relates to field of terminal technology, particularly relate to a kind of EMS memory management process and device.
Background technology
Along with the development of terminal technology, the performance of terminal is also improving constantly, it is possible to install the application of several functions in terminal to provide the user service. But, it is applied in running and understands a large amount of committed memories, thus the performance of terminal is impacted, therefore, how effectively to carry out memory management, become the important research direction improving terminal capabilities.
When user is by mounted browser class application browsing pages in terminal, if a terminal detects that the trigger action to the refresh function option on this page, then reclaim the internal memory shared by the page data of this page, and reacquire up-to-date page data, so that this page is rendered again; If be detected that the shutoff operation of this page, directly reclaim the internal memory shared by page data of this page.
Summary of the invention
For overcoming Problems existing in correlation technique, the disclosure provides a kind of EMS memory management process and device.
First aspect according to disclosure embodiment, it is provided that a kind of EMS memory management process, including:
According to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and first page node is rendered, this first page node refers to the page node in the visible viewport being shown in specified page;
When the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array being loaded into internal memory, and this second page node is rendered, this second page node refers to and is shown in the page node in this visible viewport after rolling;
Reclaiming the internal memory shared by the 3rd tabular array in this first tabular array, the 3rd tabular array is the rendering data of the page node being no longer shown in this visible viewport after rolling.
In the first possible implementation of the first aspect of the disclosure, according to first page node, the first corresponding for first page node tabular array is loaded into internal memory and includes:
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of this first page node, determine the first tabular array for rendering this first page node, and the first tabular array is loaded into internal memory.
The second in the first aspect of the disclosure is likely in implementation, reclaims in this first tabular array the internal memory shared by the 3rd tabular array and includes:
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of this visible viewport, it is determined that the 3rd tabular array, and reclaim the internal memory shared by the 3rd tabular array.
The third of first aspect in the disclosure is likely in implementation, and according to the stored tabular array of designated memory space, before the DOM Document Object Model page node of the specified page being shown in visible viewport is rendered, the method also includes:
When the load request of this specified page being detected, obtain the page data of this specified page;
Being grouped by the page data of this specified page, obtain multiple tabular array, each tabular array in the plurality of tabular array is for rendering a page node in this specified page;
Obtain the viewport information of this each tabular array correspondence page node;
The viewport information of the plurality of tabular array and this each tabular array correspondence page node is stored in this designated memory space.
In the 4th kind of possible implementation of the first aspect of the disclosure, each tabular array comprises the array of equal number.
In the 5th kind of possible implementation of the first aspect of the disclosure, after reclaiming in this first tabular array the internal memory shared by the 3rd tabular array, the method also includes:
Viewport information according to the 3rd tabular array correspondence page node, arranges the elevation information of the 3rd tabular array correspondence page node.
In the 6th kind of possible implementation of the first aspect of the disclosure, the viewport information of page node at least includes elevation information, tip position information and bottom position information.
Second aspect according to disclosure embodiment, it is provided that a kind of memory management device, including:
Processing module, for according to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and the first DOM Document Object Model page node is rendered, this first page node refers to the page node in the visible viewport being shown in specified page;
This processing module is additionally operable to when the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array is loaded into internal memory, and this second page node is rendered, this second page node refers to and is shown in the page node in this visible viewport after rolling;
Memory recycle module, for reclaiming the internal memory that this processing module is loaded in this first tabular array of internal memory shared by the 3rd tabular array, the 3rd tabular array is the rendering data of the page node being no longer shown in this visible viewport after rolling.
In the first possible implementation of the second aspect of the disclosure, this processing module is used for:
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of this first page node, determine the first tabular array for rendering this first page node, and the first tabular array is loaded into internal memory.
The second in the second aspect of the disclosure is likely in implementation, and this Memory recycle module is used for:
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of this visible viewport, it is determined that the 3rd tabular array, and reclaim the internal memory shared by the 3rd tabular array.
In the third possible implementation of the second aspect of the disclosure, this device also includes:
Page data acquisition module, for when the load request of this specified page being detected, obtaining the page data of this specified page;
Grouping module, the page data of the specified page for being got by this page data acquisition module is grouped, and obtains multiple tabular array, and each tabular array in the plurality of tabular array is for rendering a page node in this specified page;
Viewport information acquisition module, for obtaining the viewport information of this each tabular array correspondence page node that this grouping module obtains;
Memory module, the viewport information of this each tabular array correspondence page node got for the plurality of tabular array that this grouping module obtained and this viewport information acquisition module is stored in this designated memory space.
In the 4th kind of possible implementation of the second aspect of the disclosure, each tabular array comprises the array of equal number.
In the 5th kind of possible implementation of the second aspect of the disclosure, this device also includes:
Elevation information arranges module, for the viewport information according to the 3rd tabular array correspondence page node, arranges the elevation information of the 3rd tabular array correspondence page node.
In the 6th kind of possible implementation of the second aspect of the disclosure, the viewport information of page node at least includes elevation information, tip position information and bottom position information.
The third aspect, additionally provides a kind of memory management device, including:
Processor;
For storing the memorizer of the executable instruction of processor;
Wherein, this processor is configured to:
According to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and the first DOM Document Object Model page node is rendered, this first page node refers to the page node in the visible viewport being shown in specified page;
When the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array being loaded into internal memory, and this second page node is rendered, this second page node refers to and is shown in the page node in this visible viewport after rolling;
Reclaiming the internal memory shared by the 3rd tabular array in this first tabular array, the 3rd tabular array is the rendering data of the page node being no longer shown in this visible viewport after rolling.
The technical scheme that disclosure embodiment provides has the benefit that
The disclosure is by according to first page node, the first corresponding for described first page node tabular array is loaded into internal memory, and first page node is rendered, when the rolling operation of described specified page being detected, according to second page node, the second corresponding for described second page node tabular array is loaded into internal memory, and described second page node is rendered, reclaim the internal memory shared by the 3rd tabular array in described first tabular array, it is capable of in the display process of this specified page, reclaim and be not used for rendering the page data being shown in visible viewport, and then memory consumption can be reduced, improve the stability of terminal operating.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, the disclosure can not be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meets and embodiment of the disclosure, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart of a kind of EMS memory management process according to an exemplary embodiment;
Fig. 2 is the flow chart of a kind of EMS memory management process according to an exemplary embodiment;
Fig. 3 is a kind of memory management device block diagram according to an exemplary embodiment;
Fig. 4 is the block diagram of a kind of memory management device 400 according to an exemplary embodiment.
Detailed description of the invention
For making the purpose of the disclosure, technical scheme and advantage clearly, below in conjunction with accompanying drawing, disclosure embodiment is described in further detail.
Here in detail exemplary embodiment being illustrated, its example representation is in the accompanying drawings. When as explained below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element. Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the disclosure. On the contrary, they only with in appended claims describe in detail, the disclosure some in the example of consistent apparatus and method.
Fig. 1 is the flow chart of a kind of EMS memory management process according to an exemplary embodiment, as it is shown in figure 1, EMS memory management process is for, in terminal, comprising the following steps.
In a step 101, according to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and first page node is rendered, this first page node refers to the page node in the visible viewport being shown in specified page.
In a step 102, when the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array is loaded into internal memory, and this second page node is rendered, this second page node refers to and is shown in the page node in this visible viewport after rolling.
In step 103, reclaiming the internal memory shared by the 3rd tabular array in this first tabular array, the 3rd tabular array is the rendering data of the page node being no longer shown in this visible viewport after rolling.
The method that disclosure embodiment provides, by according to first page node, the first corresponding for described first page node tabular array is loaded into internal memory, and first page node is rendered, when the rolling operation of described specified page being detected, according to second page node, the second corresponding for described second page node tabular array is loaded into internal memory, and described second page node is rendered, reclaim the internal memory shared by the 3rd tabular array in described first tabular array, it is capable of in the display process of this specified page, reclaim and be not used for rendering the page data being shown in visible viewport, and then memory consumption can be reduced, improve the stability of terminal operating.
In the first possible implementation of the disclosure, according to first page node, the first corresponding for first page node tabular array is loaded into internal memory and includes:
Will be stored in each viewport information of tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of described first page node, determine the first tabular array for rendering described first page node, and the first tabular array is loaded into internal memory.
The second in the disclosure is likely in implementation, reclaims in described first tabular array the internal memory shared by the 3rd tabular array and includes:
Will be stored in each viewport information of tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of described visible viewport, it is determined that described 3rd tabular array, and reclaim the internal memory shared by described 3rd tabular array.
Being likely in implementation at the third of the disclosure, according to the stored tabular array of designated memory space, before the DOM Document Object Model page node of the specified page being shown in visible viewport is rendered, described method also includes:
When the load request of described specified page being detected, obtain the page data of described specified page;
Being grouped by the page data of described specified page, obtain multiple tabular array, each tabular array in the plurality of tabular array is for rendering a page node in described specified page;
Obtain the viewport information of described each tabular array correspondence page node;
The viewport information of the plurality of tabular array and described each tabular array correspondence page node is stored in described designated memory space.
In the 4th kind of possible implementation of the disclosure, each tabular array comprises the array of equal number.
In the 5th kind of possible implementation of the disclosure, after reclaiming in described first tabular array the internal memory shared by the 3rd tabular array, described method also includes:
Viewport information according to described 3rd tabular array correspondence page node, arranges the elevation information of described 3rd tabular array correspondence page node.
In the 6th kind of possible implementation of the disclosure, the viewport information of page node at least includes elevation information, tip position information and bottom position information.
Above-mentioned all optional technical schemes, it is possible to adopting and arbitrarily combine the alternative embodiment forming the disclosure, this is no longer going to repeat them.
Fig. 2 is the flow chart of a kind of EMS memory management process according to an exemplary embodiment. The executive agent of this embodiment can be terminal, and with reference to Fig. 2, this embodiment specifically includes:
In step 201, when the load request of this specified page being detected, obtain the page data of this specified page.
When user is by terminal mounted browser class application browsing pages, if terminal is detecting the shutoff operation to this page or refresh operation, internal memory shared by the page data of this page can be recycled, but when terminal performs multiple task simultaneously, and this page data more time, if this page is constantly in the state of being not turned off, and only show page data limited in this page, above-mentioned EMS memory management process can cause this page data that internal memory is taken in a large number, affects the speed of other tasks of terminal processes. In order to solve the problems referred to above, disclosure embodiment provides a kind of method in page display process, internal memory shared by this page data being managed.
When the load request to this specified page being detected, obtain the page data of this specified page; Wherein, this specified page can apply shown arbitrary page for browser class, it is also possible to being the shown page in other application, this is not construed as limiting by disclosure embodiment; The page data of this specified page at least includes the data for rendering this page, it is also possible to including the structure class data etc. of this page, the particular content included by this page data is not construed as limiting by disclosure embodiment.
The method of the page data obtaining this specified page can be: the URL (UniformResourceLocator according to this page, URL), access request is sent, to obtain the page data of this specified page that this server returns to this specified page corresponding server; Can also be obtained the page data of this specified page by additive method, this is not construed as limiting by disclosure embodiment.
In step 202., being grouped by the page data of this specified page, obtain multiple tabular array, each tabular array in the plurality of tabular array is for rendering a page node in this specified page.
The page data of this specified page exists with the form of table data, and this table data is grouped, and to obtain multiple tabular array, wherein, comprises the array of equal number in each tabular array. Such as, this table data be 1,2,3,4 ..., 99,100}, it is possible to this table data is divided into 1,2,3,4,5}, 6,7,8,9,10} ..., { 96,97,98,99,100}; Wherein, one array of each digitized representation, { 1,2,3,4,5} represents a tabular array, and each tabular array is for rendering a page node in this specified page. The program segment being realized above-mentioned steps by JavaScript can be:
Wherein, one page node of one section node on behalf, each section node comprises multiple DOM (DocumentObjectModel, DOM Document Object Model) node, and a display element in this specified page is rendered by least one DOM node. It is of course also possible to realize above-mentioned steps by other programming languages, this is not construed as limiting by the embodiment of the present invention.
It should be noted that, for the different pages, the number of the comprised array of each tabular array can be different, specifically can according to this page visible viewport display element number determine, if this page is when the display element of visible viewport is more, the array number that each tabular array comprises is more, if this page is less at the display element of visible viewport, the array number that each tabular array comprises is less; It is of course also possible to determine, by additive method, the array number that each tabular array comprises, this is not construed as limiting by disclosure embodiment.
By the page data of this specified page is grouped, obtain multiple tabular array, make it possible to according to the plurality of tabular array, page node is rendered by group, when page node is not shown in visible viewport, internal memory shared by the tabular array for rendering this page node can be removed by group, when this page node is shown in visible viewport again, by group, tabular array corresponding for this page node can be reloaded to internal memory, so that this page node is rendered, and then can when showing this specified page, reduce internal memory occupancy volume, and then memory consumption can be reduced, improve the stability of terminal operating.
In step 203, the viewport information of this each tabular array correspondence page node is obtained.
Wherein, the viewport information of page node at least includes elevation information, tip position information and bottom position information; Certainly, the viewport information of this page node can also include width information, leftward position information and right positions information etc., it is also possible to including other viewport information, this is not construed as limiting by disclosure embodiment.
It should be noted that this tip position information refers to this page node height position information in this specified page, correspondingly, this bottom position information is also this page node bottom position information in this specified page.
For arbitrary tabular array, the method of the viewport information obtaining this tabular array correspondence page node can be: owing to this page node comprises multiple DOM node, therefore can pass through from the page data of this specified page, obtain the viewport information of each DOM node in this page node, viewport information according to the plurality of DOM node, it is determined that the viewport information of this page node; Can also be obtained the viewport information of this tabular array correspondence page node by additive method, this is not construed as limiting by disclosure embodiment.
By obtaining the viewport information of this each tabular array correspondence page node, enable the terminal to the viewport information according to this each tabular array correspondence page node, determine whether the page node that each tabular array is corresponding is shown in visible viewport, and then be capable of loading by group and reclaiming internal memory.
In step 204, the viewport information of the plurality of tabular array and this each tabular array correspondence page node is stored in this designated memory space.
This designated memory space can be the CacheList (cache list) of terminal, it is also possible to being other memory spaces, this is not construed as limiting by disclosure embodiment.
In step 205, according to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and first page node is rendered, this first page node refers to the page node in the visible viewport being shown in specified page.
If terminal starts to show this specified page from the top position of this specified page, the region that this specified page can show on a terminal screen is visible viewport, all page nodes in this visible viewport are first page node, the first corresponding for this first page node tabular array is loaded into internal memory, and this first page node is rendered, to show the page node in the visible viewport of this specified page.
Wherein, determine the first tabular array that this first page node is corresponding and this first tabular array is loaded into the concrete grammar of internal memory can be: in the tabular array that will be stored in designated memory space, the viewport information of each tabular array correspondence page node mates with the viewport information of this first page node, determine the first tabular array for rendering this first page node, and the first tabular array is loaded into internal memory. Determining the process of the first tabular array that this first page node is corresponding, it is also possible to realized by additive method, this is not construed as limiting by disclosure embodiment.
Wherein, when the viewport information of page node includes elevation information, when tip position information and bottom position information, will be stored in the concrete grammar that in the tabular array in this designated memory space, the viewport information of each tabular array correspondence page node carries out mating with the viewport information of this first page node can be: for the arbitrary tabular array being stored in the tabular array in this designated memory space, obtain the viewport information of this tabular array correspondence page node, elevation information including this tabular array correspondence page node, tip position information and bottom position information, viewport information according to this page node, mate with the viewport information of the multiple page nodes in this first page node.
It should be noted that this first page node refers to the multiple page nodes being shown in visible viewport, that is to say, each page node in the plurality of page node is referred to as first page node.
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in this designated memory space and carry out the process mated with the viewport information of this first page node, can according to the difference of information included by the viewport information of this page node, diverse ways is taked to realize, such as, when the viewport information of this page node include be width information, leftward position information and right positions information time, it is possible to mate with the viewport information of this first page node according to this width information, leftward position information and right positions information; Additive method can also be adopted to realize this matching process, and this is not construed as limiting by disclosure embodiment.
By according to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and first page node is rendered, it is possible to realize packet and load, and then page loading velocity and display speed can be improved.
In step 206, when the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array is loaded into internal memory, and this second page node is rendered, this second page node refers to and is shown in the page node in this visible viewport after rolling.
After each rolling operation, the page node of this specified page shown at this visible viewport all can change, therefore, when the rolling operation of this specified page being detected, page node correspondence tabular array according to visible viewport, the page node that viewport visible after every time rolling is shown renders, to show the page node of this specified page shown by visible viewport.
If the screen of this terminal is non-touch screen, this rolling operation can by the scroll key of mouse, the progress bar key pulled in this specified page or by keyboard upper and lower to function key realize; If the screen of this terminal is touch screen, this rolling operation can pass through this specified page realization of sliding up or down. Shown by and the page differently configured according to terminal, function key is different, it is possible to adopting diverse ways to realize this rolling operation, this is not construed as limiting by disclosure embodiment.
Determine this second page node corresponding and tabular array and this second tabular array is loaded into the method for internal memory second tabular array corresponding with determining first page node in step 205 and this first tabular array is loaded into the method for internal memory in like manner, do not repeat herein.
It should be noted that this second page node refers to that this specified page is shown in the multiple page nodes in visible viewport, that is to say, each page node in the plurality of page node is referred to as second page node after rolling. In addition, when the rolling operation of this specified page being detected each time, the page node that this specified page before rolling is shown in visible viewport is referred to as first page node, and the page node being shown in visible viewport through rolling this specified page is referred to as second page node.
By when the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array is loaded into internal memory, and this second page node is rendered; It is capable of packet load and be grouped the purpose rendering this specified page.
In step 207, reclaiming the internal memory shared by the 3rd tabular array in this first tabular array, the 3rd tabular array is the rendering data of the page node being no longer shown in this visible viewport after rolling.
Determine the 3rd tabular array and reclaim the concrete grammar of internal memory shared by the 3rd tabular array and can be: in the tabular array that will be stored in designated memory space, the viewport information of each tabular array correspondence page node mates with the viewport information of this visible viewport, determine the 3rd tabular array, and reclaim the internal memory shared by the 3rd tabular array. Wherein, will be stored in the method that in the tabular array in designated memory space, the viewport information of each tabular array correspondence page node carries out mating with the viewport information of this visible viewport, the viewport information of page node corresponding to tabular array each in the tabular array that will be stored in step 205 in this designated memory space carries out the method mated in like manner with the viewport information of this first page node, repeats no more herein.
It should be noted that, if a part for the corresponding a certain tabular array of page node shown in visible viewport, if this tabular array is not stored in internal memory, then this tabular array is loaded in internal memory, if this tabular array is stored in internal memory, then do not reclaim the internal memory shared by this tabular array.
By reclaiming in this first tabular array the internal memory shared by the 3rd tabular array, it is capable of in the display process of this specified page, the internal memory shared by page data of this specified page is reclaimed in packet, and then can reduce memory consumption, improves the stability of terminal operating.
In another embodiment of the disclosure, after reclaiming in this first tabular array the internal memory shared by the 3rd tabular array, the viewport information according to the 3rd tabular array correspondence page node, the elevation information of the 3rd tabular array correspondence page node is set. Wherein, the viewport information of this page node includes elevation information, by arranging the elevation information of the 3rd tabular array correspondence page node, it is possible to avoid the situation occurring the page to subside.
By the JavaScript program segment of elevation information realizing arranging the 3rd tabular array correspondence page node can be:
It is of course also possible to realize arranging the process of the elevation information of the 3rd tabular array correspondence page node by other programming languages, the embodiment of the present invention to how realizing this process is not construed as limiting.
It should be noted that realize the program segment framework of processing procedure after the coupling of tabular array in step 206 and step 207 and coupling can be:
If (in visible viewport)
If (whether corresponding page node rendered)
Do not process
}else{
According to tabular array, corresponding page node is rendered
}
}else{
Reclaim this tabular array and for rendering the internal memory shared by other data of this correspondence page node
And the elevation information of this tabular array is set, to avoid the page to subside
}
The method that disclosure embodiment provides, by according to first page node, the first corresponding for described first page node tabular array is loaded into internal memory, and first page node is rendered, when the rolling operation of described specified page being detected, according to second page node, the second corresponding for described second page node tabular array is loaded into internal memory, and described second page node is rendered, reclaim the internal memory shared by the 3rd tabular array in described first tabular array, it is capable of in the display process of this specified page, reclaim and be not used for rendering the page data being shown in visible viewport, and then memory consumption can be reduced, improve the stability of terminal operating, further, after the internal memory shared by the 3rd tabular array in reclaiming this first tabular array, viewport information according to the 3rd tabular array correspondence page node, the elevation information of the 3rd tabular array correspondence page node is set, it can be avoided that occur the page to subside, improve the stability that the page shows.
Fig. 3 is a kind of memory management device block diagram according to an exemplary embodiment. With reference to Fig. 3, this device includes processing module 301 and Memory recycle module 302.
Processing module 301, for according to first page node, the first corresponding for this first page node tabular array being loaded into internal memory, and the first DOM Document Object Model page node is rendered, this first page node refers to the page node in the visible viewport being shown in specified page;
This processing module 301 is additionally operable to when the rolling operation of this specified page being detected, according to second page node, the second corresponding for this second page node tabular array is loaded into internal memory, and this second page node is rendered, this second page node refers to and is shown in the page node in this visible viewport after rolling;
Memory recycle module 302, for reclaiming the internal memory that this processing module 301 is loaded in this first tabular array of internal memory shared by the 3rd tabular array, the 3rd tabular array is the rendering data of the page node being no longer shown in this visible viewport after rolling.
The first offer in the disclosure is likely in implementation, and this processing module 301 is used for:
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of this first page node, determine the first tabular array for rendering this first page node, and the first tabular array is loaded into internal memory.
The second provided in the disclosure is likely in implementation, and this Memory recycle module 302 is used for:
Will be stored in the viewport information of each tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of this visible viewport, it is determined that the 3rd tabular array, and reclaim the internal memory shared by the 3rd tabular array.
In the third possible implementation that the disclosure provides, this device also includes:
Page data acquisition module, for when the load request of this specified page being detected, obtaining the page data of this specified page;
Grouping module, the page data of the specified page for being got by this page data acquisition module is grouped, and obtains multiple tabular array, and each tabular array in the plurality of tabular array is for rendering a page node in this specified page;
Viewport information acquisition module, for obtaining the viewport information of this each tabular array correspondence page node that this grouping module obtains;
Memory module, the viewport information of this each tabular array correspondence page node got for the plurality of tabular array that this grouping module obtained and this viewport information acquisition module is stored in this designated memory space.
In the 4th kind of possible implementation that the disclosure provides, each tabular array comprises the array of equal number.
In the 5th kind of possible implementation that the disclosure provides, this device also includes:
Elevation information arranges module, for the viewport information according to the 3rd tabular array correspondence page node, arranges the elevation information of the 3rd tabular array correspondence page node.
In the 6th kind of possible implementation that the disclosure provides, the viewport information of page node at least includes elevation information, tip position information and bottom position information.
About the device in above-described embodiment, the concrete mode that wherein modules performs to operate has been described in detail in about the embodiment of the method, and explanation will be not set forth in detail herein.
Fig. 4 is the block diagram of a kind of memory management device 400 according to an exemplary embodiment. Such as, device 400 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, armarium, body-building equipment, personal digital assistant etc.
With reference to Fig. 4, device 400 can include following one or more assembly: processes assembly 402, memorizer 404, power supply module 406, multimedia groupware 404, audio-frequency assembly 410, input/output (I/O) interface 412, sensor cluster 414, and communications component 416.
Process assembly 402 and generally control the integrated operation of device 400, such as with display, call, data communication, the operation that camera operation and record operation are associated. Process assembly 402 and can include one or more processor 420 to perform instruction, to complete all or part of step of above-mentioned method. Additionally, process assembly 402 can include one or more module, it is simple to what process between assembly 402 and other assemblies is mutual. Such as, process assembly 402 and can include multi-media module, with facilitate multimedia groupware 408 and process between assembly 402 mutual.
Memorizer 404 is configured to store various types of data to support the operation at device 400. The example of these data includes any application program for operation on device 400 or the instruction of method, contact data, telephone book data, message, picture, video etc. Memorizer 404 can be realized by any kind of volatibility or non-volatile memory device or their combination, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that power supply module 406 is device 400 provide electric power. Power supply module 406 can include power-supply management system, one or more power supplys, and other generate, manage and distribute, with for device 400, the assembly that electric power is associated.
Multimedia groupware 408 includes the screen providing an output interface between described device 400 and user. In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP). If screen includes touch panel, screen may be implemented as touch screen, to receive the input signal from user. Touch panel includes one or more touch sensor to sense the gesture on touch, slip and touch panel. Described touch sensor can not only sense the border of touch or sliding action, but also detects the persistent period relevant to described touch or slide and pressure. In certain embodiments, multimedia groupware 408 includes a front-facing camera and/or post-positioned pick-up head. When device 400 is in operator scheme, during such as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside. Each front-facing camera and post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 410 is configured to output and/or input audio signal. Such as, audio-frequency assembly 410 includes a mike (MIC), and when device 400 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike is configured to receive external audio signal. The audio signal received can be further stored at memorizer 404 or send via communications component 416. In certain embodiments, audio-frequency assembly 410 also includes a speaker, is used for exporting audio signal.
I/O interface 412 provides interface for processing between assembly 402 and peripheral interface module, above-mentioned peripheral interface module can be keyboard, puts striking wheel, button etc. These buttons may include but be not limited to: home button, volume button, startup button and locking press button.
Sensor cluster 414 includes one or more sensor, for providing the state estimation of various aspects for device 400. Such as, what sensor cluster 414 can detect device 400 opens/closed mode, the relative localization of assembly, such as described assembly is display and the keypad of device 400, the position change of all right detecting device 400 of sensor cluster 414 or 400 1 assemblies of device, the presence or absence that user contacts with device 400, the variations in temperature of device 400 orientation or acceleration/deceleration and device 400. Sensor cluster 414 can include proximity transducer, is configured to when not having any physical contact object near detection. Sensor cluster 414 can also include optical sensor, such as CMOS or ccd image sensor, for using in imaging applications. In certain embodiments, this sensor cluster 414 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 416 is configured to facilitate between device 400 and other equipment the communication of wired or wireless mode. Device 400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or their combination. In one exemplary embodiment, communications component 416 receives the broadcast singal or the broadcast related information that manage system from external broadcasting via broadcast channel. In one exemplary embodiment, described communications component 416 also includes near-field communication (NFC) module, to promote junction service. Such as, can based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 400 can be realized by one or more application specific integrated circuits (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, is used for performing above-mentioned EMS memory management process.
In the exemplary embodiment, additionally providing a kind of non-transitory computer-readable recording medium including instruction, for instance include the memorizer 404 of instruction, above-mentioned instruction can have been performed said method by the processor 420 of device 400. Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of mobile terminal so that mobile terminal is able to carry out above-mentioned EMS memory management process.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other embodiment of the disclosure. The application is intended to any modification of the disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed the general principle of the disclosure and include the undocumented known general knowledge in the art of the disclosure or conventional techniques means. Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and various amendment and change can carried out without departing from the scope. The scope of the present disclosure is only limited by appended claim.

Claims (15)

1. an EMS memory management process, it is characterised in that described method includes:
According to first page node, the first corresponding for described first page node tabular array being loaded into internal memory, and first page node is rendered, described first page node refers to the page node in the visible viewport being shown in specified page;
When the rolling operation of described specified page being detected, according to second page node, the second corresponding for described second page node tabular array is loaded into internal memory, and described second page node is rendered, described second page node refers to and is shown in the page node in described visible viewport after rolling;
Reclaiming the internal memory shared by the 3rd tabular array in described first tabular array, described 3rd tabular array is the rendering data of the page node being no longer shown in described visible viewport after rolling.
2. method according to claim 1, it is characterised in that according to first page node, the first corresponding for first page node tabular array is loaded into internal memory and includes:
Will be stored in each viewport information of tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of described first page node, determine the first tabular array for rendering described first page node, and the first tabular array is loaded into internal memory.
3. method according to claim 1, it is characterised in that reclaim in described first tabular array the internal memory shared by the 3rd tabular array and include:
Will be stored in each viewport information of tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of described visible viewport, it is determined that described 3rd tabular array, and reclaim the internal memory shared by described 3rd tabular array.
4. method according to claim 1, it is characterised in that according to the stored tabular array of designated memory space, before the DOM Document Object Model page node of the specified page being shown in visible viewport is rendered, described method also includes:
When the load request of described specified page being detected, obtain the page data of described specified page;
Being grouped by the page data of described specified page, obtain multiple tabular array, each tabular array in the plurality of tabular array is for rendering a page node in described specified page;
Obtain the viewport information of described each tabular array correspondence page node;
The viewport information of the plurality of tabular array and described each tabular array correspondence page node is stored in described designated memory space.
5. method according to claim 1, it is characterised in that comprise the array of equal number in each tabular array.
6. method according to claim 1, it is characterised in that after reclaiming in described first tabular array the internal memory shared by the 3rd tabular array, described method also includes:
Viewport information according to described 3rd tabular array correspondence page node, arranges the elevation information of described 3rd tabular array correspondence page node.
7. method according to claim 1, it is characterised in that the viewport information of page node at least includes elevation information, tip position information and bottom position information.
8. a memory management device, it is characterised in that described device includes:
Processing module, for according to first page node, the first corresponding for described first page node tabular array being loaded into internal memory, and the first DOM Document Object Model page node is rendered, described first page node refers to the page node in the visible viewport being shown in specified page;
Described processing module is additionally operable to when the rolling operation of described specified page being detected, according to second page node, the second corresponding for described second page node tabular array is loaded into internal memory, and described second page node is rendered, described second page node refers to and is shown in the page node in described visible viewport after rolling;
Memory recycle module, for reclaiming the internal memory that described processing module is loaded in described first tabular array of internal memory shared by the 3rd tabular array, described 3rd tabular array is the rendering data of the page node being no longer shown in described visible viewport after rolling.
9. device according to claim 8, it is characterised in that described processing module is used for:
Will be stored in each viewport information of tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of described first page node, determine the first tabular array for rendering described first page node, and the first tabular array is loaded into internal memory.
10. device according to claim 8, it is characterised in that described Memory recycle module is used for:
Will be stored in each viewport information of tabular array correspondence page node in the tabular array in designated memory space to mate with the viewport information of described visible viewport, it is determined that described 3rd tabular array, and reclaim the internal memory shared by described 3rd tabular array.
11. device according to claim 8, it is characterised in that described device also includes:
Page data acquisition module, for when the load request of described specified page being detected, obtaining the page data of described specified page;
Grouping module, the page data of the specified page for being got by described page data acquisition module is grouped, and obtains multiple tabular array, and each tabular array in the plurality of tabular array is for rendering a page node in described specified page;
Viewport information acquisition module, for obtaining the viewport information of described each tabular array correspondence page node that described grouping module obtains;
Memory module, the viewport information of the described each tabular array correspondence page node got for the plurality of tabular array that described grouping module obtained and described viewport information acquisition module is stored in described designated memory space.
12. device according to claim 8, it is characterised in that comprise the array of equal number in each tabular array.
13. device according to claim 8, it is characterised in that described device also includes:
Elevation information arranges module, for the viewport information according to described 3rd tabular array correspondence page node, arranges the elevation information of described 3rd tabular array correspondence page node.
14. device according to claim 8, it is characterised in that the viewport information of page node at least includes elevation information, tip position information and bottom position information.
15. a memory management device, it is characterised in that including:
Processor;
For storing the memorizer of the executable instruction of processor;
Wherein, described processor is configured to:
According to first page node, the first corresponding for described first page node tabular array being loaded into internal memory, and the first DOM Document Object Model page node is rendered, described first page node refers to the page node in the visible viewport being shown in specified page;
When the rolling operation of described specified page being detected, according to second page node, the second corresponding for described second page node tabular array is loaded into internal memory, and described second page node is rendered, described second page node refers to and is shown in the page node in described visible viewport after rolling;
Reclaiming the internal memory shared by the 3rd tabular array in described first tabular array, described 3rd tabular array is the rendering data of the page node being no longer shown in described visible viewport after rolling.
CN201510956780.1A 2015-12-18 2015-12-18 EMS memory management process and device Active CN105630411B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510956780.1A CN105630411B (en) 2015-12-18 2015-12-18 EMS memory management process and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510956780.1A CN105630411B (en) 2015-12-18 2015-12-18 EMS memory management process and device

Publications (2)

Publication Number Publication Date
CN105630411A true CN105630411A (en) 2016-06-01
CN105630411B CN105630411B (en) 2019-09-27

Family

ID=56045409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510956780.1A Active CN105630411B (en) 2015-12-18 2015-12-18 EMS memory management process and device

Country Status (1)

Country Link
CN (1) CN105630411B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196964A (en) * 2017-12-29 2018-06-22 北京奇虎科技有限公司 A kind of method and apparatus by Streams Module
CN108595262A (en) * 2018-03-29 2018-09-28 北京奇艺世纪科技有限公司 Data processing method and device
CN109844716A (en) * 2016-10-20 2019-06-04 华为技术有限公司 Using the management-control method and management and control devices of starting
CN110209447A (en) * 2019-04-28 2019-09-06 五八有限公司 A kind of list page data display method and list page data presentation device
CN110413912A (en) * 2019-03-13 2019-11-05 腾讯科技(深圳)有限公司 A kind of EMS memory management process, device and terminal
CN110717120A (en) * 2018-07-12 2020-01-21 北京京东尚科信息技术有限公司 Webpage list display method and device
CN111240757A (en) * 2020-01-03 2020-06-05 北京小米移动软件有限公司 Fast application control method, device and storage medium
CN111898049A (en) * 2020-06-16 2020-11-06 广州市玄武无线科技股份有限公司 Table implementation method and device, computer terminal equipment and storage medium
CN113010824A (en) * 2021-03-05 2021-06-22 北京明略软件系统有限公司 Method and system for realizing unlimited scrolling of long list of web pages
CN114706649A (en) * 2022-05-19 2022-07-05 北京商越网络科技有限公司 Form field destroying and rebuilding method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205505A1 (en) * 2002-01-08 2004-10-14 Vans A. Marie Preprocessing and preloading digital display pages in multiple page digital data files
CN103914213A (en) * 2012-12-31 2014-07-09 北京新媒传信科技有限公司 Method and device for eliminating page dithering
CN104809240A (en) * 2015-05-13 2015-07-29 广州华多网络科技有限公司 Page processing method and equipment adopting same
CN104850415A (en) * 2014-02-13 2015-08-19 腾讯科技(深圳)有限公司 Method and apparatus for loading pages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205505A1 (en) * 2002-01-08 2004-10-14 Vans A. Marie Preprocessing and preloading digital display pages in multiple page digital data files
CN103914213A (en) * 2012-12-31 2014-07-09 北京新媒传信科技有限公司 Method and device for eliminating page dithering
CN104850415A (en) * 2014-02-13 2015-08-19 腾讯科技(深圳)有限公司 Method and apparatus for loading pages
CN104809240A (en) * 2015-05-13 2015-07-29 广州华多网络科技有限公司 Page processing method and equipment adopting same

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109844716B (en) * 2016-10-20 2021-05-07 华为技术有限公司 Application starting control method and control equipment
CN109844716A (en) * 2016-10-20 2019-06-04 华为技术有限公司 Using the management-control method and management and control devices of starting
US11474831B2 (en) 2016-10-20 2022-10-18 Huawei Technologies Co., Ltd. Application startup control method and control device
CN108196964A (en) * 2017-12-29 2018-06-22 北京奇虎科技有限公司 A kind of method and apparatus by Streams Module
CN108595262A (en) * 2018-03-29 2018-09-28 北京奇艺世纪科技有限公司 Data processing method and device
CN110717120A (en) * 2018-07-12 2020-01-21 北京京东尚科信息技术有限公司 Webpage list display method and device
CN110413912A (en) * 2019-03-13 2019-11-05 腾讯科技(深圳)有限公司 A kind of EMS memory management process, device and terminal
CN110413912B (en) * 2019-03-13 2024-04-12 腾讯科技(深圳)有限公司 Memory management method, device and terminal
CN110209447A (en) * 2019-04-28 2019-09-06 五八有限公司 A kind of list page data display method and list page data presentation device
CN111240757A (en) * 2020-01-03 2020-06-05 北京小米移动软件有限公司 Fast application control method, device and storage medium
CN111898049B (en) * 2020-06-16 2021-04-13 广州市玄武无线科技股份有限公司 Table implementation method and device, computer terminal equipment and storage medium
CN111898049A (en) * 2020-06-16 2020-11-06 广州市玄武无线科技股份有限公司 Table implementation method and device, computer terminal equipment and storage medium
CN113010824A (en) * 2021-03-05 2021-06-22 北京明略软件系统有限公司 Method and system for realizing unlimited scrolling of long list of web pages
CN114706649A (en) * 2022-05-19 2022-07-05 北京商越网络科技有限公司 Form field destroying and rebuilding method, device, equipment and storage medium
CN114706649B (en) * 2022-05-19 2023-01-17 北京商越网络科技有限公司 Form field destroying and rebuilding method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN105630411B (en) 2019-09-27

Similar Documents

Publication Publication Date Title
CN105630411A (en) Memory management method and apparatus
CN106294609A (en) page loading method and device
CN104375828A (en) Method and device for optimizing memory
CN105550357A (en) Web page refreshing method and device
CN104636106A (en) Picture displaying method and device and terminal device
CN106055707A (en) Bullet screen display method and device
CN104899610A (en) Picture classification method and device
CN105653505A (en) Method and device for regulating character display
CN105630337A (en) Control controlling method and device
CN105786507A (en) Display interface switching method and device
CN104391711A (en) Method and device for setting screen protection
CN105867733A (en) Notice display method and device and mobile device
CN105653165A (en) Method and device for regulating character display
CN105808305A (en) Static resource loading method and device
CN105824819A (en) Image loading method, device and electronic device
CN105630339A (en) Method and device for controlling page
CN105653612A (en) Page rendering method and device
CN104536787A (en) Resource preloading method and device
CN105550213A (en) Picture browsing method and device
CN104182505A (en) Webpage rearrangement method and device
CN104199609A (en) Cursor positioning method and device
CN105827834A (en) Mobile device application method and device
CN105808304A (en) Code deployment method, device and system
CN104850592A (en) Method and device for generating model file
CN104951522A (en) Searching method and device

Legal Events

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