WO2023029172A1 - Electronic book page display method, and electronic device and storage medium - Google Patents

Electronic book page display method, and electronic device and storage medium Download PDF

Info

Publication number
WO2023029172A1
WO2023029172A1 PCT/CN2021/125782 CN2021125782W WO2023029172A1 WO 2023029172 A1 WO2023029172 A1 WO 2023029172A1 CN 2021125782 W CN2021125782 W CN 2021125782W WO 2023029172 A1 WO2023029172 A1 WO 2023029172A1
Authority
WO
WIPO (PCT)
Prior art keywords
subview
sub
page
view
display
Prior art date
Application number
PCT/CN2021/125782
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 WO2023029172A1 publication Critical patent/WO2023029172A1/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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • 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/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing

Definitions

  • the present disclosure relates to the technical field of electronic books, and in particular to an electronic book page display method, electronic equipment and storage media.
  • the original reader rendering engine cannot better meet the needs of good reading experience and fast reading iteration of new businesses such as commercialization. If you need to add some insertion information to the e-book page, you need to interact with the engine, and pass the information to be inserted to the original reader rendering engine in a way such as html, and the original reader rendering engine renders the information to the e-book layer , or directly paste the view containing information on the e-book layer rendered by the original reader rendering engine, etc.
  • the development of this rendering method is more complicated, requires more labor and time costs, and the development efficiency is low. When the page is turned, the inserted information cannot present the page turning effect, which affects the user's reading experience.
  • the present disclosure is proposed to provide an electronic book page display method, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.
  • a method for displaying e-book pages is provided, the method is executed on a reader engine, and the reader engine contains native layers, and the method includes:
  • screenshot processing is performed on the displayed sub-view, and page turning display of inserted information is realized by rendering the screenshot image.
  • an electronic device including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete mutual communication through the communication bus;
  • the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the following operations:
  • screenshot processing is performed on the displayed sub-view, and page turning display of inserted information is realized by rendering the screenshot image.
  • a non-volatile computer-readable storage medium wherein at least one executable instruction is stored in the non-volatile computer-readable storage medium, and the executable instruction causes a processor to perform any of the above-mentioned The operation corresponding to the e-book page display method of the item.
  • a computer program product which includes the calculation program stored on the above-mentioned non-volatile computer-readable storage medium.
  • the e-book page display method, electronic device, and storage medium provided in the present disclosure, the content and sub-views of the e-book are displayed through native layers to realize the display of inserted information, and the processing is more efficient.
  • screenshot processing and rendering of screenshot images the problem of page-turning display of inserted information is solved, and user experience is improved.
  • FIG. 1 shows a schematic flowchart of a method for displaying an e-book page according to an embodiment of the present disclosure
  • Figure 2a shows a schematic diagram of displaying inserted information
  • Figure 2b shows a schematic diagram of inserting information and turning pages
  • FIG. 3 shows a schematic flowchart of a method for displaying an e-book page according to another embodiment of the present disclosure
  • Fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • Fig. 1 shows a schematic flowchart of a method for displaying an e-book page according to an embodiment of the present disclosure. As shown in Fig. 1 , the method includes the following steps:
  • Step S101 obtain the subview including the insertion information and the corresponding data object, and add the subview to the container of the native layer.
  • the existing technology is to pass the insertion information to the original reader rendering engine of the e-book.
  • the original reader rendering engine After the original reader rendering engine renders the insertion information, it is set on the e-book layer displaying the content of the e-book, which needs to be rendered with the original reader.
  • the engine interacts, transmits, and renders information, etc.
  • This rendering method is slow in processing efficiency, and the rendering of inserted information can only be displayed in the form of pictures, which has a poor display effect and cannot achieve page turning effects.
  • this embodiment is executed on the reader engine, and a native layer is added to the reader engine, and the native layer is used to display e-book content and insert information.
  • the inserted information is encapsulated by a sub-view, which contains the layout settings of the controls for the inserted information, the processing of responding to various interactive events, etc.
  • the sub-view can independently process the display effect of the inserted information, such as independently presenting the inserted information in the sub-view Animation effects, etc., do not require a browser engine to process rendering insertion information, reducing interaction with the browser engine.
  • the native layer may be a view class UIView provided by the system, which is a UI control.
  • Step S102 determine the designated rendering area of the sub-view according to the data object, so that when rendering the e-book content, the designated rendering area is reserved to place the sub-view.
  • the data object corresponds to the sub-view, including information such as the type of information inserted, the style of the inserted information, the insertion position of the sub-view, the designated rendering area, etc., so that the display of the inserted information in the sub-view can be completed according to the data object.
  • the specified rendering area of the subview can be determined according to the data object.
  • the specified rendering area can be reserved, such as making it blank, without rendering, so as to place the subview and display the subview Insert information in .
  • step S103 the rendered e-book content and sub-views are displayed by native layers.
  • the e-book content is rendered by the reader engine, and the native layer receives the e-book content rendered by the reader engine to display, and displays the sub-views corresponding to the insertion position of the sub-view of the data object, as shown in Figure 2a. Complete the presentation of the inserted information.
  • Step S104 according to the received page turning instruction, screenshot processing is performed on the displayed sub-view, and the screenshot image is rendered to realize page turning display of inserted information.
  • the currently displayed sub-view is processed as a screenshot, and the obtained screenshot is rendered to realize the page-turning display of the inserted information, and the display effect is shown in Figure 2b.
  • the content and sub-views of the e-book are displayed through the native layer, so as to realize the display of inserted information, and the processing is more efficient.
  • screenshot processing and rendering of screenshot images the problem of page-turning display of inserted information is solved, and user experience is improved.
  • FIG. 3 shows a schematic flowchart of a method for displaying an e-book page according to another embodiment of the present disclosure. As shown in FIG. 3 , the method includes the following steps:
  • Step S301 creating a native layer and adding the native layer to the underlying container of the reader.
  • the native layer uses ZYGLView, relies on OpenGLES, and inherits GLKView; or, the native layer uses ZYMTKView, relies on Metal, and inherits MTKView.
  • the native layer is created based on the terminal device, and can be based on the API interface provided by various libraries in the terminal device, so that it has the ability to render and simulate page turning.
  • the native layer After creation, add the native layer to the underlying container of the reader to receive and display the content of the e-book rendered by the reader engine. For example, when opening an e-book, the native layer will be created in the reader initialization method Added to the underlying container to replace the e-book layer in the original reader to achieve various functions (such as page turning, clicking, sliding), etc.
  • Step S302 obtain subviews and corresponding data objects based on the specified protocol, and add the subviews to the container provided by the native layer.
  • subviews and corresponding data objects can be obtained by specifying a protocol.
  • the container and data object structure are provided by the native layer, and the subview containing the insertion information is added to the container provided by the native layer. , write the data related to the insertion information into the data object structure to obtain the corresponding data object.
  • the subview is obtained through the protocol method -(void)loadAdDataWithBaseView:(UIView*)baseView adItem:(OCAdItem*)adItem
  • the subview is added to the baseView (container provided by the native layer) according to the adItem.
  • Step S303 determine the designated rendering area of the sub-view according to the data object, so that when rendering the e-book content, the designated rendering area is reserved to place the sub-view.
  • Determine the designated rendering area of the subview according to the data object, that is, determine the position of the subview, and the native layer will inform the reader engine of the designated rendering area of the subview in adItem, and the reader engine will leave this area free when rendering the e-book content , for placing subviews.
  • Step S304 judging whether the position after the page of the e-book is turned is the insertion position of the sub-view.
  • step S305 is performed to display the subview; if it is judged that the position after turning the page is not the insertion of the subview location, execute step S306 to display the content of the e-book normally.
  • Step S305 setting the sub-view as a visible state, and displaying the sub-view.
  • the native layer obtains the corresponding subview through the specified protocol. If the insertion information contained in the subview is an advertisement, the advertisement rendering is loaded onto the native layer, and the subview is set to the visible state to display the subview. Specifically, the native layer analyzes the data object, determines that the advertisement subview needs to be displayed on the page position, adds the advertisement subview obtained through the specified protocol to the container of the native layer, obtains the advertisement subview from the container, and loads it into Native layer display.
  • the native layer When displaying, the native layer displays the subview in the designated rendering area to ensure the interactive visual experience of the subview and the reading experience of the reader.
  • the visible state of the subview can be realized by setting the state value to true, or by setting the state value to the corresponding alpha value, which is not limited here.
  • Step S306 submitting the rendered e-book content to the native layer for display.
  • the native layer will display the received e-book content rendered by the reader engine normally.
  • Step S307 according to the received page turning instruction, it is judged whether the page turning page is the insertion position of the sub-view.
  • step S308 When a page turning instruction is received, it is judged whether the page turning page is the insertion position of the subview, that is, it is judged whether to turn the page of the subview, if so, then execute step S308, if not, turn the page according to the normal e-book content for processing .
  • step S308 screenshot processing is performed on the displayed sub-view to obtain a screenshot image; the displayed sub-view is set to a hidden state; the screenshot image is rendered to a designated rendering area, so as to realize page-turning display of inserted information.
  • the displayed subviews When turning pages of subviews, the displayed subviews will be screenshotted through the screenshotWithScale method to obtain screenshots of the subviews. At the same time, set the subview that is currently being displayed to a hidden state, do not display the subview, and only display screenshots. Render the screenshot image to the designated rendering area, and render and display it together with the content of the e-book, so as to realize the effect of turning the pages of the e-book and ensure the interactive reading experience of the reader.
  • the hidden state of the subview can be realized by setting the state value to false, or by setting the corresponding alpha value.
  • setting an alpha value means hiding the subview, which is not limited here.
  • this embodiment also includes the following steps:
  • Step S309 receiving a behavior event triggered by the user on the sub-view, and transparently transmitting the behavior event to the sub-view, so that the sub-view responds to the behavior event.
  • the interaction and content layout of the subviews are controlled by the subview creators (that is, the subviews themselves can handle the interaction events of the subview content), without interacting with the reader engine, which reduces the interaction complexity and improves the interactive ability of reading pages.
  • a behavior event triggered by the user on the subview is received, such as a click event, the behavior event is directly transmitted to the subview, and the subview directly responds to the behavior event, so that the animation effect and display effect in the subview can be fully presented.
  • the subview and the corresponding data object are obtained based on the specified protocol, and the subview is directly loaded and displayed by the native layer at the insertion position of the subview, without rendering and loading by the reader engine. It avoids the complex interaction between the page and the browser engine, and improves the developer's development efficiency.
  • the inserted information is displayed in a sub-view, which can present the animation effect of the inserted information, which greatly improves the user's reading interaction experience and is more concise and convenient.
  • Embodiment 3 of the present application provides a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute any of the above method embodiments.
  • E-book page display method
  • the executable instruction can be used to make the processor perform the following operations: obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer; determine the designated rendering area of the subview according to the data object , so that when rendering the e-book content, the specified rendering area is reserved to place the sub-view; the rendered e-book content and sub-view are handed over to the native layer for display; according to the page-turning command received, the displayed sub-view is screenshot-processed, Realize the page-turning display of inserted information for screenshot image rendering.
  • executable instructions further cause the processor to perform the following operations:
  • the data object includes the type of information inserted, the style of the inserted information, the insertion position of the subview and/or the specified rendering area;
  • executable instructions further cause the processor to perform the following operations:
  • executable instructions further cause the processor to perform the following operations:
  • executable instructions further cause the processor to perform the following operations:
  • the native layer is adapted to be created by different terminal devices, and is used to display e-book content and sub-views containing inserted information.
  • executable instructions further cause the processor to perform the following operations:
  • the behavior event triggered by the user on the sub-view is received, and the behavior event is transparently transmitted to the sub-view, so that the sub-view responds to the behavior event.
  • the sub-view contains layout settings for each control of the inserted information, so as to autonomously present the animation effect of the inserted information in the sub-view.
  • FIG. 4 shows a schematic structural diagram of an electronic device according to Embodiment 4 of the present disclosure.
  • the specific embodiment of the present disclosure does not limit the specific implementation of the electronic device.
  • the electronic device may include: a processor (processor) 402, a communication interface (Communications Interface) 404, a memory (memory) 406, and a communication bus 408.
  • processor processor
  • Communication interface Communication Interface
  • memory memory
  • the processor 402 , the communication interface 404 , and the memory 406 communicate with each other through the communication bus 408 .
  • the communication interface 404 is used to communicate with network elements of other devices such as clients or other servers.
  • the processor 402 is configured to execute the program 410, and specifically, may execute the relevant steps in the above embodiment of the method for displaying an e-book page.
  • the program 410 may include program codes including computer operation instructions.
  • the processor 402 may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present disclosure.
  • the one or more processors included in the server may be of the same type, such as one or more CPUs, or may be of different types, such as one or more CPUs and one or more ASICs.
  • the memory 406 is used to store the program 410 .
  • the memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • the program 410 can specifically be used to make the processor 402 perform the following operations: obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer; determine the designated rendering area of the subview according to the data object , so that when rendering the e-book content, the specified rendering area is reserved to place the sub-view; the rendered e-book content and sub-view are handed over to the native layer for display; according to the page-turning command received, the displayed sub-view is screenshot-processed, Realize the page-turning display of inserted information for screenshot image rendering.
  • the program 410 is used to enable the processor 402 to obtain subviews and corresponding data objects based on a specified protocol; the data objects include the type of information to be inserted, the style of information to be inserted, the insertion position of the subview and/or the specified Render area; add subviews to the container provided by the native layer.
  • the program 410 is used to enable the processor 402 to determine whether the page-turning page is the insertion position of the sub-view according to the page-turning instruction received; Picture; set the displayed subview to hidden state; render the screenshot picture to the designated rendering area to realize the page-turning display of inserted information.
  • the program 410 is used to make the processor 402 determine whether the position after turning the page of the e-book is the insertion position of the sub-view; if so, set the sub-view to a visible state and display the sub-view.
  • the program 410 is configured to enable the processor 402 to create a native layer, and add the native layer to the underlying container of the reader.
  • the native layer is adapted to be created by different terminal devices, and is used to display e-book content and sub-views containing inserted information.
  • the program 410 is configured to enable the processor 402 to receive a behavior event triggered by the user on the sub-view, and transparently transmit the behavior event to the sub-view, so that the sub-view responds to the behavior event.
  • the sub-view contains layout settings for each control of the inserted information, so as to autonomously present the animation effect of the inserted information in the sub-view.
  • the content of the e-book and the sub-view are displayed through the native layer, so that the display of the inserted information is realized, and the processing is more efficient.
  • screenshot processing and rendering of screenshot images the problem of page-turning display of inserted information is solved, and user experience is improved.
  • modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment.
  • Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies.
  • All features disclosed in this specification including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined.
  • Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

