CN105630411B - EMS memory management process and device - Google Patents

EMS memory management process and device Download PDF

Info

Publication number
CN105630411B
CN105630411B CN201510956780.1A CN201510956780A CN105630411B CN 105630411 B CN105630411 B CN 105630411B CN 201510956780 A CN201510956780 A CN 201510956780A CN 105630411 B CN105630411 B CN 105630411B
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.)
Active
Application number
CN201510956780.1A
Other languages
Chinese (zh)
Other versions
CN105630411A (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.)
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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

Present disclose provides a kind of EMS memory management process and devices, belong to field of terminal technology.Method includes: corresponding first tabular array of the first page node to be loaded onto memory, and render to first page node according to first page node;When detecting the scroll operation of the specified page, according to second page node, corresponding second tabular array of the second page node is loaded onto memory, and render to the second page node;The occupied memory of third tabular array in first tabular array is recycled, the third tabular array is the rendering data for the page node being no longer shown in the visible viewport after rolling.The disclosure can be realized during the display of the specified page, and recycling is not used for the page data that rendering is shown in visible viewport, and then can reduce memory consumption, improve the stability of terminal operating.

Description

EMS memory management process and device
Technical field
This disclosure relates to field of terminal technology more particularly to a kind of EMS memory management process and device.
Background technique
With the continuous development of terminal technology, the performance of terminal is also being continuously improved, and can install a variety of function at the terminal The application of energy is to provide service for user.However, using in the process of running can a large amount of committed memories, thus to the performance of terminal It impacts, therefore, how effectively to carry out memory management, become an important research direction for improving terminal capabilities.
When user is by the mounted browser class application-browsing page in terminal, if a terminal detects that the page On refresh function option trigger action, then recycle the occupied memory of page data of the page, and reacquire newest Page data, to be rendered again to the page;If detecting the shutoff operation of the page, the page of the page is directly recycled The occupied memory of data.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of EMS memory management process and device.
According to the first aspect of the embodiments of the present disclosure, a kind of EMS memory management process is provided, comprising:
According to first page node, corresponding first tabular array of the first page node is loaded onto memory, and to One page node is rendered, which refers to the page node being shown in the visible viewport of specified page;
It is according to second page node, the second page node is corresponding when detecting the scroll operation of the specified page The second tabular array be loaded onto memory, and the second page node is rendered, which refers to by rolling The page node being shown in after dynamic in the visible viewport;
The occupied memory of third tabular array in first tabular array is recycled, which is by rolling It is no longer shown in the rendering data of the page node in the visible viewport afterwards.
In the first possible implementation of the first aspect of the disclosure, according to first page node, by first page Corresponding first tabular array of node is loaded onto memory and includes:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in It is matched with the viewport information of the first page node, determines the first tabular array for rendering the first page node, And the first tabular array is loaded onto memory.
In second of possible implementation of the first aspect of the disclosure, third array in first tabular array is recycled The occupied memory of list includes:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in The viewport information of viewport visible with this is matched, and determines the third tabular array, and is recycled occupied by the third tabular array Memory.
In the third possible implementation of the first aspect of the disclosure, the array that is stored according to designated memory space List, before rendering to the DOM Document Object Model page node for the specified page being shown in visible viewport, this method is also Include:
In the load request for detecting the specified page, the page data of the specified page is obtained;
The page data of the specified page is grouped, multiple tabular array are obtained, it is every in multiple tabular array A tabular array is used to render a page node in the specified page;
Obtain the viewport information of each tabular array corresponding page node;
The viewport information of multiple tabular array and each tabular array corresponding page node is stored in this specified to deposit It stores up in space.
In the 4th kind of possible implementation of the first aspect of the disclosure, comprising identical quantity in each tabular array Array.
In the 5th kind of possible implementation of the first aspect of the disclosure, third array in first tabular array is recycled After the occupied memory of list, this method further include:
According to the viewport information of the third tabular array corresponding page node, which is set The elevation information of point.
In the 6th kind of possible implementation of the first aspect of the disclosure, the viewport information of page node includes at least height Spend information, top position information and bottom position information.
According to the second aspect of an embodiment of the present disclosure, a kind of memory management device is provided, comprising:
Processing module, for according to first page node, corresponding first tabular array of the first page node to be loaded To memory, and the first DOM Document Object Model page node is rendered, which, which refers to, is shown in specified page Visible viewport in page node;
The processing module is also used to when detecting the scroll operation of the specified page, according to second page node, by this Corresponding second tabular array of second page node is loaded onto memory, and renders to the second page node, the second page Face node refers to the page node being shown in the visible viewport after rolling;
Memory recycle module is loaded onto third array column in first tabular array of memory for recycling the processing module The occupied memory of table, the third tabular array are the wash with watercolours for the page node being no longer shown in the visible viewport after rolling Contaminate data.
In the first possible implementation of the second aspect of the disclosure, which is used for:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in It is matched with the viewport information of the first page node, determines the first tabular array for rendering the first page node, And the first tabular array is loaded onto memory.
In second of possible implementation of the second aspect of the disclosure, which is used for:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in The viewport information of viewport visible with this is matched, and determines the third tabular array, and is recycled occupied by the third tabular array Memory.
In the third possible implementation of the second aspect of the disclosure, the device further include:
Page data obtains module, for obtaining the specified page in the load request for detecting the specified page Page data;
The page data of grouping module, the specified page for getting page data acquisition module is grouped, Multiple tabular array are obtained, each tabular array in multiple tabular array is used to render a page in the specified page Node;
Viewport information obtains module, for obtaining each tabular array corresponding page node that the grouping module obtains Viewport information;
Memory module, multiple tabular array and the viewport information for obtaining the grouping module obtain module and obtain To the viewport information of each tabular array corresponding page node be stored in the designated memory space.
In the 4th kind of possible implementation of the second aspect of the disclosure, comprising identical quantity in each tabular array Array.
In the 5th kind of possible implementation of the second aspect of the disclosure, the device further include:
Elevation information setup module, for the viewport information according to the third tabular array corresponding page node, setting should The elevation information of third tabular array corresponding page node.
In the 6th kind of possible implementation of the second aspect of the disclosure, the viewport information of page node includes at least height Spend information, top position information and bottom position information.
The third aspect additionally provides a kind of memory management device, comprising:
Processor;
Memory for the instruction that storage processor can be performed;
Wherein, which is configured as:
According to first page node, corresponding first tabular array of the first page node is loaded onto memory, and to One DOM Document Object Model page node is rendered, which, which refers to, is shown in the visible viewport of specified page Page node;
It is according to second page node, the second page node is corresponding when detecting the scroll operation of the specified page The second tabular array be loaded onto memory, and the second page node is rendered, which refers to by rolling The page node being shown in after dynamic in the visible viewport;
The occupied memory of third tabular array in first tabular array is recycled, which is by rolling It is no longer shown in the rendering data of the page node in the visible viewport afterwards.
The technical solution that the embodiment of the present disclosure provides has the benefit that
The disclosure is by the way that according to first page node, corresponding first tabular array of the first page node is loaded onto Memory, and first page node is rendered, when detecting the scroll operation of the specified page, according to second page section Corresponding second tabular array of the second page node is loaded onto memory, and carries out wash with watercolours to the second page node by point Dye recycles the occupied memory of third tabular array in first tabular array, can be realized the display in the specified page In the process, recycling is not used for the page data that rendering is shown in visible viewport, and then can reduce memory consumption, improves terminal The stability of operation.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of EMS memory management process shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of EMS memory management process shown according to an exemplary embodiment;
Fig. 3 is a kind of memory management device block diagram shown according to an exemplary embodiment;
Fig. 4 is a kind of block diagram of memory management device 400 shown according to an exemplary embodiment.
Specific embodiment
To keep the purposes, technical schemes and advantages of the disclosure clearer, below in conjunction with attached drawing to disclosure embodiment party Formula is described in further detail.
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of EMS memory management process shown according to an exemplary embodiment, as shown in Figure 1, memory Management method is for including the following steps in terminal.
In a step 101, according to first page node, corresponding first tabular array of the first page node is loaded onto Memory, and first page node is rendered, which, which refers to, is shown in the visible viewport of specified page Page node.
In a step 102, when detecting the scroll operation of the specified page, according to second page node, by this second Corresponding second tabular array of page node is loaded onto memory, and renders to the second page node, the second page section Point refers to the page node being shown in the visible viewport after rolling.
In step 103, the occupied memory of third tabular array in first tabular array, third array column are recycled Table is the rendering data for the page node being no longer shown in the visible viewport after rolling.
The method that the embodiment of the present disclosure provides, it is by according to first page node, the first page node is corresponding First tabular array is loaded onto memory, and renders to first page node, when the rolling for detecting the specified page is grasped When making, according to second page node, corresponding second tabular array of the second page node is loaded onto memory, and to described Second page node is rendered, and is recycled the occupied memory of third tabular array in first tabular array, be can be realized During the display of the specified page, recycling is not used for the page data that rendering is shown in visible viewport, and then can subtract Few memory consumption, improves the stability of terminal operating.
It is according to first page node, first page node is corresponding in the first possible implementation of the disclosure First tabular array is loaded onto memory
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in It is matched with the viewport information of the first page node, determines that the first array for rendering the first page node arranges Table, and the first tabular array is loaded onto memory.
In second of possible implementation of the disclosure, recycle in first tabular array shared by third tabular array Memory includes:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in It is matched with the viewport information of the visible viewport, determines the third tabular array, and recycle the third tabular array Occupied memory.
In the third possible implementation of the disclosure, the tabular array stored according to designated memory space, to aobvious Show before the DOM Document Object Model page node of the specified page in visible viewport is rendered, the method also includes:
When detecting the load request of the specified page, the page data of the specified page is obtained;
The page data of the specified page is grouped, obtains multiple tabular array, in the multiple tabular array Each tabular array be used to render a page node in the specified page;
Obtain the viewport information of each tabular array corresponding page node;
The viewport information of the multiple tabular array and each tabular array corresponding page node is stored in described In designated memory space.
In the 4th kind of possible implementation of the disclosure, the array of identical quantity is included in each tabular array.
In the 5th kind of possible implementation of the disclosure, recycle in first tabular array shared by third tabular array After memory, the method also includes:
According to the viewport information of the third tabular array corresponding page node, the third tabular array is set and corresponds to page The elevation information of face node.
In the 6th kind of possible implementation of the disclosure, the viewport information of page node includes at least elevation information, top Portion's location information and bottom position information.
All the above alternatives can form the alternative embodiment of the disclosure, herein no longer using any combination It repeats one by one.
Fig. 2 is a kind of flow chart of EMS memory management process shown according to an exemplary embodiment.The execution of the embodiment Main body can be terminal, and referring to Fig. 2, which is specifically included:
In step 201, in the load request for detecting the specified page, the page data of the specified page is obtained.
In user's browser class application-browsing page mounted by terminal, if terminal is being detected to the page Shutoff operation or refresh operation, can the occupied memory of page data to the page be recycled, however work as terminal Multiple tasks are performed simultaneously, and when the page data is more, if the page is constantly in the state of being not turned off, and only show the page Limited page data in face, above-mentioned EMS memory management process will cause the page data and largely occupy to memory, influence at terminal Manage the speed of other tasks.To solve the above-mentioned problems, the embodiment of the present disclosure provides one kind during page display to this The method that memory occupied by page data is managed.
When detecting the load request to the specified page, the page data of the specified page is obtained;Wherein, this is specified The page can apply shown any page for browser class, be also possible to the shown page in other application, and the disclosure is real It applies example and this is not construed as limiting;The page data of the specified page includes at least the data for rendering the page, can also include Structure class data of the page etc., the embodiment of the present disclosure is not construed as limiting particular content included by the page data.
The method for obtaining the page data of the specified page can be with are as follows: according to URL (the Uniform Resource of the page Locator, uniform resource locator), access request is sent to the specified page corresponding server, to obtain server return The specified page page data;The page data of the specified page can also be obtained by other methods, the disclosure is implemented Example is not construed as limiting this.
In step 202, the page data of the specified page is grouped, obtains multiple tabular array, multiple number Each tabular array in Groups List is used to render a page node in the specified page.
The page data of the specified page exists in the form of table data, is grouped to the table data, to obtain Multiple tabular array, wherein include the array of identical quantity in each tabular array.For example, the table data be 1,2,3, 4 ..., 99,100 }, which can be divided into { 1,2,3,4,5 }, { 6,7,8,9,10 } ..., 96,97,98,99, 100};Wherein, each number represents an array, and { 1,2,3,4,5 } indicates that a tabular array, each tabular array are used for wash with watercolours Contaminate a page node in the specified page.Realize that the program segment of above-mentioned steps can be with by JavaScript are as follows:
Wherein, one page node of a section node on behalf, each section node include multiple DOM (Document Object Model, DOM Document Object Model) node, a display elements in the specified page are by least one DOM node rendering.It is of course also possible to realize that above-mentioned steps, the embodiment of the present invention are not construed as limiting this by other programming languages.
It should be noted that the number of each included array of tabular array can be different for the different pages, specifically may be used With according to the page the display elements of visible viewport how much determinations, if the page is more in the display elements of visible viewport When, the array number that each tabular array is included is more, if the page is less in the display elements of visible viewport, every number The array number that Groups List is included is less;It is of course also possible to determine the number that each tabular array is included by other methods Group number, the embodiment of the present disclosure are not construed as limiting this.
By the way that the page data of the specified page to be grouped, multiple tabular array are obtained, are made it possible to more according to this A tabular array, when page node is not shown in visible viewport, can be removed by group by group rendering page node and be used for wash with watercolours Memory shared by the tabular array of the page node is contaminated, it, can be by a group general when the page node is shown in again in visible viewport The corresponding tabular array of page node is reloaded to memory, to render to the page node, and then can shown When the specified page, memory occupancy volume is reduced, and then memory consumption can be reduced, improve the stability of terminal operating.
In step 203, the viewport information of each tabular array corresponding page node is obtained.
Wherein, the viewport information of page node includes at least elevation information, top position information and bottom position information;When So, the viewport information of the page node can also include width information, leftward position information and right positions information etc., can be with Including other viewport informations, the embodiment of the present disclosure is not construed as limiting this.
It should be noted that the top position information refers to height and position letter of the page node in the specified page Breath, correspondingly, the bottom position information are also bottom position information of the page node in the specified page.
For any tabular array, the method for obtaining the viewport information of the tabular array corresponding page node can be with are as follows: by Include multiple DOM nodes in the page node, therefore can be by obtaining the page section from the page data of the specified page The viewport information of each DOM node in point determines the viewport letter of the page node according to the viewport information of multiple DOM node Breath;Can also obtain the viewport information of the tabular array corresponding page node by other methods, the embodiment of the present disclosure to this not It limits.
By obtaining the viewport information of each tabular array corresponding page node, enable the terminal to according to every number The viewport information of Groups List corresponding page node, determines whether the corresponding page node of each tabular array is shown in visible viewport In, and then can be realized by group load and recycling memory.
In step 204, the viewport information of multiple tabular array and each tabular array corresponding page node is deposited It is stored in the designated memory space.
The designated memory space can be the CacheList (cache list) of terminal, be also possible to other memory spaces, this Open embodiment is not construed as limiting this.
In step 205, according to first page node, corresponding first tabular array of the first page node is loaded onto Memory, and first page node is rendered, which, which refers to, is shown in the visible viewport of specified page Page node.
If terminal shows the specified page since the top position of the specified page, the specified page is in end panel The region that can be shown on curtain is visible viewport, and all page nodes in the visible viewport are first page node, will Corresponding first tabular array of the first page node is loaded onto memory, and renders to the first page node, with display Page node in the visible viewport of the specified page.
Wherein it is determined that corresponding first tabular array of the first page node and first tabular array is loaded onto memory Specific method can be with are as follows: each tabular array corresponding page node in the tabular array in designated memory space will be stored in Viewport information is matched with the viewport information of the first page node, determines the first number for rendering the first page node Groups List, and the first tabular array is loaded onto memory.Determine the process of corresponding first tabular array of the first page node, It can also be realized by other methods, the embodiment of the present disclosure is not construed as limiting this.
It wherein, will when the viewport information of page node includes elevation information, top position information and bottom position information Be stored in the tabular array in the designated memory space viewport information of each tabular array corresponding page node and this first The viewport information of page node carries out matched specific method can be with are as follows: the array being stored in the designated memory space is arranged Any tabular array in table obtains the viewport information of the tabular array corresponding page node, including the tabular array corresponds to page Elevation information, top position information and the bottom position information of face node, according to the viewport information of the page node, with this first The viewport information of multiple page nodes in page node is matched.
It should be noted that the first page node refers to the multiple page nodes being shown in visible viewport, that is to say, Each page node in multiple page node is referred to as first page node.
The viewport letter of each tabular array corresponding page node in the tabular array in the designated memory space will be stored in The viewport information of breath and the first page node carries out matched process, can be according to included by the viewport information of the page node The difference of information takes different methods to realize, for example, when the page node viewport information includes is width information, a left side When side position information and right positions information, according to the width information, leftward position information and right positions information and it can be somebody's turn to do The viewport information of first page node is matched;The matching process, the embodiment of the present disclosure can also be realized using other methods This is not construed as limiting.
By the way that according to first page node, corresponding first tabular array of the first page node is loaded onto memory, and First page node is rendered, can be realized grouping load, and then can be improved page loading velocity and display speed.
In step 206, when detecting the scroll operation of the specified page, according to second page node, by this second Corresponding second tabular array of page node is loaded onto memory, and renders to the second page node, the second page section Point refers to the page node being shown in the visible viewport after rolling.
After each scroll operation, can all it become in the page node for the specified page that the visible viewport is shown Change, therefore, when detecting the scroll operation of the specified page, array column is corresponded to according to page node shown by visible viewport Table, the page node shown to visible viewport after each roll renders, to show the specific page shown by visible viewport The page node in face.
If the screen of the terminal is non-touch screen, the scroll operation can by the scroll key of mouse, to pull this specified Progress bar key on the page is realized by keyboard upper and lower direction function key;If the screen of the terminal is touch screen, should Scroll operation can be realized by sliding the specified page upward or downward.According to function shown by terminal configuration difference and the page Key is different, can realize that the scroll operation, the embodiment of the present disclosure are not construed as limiting this using different methods.
Determine the second page node corresponding and tabular array and the side that second tabular array is loaded onto memory Method determines corresponding second tabular array of first page node with step 205 and first tabular array is loaded onto memory Method similarly, does not repeat herein.
It should be noted that the second page node refers to that after rolling, the specified page is shown in visible viewport Multiple page nodes, that is to say, each page node in multiple page node is referred to as second page node.In addition, When detecting the scroll operation of the specified page each time, will be shown in visible viewport by the specified page before rolling Page node is referred to as first page node, is referred to as by rolling the page node that the specified page is shown in visible viewport Second page node.
By when detecting the scroll operation of the specified page, according to second page node, by the second page node Corresponding second tabular array is loaded onto memory, and renders to the second page node;It can be realized grouping load and divide Group renders the purpose of the specified page.
In step 207, the occupied memory of third tabular array in first tabular array, third array column are recycled Table is the rendering data for the page node being no longer shown in the visible viewport after rolling.
The specific method for determining the third tabular array and recycling memory occupied by the third tabular array can be with are as follows: will deposit It is stored in viewport information viewport visible with this of each tabular array corresponding page node in the tabular array in designated memory space Viewport information matched, determine the third tabular array, and recycle the occupied memory of third tabular array.Wherein, The viewport information for being stored in each tabular array corresponding page node in the tabular array in designated memory space is visible with this The viewport information of viewport carries out matched method, will be stored in the tabular array in the designated memory space with step 205 It is same that the viewport information of the viewport information of each tabular array corresponding page node and the first page node carries out matched method Reason, details are not described herein again.
It should be noted that if page node shown in visible viewport corresponds to a part of a certain tabular array, such as The fruit tabular array is not stored in memory, then the tabular array is loaded onto memory, if in the tabular array is stored in In depositing, then the occupied memory of the tabular array is not recycled.
By recycling the occupied memory of third tabular array in first tabular array, can be realized in the specified page Display during, the occupied memory of page data of the specified page is recycled in grouping, and then can reduce memory consumption, mentions The stability of high terminal operating.
In another embodiment of the disclosure, recycle in first tabular array occupied memory of third tabular array it Afterwards, according to the viewport information of the third tabular array corresponding page node, which is set Elevation information.Wherein, the viewport information of the page node includes elevation information, by the way that the third tabular array corresponding page is arranged The elevation information of node, can be avoided that there is a situation where the pages to collapse.
Realize that the program segment that the elevation information of the third tabular array corresponding page node is arranged can by JavaScript With are as follows:
It is of course also possible to realize the height letter that the third tabular array corresponding page node is arranged by other programming languages The process of breath, how the embodiment of the present invention is to realizing that the process is not construed as limiting.
It should be noted that realizing the matching of tabular array and the treatment process after matching in step 206 and step 207 Program segment frames can be with are as follows:
If (in visible viewport)
If (whether corresponding page node rendered)
It does not handle
}else{
Corresponding page node is rendered according to tabular array
}
}else{
Recycle the tabular array and the occupied memory of other data for rendering the corresponding page node
And the elevation information of the tabular array is set, it is collapsed to avoid the page
}
The method that the embodiment of the present disclosure provides, it is by according to first page node, the first page node is corresponding First tabular array is loaded onto memory, and renders to first page node, when the rolling for detecting the specified page is grasped When making, according to second page node, corresponding second tabular array of the second page node is loaded onto memory, and to described Second page node is rendered, and is recycled the occupied memory of third tabular array in first tabular array, be can be realized During the display of the specified page, recycling is not used for the page data that rendering is shown in visible viewport, and then can subtract Few memory consumption, improves the stability of terminal operating;Further, pass through the third array column in recycling first tabular array After the occupied memory of table, according to the viewport information of the third tabular array corresponding page node, third array column are set The elevation information of table corresponding page node can be avoided the generation page and collapse, improves the stability that the page is shown.
Fig. 3 is a kind of memory management device block diagram shown according to an exemplary embodiment.Referring to Fig. 3, which includes Processing module 301 and Memory recycle module 302.
Processing module 301, for according to first page node, corresponding first tabular array of the first page node to be added It is loaded onto memory, and the first DOM Document Object Model page node is rendered, which, which refers to, is shown in specific page Page node in the visible viewport in face;
The processing module 301 is also used to when detecting the scroll operation of the specified page, will according to second page node Corresponding second tabular array of the second page node is loaded onto memory, and renders to the second page node, this second Page node refers to the page node being shown in the visible viewport after rolling;
Memory recycle module 302 is loaded onto third in first tabular array of memory for recycling the processing module 301 The occupied memory of tabular array, the third tabular array are the page section being no longer shown in the visible viewport after rolling The rendering data of point.
In the first possible implementation that the disclosure provides, which is used for:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in It is matched with the viewport information of the first page node, determines the first tabular array for rendering the first page node, And the first tabular array is loaded onto memory.
In second of possible implementation that the disclosure provides, which is used for:
The viewport information of each tabular array corresponding page node in the tabular array in designated memory space will be stored in The viewport information of viewport visible with this is matched, and determines the third tabular array, and is recycled occupied by the third tabular array Memory.
In the third possible implementation that the disclosure provides, the device further include:
Page data obtains module, for obtaining the specified page in the load request for detecting the specified page Page data;
The page data of grouping module, the specified page for getting page data acquisition module is grouped, Multiple tabular array are obtained, each tabular array in multiple tabular array is used to render a page in the specified page Node;
Viewport information obtains module, for obtaining each tabular array corresponding page node that the grouping module obtains Viewport information;
Memory module, multiple tabular array and the viewport information for obtaining the grouping module obtain module and obtain To the viewport information of each tabular array corresponding page node be stored in the designated memory space.
In the 4th kind of possible implementation that the disclosure provides, the array of identical quantity is included in each tabular array.
In the 5th kind of possible implementation that the disclosure provides, the device further include:
Elevation information setup module, for the viewport information according to the third tabular array corresponding page node, setting should The elevation information of third tabular array corresponding page node.
In the 6th kind of possible implementation that the disclosure provides, the viewport information of page node, which includes at least height, to be believed Breath, top position information and bottom position information.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 4 is a kind of block diagram of memory management device 400 shown according to an exemplary embodiment.For example, device 400 can To be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices are good for Body equipment, personal digital assistant etc..
Referring to Fig. 4, device 400 may include following one or more components: processing component 402, memory 404, power supply Component 406, multimedia component 404, audio component 410, input/output (I/O) interface 412, sensor module 414, Yi Jitong Believe component 416.
The integrated operation of the usual control device 400 of processing component 402, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 402 may include that one or more processors 420 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 402 may include one or more modules, just Interaction between processing component 402 and other assemblies.For example, processing component 402 may include multi-media module, it is more to facilitate Interaction between media component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in device 400.These data are shown Example includes the instruction of any application or method for operating on device 400, contact data, and telephone book data disappears Breath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 406 provides electric power for the various assemblies of device 400.Power supply module 406 may include power management system System, one or more power supplys and other with for device 400 generate, manage, and distribute the associated component of electric power.
Multimedia component 408 includes the screen of one output interface of offer between described device 400 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 408 includes a front camera and/or rear camera.When device 400 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a Mike Wind (MIC), when device 400 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 404 or via communication set Part 416 is sent.In some embodiments, audio component 410 further includes a loudspeaker, is used for output audio signal.
I/O interface 412 provides interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 414 includes one or more sensors, and the state for providing various aspects for device 400 is commented Estimate.For example, sensor module 414 can detecte the state that opens/closes of device 400, and the relative positioning of component, for example, it is described Component is the display and keypad of device 400, and sensor module 414 can be with 400 1 components of detection device 400 or device Position change, the existence or non-existence that user contacts with device 400,400 orientation of device or acceleration/deceleration and device 400 Temperature change.Sensor module 414 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 414 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device 400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 416 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 400 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned EMS memory management process.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 404 of instruction, above-metioned instruction can be executed by the processor 420 of device 400 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium is additionally provided, when the storage is situated between When instruction in matter is executed 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 the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (14)

