WO2018032698A1 - Page turning method and device, and writing terminal - Google Patents

Page turning method and device, and writing terminal Download PDF

Info

Publication number
WO2018032698A1
WO2018032698A1 PCT/CN2016/113340 CN2016113340W WO2018032698A1 WO 2018032698 A1 WO2018032698 A1 WO 2018032698A1 CN 2016113340 W CN2016113340 W CN 2016113340W WO 2018032698 A1 WO2018032698 A1 WO 2018032698A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
object data
serialized
current memory
jump
Prior art date
Application number
PCT/CN2016/113340
Other languages
French (fr)
Chinese (zh)
Inventor
扶宇琳
Original Assignee
广州视睿电子科技有限公司
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 广州视睿电子科技有限公司 filed Critical 广州视睿电子科技有限公司
Publication of WO2018032698A1 publication Critical patent/WO2018032698A1/en

Links

Images

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/0608Saving storage space on 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
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0661Format or protocol conversion arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to the field of writing software, and in particular, to a page turning method, device and writing terminal.
  • each writing stroke is stored as an object in the memory.
  • This object of writing the handwriting includes a plurality of objects constituting the point of the handwriting, the number of points and the handwriting. The length is positively correlated, and the longer the handwriting, the more points; at the same time, the generation of the handwriting points is related to the touch event. The slower the writing, the more touch events are generated, and the more points that constitute the handwriting.
  • write a stroke of a word that will contain at least 50 points and will produce 50 point objects in memory.
  • the system has an automatic garbage collection mechanism. This is a feature that inherits from the Java language.
  • system resources system memory
  • the system automatically reclaims resources that are no longer used.
  • recycling the system temporarily stops the application running until the recycling is completed, which will cause the application to be stuck.
  • the system needs to traverse the objects in memory, so the more objects stored in the memory, the more objects that need to be traversed when a garbage collection occurs, the longer the recovery time, the resulting The more obvious. Therefore, when the whiteboard writing content is more and more, the application will become more and more stuck. Even if the user newly adds a page and writes on the new page, since the previous object still exists in the memory, there will still be obvious. Caton affects the user experience.
  • an object of the present invention is to provide a page turning method, apparatus, and writing terminal that can avoid the problem of stuttering due to garbage collection during continuous writing.
  • the invention provides a page turning method, comprising the following steps:
  • the serializing processing the predetermined object data currently stored in the memory is specifically:
  • the serializing processing the predetermined object data currently stored in the memory is specifically:
  • the first threshold is generated according to an average number of object data of each page and a maximum number of object data that can be tolerated by the current memory.
  • the serializing processing the predetermined object data currently stored in the memory is specifically:
  • the invention also provides a page turning device comprising:
  • a page turning listening unit configured to monitor a page turning instruction sent by the user to jump from the currently open page to the target page
  • a serialization unit configured to serialize predetermined object data stored in the current memory
  • a deserialization unit configured to deserialize the serialized data into object data after querying the serialized data corresponding to the target page, and draw the object data to display the target page .
  • the serialization unit is configured to acquire object data corresponding to the currently open page stored in the current memory, and serialize the object data corresponding to the currently open page into serialized data.
  • the serializing unit specifically includes:
  • a page number obtaining module configured to acquire all object data stored in the current memory and a page corresponding to each object data, to obtain a number of pages that are not serialized
  • a first determining module configured to determine whether the number of the pages that are not serialized is greater than a preset first threshold; if yes, notify the first serialization sub-module; if not, notify the jump unit;
  • the first serialization submodule is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
  • the serializing unit specifically includes:
  • An object obtaining module configured to acquire all object data stored in the current memory and a page corresponding to each object data
  • a second determining module configured to determine whether the quantity of all object data stored in the current memory is greater than a preset second threshold; if yes, notify the second serialization sub-module; if not, notify the jump unit ;
  • the second serialization submodule is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
  • the present invention also provides a writing terminal comprising the above-described page turning device.
  • the page turning method, device and writing terminal provided by the invention reduce the predetermined object data into serialized data by serializing the predetermined object data stored in the current memory during page turning, thereby reducing the The amount of object data stored in memory, which shortens the time required to traverse the object during garbage collection, and avoids the obvious stuck of the application due to too many objects traversed.
  • the invention can improve the flow of writing and improve the user experience.
  • FIG. 1 is a schematic flow chart of a page turning method according to an embodiment of the present invention.
  • FIG. 2 is another schematic flowchart of a page turning method according to an embodiment of the present invention.
  • FIG. 3 is another schematic flowchart of a page turning method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a page turning device according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural view of the serialization unit of FIG. 4.
  • Figure 6 is a schematic diagram showing the structure of the serialization unit of Figure 4.
  • an embodiment of the present invention provides a page turning method for performing page turning control on writing software in a writing terminal (such as an electronic whiteboard) having a writing function, in particular, writing software based on an Android platform, at least Including the following steps:
  • the page turning operation when the user writes using the electronic whiteboard or other writing terminal, the page turning operation is performed, and when the user performs the page turning operation, the corresponding page turning instruction is generated.
  • the page turning instruction may include an instruction to scroll forward from the currently open page, an instruction to scroll backward from the currently open page, and an instruction to jump forward from the currently open page to the specified page. And an instruction to jump backward from the currently open page to the specified page.
  • a new page is generated when an instruction to page backward is executed.
  • the new page is a blank page or a page generated according to a predetermined template. Before the new page is generated, in order to prevent the phenomenon that the card is stuck or not smooth when editing on the newly created page, the predetermined object data stored in the current memory needs to be serialized.
  • the object data corresponding to the currently open page may be serialized, so that the object data is serialized into serialized data of a common data type, and the serialized data is serialized data. It is saved in memory or in a file. Since these serialized data are not object data, the system does not need to traverse these serialized data during garbage collection, so the traversal time required for garbage collection can be significantly reduced, thereby avoiding obvious stagnation during garbage collection or The problem of waiting for a long time.
  • the user needs to jump to the 12th page to continue writing and editing after completing the writing and editing of the 11th page.
  • the edited page if it is, generates a new page and serializes all object data on page 11 into serialized data. After serialization, it jumps and generates a new page 12.
  • the user needs to jump to the previous page when editing or reading the content of the 11th page, such as page 10 (which may also be the page after the 11th page, But to ensure that the following page is not a new page) to refer to the content on page 10, then, at this time, the object data corresponding to the 11th page is serialized into serialized data; then jump to page 10, and After deserializing the serialized data corresponding to page 10 into object data, The object data is converted into a corresponding handwriting, and the handwriting is drawn on a display screen to display the target page.
  • page 10 which may also be the page after the 11th page, But to ensure that the following page is not a new page
  • the page turning method provided by the embodiment of the present invention reduces the in-memory data of the currently open page by serializing the currently opened page when the page is turned.
  • the amount of object data stored which in turn reduces the time required to traverse objects during garbage collection, avoiding the appearance of significant stagnation or long waits.
  • the embodiment of the invention can improve the flow of writing and improve the user experience.
  • step S102 of the above embodiment if the current open page is serialized each time the target page is jumped, when the user needs to return from the target page to the currently open page for data reference (specially, if If the target page is a new page, since it is generally necessary to refer to the content of the previous page when editing the new page, it may be more frequent to return to the currently open page for data reference. It is also necessary to serialize the target page first. And deserializing the currently open page to display the currently open page normally. Since serialization and deserialization take time, this can cause additional waiting time for the user.
  • step S102 is specifically:
  • S1021 Acquire all object data stored in the current memory and a page corresponding to each object data to obtain a number of pages that are not serialized.
  • the serialization of the currently open page is not performed every time the page turning instruction is executed, but a certain number of pages are not serialized, wherein the pages are newly stored to
  • the page in memory can also be understood as the object data in the page that the user has operated in the most recent time is not serialized first, so that the user can turn the page back and forth.
  • the first threshold is 2
  • the user needs to jump to the 12th page (new page) to continue editing after completing the editing of the 11th page.
  • First get all the object data stored in the current memory and the page corresponding to each object data, assuming that the object data in page 9, page 10 and page 11 has not been serialized (and assume that these 3 pages are in The storage time in memory is in order of page 9, page 10, 11), that is, the object data of 3 pages is not serialized. Since 3 is larger than the first threshold 2, when jumping to the 12th page, it is necessary to correspond to the page with the earliest storage time (page 9).
  • the object data is serialized into serialized data.
  • the first threshold is generated according to an average number of object data of each page and a maximum number of object data that can be tolerated by the current memory, so that too many pages are avoided.
  • the problem of writing stuck and not flowing caused by serialization For example, assuming that the average number of object data per page is 1000, and the number of maximum object data that can be tolerated by the current memory is 5000, the first threshold is preferably an integer of 4 or less. In this way, the problem of re-serialization and repeated deserialization caused by frequent page turning is solved, and writing and use are smoothed.
  • Step S102 is specifically:
  • S1025 Determine whether the quantity of the object data stored in the current memory is greater than a preset second threshold; if yes, execute S1026; if not, execute S103.
  • the object data corresponding to the page with the earliest storage time is serialized into serialized data.
  • the preferred embodiment it is determined whether the number of object data currently stored in the memory is greater than a preset second threshold. That is, the serialization of the currently open page is not necessarily performed every time the page turning instruction is executed, but a certain amount of object data is not serialized, wherein the object data is the latest object stored in the memory. data. It can also be understood that the object data in the page that the user has operated recently has not been serialized first, so that the user can view it.
  • the second threshold is 5000
  • the user needs to jump to the 12th page (new page) to continue editing after completing the editing of the 11th page.
  • an embodiment of the present invention further provides a page turning device 100, including:
  • the page turning monitoring unit 10 is configured to monitor a page turning instruction issued by the user to jump from the currently open page to the target page.
  • the serializing unit 20 is configured to serialize predetermined object data stored in the current memory.
  • the serialization unit 20 is specifically configured to acquire object data corresponding to the currently open page stored in the current memory, and serialize the object data corresponding to the currently open page into serialized data.
  • the jump unit 30 is configured to jump to the target page.
  • the deserialization unit 40 is configured to, after querying the serialized data corresponding to the target page, deserialize the serialized data into object data, and draw the object data to display the target page.
  • the page turning device 100 provided by the embodiment of the present invention serializes the currently open page by the serialization unit 20 when the page is turned over, so that the object data of the currently opened page is converted into serialized data, thereby reducing The amount of object data stored in memory, which shortens the time required to traverse objects in garbage collection, and avoids the appearance of obvious stagnation.
  • the embodiment of the invention can improve the flow of writing and improve the user experience.
  • the serialization unit 20 specifically includes:
  • the page number obtaining module 21 is configured to acquire all object data stored in the current memory and a page corresponding to each object data.
  • the first determining module 22 is configured to determine whether the number of pages in the current memory in which the object data is stored is greater than a preset first threshold; if yes, notify the first serialization sub-module 23; if not, notify the Jump unit 30.
  • the first serialization sub-module 23 is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
  • the preferred embodiment can solve the problem of repeated serialization and repeated deserialization caused by frequent page turning under the premise of ensuring smooth use, reducing the waiting time of the user and improving the user experience.
  • the serialization unit 20 specifically includes:
  • the object obtaining module 24 is configured to acquire all object data stored in the current memory and a page corresponding to each object data.
  • the second determining module 25 is configured to determine whether the quantity of all the object data stored in the current memory is greater than a preset second threshold; if yes, notify the second serialization sub-module 26; if not, notify the hop Turn unit 30.
  • the second serialization sub-module 26 is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
  • the preferred embodiment can solve the problem of repeated serialization and repeated deserialization caused by frequent page turning under the premise of ensuring smooth use, reducing the waiting time of the user and improving the user experience.
  • the embodiment of the invention further provides a writing terminal, which comprises the page turning device 100 according to any of the above embodiments.
  • the writing terminal is an electronic whiteboard.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A page turning method and device, and a writing terminal. The method comprises the following steps: monitoring a page turning instruction, which is issued by a user, for jumping from a currently opened page to a target page (S101); serializing predetermined object data stored in a current memory (S102); jumping to the target page (S103); and deserializing, when serialized data corresponding to the target page is found, the serialized data into object data, and drawing the object data to display the target page (S104). The problems of delay and unsmooth writing caused by garbage collection can be avoided.

Description

一种翻页方法、装置及书写终端Method, device and writing terminal 技术领域Technical field
本发明涉及书写软件领域,尤其涉及一种翻页方法、装置及书写终端。The present invention relates to the field of writing software, and in particular, to a page turning method, device and writing terminal.
背景技术Background technique
在白板软件或其他书写软件中,每一笔书写笔迹被当作一个对象存储在内存中,这一个书写笔迹的对象又包括很多个构成这个笔迹的点的对象,点对象的个数与笔迹的长度成正相关,笔迹越长,点越多;同时笔迹点的生成与触摸事件相关,书写越慢,产生的触摸事件越多,构成这个笔迹的点也就越多。通常来说,写一个字的一个笔划,这个笔划至少会包含50个点,也就会在内存中产生50个点对象。In the whiteboard software or other writing software, each writing stroke is stored as an object in the memory. This object of writing the handwriting includes a plurality of objects constituting the point of the handwriting, the number of points and the handwriting. The length is positively correlated, and the longer the handwriting, the more points; at the same time, the generation of the handwriting points is related to the touch event. The slower the writing, the more touch events are generated, and the more points that constitute the handwriting. In general, write a stroke of a word that will contain at least 50 points and will produce 50 point objects in memory.
在Android平台上,***有自动垃圾回收机制,这是继承自Java语言的特性,当***资源(***内存)不够时,***会自动回收那些不再使用的资源。在进行回收时,***会暂时停止应用的运行,直到回收完成,这个过程会对应用造成卡顿。On the Android platform, the system has an automatic garbage collection mechanism. This is a feature that inherits from the Java language. When the system resources (system memory) are insufficient, the system automatically reclaims resources that are no longer used. When recycling, the system temporarily stops the application running until the recycling is completed, which will cause the application to be stuck.
由于在回收时,***需要对内存中的对象进行遍历,这样当存储在内存中的对象越多,发生一次垃圾回收时需要遍历的对象越多,回收的时间越长,造成的卡顿也就越明显。因此当白板书写内容越来越多时,应用就会变得越来越卡,即使用户新添加一页,在新页面上书写时,由于之前的对象仍然存在于内存之中,仍然会有明显的卡顿,影响了用户的使用体验。Because in the recycling, the system needs to traverse the objects in memory, so the more objects stored in the memory, the more objects that need to be traversed when a garbage collection occurs, the longer the recovery time, the resulting The more obvious. Therefore, when the whiteboard writing content is more and more, the application will become more and more stuck. Even if the user newly adds a page and writes on the new page, since the previous object still exists in the memory, there will still be obvious. Caton affects the user experience.
发明内容Summary of the invention
针对上述问题,本发明的目的在于提供一种翻页方法、装置及书写终端,可避免在连续书写时,由于回收垃圾而造成的卡顿的问题。In view of the above problems, an object of the present invention is to provide a page turning method, apparatus, and writing terminal that can avoid the problem of stuttering due to garbage collection during continuous writing.
本发明提供了一种翻页方法,包括如下步骤:The invention provides a page turning method, comprising the following steps:
监听用户发出的从当前打开页面跳转到目标页面的翻页指令;Listening to a page turning instruction issued by the user to jump from the currently open page to the target page;
对当前内存中存储的预定的对象数据进行序列化处理;Serializing the predetermined object data stored in the current memory;
跳转到所述目标页面;Jump to the target page;
当查询到与所述目标页面对应的序列化数据后,将所述序列化数据反序列化为对象数据, 并对所述对象数据进行绘制,以显示所述目标页面。After querying the serialized data corresponding to the target page, deserializing the serialized data into object data, And drawing the object data to display the target page.
优选地,所述对当前内存中存储的预定的对象数据进行序列化处理,具体为:Preferably, the serializing processing the predetermined object data currently stored in the memory is specifically:
获取当前内存中存储的与所述当前打开页面对应的对象数据,并将与所述当前打开页面对应的对象数据序列化为序列化数据。Obtaining object data corresponding to the currently open page stored in the current memory, and serializing the object data corresponding to the currently open page into serialized data.
优选地,所述对当前内存中存储的预定的对象数据进行序列化处理,具体为:Preferably, the serializing processing the predetermined object data currently stored in the memory is specifically:
获取当前内存中存储的所有对象数据及与每个对象数据对应的页面,以获得未被序列化的页面的数量;Obtaining all object data stored in the current memory and a page corresponding to each object data to obtain the number of pages that are not serialized;
判断所述未被序列化的页面的数量是否大于预设的第一阈值;Determining whether the number of the pages that are not serialized is greater than a preset first threshold;
若是,则将与存储时间最早的页面对应的对象数据序列化为序列化数据;If yes, the object data corresponding to the page with the earliest storage time is serialized into serialized data;
若否,则执行步骤:跳转到所述目标页面。If no, perform the step: jump to the target page.
优选地,所述第一阈值根据每个页面的对象数据的平均个数及当前内存可容忍的最大对象数据的个数生成。Preferably, the first threshold is generated according to an average number of object data of each page and a maximum number of object data that can be tolerated by the current memory.
优选地,所述对当前内存中存储的预定的对象数据进行序列化处理,具体为:Preferably, the serializing processing the predetermined object data currently stored in the memory is specifically:
获取当前内存中存储的所有对象数据及与每个对象数据对应的页面;Obtaining all object data stored in the current memory and a page corresponding to each object data;
判断所述当前内存中存储的所有对象数据的数量是否大于预设的第二阈值;Determining whether the quantity of all object data stored in the current memory is greater than a preset second threshold;
若是,则将与存储时间最早的页面对应的对象数据序列化为序列化数据;If yes, the object data corresponding to the page with the earliest storage time is serialized into serialized data;
若否,则执行步骤:跳转到所述目标页面。If no, perform the step: jump to the target page.
本发明还提供一种翻页装置,包括:The invention also provides a page turning device comprising:
翻页监听单元,用于监听用户发出的从当前打开页面跳转到目标页面的翻页指令;a page turning listening unit, configured to monitor a page turning instruction sent by the user to jump from the currently open page to the target page;
序列化单元,用于对当前内存中存储的预定的对象数据进行序列化处理;a serialization unit, configured to serialize predetermined object data stored in the current memory;
跳转单元,用于跳转到所述目标页面;a jump unit for jumping to the target page;
反序列化单元,用于当查询到与所述目标页面对应的序列化数据后,将所述序列化数据反序列化为对象数据,并对所述对象数据进行绘制,以显示所述目标页面。a deserialization unit, configured to deserialize the serialized data into object data after querying the serialized data corresponding to the target page, and draw the object data to display the target page .
优选地,所述序列化单元具体用于,获取当前内存中存储的与所述当前打开页面对应的对象数据,并将与所述当前打开页面对应的对象数据序列化为序列化数据。Preferably, the serialization unit is configured to acquire object data corresponding to the currently open page stored in the current memory, and serialize the object data corresponding to the currently open page into serialized data.
优选地,所述序列化单元具体包括:Preferably, the serializing unit specifically includes:
页面数量获取模块,用于获取当前内存中存储的所有对象数据及与每个对象数据对应的页面,以获得未被序列化的页面的数量;a page number obtaining module, configured to acquire all object data stored in the current memory and a page corresponding to each object data, to obtain a number of pages that are not serialized;
第一判断模块,用于判断所述未被序列化的页面的数量是否大于预设的第一阈值;若是,则通知第一序列化子模块;若否,则通知所述跳转单元; a first determining module, configured to determine whether the number of the pages that are not serialized is greater than a preset first threshold; if yes, notify the first serialization sub-module; if not, notify the jump unit;
所述第一序列化子模块,用于将与存储时间最早的页面对应的对象数据序列化为序列化数据。The first serialization submodule is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
优选地,所述序列化单元具体包括:Preferably, the serializing unit specifically includes:
对象获取模块,用于获取当前内存中存储的所有对象数据及与每个对象数据对应的页面;An object obtaining module, configured to acquire all object data stored in the current memory and a page corresponding to each object data;
第二判断模块,用于判断所述当前内存中存储的所有对象数据的数量是否大于预设的第二阈值;若是,则通知第二序列化子模块;若否,则通知所述跳转单元;a second determining module, configured to determine whether the quantity of all object data stored in the current memory is greater than a preset second threshold; if yes, notify the second serialization sub-module; if not, notify the jump unit ;
所述第二序列化子模块,用于将与存储时间最早的页面对应的对象数据序列化为序列化数据。The second serialization submodule is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
本发明还提供一种书写终端,包括上述的翻页装置。The present invention also provides a writing terminal comprising the above-described page turning device.
本发明提供的翻页方法、装置及书写终端,通过在翻页时,对当前内存中存储的预定的对象数据进行序列化处理,使得所述预定的对象数据转化为序列化数据,从而减少了内存中存储的对象数据的数量,进而缩短了在垃圾回收时遍历对象所需的时间,避免了由于遍历的对象过多而导致的应用出现明显卡顿的现象。本发明可提高书写的流程性,提高用户的使用体验。The page turning method, device and writing terminal provided by the invention reduce the predetermined object data into serialized data by serializing the predetermined object data stored in the current memory during page turning, thereby reducing the The amount of object data stored in memory, which shortens the time required to traverse the object during garbage collection, and avoids the obvious stuck of the application due to too many objects traversed. The invention can improve the flow of writing and improve the user experience.
附图说明DRAWINGS
为了更清楚地说明本发明的技术方案,下面将对实施方式中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the present invention, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, which are common in the art. For the skilled person, other drawings can be obtained from these drawings without any creative work.
图1是本发明实施例提供的翻页方法的一种流程示意图。FIG. 1 is a schematic flow chart of a page turning method according to an embodiment of the present invention.
图2是本发明实施例提供的翻页方法的另一种流程示意图。FIG. 2 is another schematic flowchart of a page turning method according to an embodiment of the present invention.
图3是本发明实施例提供的翻页方法的另一种流程示意图。FIG. 3 is another schematic flowchart of a page turning method according to an embodiment of the present invention.
图4是本发明实施例提供的翻页装置的结构示意图。FIG. 4 is a schematic structural diagram of a page turning device according to an embodiment of the present invention.
图5是图4的序列化单元的一种结构示意图。FIG. 5 is a schematic structural view of the serialization unit of FIG. 4.
图6是图4的序列化单元的一种结构示意图。Figure 6 is a schematic diagram showing the structure of the serialization unit of Figure 4.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
请参阅图1,本发明实施例提供一种翻页方法,用于对具有书写功能的书写终端(如电子白板)中的书写软件,特别是基于安卓平台的书写软件进行翻页控制,其至少包括如下步骤:Referring to FIG. 1 , an embodiment of the present invention provides a page turning method for performing page turning control on writing software in a writing terminal (such as an electronic whiteboard) having a writing function, in particular, writing software based on an Android platform, at least Including the following steps:
S101,监听用户发出的从当前打开页面跳转到目标页面的翻页指令。S101. Monitor a page turning instruction sent by the user to jump from the currently open page to the target page.
S102,对当前内存中存储的预定的对象数据进行序列化处理。S102: Serialize the predetermined object data stored in the current memory.
S103,跳转到所述目标页面。S103. Jump to the target page.
S104,当查询到与所述目标页面对应的序列化数据后,将所述序列化数据反序列化为对象数据,并对所述对象数据进行绘制,以显示所述目标页面。S104. After querying the serialized data corresponding to the target page, deserialize the serialized data into object data, and draw the object data to display the target page.
具体地,在本发明实施例中,用户在使用电子白板或其他的书写终端进行书写时,会进行翻页操作,当用户执行翻页操作时,即生成相应的翻页指令。其中,所述翻页指令可包括从当前打开页面向前翻一页的指令,从所述当前打开页面向后翻一页的指令,从所述当前打开页面向前跳转到指定页面的指令及从所述当前打开页面向后跳转到指定页面的指令。若所述当前打开页面为最后一张被编辑的页面,则在执行向后翻一页的指令时,会生成一个新建页面。其中,一般的,新建页面为一张空白的页面或者是按照预定的模板生成的页面。在生成所述新建页面前,为了防止在所述新建页面上编辑时出现卡顿或不流畅的现象,需对当前内存中存储的预定的对象数据进行序列化处理。Specifically, in the embodiment of the present invention, when the user writes using the electronic whiteboard or other writing terminal, the page turning operation is performed, and when the user performs the page turning operation, the corresponding page turning instruction is generated. The page turning instruction may include an instruction to scroll forward from the currently open page, an instruction to scroll backward from the currently open page, and an instruction to jump forward from the currently open page to the specified page. And an instruction to jump backward from the currently open page to the specified page. If the currently open page is the last edited page, a new page is generated when an instruction to page backward is executed. In general, the new page is a blank page or a page generated according to a predetermined template. Before the new page is generated, in order to prevent the phenomenon that the card is stuck or not smooth when editing on the newly created page, the predetermined object data stored in the current memory needs to be serialized.
在本发明实施例中,在翻页时,可先对与所述当前打开页面对应的对象数据进行序列化处理,使得所述对象数据序列化为普通数据类型的序列化数据,这些序列化数据被保存在内存中或者文件中。由于这些序列化数据不是对象数据,在进行垃圾回收时,***不需要对这些序列化数据进行遍历,因此可明显减少垃圾回收所需的遍历时间,进而避免了在垃圾回收时出现明显卡顿或长时间等待的问题。In the embodiment of the present invention, when the page is turned, the object data corresponding to the currently open page may be serialized, so that the object data is serialized into serialized data of a common data type, and the serialized data is serialized data. It is saved in memory or in a file. Since these serialized data are not object data, the system does not need to traverse these serialized data during garbage collection, so the traversal time required for garbage collection can be significantly reduced, thereby avoiding obvious stagnation during garbage collection or The problem of waiting for a long time.
为了便于对本实施例的理解,下面将以一些具体的例子说明本实施例的应用。In order to facilitate the understanding of the embodiment, the application of the embodiment will be described below with some specific examples.
例如,假设所述当前打开页面为第11页,用户在完成第11页的书写编辑后,需要跳转到第12页继续进行书写编辑,则此时,先判断第11页是否为最后一个被编辑的页面,如果是,则生成一个新建页面,并将第11页内的所有对象数据序列化为序列化数据,在完成序列化后,跳转并生成一个新建的第12页。For example, if the currently open page is page 11, the user needs to jump to the 12th page to continue writing and editing after completing the writing and editing of the 11th page. At this time, it is first determined whether the 11th page is the last one. The edited page, if it is, generates a new page and serializes all object data on page 11 into serialized data. After serialization, it jumps and generates a new page 12.
再例如,假设所述当前打开页面为第11页,用户在编辑或阅读第11页的内容时,需要跳转到前面的页面,如第10页(也可以是在第11页后面的页面,但需保证后面的页面不是一个新建页面)来参考第10页内的内容,则此时,先将与第11页对应的对象数据序列化为序列化数据;再跳转到第10页,并将与第10页对应的序列化数据反序列化为对象数据后, 将所述对象数据转化为对应的笔迹,并将所述笔迹绘制在显示屏上,从而显示所述目标页面。For another example, if the currently open page is page 11, the user needs to jump to the previous page when editing or reading the content of the 11th page, such as page 10 (which may also be the page after the 11th page, But to ensure that the following page is not a new page) to refer to the content on page 10, then, at this time, the object data corresponding to the 11th page is serialized into serialized data; then jump to page 10, and After deserializing the serialized data corresponding to page 10 into object data, The object data is converted into a corresponding handwriting, and the handwriting is drawn on a display screen to display the target page.
需要说明的是,在进行序列化和反序列化时,都需要一定的等待时间,因而在进行跳转时,会生成一个等待的页面或标志,待序列化和反序列化完成时,再跳转到目标页面。It should be noted that when serialization and deserialization are performed, a certain waiting time is required, so when a jump is performed, a waiting page or flag is generated, and when the serialization and deserialization are completed, the jump is performed. Go to the target page.
综上所述,本发明实施例提供的翻页方法,通过在翻页时,对当前打开页面进行序列化处理,使得所述当前打开页面的对象数据转化为序列化数据,从而减少了内存中存储的对象数据的数量,进而缩短了在垃圾回收时遍历对象所需的时间,避免了出现明显卡顿或长时间等待的现象。本发明实施例可提高书写的流程性,提高用户的使用体验。In summary, the page turning method provided by the embodiment of the present invention reduces the in-memory data of the currently open page by serializing the currently opened page when the page is turned. The amount of object data stored, which in turn reduces the time required to traverse objects during garbage collection, avoiding the appearance of significant stagnation or long waits. The embodiment of the invention can improve the flow of writing and improve the user experience.
为了便于对本发明的理解,下面将对本发明的一些优选实施例做更进一步的描述。In order to facilitate an understanding of the present invention, some preferred embodiments of the present invention will be further described below.
第一个优选实施例:First preferred embodiment:
针对上述实施例的步骤S102,如果在每次跳转到目标页面时,都将当前打开页面进行序列化,当用户需要从目标页面返回到所述当前打开页面进行资料参考时(特别的,如果目标页面是新建页面的话,由于在编辑新建页面的时候一般需要参考前面页面的内容,因而可能会较频繁的需要返回到所述当前打开页面进行资料参考),还需要首先对目标页面进行序列化,并对所述当前打开页面反序列化才能正常显示所述当前打开页面。由于序列化和反序列化是需要时间的,这样就可能造成用户额外的等待时间。For step S102 of the above embodiment, if the current open page is serialized each time the target page is jumped, when the user needs to return from the target page to the currently open page for data reference (specially, if If the target page is a new page, since it is generally necessary to refer to the content of the previous page when editing the new page, it may be more frequent to return to the currently open page for data reference. It is also necessary to serialize the target page first. And deserializing the currently open page to display the currently open page normally. Since serialization and deserialization take time, this can cause additional waiting time for the user.
为此,请参阅图2,在本优选实施例中,所述步骤S102具体为:To this end, please refer to FIG. 2, in the preferred embodiment, the step S102 is specifically:
S1021,获取当前内存中存储的所有对象数据及与每个对象数据对应的页面,以获得未被序列化的页面的数量。S1021: Acquire all object data stored in the current memory and a page corresponding to each object data to obtain a number of pages that are not serialized.
其中,所述的所有对象特指当前编辑的文件的对象数据。Among them, all the objects mentioned specifically refer to the object data of the currently edited file.
S1022,判断所述未被序列化的页面的数量是否大于预设的第一阈值;若是,则执行S1023,若否,则执行S103。S1022. Determine whether the number of pages that are not serialized is greater than a preset first threshold; if yes, execute S1023, and if no, execute S103.
S1023,则将与存储时间最早的页面对应的对象数据序列化为序列化数据。In S1023, the object data corresponding to the page with the earliest storage time is serialized into serialized data.
在本优选实施例中,并不会在每次执行翻页指令的时候都对所述当前打开页面执行序列化,而是允许一定数量的页面不进行序列化,其中,这些页面是最新存储到内存中的页面,也可以理解为对用户最近时间操作过的页面内的对象数据先不进行序列化,以方便用户来回翻页查看。In the preferred embodiment, the serialization of the currently open page is not performed every time the page turning instruction is executed, but a certain number of pages are not serialized, wherein the pages are newly stored to The page in memory can also be understood as the object data in the page that the user has operated in the most recent time is not serialized first, so that the user can turn the page back and forth.
例如,设所述第一阈值为2,假如所述当前打开页面为第11页,用户在完成第11页的编辑后,需要跳转到第12页(新建页面)继续进行编辑,则此时,先获取当前内存中存储的所有对象数据及与每个对象数据对应的页面,假设检测到第9页,第10页和第11页中的对象数据尚未被序列化(且假设这3页在内存中的存储时间的先后顺序依次为第9页、第10页、 第11),即有3张页面的对象数据没有被序列化,由于3大于第一阈值2,因而在跳转到第12页的时候,需要将与存储时间最早的页面(第9页)对应的对象数据序列化为序列化数据。在对12页进行编辑的过程中,若需要返回到第11页,由于此时,第10、11、12页的对象数据没有被序列化,因而在跳转到第11页的时候,需要将与存储时间最早的页面(第10页)对应的对象数据序列化为序列化数据,而第11页和第12页不需要进行序列化。此后,若用户再次从第11页翻页到第12页进行编辑,由于此时只有第11和12页的对象数据没有被序列化,因而在跳转到第12页的时候,一方面,不需要对第11页内的对象数据进行序列化,另一方面,由于第12页的对象数据也没有被序列化成序列化数据,因此也无需进行反序列化。如此,即在保证使用顺畅的前提下,解决了在频繁翻页时造成的重复序列化和重复反序列化的问题,减少了用户的等待时间,提升了用户的使用体验。For example, if the first threshold is 2, if the currently open page is the 11th page, the user needs to jump to the 12th page (new page) to continue editing after completing the editing of the 11th page. First, get all the object data stored in the current memory and the page corresponding to each object data, assuming that the object data in page 9, page 10 and page 11 has not been serialized (and assume that these 3 pages are in The storage time in memory is in order of page 9, page 10, 11), that is, the object data of 3 pages is not serialized. Since 3 is larger than the first threshold 2, when jumping to the 12th page, it is necessary to correspond to the page with the earliest storage time (page 9). The object data is serialized into serialized data. In the process of editing 12 pages, if you need to return to page 11, since the object data of pages 10, 11, and 12 is not serialized, you need to jump to page 11 when you jump to page 11. The object data corresponding to the page with the earliest storage time (page 10) is serialized as serialized data, and pages 11 and 12 do not need to be serialized. Thereafter, if the user flips the page from page 11 to page 12 again for editing, since only the object data of pages 11 and 12 is not serialized at this time, when jumping to page 12, on the one hand, It is necessary to serialize the object data on page 11, and on the other hand, since the object data on page 12 is not serialized into serialized data, there is no need to deserialize. In this way, under the premise of ensuring smooth use, the problem of repeated serialization and repeated deserialization caused by frequent page turning is solved, the waiting time of the user is reduced, and the user experience is improved.
需要说明的是,在本发明实施例中,所述第一阈值根据每个页面的对象数据的平均个数及当前内存可容忍的最大对象数据的个数生成,这样,可避免太多页面没有被序列化而造成的书写卡顿和不流程的问题。例如,假设每个页面的对象数据的平均个数是1000个,而当前内存可容忍的最大对象数据的个数是5000个,则所述第一阈值优选为4或小于4的整数。如此,在解决频繁翻页时造成的重新序列化和重复反序列化的问题的同时,保证了书写和使用的顺畅。It should be noted that, in the embodiment of the present invention, the first threshold is generated according to an average number of object data of each page and a maximum number of object data that can be tolerated by the current memory, so that too many pages are avoided. The problem of writing stuck and not flowing caused by serialization. For example, assuming that the average number of object data per page is 1000, and the number of maximum object data that can be tolerated by the current memory is 5000, the first threshold is preferably an integer of 4 or less. In this way, the problem of re-serialization and repeated deserialization caused by frequent page turning is solved, and writing and use are smoothed.
第二个优选实施例。A second preferred embodiment.
针对与第一个优选实施例相同的问题,请参阅图3,在本优选实施例中:For the same problem as the first preferred embodiment, please refer to FIG. 3, in the preferred embodiment:
步骤S102具体为:Step S102 is specifically:
S1024,获取当前内存中存储的所有对象数据及与每个对象数据对应的页面;S1024: Acquire all object data stored in the current memory and a page corresponding to each object data;
S1025,判断所述当前内存中存储有对象数据的数量是否大于预设的第二阈值;若是,则执行S1026,若否,则执行S103。S1025: Determine whether the quantity of the object data stored in the current memory is greater than a preset second threshold; if yes, execute S1026; if not, execute S103.
S1026,则将与存储时间最早的页面对应的对象数据序列化为序列化数据。In S1026, the object data corresponding to the page with the earliest storage time is serialized into serialized data.
与第一个优选实施例不同的是,在本优选实施例中,判断的是当前内存中存储的对象数据的数量是否大于预设的第二阈值。即不一定会在每次执行翻页指令的时候都对所述当前打开页面执行序列化,而是允许一定数量的对象数据不进行序列化,其中,这些对象数据是最新存储到内存中的对象数据。也可以理解为对用户最近时间操作过的页面内的对象数据先不进行序列化,以方便用户查看。Different from the first preferred embodiment, in the preferred embodiment, it is determined whether the number of object data currently stored in the memory is greater than a preset second threshold. That is, the serialization of the currently open page is not necessarily performed every time the page turning instruction is executed, but a certain amount of object data is not serialized, wherein the object data is the latest object stored in the memory. data. It can also be understood that the object data in the page that the user has operated recently has not been serialized first, so that the user can view it.
例如,设所述第二阈值为5000,假如所述当前打开页面为第11页,用户在完成第11页的编辑后,需要跳转到第12页(新建页面)继续进行编辑,则此时,先获取当前内存中存储 的所有对象数据及与每个对象数据对应的页面,假设检测到第8页(包含1000个对象数据)、第9页(包含1500个对象数据),第10页(1000个对象数据)和第11页(包括1100个对象数据)中的对象数据均没有被序列化(且假设这四页在内存中的存储时间的先后顺序依次为第8页,第9页、第10页、第11),由于这4页的全部对象数据之和(4600)小于所述第二阈值5000,因而在跳转到第12页的时候,不需要进行序列化。在对12页进行编辑的过程中(编辑产生了2000个对象数据),若需要返回到第11页,由于此时,这5页的全部对象数据之和(6600)大于所述第二阈值5000,因而在跳转到第11页的时候,需要将与存储时间最早的页面(第8页)对应的对象数据序列化为序列化数据。在对第8页完成序列化后,由于剩下的4页的全部对象数据之和(5600)仍然大于所述第二阈值,因而还需要继续将与存储时间最早的页面(第9页)对应的对象数据序列化为序列化数据,而第10、11页和第12页不需要进行序列化。此后,若用户再次从第11页翻页到第12页进行编辑,由于第10、11页和第12页这3页内的数据对象之和小于所述第二阈值,因而在跳转到第12页的时候,一方面,不需要对第11页内的对象数据进行序列化,另一方面,由于第12页的对象数据也没有被序列化成序列化数据,因此也无需进行反序列化。如此,即在保证使用顺畅的前提下,解决了在频繁翻页时造成的重复序列化和重复反序列化的问题,减少了用户的等待时间,提升了用户的使用体验。For example, if the second threshold is 5000, if the currently open page is the 11th page, the user needs to jump to the 12th page (new page) to continue editing after completing the editing of the 11th page. , first get the current in-memory storage All object data and the page corresponding to each object data, assuming that page 8 (containing 1000 object data), page 9 (containing 1500 object data), page 10 (1000 object data) and The object data in 11 pages (including 1100 object data) is not serialized (and the order of storage of these four pages in memory is assumed to be page 8, page 9, page 10, page 11). Since the sum of all the object data (4600) of the four pages is smaller than the second threshold value 5000, serialization is not required when jumping to the 12th page. In the process of editing 12 pages (editing produces 2000 object data), if it is necessary to return to page 11, since the sum of all object data of these 5 pages (6600) is greater than the second threshold value 5000 Therefore, when jumping to page 11, it is necessary to serialize the object data corresponding to the page with the earliest storage time (page 8) into serialized data. After the serialization is completed on page 8, since the sum of all the object data (5600) of the remaining 4 pages is still larger than the second threshold, it is necessary to continue to correspond to the page with the earliest storage time (page 9). The object data is serialized into serialized data, while pages 10, 11 and 12 do not need to be serialized. Thereafter, if the user turns pages from page 11 to page 12 again for editing, since the sum of the data objects in the three pages of pages 10, 11, and 12 is smaller than the second threshold, the jump to the On the 12th page, on the one hand, there is no need to serialize the object data on page 11, and on the other hand, since the object data on page 12 is not serialized into serialized data, there is no need to deserialize. In this way, under the premise of ensuring smooth use, the problem of repeated serialization and repeated deserialization caused by frequent page turning is solved, the waiting time of the user is reduced, and the user experience is improved.
请参阅图4,本发明实施例还提供了一种翻页装置100,包括:Referring to FIG. 4, an embodiment of the present invention further provides a page turning device 100, including:
翻页监听单元10,用于监听用户发出的从当前打开页面跳转到目标页面的翻页指令。The page turning monitoring unit 10 is configured to monitor a page turning instruction issued by the user to jump from the currently open page to the target page.
序列化单元20,用于对当前内存中存储的预定的对象数据进行序列化处理。The serializing unit 20 is configured to serialize predetermined object data stored in the current memory.
其中,所述序列化单元20具体用于,获取当前内存中存储的与所述当前打开页面对应的对象数据,并将与所述当前打开页面对应的对象数据序列化为序列化数据。The serialization unit 20 is specifically configured to acquire object data corresponding to the currently open page stored in the current memory, and serialize the object data corresponding to the currently open page into serialized data.
跳转单元30,用于跳转到所述目标页面。The jump unit 30 is configured to jump to the target page.
反序列化单元40,用于当查询到与所述目标页面对应的序列化数据后,将所述序列化数据反序列化为对象数据,并对所述对象数据进行绘制,以显示所述目标页面。The deserialization unit 40 is configured to, after querying the serialized data corresponding to the target page, deserialize the serialized data into object data, and draw the object data to display the target page.
本发明实施例提供的翻页装置100,通过在翻页时,由所述序列化单元20对当前打开页面进行序列化处理,使得所述当前打开页面的对象数据转化为序列化数据,从而减少了内存中存储的对象数据的数量,进而缩短了在垃圾回收时遍历对象所需的时间,避免了出现明显卡顿的现象。本发明实施例可提高书写的流程性,提高用户的使用体验。The page turning device 100 provided by the embodiment of the present invention serializes the currently open page by the serialization unit 20 when the page is turned over, so that the object data of the currently opened page is converted into serialized data, thereby reducing The amount of object data stored in memory, which shortens the time required to traverse objects in garbage collection, and avoids the appearance of obvious stagnation. The embodiment of the invention can improve the flow of writing and improve the user experience.
请参阅图5,优选地,所述序列化单元20具体包括: Referring to FIG. 5, the serialization unit 20 specifically includes:
页面数量获取模块21,用于获取当前内存中存储的所有对象数据及与每个对象数据对应的页面。The page number obtaining module 21 is configured to acquire all object data stored in the current memory and a page corresponding to each object data.
第一判断模块22,用于判断所述当前内存中存储有对象数据的页面的数量是否大于预设的第一阈值;若是,则通知第一序列化子模块23;若否,则通知所述跳转单元30。The first determining module 22 is configured to determine whether the number of pages in the current memory in which the object data is stored is greater than a preset first threshold; if yes, notify the first serialization sub-module 23; if not, notify the Jump unit 30.
所述第一序列化子模块23,用于将与存储时间最早的页面对应的对象数据序列化为序列化数据。The first serialization sub-module 23 is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
本优选实施例可在保证使用顺畅的前提下,解决了在频繁翻页时造成的重复序列化和重复反序列化的问题,减少了用户的等待时间,提升了用户的使用体验。The preferred embodiment can solve the problem of repeated serialization and repeated deserialization caused by frequent page turning under the premise of ensuring smooth use, reducing the waiting time of the user and improving the user experience.
请参阅图6,优选地,所述序列化单元20具体包括:Referring to FIG. 6, the serialization unit 20 specifically includes:
对象获取模块24,用于获取当前内存中存储的所有对象数据及与每个对象数据对应的页面。The object obtaining module 24 is configured to acquire all object data stored in the current memory and a page corresponding to each object data.
第二判断模块25,用于判断所述当前内存中存储的所有对象数据的数量是否大于预设的第二阈值;若是,则通知第二序列化子模块26;若否,则通知所述跳转单元30。The second determining module 25 is configured to determine whether the quantity of all the object data stored in the current memory is greater than a preset second threshold; if yes, notify the second serialization sub-module 26; if not, notify the hop Turn unit 30.
所述第二序列化子模块26,用于将与存储时间最早的页面对应的对象数据序列化为序列化数据。The second serialization sub-module 26 is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
本优选实施例可在保证使用顺畅的前提下,解决了在频繁翻页时造成的重复序列化和重复反序列化的问题,减少了用户的等待时间,提升了用户的使用体验。The preferred embodiment can solve the problem of repeated serialization and repeated deserialization caused by frequent page turning under the premise of ensuring smooth use, reducing the waiting time of the user and improving the user experience.
本发明实施例还提供一种书写终端,所述书写终端包括上述任一实施例所述的翻页装置100。The embodiment of the invention further provides a writing terminal, which comprises the page turning device 100 according to any of the above embodiments.
其中,优选的,所述书写终端为电子白板。Preferably, the writing terminal is an electronic whiteboard.
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。The above disclosure is only a preferred embodiment of the present invention, and of course, the scope of the present invention is not limited thereto, and those skilled in the art can understand all or part of the process of implementing the above embodiments, and according to the present invention. The equivalent changes required are still within the scope of the invention.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。 One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Claims (10)

  1. 一种翻页方法,其特征在于,包括如下步骤:A page turning method, comprising the following steps:
    监听用户发出的从当前打开页面跳转到目标页面的翻页指令;Listening to a page turning instruction issued by the user to jump from the currently open page to the target page;
    对当前内存中存储的预定的对象数据进行序列化处理;Serializing the predetermined object data stored in the current memory;
    跳转到所述目标页面;Jump to the target page;
    当查询到与所述目标页面对应的序列化数据后,将所述序列化数据反序列化为对象数据,并对所述对象数据进行绘制,以显示所述目标页面。After querying the serialized data corresponding to the target page, the serialized data is deserialized into object data, and the object data is drawn to display the target page.
  2. 根据权利要求1所述的翻页方法,其特征在于,所述对当前内存中存储的预定的对象数据进行序列化处理,具体为:The page turning method according to claim 1, wherein the serializing the predetermined object data stored in the current memory is specifically:
    获取当前内存中存储的与所述当前打开页面对应的对象数据,并将与所述当前打开页面对应的对象数据序列化为序列化数据。Obtaining object data corresponding to the currently open page stored in the current memory, and serializing the object data corresponding to the currently open page into serialized data.
  3. 根据权利要求1所述的翻页方法,其特征在于,所述对当前内存中存储的预定的对象数据进行序列化处理,具体为:The page turning method according to claim 1, wherein the serializing the predetermined object data stored in the current memory is specifically:
    获取当前内存中存储的所有对象数据及与每个对象数据对应的页面,以获得未被序列化的页面的数量;Obtaining all object data stored in the current memory and a page corresponding to each object data to obtain the number of pages that are not serialized;
    判断所述未被序列化的页面的数量是否大于预设的第一阈值;Determining whether the number of the pages that are not serialized is greater than a preset first threshold;
    若是,则将与存储时间最早的页面对应的对象数据序列化为序列化数据;If yes, the object data corresponding to the page with the earliest storage time is serialized into serialized data;
    若否,则执行步骤:跳转到所述目标页面。If no, perform the step: jump to the target page.
  4. 根据权利要求3所述的翻页方法,其特征在于,所述第一阈值根据每个页面的对象数据的平均个数及当前内存可容忍的最大对象数据的个数生成。The page turning method according to claim 3, wherein the first threshold is generated according to an average number of object data of each page and a maximum number of object data that can be tolerated by the current memory.
  5. 根据权利要求1所述的翻页方法,其特征在于,所述对当前内存中存储的预定的对象数据进行序列化处理,具体为:The page turning method according to claim 1, wherein the serializing the predetermined object data stored in the current memory is specifically:
    获取当前内存中存储的所有对象数据及与每个对象数据对应的页面;Obtaining all object data stored in the current memory and a page corresponding to each object data;
    判断所述当前内存中存储的所有对象数据的数量是否大于预设的第二阈值;Determining whether the quantity of all object data stored in the current memory is greater than a preset second threshold;
    若是,则将与存储时间最早的页面对应的对象数据序列化为序列化数据;If yes, the object data corresponding to the page with the earliest storage time is serialized into serialized data;
    若否,则执行步骤:跳转到所述目标页面。 If no, perform the step: jump to the target page.
  6. 一种翻页装置,其特征在于,包括:A page turning device, comprising:
    翻页监听单元,用于监听用户发出的从当前打开页面跳转到目标页面的翻页指令;a page turning listening unit, configured to monitor a page turning instruction sent by the user to jump from the currently open page to the target page;
    序列化单元,用于对当前内存中存储的预定的对象数据进行序列化处理;a serialization unit, configured to serialize predetermined object data stored in the current memory;
    跳转单元,用于跳转到所述目标页面;a jump unit for jumping to the target page;
    反序列化单元,用于当查询到与所述目标页面对应的序列化数据后,将所述序列化数据反序列化为对象数据,并对所述对象数据进行绘制,以显示所述目标页面。a deserialization unit, configured to deserialize the serialized data into object data after querying the serialized data corresponding to the target page, and draw the object data to display the target page .
  7. 根据权利要求6所述的翻页装置,其特征在于,所述序列化单元具体用于,获取当前内存中存储的与所述当前打开页面对应的对象数据,并将与所述当前打开页面对应的对象数据序列化为序列化数据。The page turning device according to claim 6, wherein the serializing unit is configured to acquire object data corresponding to the currently opened page currently stored in the memory, and corresponding to the currently open page The object data is serialized into serialized data.
  8. 根据权利要求6所述的翻页装置,其特征在于,所述序列化单元具体包括:The page turning device according to claim 6, wherein the serializing unit specifically comprises:
    页面数量获取模块,用于获取当前内存中存储的所有对象数据及与每个对象数据对应的页面,以获得未被序列化的页面的数量;a page number obtaining module, configured to acquire all object data stored in the current memory and a page corresponding to each object data, to obtain a number of pages that are not serialized;
    第一判断模块,用于判断所述未被序列化的页面的数量是否大于预设的第一阈值;若是,则通知第一序列化子模块;若否,则通知所述跳转单元;a first determining module, configured to determine whether the number of the pages that are not serialized is greater than a preset first threshold; if yes, notify the first serialization sub-module; if not, notify the jump unit;
    所述第一序列化子模块,用于将与存储时间最早的页面对应的对象数据序列化为序列化数据。The first serialization submodule is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
  9. 根据权利要求6所述的翻页装置,其特征在于,所述序列化单元具体包括:The page turning device according to claim 6, wherein the serializing unit specifically comprises:
    对象获取模块,用于获取当前内存中存储的所有对象数据及与每个对象数据对应的页面;An object obtaining module, configured to acquire all object data stored in the current memory and a page corresponding to each object data;
    第二判断模块,用于判断所述当前内存中存储的所有对象数据的数量是否大于预设的第二阈值;若是,则通知第二序列化子模块;若否,则通知所述跳转单元;a second determining module, configured to determine whether the quantity of all object data stored in the current memory is greater than a preset second threshold; if yes, notify the second serialization sub-module; if not, notify the jump unit ;
    所述第二序列化子模块,用于将与存储时间最早的页面对应的对象数据序列化为序列化数据。The second serialization submodule is configured to serialize object data corresponding to the page with the earliest storage time into serialized data.
  10. 一种书写终端,其特征在于,包括如权利要求6至9任意一项所述的翻页装置。 A writing terminal comprising the page turning device according to any one of claims 6 to 9.
PCT/CN2016/113340 2016-08-16 2016-12-30 Page turning method and device, and writing terminal WO2018032698A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610673260.4 2016-08-16
CN201610673260.4A CN106250063B (en) 2016-08-16 2016-08-16 Page turning method and device and writing terminal

Publications (1)

Publication Number Publication Date
WO2018032698A1 true WO2018032698A1 (en) 2018-02-22

Family

ID=57593141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113340 WO2018032698A1 (en) 2016-08-16 2016-12-30 Page turning method and device, and writing terminal

Country Status (2)

Country Link
CN (1) CN106250063B (en)
WO (1) WO2018032698A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861051A (en) * 2019-11-28 2021-05-28 北京沃东天骏信息技术有限公司 Page operation control method and device, electronic equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250063B (en) * 2016-08-16 2019-11-29 广州视睿电子科技有限公司 Page turning method and device and writing terminal
CN107491249B (en) * 2017-08-21 2020-11-06 广州视源电子科技股份有限公司 Control method, device and equipment of intelligent tablet and storage medium
CN111352554A (en) * 2018-12-24 2020-06-30 杭州海康威视数字技术股份有限公司 Method and device for turning pages on electronic equipment
CN109739575A (en) * 2018-12-29 2019-05-10 上海掌门科技有限公司 Information processing method, electronic equipment and computer-readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008005830A2 (en) * 2006-06-30 2008-01-10 E-Book Systems, Inc. Method, system, and computer-readable instructions for advertisement using a multi-flipbook system
CN102043583A (en) * 2010-11-30 2011-05-04 汉王科技股份有限公司 Page skip method, page skip device and electronic reading device
CN102136251A (en) * 2010-01-26 2011-07-27 上海易狄欧电子科技有限公司 Electronic book page turning method and electronic book reader
CN104461745A (en) * 2014-12-23 2015-03-25 中科创达软件股份有限公司 Memory optimization method and device
CN104808889A (en) * 2014-01-24 2015-07-29 贝壳网际(北京)安全技术有限公司 Page switching method and electronic equipment
CN105095250A (en) * 2014-05-05 2015-11-25 北京大学 Page scheduling processing method and device
CN106250063A (en) * 2016-08-16 2016-12-21 广州视睿电子科技有限公司 Page turning method and device and writing terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693955B2 (en) * 2002-02-22 2010-04-06 Bea Systems, Inc. System and method for deploying a web service
CN102841901B (en) * 2011-06-23 2015-09-09 腾讯科技(深圳)有限公司 A kind of method and apparatus of web displaying

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008005830A2 (en) * 2006-06-30 2008-01-10 E-Book Systems, Inc. Method, system, and computer-readable instructions for advertisement using a multi-flipbook system
CN102136251A (en) * 2010-01-26 2011-07-27 上海易狄欧电子科技有限公司 Electronic book page turning method and electronic book reader
CN102043583A (en) * 2010-11-30 2011-05-04 汉王科技股份有限公司 Page skip method, page skip device and electronic reading device
CN104808889A (en) * 2014-01-24 2015-07-29 贝壳网际(北京)安全技术有限公司 Page switching method and electronic equipment
CN105095250A (en) * 2014-05-05 2015-11-25 北京大学 Page scheduling processing method and device
CN104461745A (en) * 2014-12-23 2015-03-25 中科创达软件股份有限公司 Memory optimization method and device
CN106250063A (en) * 2016-08-16 2016-12-21 广州视睿电子科技有限公司 Page turning method and device and writing terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861051A (en) * 2019-11-28 2021-05-28 北京沃东天骏信息技术有限公司 Page operation control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106250063A (en) 2016-12-21
CN106250063B (en) 2019-11-29

Similar Documents

Publication Publication Date Title
WO2018032698A1 (en) Page turning method and device, and writing terminal
US10509851B2 (en) Latency reduction in collaborative presentation sharing environment
US7987160B2 (en) Status tool to expose metadata read and write queues
JP4698599B2 (en) Real time inking
US20090199123A1 (en) Dynamic preview of diagram elements to be inserted into a diagram
US20170364497A1 (en) Digital document change conflict resolution
US8607239B2 (en) Lock mechanism to reduce waiting of threads to access a shared resource by selectively granting access to a thread before an enqueued highest priority thread
CN110865888A (en) Resource loading method and device, server and storage medium
US20210247987A1 (en) Algorithm program loading method and related apparatus
KR20140003419A (en) Serializing document editing commands
US8780120B2 (en) GPU self throttling
CN108198582B (en) NAND Flash control method and device and SSD
US20140250251A1 (en) Automatically and transparently preserving testing state across sessions
WO2023060833A1 (en) Data exchange method, electronic device and storage medium
CN105740073A (en) Method and apparatus for dynamically controlling quantity of operation system processes
US9529816B2 (en) Arbitrating among concurrent editors of shared documents
WO2021238261A1 (en) Multi-thread message processing method based on lookup operation
CN112765110B (en) PDF annotation data generation method, device, equipment and storage medium
CN104182490B (en) A kind of method and device for managing data access
US20130290657A1 (en) Storing data in containers
US20130179896A1 (en) Multi-thread processing of an XML document
CN111352909A (en) File saving and loading method and device, electronic device and storage medium
US11941355B2 (en) Using operational transforms to perform operations on parallel copies of a document model
CN111400342A (en) Database updating method, device, equipment and storage medium
CN113778624B (en) Object processing method and device, intelligent terminal and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16913450

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16913450

Country of ref document: EP

Kind code of ref document: A1