Abstract

Disclosed in the present disclosure are an electronic book page display method, and an electronic device and a storage medium. The method is executed by a reader engine, which includes a native layer. The method comprises: acquiring a sub-view which includes insertion information, and a corresponding data object, and adding the sub-view to a container of a native layer; determining a specified rendering area of the sub-view according to the data object, such that when electronic book content is rendered, the specified rendering area is reserved to place the sub-view; delivering the rendered electronic book content and the sub-view to the native layer for display; and performing screenshot processing on the displayed sub-view according to a received page-turning instruction, and rendering a screenshot image, so as to realize page-turning display of the insertion information.

Description

电子书页面展示方法、电子设备及存储介质E-book page display method, electronic device and storage medium
相关申请的交叉参考Cross References to Related Applications
本申请要求于2021年9月3日提交中国专利局、申请号为202111033016.9、名称为“电子书页面展示方法、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application with application number 202111033016.9 and titled "E-book page display method, electronic device, and storage medium" filed with the China Patent Office on September 3, 2021, the entire contents of which are hereby incorporated by reference In this application.
技术领域technical field
本公开涉及电子书技术领域,具体涉及一种电子书页面展示方法、电子设备及存储介质。The present disclosure relates to the technical field of electronic books, and in particular to an electronic book page display method, electronic equipment and storage media.
背景技术Background technique
随着电子阅读行业的蓬勃发展,日趋激烈的竞争也随之而来。在阅读电子书时,会根据更多业务需求在电子书中插入信息,同时也要呈现给用户良好的阅读体验。With the vigorous development of the e-reading industry, the increasingly fierce competition will follow. When reading an e-book, information will be inserted into the e-book according to more business needs, and at the same time, a good reading experience should be presented to the user.
现有技术在对插入信息进行翻页处理时,原阅读器渲染引擎无法较佳地满足商业化等新业务的良好阅读体验、快读迭代的需求。如在电子书页面中需添加一些插入信息时,需要与引擎进行交互,通过如html的方式将待插入的信息传递给原阅读器渲染引擎,原阅读器渲染引擎将信息渲染至电子书图层上,或者直接将包含信息的视图贴在原阅读器渲染引擎渲染的电子书图层上方等,这种渲染的方式开发较复杂,需要花费较多人工和时间成本,开发效率低,并且,电子书翻页时,插入信息无法呈现翻页效果,影响用户的阅读体验。In the existing technology, when turning pages of inserted information, the original reader rendering engine cannot better meet the needs of good reading experience and fast reading iteration of new businesses such as commercialization. If you need to add some insertion information to the e-book page, you need to interact with the engine, and pass the information to be inserted to the original reader rendering engine in a way such as html, and the original reader rendering engine renders the information to the e-book layer , or directly paste the view containing information on the e-book layer rendered by the original reader rendering engine, etc. The development of this rendering method is more complicated, requires more labor and time costs, and the development efficiency is low. When the page is turned, the inserted information cannot present the page turning effect, which affects the user's reading experience.
公开内容public content
鉴于上述问题,提出了本公开以便提供一种克服上述问题或者至少部分地解决上述问题的电子书页面展示方法、电子设备及存储介质。In view of the above problems, the present disclosure is proposed to provide an electronic book page display method, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.
根据本公开的一个方面,提供了一种电子书页面展示方法,方法执行于阅读器引擎,阅读器引擎包含原生图层,方法包括:According to one aspect of the present disclosure, a method for displaying e-book pages is provided, the method is executed on a reader engine, and the reader engine contains native layers, and the method includes:
获取包含插入信息的子视图及对应的数据对象,并将子视图添加至原生图层的容器中;Obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer;
根据数据对象确定子视图的指定渲染区域,以便渲染电子书内容时,保留指定渲染区域放置子视图;Determine the designated rendering area of the subview according to the data object, so that when rendering the content of the e-book, the designated rendering area is reserved to place the subview;
将渲染后的电子书内容及子视图交由原生图层进行展示;Submit the rendered e-book content and subviews to the native layer for display;
根据接收的翻页指令,将展示的子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示。According to the received page turning instruction, screenshot processing is performed on the displayed sub-view, and page turning display of inserted information is realized by rendering the screenshot image.
根据本公开的另一方面,提供了一种电子设备,包括:处理器、存储器、通信接口和通信总线,处理器、存储器和通信接口通过通信总线完成相互间的通信;According to another aspect of the present disclosure, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete mutual communication through the communication bus;
存储器用于存放至少一可执行指令,可执行指令使处理器执行以下操作:The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the following operations:
获取包含插入信息的子视图及对应的数据对象,并将子视图添加至原生图层的容器中;Obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer;
根据数据对象确定子视图的指定渲染区域,以便渲染电子书内容时,保留指定渲染区域放置子视图;Determine the designated rendering area of the subview according to the data object, so that when rendering the content of the e-book, the designated rendering area is reserved to place the subview;
将渲染后的电子书内容及子视图交由原生图层进行展示;Submit the rendered e-book content and subviews to the native layer for display;
根据接收的翻页指令,将展示的子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示。According to the received page turning instruction, screenshot processing is performed on the displayed sub-view, and page turning display of inserted information is realized by rendering the screenshot image.
根据本公开的又一方面,提供了一种非易失性计算机可读存储介质,非易失性计算机可读存储介质中存储有至少一可执行指令,可执行指令使处理器执行上述任一项的电子书页面展示方法对应的操作。According to yet another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, wherein at least one executable instruction is stored in the non-volatile computer-readable storage medium, and the executable instruction causes a processor to perform any of the above-mentioned The operation corresponding to the e-book page display method of the item.
根据本公开的再又一方面,还提供了一种计算机程序产品,该计算机程序产品包括存储在上述非易失性计算机可读存储介质上的计算程序。根据本公开提供的电子书页面展示方法、电子设备及存储介质,通过原生图层展示电子书内容及子视图,实现对插入信息的展示,处理更高效。通过截图处理,对截图图片的渲染,解决插入信息的翻页展示问题,提升用户体验。According to still another aspect of the present disclosure, there is also provided a computer program product, which includes the calculation program stored on the above-mentioned non-volatile computer-readable storage medium. According to the e-book page display method, electronic device, and storage medium provided in the present disclosure, the content and sub-views of the e-book are displayed through native layers to realize the display of inserted information, and the processing is more efficient. Through screenshot processing and rendering of screenshot images, the problem of page-turning display of inserted information is solved, and user experience is improved.
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技 术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。The above description is only an overview of the technical solution of the present disclosure. In order to better understand the technical means of the present disclosure, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present disclosure more obvious and understandable , the specific embodiments of the present disclosure are enumerated below.
附图概述Figure overview
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本公开的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present disclosure. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1示出了根据本公开一个实施例的电子书页面展示方法的流程示意图;FIG. 1 shows a schematic flowchart of a method for displaying an e-book page according to an embodiment of the present disclosure;
图2a示出了插入信息展示示意图;Figure 2a shows a schematic diagram of displaying inserted information;
图2b示出了插入信息翻页示意图;Figure 2b shows a schematic diagram of inserting information and turning pages;
图3示出了根据本公开另一个实施例的电子书页面展示方法的流程示意图;FIG. 3 shows a schematic flowchart of a method for displaying an e-book page according to another embodiment of the present disclosure;
图4示出了根据本公开一个实施例的一种电子设备的结构示意图。Fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
本公开的较佳实施方式Preferred Embodiments of the Disclosure
实施例一Embodiment one
图1示出了根据本公开一个实施例的电子书页面展示方法的流程示意图,如图1所示,该方法包括如下步骤:Fig. 1 shows a schematic flowchart of a method for displaying an e-book page according to an embodiment of the present disclosure. As shown in Fig. 1 , the method includes the following steps:
步骤S101,获取包含插入信息的子视图及对应的数据对象,并将子视图添加至原生图层的容器中。Step S101, obtain the subview including the insertion information and the corresponding data object, and add the subview to the container of the native layer.
现有技术是将插入信息传递给电子书的原阅读器渲染引擎,由原阅读器渲染引擎渲染插入信息后,将其设置在展示电子书内容的电子书图层上,需要与原阅读器渲染引擎进行交互、传输、渲染信息等,这种渲染方式处理效率慢,且对插入信息的渲染仅能以图片方式进行展示,展示效果差,也无法实现翻页效果。基于以上问题,本实施例执行于阅读器引擎,在阅读器引擎中加入原生图层,由原生图层来展示电子书内容,以及插入信息。插入信息 利用子视图来封装,子视图中包含插入信息的各控件布局设置、响应各种交互事件的处理等,子视图可以独立自主的处理插入信息的展示效果,如自主呈现子视图中插入信息的动画效果等,无需阅读器引擎来处理渲染插入信息,减少与阅读器引擎的交互。The existing technology is to pass the insertion information to the original reader rendering engine of the e-book. After the original reader rendering engine renders the insertion information, it is set on the e-book layer displaying the content of the e-book, which needs to be rendered with the original reader. The engine interacts, transmits, and renders information, etc. This rendering method is slow in processing efficiency, and the rendering of inserted information can only be displayed in the form of pictures, which has a poor display effect and cannot achieve page turning effects. Based on the above problems, this embodiment is executed on the reader engine, and a native layer is added to the reader engine, and the native layer is used to display e-book content and insert information. The inserted information is encapsulated by a sub-view, which contains the layout settings of the controls for the inserted information, the processing of responding to various interactive events, etc. The sub-view can independently process the display effect of the inserted information, such as independently presenting the inserted information in the sub-view Animation effects, etc., do not require a browser engine to process rendering insertion information, reducing interaction with the browser engine.
在一种可能的实现方式中,原生图层可以是系统提供的一个视图类UIView,是一个UI控件。In a possible implementation manner, the native layer may be a view class UIView provided by the system, which is a UI control.
在展示插入信息时,当获取到包含插入信息的子视图及对应的数据对象后,直接将子视图添加至原生图层的容器中,插入信息的渲染无需阅读器引擎处理,原生图层直接展示子视图的插入信息。原生图层可以适配不同终端设备创建,来展示电子书内容以及包含插入信息的子视图。When displaying the inserted information, after obtaining the subview containing the inserted information and the corresponding data object, directly add the subview to the container of the native layer, the rendering of the inserted information does not need to be processed by the reader engine, and the native layer is directly displayed Insertion information for subviews. Native layers can be created for different terminal devices to display e-book content and subviews containing inserted information.
步骤S102,根据数据对象确定子视图的指定渲染区域,以便渲染电子书内容时,保留指定渲染区域放置子视图。Step S102, determine the designated rendering area of the sub-view according to the data object, so that when rendering the e-book content, the designated rendering area is reserved to place the sub-view.
数据对象与子视图对应,包含如插入信息类型、插入信息样式、子视图的插入位置、指定渲染区域等信息,方便根据数据对象完成子视图中插入信息的展示。具体地,根据数据对象可以确定子视图的指定渲染区域,阅读器引擎在渲染电子书内容时,可以将该指定渲染区域保留,如使其空白,不进行渲染,以放置子视图,展示子视图中的插入信息。The data object corresponds to the sub-view, including information such as the type of information inserted, the style of the inserted information, the insertion position of the sub-view, the designated rendering area, etc., so that the display of the inserted information in the sub-view can be completed according to the data object. Specifically, the specified rendering area of the subview can be determined according to the data object. When the reader engine renders the content of the e-book, the specified rendering area can be reserved, such as making it blank, without rendering, so as to place the subview and display the subview Insert information in .
步骤S103,将渲染后的电子书内容及子视图交由原生图层进行展示。In step S103, the rendered e-book content and sub-views are displayed by native layers.
电子书内容由阅读器引擎对其渲染,原生图层接收阅读器引擎渲染后的电子书内容进行展示,并根据数据对象的子视图插入位置对应的将子视图进行展示,如图2a所示,完成对插入信息的展示。The e-book content is rendered by the reader engine, and the native layer receives the e-book content rendered by the reader engine to display, and displays the sub-views corresponding to the insertion position of the sub-view of the data object, as shown in Figure 2a. Complete the presentation of the inserted information.
步骤S104,根据接收的翻页指令,将展示的子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示。Step S104 , according to the received page turning instruction, screenshot processing is performed on the displayed sub-view, and the screenshot image is rendered to realize page turning display of inserted information.
当接收到翻页指令后,将当前展示的子视图进行截图处理,对得到的截图图片进行渲染,实现插入信息的翻页展示,展示效果如图2b所示。After receiving the page-turning instruction, the currently displayed sub-view is processed as a screenshot, and the obtained screenshot is rendered to realize the page-turning display of the inserted information, and the display effect is shown in Figure 2b.
根据本公开提供的电子书页面展示方法,通过原生图层展示电子书内容及子视图,实现对插入信息的展示,处理更高效。通过截图处理,对截图图片的渲染,解决插入信息的翻页展示问题,提升用户体验。According to the e-book page display method provided in the present disclosure, the content and sub-views of the e-book are displayed through the native layer, so as to realize the display of inserted information, and the processing is more efficient. Through screenshot processing and rendering of screenshot images, the problem of page-turning display of inserted information is solved, and user experience is improved.
实施例二Embodiment two
图3示出了根据本公开另一个实施例的电子书页面展示方法的流程示意图,如图3所示,该方法包括如下步骤:FIG. 3 shows a schematic flowchart of a method for displaying an e-book page according to another embodiment of the present disclosure. As shown in FIG. 3 , the method includes the following steps:
步骤S301,创建原生图层,并将原生图层添加至阅读器的底层容器中。Step S301, creating a native layer and adding the native layer to the underlying container of the reader.
创建原生图层ReadView,原生图层可以适配不同的终端设备创建,如原生图层采用ZYGLView,依赖OpenGLES,继承GLKView创建得到;或者,原生图层采用ZYMTKView,依赖Metal,继承MTKView创建得到等。原生图层基于终端设备创建,可以基于终端设备中各类库提供的API接口,使自身其拥有渲染、仿真翻页等能力。Create the native layer ReadView, which can be adapted to different terminal devices. For example, the native layer uses ZYGLView, relies on OpenGLES, and inherits GLKView; or, the native layer uses ZYMTKView, relies on Metal, and inherits MTKView. The native layer is created based on the terminal device, and can be based on the API interface provided by various libraries in the terminal device, so that it has the ability to render and simulate page turning.
创建后将原生图层添加至阅读器的底层容器中,用于接收阅读器引擎渲染的电子书内容进行展示,如打开一本电子书时,在阅读器初始化的方法中将创建的原生图层添加到底层容器中,以替代原有阅读器中电子书图层,实现各种功能(如翻页、点击、滑动)等。After creation, add the native layer to the underlying container of the reader to receive and display the content of the e-book rendered by the reader engine. For example, when opening an e-book, the native layer will be created in the reader initialization method Added to the underlying container to replace the e-book layer in the original reader to achieve various functions (such as page turning, clicking, sliding), etc.
步骤S302,基于指定协议获取子视图及对应的数据对象,将子视图添加至原生图层提供的容器中。Step S302, obtain subviews and corresponding data objects based on the specified protocol, and add the subviews to the container provided by the native layer.
获取子视图时,可以通过指定协议来获取子视图及对应的数据对象,在指定协议中由原生图层提供容器和数据对象结构体,将包含插入信息的子视图添加至原生图层提供的容器中,将插入信息相关数据写入至数据对象结构体,得到对应的数据对象。具体地,如通过协议方法-(void)loadAdDataWithBaseView:(UIView*)baseView adItem:(OCAdItem*)adItem,获取到子视图,根据adItem将子视图添加到baseView(原生图层提供的容器)中。When obtaining subviews, subviews and corresponding data objects can be obtained by specifying a protocol. In the specified protocol, the container and data object structure are provided by the native layer, and the subview containing the insertion information is added to the container provided by the native layer. , write the data related to the insertion information into the data object structure to obtain the corresponding data object. Specifically, if the subview is obtained through the protocol method -(void)loadAdDataWithBaseView:(UIView*)baseView adItem:(OCAdItem*)adItem, the subview is added to the baseView (container provided by the native layer) according to the adItem.
步骤S303,根据数据对象确定子视图的指定渲染区域,以便渲染电子书内容时,保留指定渲染区域放置子视图。Step S303, determine the designated rendering area of the sub-view according to the data object, so that when rendering the e-book content, the designated rendering area is reserved to place the sub-view.
根据数据对象确定子视图的指定渲染区域,即确定子视图位置,原生图层将adItem中子视图的指定渲染区域告知阅读器引擎,阅读器引擎在渲染电子书内容的时候会将此区域空出,以供放置子视图。Determine the designated rendering area of the subview according to the data object, that is, determine the position of the subview, and the native layer will inform the reader engine of the designated rendering area of the subview in adItem, and the reader engine will leave this area free when rendering the e-book content , for placing subviews.
步骤S304,判断电子书翻页后的位置是否为子视图的插入位置。Step S304, judging whether the position after the page of the e-book is turned is the insertion position of the sub-view.
当判断电子书翻页后的位置为子视图的插入位置时,即翻页到需要展示子视图的页面时,则执行步骤S305,展示子视图;若判断翻页后的位置不是子视图的插入位置,则执行步骤S306,正常展示电子书内容。When it is judged that the position after turning the page of the e-book is the insertion position of the subview, that is, when the page is turned to the page that needs to display the subview, step S305 is performed to display the subview; if it is judged that the position after turning the page is not the insertion of the subview location, execute step S306 to display the content of the e-book normally.
步骤S305,将子视图设置为可见状态,展示子视图。Step S305, setting the sub-view as a visible state, and displaying the sub-view.
原生图层通过指定协议获取对应的子视图,子视图包含的插入信息如为广告,则将广告渲染加载到原生图层上,将子视图设置为可见状态,展示子视图。具体地,原生图层分析数据对象,确定在该页面位置需展示广告子视图,将通过指定协议得到的广告子视图添加到原生图层的容器后,从容器中获取到广告子视图,加载至原生图层展示。The native layer obtains the corresponding subview through the specified protocol. If the insertion information contained in the subview is an advertisement, the advertisement rendering is loaded onto the native layer, and the subview is set to the visible state to display the subview. Specifically, the native layer analyzes the data object, determines that the advertisement subview needs to be displayed on the page position, adds the advertisement subview obtained through the specified protocol to the container of the native layer, obtains the advertisement subview from the container, and loads it into Native layer display.
展示时,原生图层将子视图显示在指定渲染区域,保证子视图的交互视觉体验和阅读器的阅读体验。When displaying, the native layer displays the subview in the designated rendering area to ensure the interactive visual experience of the subview and the reading experience of the reader.
子视图的可见状态可以通过设置状态值为true的方式实现,也可以通过设置状态值为对应的alpha值方式实现,此处不做限定。The visible state of the subview can be realized by setting the state value to true, or by setting the state value to the corresponding alpha value, which is not limited here.
步骤S306,将渲染后的电子书内容交由原生图层进行展示。Step S306, submitting the rendered e-book content to the native layer for display.
若翻页后的页面位置不是子视图的插入位置,则原生图层将接收到的由阅读器引擎渲染后的电子书内容正常展示。If the page position after page turning is not the insertion position of the subview, the native layer will display the received e-book content rendered by the reader engine normally.
步骤S307,根据接收的翻页指令,判断翻页页面是否为子视图的插入位置。Step S307, according to the received page turning instruction, it is judged whether the page turning page is the insertion position of the sub-view.
当接收到翻页指令时,判断翻页页面是否为子视图的插入位置,即判断是否对子视图进行翻页,若是,则执行步骤S308,若否,则按照正常电子书内容翻页进行处理。When a page turning instruction is received, it is judged whether the page turning page is the insertion position of the subview, that is, it is judged whether to turn the page of the subview, if so, then execute step S308, if not, turn the page according to the normal e-book content for processing .
步骤S308,将展示的子视图进行截图处理,得到截图图片;将展示的子视图设置为隐藏状态;将截图图片渲染至指定渲染区域,以实现插入信息的翻页展示。In step S308, screenshot processing is performed on the displayed sub-view to obtain a screenshot image; the displayed sub-view is set to a hidden state; the screenshot image is rendered to a designated rendering area, so as to realize page-turning display of inserted information.
对子视图进行翻页时,将展示的子视图通过如screenshotWithScale方法进行截图处理,得到子视图的截图图片。同时,将当前正在展示的子视图设置为隐藏状态,不展示子视图,只展示截图图片。将截图图片渲染至指定渲 染区域,同时与电子书内容一同渲染展示,实现跟随电子书翻页的效果,保证阅读器的阅读交互体验。When turning pages of subviews, the displayed subviews will be screenshotted through the screenshotWithScale method to obtain screenshots of the subviews. At the same time, set the subview that is currently being displayed to a hidden state, do not display the subview, and only display screenshots. Render the screenshot image to the designated rendering area, and render and display it together with the content of the e-book, so as to realize the effect of turning the pages of the e-book and ensure the interactive reading experience of the reader.
子视图的隐藏状态可以通过设置状态值为false的方式实现,也可以通过设置状态值为对应的alpha值方式实现,如设置某alpha值代表隐藏子视图,此处不做限定。The hidden state of the subview can be realized by setting the state value to false, or by setting the corresponding alpha value. For example, setting an alpha value means hiding the subview, which is not limited here.
可选地,本实施例还包括以下步骤:Optionally, this embodiment also includes the following steps:
步骤S309,接收用户在子视图上触发的行为事件,将行为事件透传给子视图,以由子视图响应行为事件。Step S309, receiving a behavior event triggered by the user on the sub-view, and transparently transmitting the behavior event to the sub-view, so that the sub-view responds to the behavior event.
子视图的交互和内容布局由子视图创建者控制(即子视图自身可处理子视图内容的交互事件),无需与阅读器引擎交互,降低了交互复杂度,提升了阅读页面的交互能力。当接收到用户在子视图上触发的行为事件,如点击事件等,将行为事件直接透传给子视图,由子视图直接响应行为事件,从而可以完整地呈现子视图中的动画效果、展示效果等。The interaction and content layout of the subviews are controlled by the subview creators (that is, the subviews themselves can handle the interaction events of the subview content), without interacting with the reader engine, which reduces the interaction complexity and improves the interactive ability of reading pages. When a behavior event triggered by the user on the subview is received, such as a click event, the behavior event is directly transmitted to the subview, and the subview directly responds to the behavior event, so that the animation effect and display effect in the subview can be fully presented. .
根据本公开提供的电子书页面展示方法,基于指定协议获取到子视图和对应的数据对象,在子视图的插入位置处由原生图层直接加载展示子视图,无需由阅读器引擎来渲染加载,避免了页面与阅读器引擎复杂的交互,提升了开发者的开发效率。同时,子视图方式展示插入信息,可以呈现插入信息的动画效果,极大地提升了用户阅读交互体验,更简洁方便。According to the e-book page display method provided in this disclosure, the subview and the corresponding data object are obtained based on the specified protocol, and the subview is directly loaded and displayed by the native layer at the insertion position of the subview, without rendering and loading by the reader engine. It avoids the complex interaction between the page and the browser engine, and improves the developer's development efficiency. At the same time, the inserted information is displayed in a sub-view, which can present the animation effect of the inserted information, which greatly improves the user's reading interaction experience and is more concise and convenient.
实施例三Embodiment three
本申请实施例三提供了一种非易失性计算机可读存储介质,非易失性计算机可读存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的电子书页面展示方法。Embodiment 3 of the present application provides a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute any of the above method embodiments. E-book page display method.
可执行指令具体可以用于使得处理器执行以下操作:获取包含插入信息的子视图及对应的数据对象,并将子视图添加至原生图层的容器中;根据数据对象确定子视图的指定渲染区域,以便渲染电子书内容时,保留指定渲染区域放置子视图;将渲染后的电子书内容及子视图交由原生图层进行展示;根据接收的翻页指令,将展示的子视图进行截图处理,对截图图片渲染实现 插入信息的翻页展示。Specifically, the executable instruction can be used to make the processor perform the following operations: obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer; determine the designated rendering area of the subview according to the data object , so that when rendering the e-book content, the specified rendering area is reserved to place the sub-view; the rendered e-book content and sub-view are handed over to the native layer for display; according to the page-turning command received, the displayed sub-view is screenshot-processed, Realize the page-turning display of inserted information for screenshot image rendering.
在一种可选的实施方式中,可执行指令进一步使处理器执行以下操作:In an optional implementation manner, the executable instructions further cause the processor to perform the following operations:
基于指定协议获取子视图及对应的数据对象;数据对象包含插入信息类型、插入信息样式、子视图的插入位置和/或指定渲染区域;Obtain the subview and the corresponding data object based on the specified protocol; the data object includes the type of information inserted, the style of the inserted information, the insertion position of the subview and/or the specified rendering area;
将子视图添加至原生图层提供的容器中。Add subviews to the container provided by the native layer.
在一种可选的实施方式中,可执行指令进一步使处理器执行以下操作:In an optional implementation manner, the executable instructions further cause the processor to perform the following operations:
根据接收的翻页指令,判断翻页页面是否为子视图的插入位置;According to the received page turning instruction, determine whether the page turning page is the insertion position of the subview;
若是,将展示的子视图进行截图处理,得到截图图片;将展示的子视图设置为隐藏状态;将截图图片渲染至指定渲染区域,以实现插入信息的翻页展示。If so, take a screenshot of the displayed sub-view to obtain a screenshot; set the displayed sub-view to a hidden state; render the screenshot to the designated rendering area to realize page-turning display of inserted information.
在一种可选的实施方式中,可执行指令进一步使处理器执行以下操作:In an optional implementation manner, the executable instructions further cause the processor to perform the following operations:
判断电子书翻页后的位置是否为子视图的插入位置;Determine whether the position after turning the page of the e-book is the insertion position of the subview;
若是,则将子视图设置为可见状态,展示子视图。If so, set the subview to the visible state and display the subview.
在一种可选的实施方式中,可执行指令进一步使处理器执行以下操作:In an optional implementation manner, the executable instructions further cause the processor to perform the following operations:
创建原生图层,并将原生图层添加至阅读器的底层容器中。Create a native layer and add the native layer to the underlying container of the reader.
在一种可选的实施方式中,原生图层适配不同终端设备创建,用于展示电子书内容以及包含插入信息的子视图。In an optional implementation manner, the native layer is adapted to be created by different terminal devices, and is used to display e-book content and sub-views containing inserted information.
在一种可选的实施方式中,可执行指令进一步使处理器执行以下操作:In an optional implementation manner, the executable instructions further cause the processor to perform the following operations:
接收用户在子视图上触发的行为事件,将行为事件透传给子视图,以由子视图响应所述行为事件。The behavior event triggered by the user on the sub-view is received, and the behavior event is transparently transmitted to the sub-view, so that the sub-view responds to the behavior event.
在一种可选的实施方式中,子视图中包含插入信息各控件布局设置,以自主呈现子视图中插入信息的动画效果。In an optional implementation manner, the sub-view contains layout settings for each control of the inserted information, so as to autonomously present the animation effect of the inserted information in the sub-view.
实施例四Embodiment four
图4示出了根据本公开实施例四的一种电子设备的结构示意图,本公开具体实施例并不对电子设备的具体实现做限定。FIG. 4 shows a schematic structural diagram of an electronic device according to Embodiment 4 of the present disclosure. The specific embodiment of the present disclosure does not limit the specific implementation of the electronic device.
如图4所示,该电子设备可以包括:处理器(processor)402、通信接口(Communications Interface)404、存储器(memory)406、以及通信总线408。As shown in FIG. 4 , the electronic device may include: a processor (processor) 402, a communication interface (Communications Interface) 404, a memory (memory) 406, and a communication bus 408.
其中:in:
处理器402、通信接口404、以及存储器406通过通信总线408完成相互间的通信。The processor 402 , the communication interface 404 , and the memory 406 communicate with each other through the communication bus 408 .
通信接口404,用于与其它设备比如客户端或其它服务器等的网元通信。The communication interface 404 is used to communicate with network elements of other devices such as clients or other servers.
处理器402,用于执行程序410,具体可以执行上述电子书页面展示方法实施例中的相关步骤。The processor 402 is configured to execute the program 410, and specifically, may execute the relevant steps in the above embodiment of the method for displaying an e-book page.
具体地,程序410可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 410 may include program codes including computer operation instructions.
处理器402可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本公开实施例的一个或多个集成电路。服务器包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 402 may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present disclosure. The one or more processors included in the server may be of the same type, such as one or more CPUs, or may be of different types, such as one or more CPUs and one or more ASICs.
存储器406,用于存放程序410。存储器406可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 406 is used to store the program 410 . The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
程序410具体可以用于使得处理器402执行以下操作:获取包含插入信息的子视图及对应的数据对象,并将子视图添加至原生图层的容器中;根据数据对象确定子视图的指定渲染区域,以便渲染电子书内容时,保留指定渲染区域放置子视图;将渲染后的电子书内容及子视图交由原生图层进行展示;根据接收的翻页指令,将展示的子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示。The program 410 can specifically be used to make the processor 402 perform the following operations: obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer; determine the designated rendering area of the subview according to the data object , so that when rendering the e-book content, the specified rendering area is reserved to place the sub-view; the rendered e-book content and sub-view are handed over to the native layer for display; according to the page-turning command received, the displayed sub-view is screenshot-processed, Realize the page-turning display of inserted information for screenshot image rendering.
在一种可选的实施方式中,程序410用于使得处理器402基于指定协议获取子视图及对应的数据对象;数据对象包含插入信息类型、插入信息样式、子视图的插入位置和/或指定渲染区域;将子视图添加至原生图层提供的容器中。In an optional implementation, the program 410 is used to enable the processor 402 to obtain subviews and corresponding data objects based on a specified protocol; the data objects include the type of information to be inserted, the style of information to be inserted, the insertion position of the subview and/or the specified Render area; add subviews to the container provided by the native layer.
在一种可选的实施方式中,程序410用于使得处理器402根据接收的翻 页指令,判断翻页页面是否为子视图的插入位置;若是,将展示的子视图进行截图处理,得到截图图片;将展示的子视图设置为隐藏状态;将截图图片渲染至指定渲染区域,以实现插入信息的翻页展示。In an optional implementation, the program 410 is used to enable the processor 402 to determine whether the page-turning page is the insertion position of the sub-view according to the page-turning instruction received; Picture; set the displayed subview to hidden state; render the screenshot picture to the designated rendering area to realize the page-turning display of inserted information.
在一种可选的实施方式中,程序410用于使得处理器402判断电子书翻页后的位置是否为子视图的插入位置;若是,则将子视图设置为可见状态,展示子视图。In an optional implementation, the program 410 is used to make the processor 402 determine whether the position after turning the page of the e-book is the insertion position of the sub-view; if so, set the sub-view to a visible state and display the sub-view.
在一种可选的实施方式中,程序410用于使得处理器402创建原生图层,并将原生图层添加至阅读器的底层容器中。In an optional implementation manner, the program 410 is configured to enable the processor 402 to create a native layer, and add the native layer to the underlying container of the reader.
在一种可选的实施方式中,原生图层适配不同终端设备创建,用于展示电子书内容以及包含插入信息的子视图。In an optional implementation manner, the native layer is adapted to be created by different terminal devices, and is used to display e-book content and sub-views containing inserted information.
在一种可选的实施方式中,程序410用于使得处理器402接收用户在子视图上触发的行为事件,将行为事件透传给所述子视图,以由子视图响应行为事件。In an optional implementation manner, the program 410 is configured to enable the processor 402 to receive a behavior event triggered by the user on the sub-view, and transparently transmit the behavior event to the sub-view, so that the sub-view responds to the behavior event.
在一种可选的实施方式中,子视图中包含插入信息各控件布局设置,以自主呈现子视图中插入信息的动画效果。In an optional implementation manner, the sub-view contains layout settings for each control of the inserted information, so as to autonomously present the animation effect of the inserted information in the sub-view.
程序410中各步骤的具体实现可以参见上述电子书页面展示实施例中的相应步骤中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。For the specific implementation of each step in the program 410, reference may be made to the corresponding description of the corresponding steps in the above-mentioned e-book page display embodiment, and details are not repeated here. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the foregoing method embodiments, and details are not repeated here.
通过本实施例提供的方案,通过原生图层展示电子书内容及子视图,实现对插入信息的展示,处理更高效。通过截图处理,对截图图片的渲染,解决插入信息的翻页展示问题,提升用户体验。Through the solution provided by this embodiment, the content of the e-book and the sub-view are displayed through the native layer, so that the display of the inserted information is realized, and the processing is more efficient. Through screenshot processing and rendering of screenshot images, the problem of page-turning display of inserted information is solved, and user experience is improved.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本公开的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个公开方面中的一个或多个,在上面对本公开的示例性实施例的描述中,本公开的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开 的方法解释成反映如下意图:即所要求保护的本公开要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,公开方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本公开的单独实施例。Similarly, it should be appreciated that in the above description of exemplary embodiments of the disclosure, in order to streamline the disclosure and to facilitate an understanding of one or more of the various disclosed aspects, various features of the disclosure are sometimes grouped together into a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed disclosure requires more features than are expressly recited in each claim. Rather, as the following claims reflect, disclosed aspects lie in less than all features of a single foregoing disclosed embodiment. Thus the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this disclosure.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本公开的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the present disclosure. and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
应该注意的是上述实施例对本公开进行说明而不是对本公开进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本公开可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the disclosure, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The disclosure can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims (18)

  1. 一种电子书页面展示方法,所述方法执行于阅读器引擎,所述阅读器引擎包含原生图层,方法包括:A method for displaying an electronic book page, the method is executed on a reader engine, and the reader engine includes a native layer, and the method includes:
    获取包含插入信息的子视图及对应的数据对象,并将所述子视图添加至所述原生图层的容器中;Obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer;
    根据所述数据对象确定所述子视图的指定渲染区域,以便渲染电子书内容时,保留所述指定渲染区域放置子视图;Determine the designated rendering area of the sub-view according to the data object, so that when rendering the e-book content, the designated rendering area is reserved to place the sub-view;
    将渲染后的电子书内容及所述子视图交由原生图层进行展示;Submit the rendered e-book content and the subview to the native layer for display;
    根据接收的翻页指令,将展示的所述子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示。According to the page-turning instruction received, the displayed sub-view is processed as a screenshot, and the screenshot image is rendered to realize page-turning display of inserted information.
  2. 根据权利要求1所述的方法,其中,所述获取包含插入信息的子视图及对应的数据对象,并将所述子视图添加至所述原生图层的容器中具体为:The method according to claim 1, wherein said obtaining the subview including the insertion information and the corresponding data object, and adding the subview to the container of the native layer is specifically:
    基于指定协议获取子视图及对应的数据对象;所述数据对象包含插入信息类型、插入信息样式、子视图的插入位置和/或指定渲染区域;Obtain the subview and the corresponding data object based on the specified protocol; the data object includes the insertion information type, the insertion information style, the insertion position of the subview and/or the specified rendering area;
    将所述子视图添加至所述原生图层提供的容器中。Adds the subview to the container provided by the native layer.
  3. 根据权利要求1所述的方法,其中,根据接收的翻页指令,将展示的所述子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示进一步包括:The method according to claim 1, wherein, according to the received page-turning instruction, performing screenshot processing on the displayed sub-view, and rendering the screenshot image to realize the page-turning display of inserting information further includes:
    根据接收的翻页指令,判断翻页页面是否为子视图的插入位置;According to the received page turning instruction, determine whether the page turning page is the insertion position of the subview;
    若是,将展示的所述子视图进行截图处理,得到截图图片;将所述展示的子视图设置为隐藏状态;将所述截图图片渲染至所述指定渲染区域,以实现插入信息的翻页展示。If so, perform screenshot processing on the displayed subview to obtain a screenshot image; set the displayed subview to a hidden state; render the screenshot image to the designated rendering area to realize page-turning display of inserted information .
  4. 根据权利要求2或3所述的方法,其中,在所述将渲染后的电子书内容及所述子视图交由原生图层进行展示之前,所述方法还包括:The method according to claim 2 or 3, wherein, before the rendered e-book content and the sub-view are displayed by the native layer, the method further comprises:
    判断电子书翻页后的位置是否为子视图的插入位置;Determine whether the position after turning the page of the e-book is the insertion position of the subview;
    若是,则将所述子视图设置为可见状态,展示所述子视图。If yes, setting the subview to a visible state to display the subview.
  5. 根据权利要求1-4中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    创建原生图层,并将所述原生图层添加至阅读器的底层容器中。Create a native layer and add the native layer to the underlying container of the reader.
  6. 根据权利要求1-5中任一项所述的方法,其中,所述原生图层适配不同终端设备创建,用于展示电子书内容以及包含插入信息的子视图。The method according to any one of claims 1-5, wherein the native layer is adapted to be created by different terminal devices, and is used to display e-book content and sub-views containing inserted information.
  7. 根据权利要求1-6中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1-6, wherein the method further comprises:
    接收用户在所述子视图上触发的行为事件,将所述行为事件透传给所述子视图,以由所述子视图响应所述行为事件。A behavior event triggered by the user on the sub-view is received, and the behavior event is transparently transmitted to the sub-view, so that the sub-view responds to the behavior event.
  8. 根据权利要求1-7中任一项所述的方法,其中,所述子视图中包含插入信息各控件布局设置,以自主呈现所述子视图中插入信息的动画效果。The method according to any one of claims 1-7, wherein the sub-view contains layout settings for each control inserting information, so as to autonomously present an animation effect of inserting information in the sub-view.
  9. 一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;An electronic device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete mutual communication through the communication bus;
    所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行以下操作:The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the following operations:
    获取包含插入信息的子视图及对应的数据对象,并将所述子视图添加至所述原生图层的容器中;Obtain the subview containing the insertion information and the corresponding data object, and add the subview to the container of the native layer;
    根据所述数据对象确定所述子视图的指定渲染区域,以便渲染电子书内容时,保留所述指定渲染区域放置子视图;Determine the designated rendering area of the sub-view according to the data object, so that when rendering the e-book content, the designated rendering area is reserved to place the sub-view;
    将渲染后的电子书内容及所述子视图交由原生图层进行展示;Submit the rendered e-book content and the subview to the native layer for display;
    根据接收的翻页指令,将展示的所述子视图进行截图处理,对截图图片渲染实现插入信息的翻页展示。According to the page-turning instruction received, the displayed sub-view is processed as a screenshot, and the screenshot image is rendered to realize page-turning display of inserted information.
  10. 根据权利要求9所述电子设备,所述可执行指令进一步使所述处理器执行以下操作:According to the electronic device according to claim 9, the executable instructions further cause the processor to perform the following operations:
    基于指定协议获取子视图及对应的数据对象;所述数据对象包含插入信息类型、插入信息样式、子视图的插入位置和/或指定渲染区域;Obtain the subview and the corresponding data object based on the specified protocol; the data object includes the insertion information type, the insertion information style, the insertion position of the subview and/or the specified rendering area;
    将所述子视图添加至所述原生图层提供的容器中。Adds the subview to the container provided by the native layer.
  11. 根据权利要求9所述电子设备,所述可执行指令进一步使所述处理器执行以下操作:According to the electronic device of claim 9, the executable instructions further cause the processor to perform the following operations:
    根据接收的翻页指令,判断翻页页面是否为子视图的插入位置;According to the received page turning instruction, determine whether the page turning page is the insertion position of the subview;
    若是,将展示的所述子视图进行截图处理,得到截图图片;将所述展示的子视图设置为隐藏状态;将所述截图图片渲染至所述指定渲染区域,以实现插入信息的翻页展示。If so, perform screenshot processing on the displayed subview to obtain a screenshot image; set the displayed subview to a hidden state; render the screenshot image to the designated rendering area to realize page-turning display of inserted information .
  12. 根据权利要求10或11所述电子设备,所述可执行指令进一步使所述处理器执行以下操作:According to the electronic device according to claim 10 or 11, the executable instructions further cause the processor to perform the following operations:
    判断电子书翻页后的位置是否为子视图的插入位置;Determine whether the position after turning the page of the e-book is the insertion position of the subview;
    若是,则将所述子视图设置为可见状态,展示所述子视图。If yes, setting the subview to a visible state to display the subview.
  13. 根据权利要求9-12中任一项所述电子设备,所述可执行指令进一步使所述处理器执行以下操作:According to the electronic device according to any one of claims 9-12, the executable instructions further cause the processor to perform the following operations:
    创建原生图层,并将所述原生图层添加至阅读器的底层容器中。Create a native layer and add the native layer to the underlying container of the reader.
  14. 根据权利要求9-13中任一项所述电子设备,所述原生图层适配不同终端设备创建,用于展示电子书内容以及包含插入信息的子视图。According to the electronic device according to any one of claims 9-13, the native layer is adapted to be created by different terminal devices, and is used to display e-book content and sub-views containing inserted information.
  15. 根据权利要求9-14中任一项所述的电子设备,所述可执行指令进一步使所述处理器执行以下操作:The electronic device according to any one of claims 9-14, the executable instructions further cause the processor to perform the following operations:
    接收用户在所述子视图上触发的行为事件,将所述行为事件透传给所述子视图,以由所述子视图响应所述行为事件。A behavior event triggered by the user on the sub-view is received, and the behavior event is transparently transmitted to the sub-view, so that the sub-view responds to the behavior event.
  16. 根据权利要求9-15中任一项所述电子设备,所述子视图中包含插入信息各控件布局设置,以自主呈现所述子视图中插入信息的动画效果。According to the electronic device according to any one of claims 9-15, the sub-view includes layout settings of various controls for inserting information, so as to autonomously present the animation effect of inserting information in the sub-view.
  17. 一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如权利要求1-8中任一项所述的电子书页面展示方法对应的操作。A non-volatile computer-readable storage medium, at least one executable instruction is stored in the non-volatile computer-readable storage medium, and the executable instruction causes the processor to perform any one of claims 1-8. Operations corresponding to the e-book page display method described in item.
  18. 一种计算机程序产品,该计算机程序产品包括存储在非易失性计算机可读存储介质上的计算程序,该计算机程序包括程序指令,当该程序指令被处理器执行时,使该处理器执行如权利要求1-8中任一项所述的电子书页面展示方法对应的操作。A computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is Operations corresponding to the e-book page display method described in any one of claims 1-8.