1. a kind of EMS memory management process, which is characterized in that the described method includes:
According to the viewport information of first page node, corresponding first tabular array of the first page node is loaded onto interior It deposits, and first page node is rendered, the first page node, which refers to, to be shown in the visible viewport of specified page Page node;
When detecting the scroll operation of the specified page, according to the viewport information of second page node, by the second page Node corresponding second tabular array in face is loaded onto memory, and renders to the second page node, the second page Node refers to the page node being shown in the visible viewport after rolling;
The occupied memory of third tabular array in first tabular array is recycled, the third tabular array is by rolling It is no longer shown in the rendering data of the page node in the visible viewport afterwards, the viewport information of the page node includes at least Elevation information, top position information and bottom position information.
2. the method according to claim 1, wherein according to the viewport information of first page node, by first page Node corresponding first tabular array in face is loaded onto memory and includes:
The viewport information of each tabular array corresponding page node and institute in the tabular array in designated memory space will be stored in The viewport information for stating first page node is matched, and determines the first tabular array for rendering the first page node, And the first tabular array is loaded onto memory.
3. the method according to claim 1, wherein third tabular array institute in recycling first tabular array The memory of occupancy includes:
The viewport information of each tabular array corresponding page node and institute in the tabular array in designated memory space will be stored in The viewport information for stating visible viewport is matched, and determines the third tabular array, and is recycled shared by the third tabular array Memory.
4. the method according to claim 1, wherein the tabular array stored according to designated memory space, right Before the DOM Document Object Model page node for the specified page being shown in visible viewport is rendered, the method also includes:
When detecting the load request of the specified page, the page data of the specified page is obtained;
The page data of the specified page is grouped, multiple tabular array are obtained, it is every in the multiple tabular array A tabular array is used to render a page node in the specified page;
Obtain the viewport information of each tabular array corresponding page node;
The viewport information of the multiple tabular array and each tabular array corresponding page node is stored in described specified In memory space.
5. the method according to claim 1, wherein including the array of identical quantity in each tabular array.
6. the method according to claim 1, wherein third tabular array institute in recycling first tabular array After the memory of occupancy, the method also includes:
According to the viewport information of the third tabular array corresponding page node, the third tabular array corresponding page section is set The elevation information of point.
7. a kind of memory management device, which is characterized in that described device includes:
Processing module, for the viewport information according to first page node, by corresponding first array of the first page node List is loaded onto memory, and renders to the first DOM Document Object Model page node, and the first page node refers to display Page node in the visible viewport of specified page;
The processing module is also used to when detecting the scroll operation of the specified page, according to the viewport of second page node Corresponding second tabular array of the second page node is loaded onto memory, and carried out to the second page node by information Rendering, the second page node refer to the page node being shown in the visible viewport after rolling;
Memory recycle module is loaded onto third array column in first tabular array of memory for recycling the processing module The occupied memory of table, the third tabular array are the page node being no longer shown in the visible viewport after rolling Rendering data, the viewport information of page node includes at least elevation information, top position information and bottom position information.
8. device according to claim 7, which is characterized in that the processing module is used for:
The viewport information of each tabular array corresponding page node and institute in the tabular array in designated memory space will be stored in The viewport information for stating first page node is matched, and determines the first tabular array for rendering the first page node, And the first tabular array is loaded onto memory.
9. device according to claim 7, which is characterized in that the Memory recycle module is used for:
The viewport information of each tabular array corresponding page node and institute in the tabular array in designated memory space will be stored in The viewport information for stating visible viewport is matched, and determines the third tabular array, and is recycled shared by the third tabular array Memory.
10. device according to claim 7, which is characterized in that described device further include:
Page data obtains module, for obtaining the specified page when detecting the load request of the specified page Page data;
The page data of grouping module, the specified page for getting page data acquisition module is grouped, and is obtained To multiple tabular array, each tabular array in the multiple tabular array is used to render a page in the specified page Face node;
Viewport information obtains module, for obtaining each tabular array corresponding page node that the grouping module obtains Viewport information;
Memory module, the multiple tabular array and the viewport information for obtaining the grouping module obtain module and obtain The viewport information for each tabular array corresponding page node got is stored in designated memory space.
11. device according to claim 7, which is characterized in that include the array of identical quantity in each tabular array.
12. device according to claim 7, which is characterized in that described device further include:
Elevation information setup module, for the viewport information according to the third tabular array corresponding page node, described in setting The elevation information of third tabular array corresponding page node.
13. a kind of memory management device characterized by comprising
Processor;
Memory for the instruction that storage processor can be performed;
Wherein, the processor is configured to:
According to the viewport information of first page node, corresponding first tabular array of the first page node is loaded onto interior It deposits, and the first DOM Document Object Model page node is rendered, the first page node, which refers to, is shown in specified page It can be seen that the page node in viewport;
When detecting the scroll operation of the specified page, according to the viewport information of second page node, by the second page Node corresponding second tabular array in face is loaded onto memory, and renders to the second page node, the second page Node refers to the page node being shown in the visible viewport after rolling;
The occupied memory of third tabular array in first tabular array is recycled, the third tabular array is by rolling It is no longer shown in the rendering data of the page node in the visible viewport afterwards, the viewport information of page node includes at least height Information, top position information and bottom position information.
14. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage at least one refers to It enables, claim 1-6 any EMS memory management process is realized when described instruction is executed by processor.
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 CN105630411A (en) 2016-06-01
CN105630411B true 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)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220077B (en) * 2016-10-20 2019-03-19 华为技术有限公司 Using the management-control method and management and control devices of starting
CN108196964A (en) * 2017-12-29 2018-06-22 北京奇虎科技有限公司 A kind of method and apparatus by Streams Module
CN108595262B (en) * 2018-03-29 2021-06-22 北京奇艺世纪科技有限公司 Data processing method and device
CN110717120B (en) * 2018-07-12 2024-06-18 北京京东尚科信息技术有限公司 Webpage list display method and device
CN110413912B (en) * 2019-03-13 2024-04-12 腾讯科技(深圳)有限公司 Memory management method, device and terminal
CN110209447B (en) * 2019-04-28 2023-02-28 五八有限公司 List page data display method and list page data display device
CN111240757B (en) * 2020-01-03 2024-02-06 北京小米移动软件有限公司 Quick 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
CN113010824A (en) * 2021-03-05 2021-06-22 北京明略软件系统有限公司 Method and system for realizing unlimited scrolling of long list of web pages
CN113127779B (en) * 2021-03-22 2024-06-21 北京达佳互联信息技术有限公司 Data viewing method and device, electronic equipment and storage medium
CN114706649B (en) * 2022-05-19 2023-01-17 北京商越网络科技有限公司 Form field destroying and rebuilding method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN105630411A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
CN105630411B (en) EMS memory management process and device
KR102241994B1 (en) Method for controlling function using electronic pen and an electronic device thereof
CN105657173B (en) Volume adjusting method, device and mobile terminal
CN106294609A (en) page loading method and device
US20140136213A1 (en) Mobile terminal and control method thereof
KR20160080036A (en) User termincal device and methods for controlling the user termincal device thereof
CN104536787B (en) Resource preloads method and device
CN105430715B (en) Control the method and device of WIFI scanning
CN108038102A (en) Recommendation method, apparatus, terminal and the storage medium of facial expression image
WO2016065814A1 (en) Information selection method and device
CN105630339A (en) Method and device for controlling page
CN105630337A (en) Control controlling method and device
CN105824819A (en) Image loading method, device and electronic device
CN105955808B (en) The task management method and device of instant messaging application
CN106504295A (en) Render the method and device of picture
CN108829475A (en) UI method for drafting, device and storage medium
CN105957011B (en) Image processing method and device
CN106713656A (en) Photographing method and mobile terminal
CN108009273B (en) Image display method, image display device and computer-readable storage medium
CN105827834A (en) Mobile device application method and device
CN108874481A (en) Handle the method and device of suspended window
CN105677215A (en) Application control method and apparatus
CN107168969A (en) A kind of page elements control method, device and electronic equipment
CN105183326B (en) list display method and device
CN108319885B (en) Fingerprint identification 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