PCT/CN2021/125782 2021-09-03 2021-10-22 Electronic book page display method, and electronic device and storage medium WO2023029172A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111033016.9A CN113672150A (en) 2021-09-03 2021-09-03 Electronic book page display method, electronic equipment and storage medium
CN202111033016.9 2021-09-03

Publications (1)

Publication Number Publication Date
WO2023029172A1 true WO2023029172A1 (en) 2023-03-09

Family

ID=78548245

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125782 WO2023029172A1 (en) 2021-09-03 2021-10-22 Electronic book page display method, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN113672150A (en)
WO (1) WO2023029172A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114255084A (en) * 2021-12-21 2022-03-29 北京沃东天骏信息技术有限公司 Advertisement page display method, device and system
CN114967998A (en) * 2022-05-31 2022-08-30 掌阅科技股份有限公司 Operation bar display method, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846682B1 (en) * 2013-11-25 2017-12-19 Amazon Technologies, Inc. Cross-platform presentation of digital content
CN111143725A (en) * 2019-11-15 2020-05-12 北京字节跳动网络技术有限公司 Page generation method and device and electronic equipment
CN111611037A (en) * 2020-05-09 2020-09-01 掌阅科技股份有限公司 View object processing method for electronic book, electronic device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096691B (en) * 2019-04-16 2022-12-23 掌阅科技股份有限公司 Typesetting method based on electronic book, electronic equipment and computer storage medium
CN112486398B (en) * 2020-12-18 2022-05-20 掌阅科技股份有限公司 Method for realizing page turning effect of handwriting, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846682B1 (en) * 2013-11-25 2017-12-19 Amazon Technologies, Inc. Cross-platform presentation of digital content
CN111143725A (en) * 2019-11-15 2020-05-12 北京字节跳动网络技术有限公司 Page generation method and device and electronic equipment
CN111611037A (en) * 2020-05-09 2020-09-01 掌阅科技股份有限公司 View object processing method for electronic book, electronic device and storage medium

Also Published As

Publication number Publication date
CN113672150A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
WO2023029172A1 (en) Electronic book page display method, and electronic device and storage medium
US11036345B2 (en) System and method for on-screen graphical user interface encapsulation and reproduction
US7844917B2 (en) Optimal display of multiple windows within a computer display
CN105159521B (en) With the method and system for the user interface element update dock for indicating remote application
JP5506120B2 (en) Apparatus and method for partitioning a display surface into a plurality of virtual display areas
US9715750B2 (en) System and method for layering using tile-based renderers
TWI566160B (en) Computer storage medium, method, and computing device for coordination of animations across multiple applications or processes
US20150019983A1 (en) Computer-implemented virtual object for managing digital content
JP4857122B2 (en) An intelligent agenda object that reveals the context location in a presentation application
KR101512010B1 (en) Combining interfaces of shell applications and sub-applications
WO2017166210A1 (en) Method for processing application program and mobile device
US9021352B2 (en) Methods and apparatus for predictive document rendering
WO2012037554A2 (en) Method and apparatus for pre-rendering expected system response
CN105573694B (en) Multiple display rendering of digital content
WO2010000126A1 (en) Method and system for generating interactive information
US20160364398A1 (en) Generation and dynamic serving of device-dependent web content
US20090153435A1 (en) Presentation System
US7640505B1 (en) Element view toggling
US20130152009A1 (en) Browsing Between Mobile and Non-Mobile Web Sites
CN113157171A (en) Application display method in split screen mode, computing device and computer storage medium
CN113849096B (en) Desktop display method and device and computing equipment
TW200407771A (en) Screen display processing apparatus, screen display processing method and computer program
US9588661B1 (en) Graphical user interface widget to select multiple items from a fixed domain
WO2021098306A1 (en) Object comparison method, and device
WO2023185109A1 (en) Display method of folding screen device, folding screen device, 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: 21955701

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE