CN112433657A - Electronic book simulation page turning method, electronic equipment and computer storage medium - Google Patents

Electronic book simulation page turning method, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN112433657A
CN112433657A CN202011324166.0A CN202011324166A CN112433657A CN 112433657 A CN112433657 A CN 112433657A CN 202011324166 A CN202011324166 A CN 202011324166A CN 112433657 A CN112433657 A CN 112433657A
Authority
CN
China
Prior art keywords
page
page turning
book
turning
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011324166.0A
Other languages
Chinese (zh)
Other versions
CN112433657B (en
Inventor
孙上斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ireader Technology Co Ltd
Original Assignee
Ireader Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ireader Technology Co Ltd filed Critical Ireader Technology Co Ltd
Priority to CN202011324166.0A priority Critical patent/CN112433657B/en
Publication of CN112433657A publication Critical patent/CN112433657A/en
Application granted granted Critical
Publication of CN112433657B publication Critical patent/CN112433657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/02Digital computers in general; Data processing equipment in general manually operated with input through keyboard and computation using a built-in program, e.g. pocket calculators
    • G06F15/025Digital computers in general; Data processing equipment in general manually operated with input through keyboard and computation using a built-in program, e.g. pocket calculators adapted to a specific application
    • G06F15/0291Digital computers in general; Data processing equipment in general manually operated with input through keyboard and computation using a built-in program, e.g. pocket calculators adapted to a specific application for reading, e.g. e-books

Abstract

The invention discloses a simulation page turning method of an electronic book, electronic equipment and a computer storage medium, wherein the method comprises the following steps: when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface; determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface; and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page. The page turning state of the book presented through the curling process of the book page is rendered in the mode, and the page turning visual experience when a user reads a real paper book can be given.

Description

Electronic book simulation page turning method, electronic equipment and computer storage medium
Technical Field
The invention relates to the field of computers, in particular to an electronic book simulation page turning method, electronic equipment and a computer storage medium.
Background
At present, with the increasing popularity of electronic devices, more and more users are used to read electronic books through electronic devices to replace traditional paper books. Due to the advantage of portability, the user can open the electronic book for reading at any time and any place. In the conventional method, when a user performs a page turning operation through an electronic book, a conversion process of page contents is completed by means of page instant switching.
In addition, especially when the pages of the book contain pictures, the processing mode of the pages of the book with the pictures inserted is more complex, so that the page turning mode of the pages of the electronic book containing the pictures can be completed only by an instant switching mode, and dynamic effects cannot be added.
However, the page turning mode is more abrupt, and the traditional paper reading page turning mode cannot be simulated. For example, when a user reads a paper book, the page turning operation is usually performed by lifting a corner of the book page to make the book page appear in a curled state. Therefore, the page turning effect of a real paper book cannot be simulated by the existing electronic book page turning mode.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide a method, an electronic device, and a computer storage medium for simulated page turning of an electronic book that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method for simulating page turning of an electronic book, including:
when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface;
determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface;
and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
According to another aspect of the present invention, there is provided an electronic apparatus including: the system comprises 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 configured to store at least one executable instruction that causes the processor to:
when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface;
determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface;
and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
According to yet another aspect of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing the processor to:
when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface;
determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface;
and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
In the method for simulating page turning of the electronic book, the electronic device and the computer storage medium provided by the invention, when a page turning instruction triggered by a book page containing a picture is detected, the picture drawing interface can be called, so that a page turning action area corresponding to the page turning instruction contained in the book page is determined through the picture drawing interface, and page turning transformation positions of all image units contained in the page turning action area are calculated and displayed, so that the simulated page turning processing of the book page is realized. Therefore, the page turning visual experience when a user reads a real paper book can be given to the page turning visual experience when the user reads the real paper book by calculating the page turning conversion positions corresponding to the image units in the page turning action region when the book page is in a curled state along with the page turning instruction and further rendering the page turning state of the book presented by the curling process of the book page.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
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 embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating a method for simulating page turning of an electronic book according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for simulating page turning of an electronic book according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of an electronic device according to another embodiment of the invention;
FIG. 4 is a schematic diagram illustrating a page turning state;
FIG. 5 is a schematic diagram illustrating yet another page turning state.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Fig. 1 shows a flowchart of a method for simulating page turning of an electronic book according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step S110: and when a page turning instruction triggered by the book page containing the preset picture elements is detected, calling a picture drawing interface.
The book page containing the preset picture elements refers to: the page content includes content such as a dynamic picture or a picture element for linking to a video resource. For example, dynamic video resources are inserted into an electronic book in a manner of picture linking and the like, so that a user can conveniently acquire information in forms of pictures or videos and the like in the process of reading the electronic book, and the book reading efficiency is further improved.
Specifically, the page flip instruction is usually triggered by a slide operation. Correspondingly, when a page turning instruction triggered by sliding operation is detected, the picture drawing interface is called to realize subsequent page turning drawing operation. Wherein, the picture drawing interface means: the interface is specially used for realizing the picture drawing function.
Step S120: and determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface.
Since the page turning operation is usually only used to lift one corner of the page of the book, the page area of the page of the book, which is affected by the page turning operation and appears in a curled state, is only a local area in the page of the book, and the local area is a page turning active area. The remaining page area that is not affected by the page turning operation and remains in the flat state (non-rolled state) is a non-page turning active area.
In order to simulate the true page turning curl state, it is necessary to first determine the above-mentioned page turning effect region so as to perform a curl conversion process with respect to the page turning effect region in a subsequent step. In specific implementation, the page turning action region included in the book page may be determined according to the page turning radius from the page turning radius calculated from the displacement variation between the page turning conversion position of the page turning reference point in the book page and the page initial position of the page turning reference point, and a specific determination manner may be flexibly selected by a person skilled in the art, which is not limited herein.
Step S130: and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
Specifically, when the page of the book shows a curled state, each image unit included in the page also shows a curled state, and therefore, it is necessary to calculate a page turning conversion position corresponding to each image unit after the curling conversion according to the page initial position of each image unit included in the page turning action region. The page initial position of each image unit is as follows: before the page turning operation is executed, each image unit is located at a position in a page of the book, and can be specifically represented by page coordinates; the page turning conversion position of the image unit is as follows: after the page turning operation is performed, the respective image elements assume changed positions according to the rolled state of the book page. In specific implementation, the page curl radius can reflect the curl degree of the page of the book, so that the page turning conversion position of each image unit can be calculated based on the page curl radius. Therefore, the page turning transformation positions of the image units are calculated and displayed, and a page curling effect similar to that presented when a paper book is turned can be rendered, so that the simulated page turning processing of the book page is realized.
In the simulation page turning method of the electronic book, provided by the invention, when a page turning instruction triggered by a book page containing a picture is detected, the picture drawing interface is called, so that a page turning action area corresponding to the page turning instruction contained in the book page is determined through the picture drawing interface, and the page turning transformation position of each image unit contained in the page turning action area is calculated and displayed, so that the simulation page turning processing of the book page is realized. Therefore, the page turning visual experience when a user reads a real paper book can be given to the page turning visual experience when the user reads the real paper book by calculating the page turning conversion positions corresponding to the image units in the page turning action region when the book page is in a curled state along with the page turning instruction and further rendering the page turning state of the book presented by the curling process of the book page.
Example two
Fig. 2 is a flowchart illustrating a method for simulating page turning of an electronic book according to another embodiment of the present invention. As shown in fig. 2, the method comprises the steps of:
step S210: and when a page turning instruction triggered by the book page containing the preset picture elements is detected, calling a picture drawing interface.
The book page containing the preset picture elements refers to: the page content includes content such as a dynamic picture or a picture element for linking to a video resource. For example, dynamic video resources are inserted into an electronic book in a manner of picture linking and the like, so that a user can conveniently acquire information in forms of pictures or videos and the like in the process of reading the electronic book, and the book reading efficiency is further improved.
Specifically, the page flip instruction is usually triggered by a slide operation. Correspondingly, when a page turning instruction triggered by sliding operation is detected, the picture drawing interface is called to realize subsequent page turning drawing operation. Wherein, the picture drawing interface means: the interface is specially used for realizing the picture drawing function. For example, in the android system, the drawing function can be realized through an interface provided by the android system. For another example, in the ios system, the interface with drawing function can be realized through custom development. The interface logic of the picture drawing interface can be flexibly adjusted according to actual business requirements, so that the picture drawing interface is particularly suitable for page turning drawing processing of complex book pages containing pictures.
In the process of implementing the present invention, the inventor finds that drawing processing is mostly implemented in an OpenGL manner in the conventional manner, but the OpenGL manner has the following limitations: it cannot be applied to the processing of book pages containing pictures. That is, the OpenGL rendering method can only be applied to the conventional rendering process of a book page containing characters, but cannot be applied when the book page contains a picture or a picture link for linking to a video resource.
Therefore, in order to solve the above problem, in this embodiment, when a page turning instruction is detected, page description information of a book page corresponding to the page turning instruction is further obtained, whether a preset picture element is included in the book page is determined according to the page description information of the book page, and if so, the picture drawing interface is called to implement page turning drawing processing; if not, whether the processing is carried out in a conventional OpenGL drawing mode or not can be flexibly selected. The preset picture elements are used for displaying dynamic picture resources, namely video resources or dynamic picture resources. The preset picture elements are inserted into the page, so that the video content can be played in the reading process of the electronic book, and the information acquisition efficiency of a user is improved. Specifically, when judging whether the book page contains the preset picture element according to the page description information of the book page, the method can be realized by analyzing the page source code corresponding to the book page and judging whether the page source code contains the source code identifier matched with the preset picture element.
Step S220: and determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface.
Since the page turning operation is usually only used to lift one corner of the page of the book, the page area of the page of the book, which is affected by the page turning operation and appears in a curled state, is only a local area in the page of the book, and the local area is a page turning active area. The remaining page area that is not affected by the page turning operation and remains in the flat state (non-rolled state) is a non-page turning active area.
Specifically, when determining the page turning action region, calculation processing is required, and in order to reduce the calculation amount, in this embodiment, the number of image units to be calculated is reduced by a sampling manner, so that the calculation efficiency is improved. Specifically, sampling image units contained in a book page through a picture drawing interface to obtain sampling units contained in the book page; and determining a page turning action area corresponding to the page turning instruction and contained in the page of the book according to the sampling unit contained in the page of the book. The image units can be image information in the form of image pixel points and the like, and sampling is used for reducing the number of the image units so as to reduce the calculation amount.
In specific implementation, a page area of a book page is divided into a plurality of area grids through a picture drawing interface, and sampling processing is respectively carried out on image units contained in each area grid to obtain a sampling unit set corresponding to each area grid; correspondingly, the area grids belonging to the page turning action area are determined according to the sampling unit sets corresponding to the area grids. For example, the size of each area grid is set in advance, and accordingly, each area grid is divided according to the corresponding size, so that the page area of the whole book page is divided into a plurality of area grids which are arranged in sequence. Specifically, when the sampling processing is performed on each area grid, a plurality of image units in the area grid may be extracted according to a preset sampling ratio, where the extracted image units are also called sampling units, and accordingly, the extracted image units together form a sampling unit set corresponding to the area grid.
Step S230: and calculating the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface, and rendering the calculated page turning transformation position of each image unit so as to realize the simulation page turning processing of the book page.
In specific implementation, the page initial position of each image unit contained in a sampling unit set corresponding to an area grid belonging to a page turning action area is obtained through a picture drawing interface; and calculating and displaying the page turning transformation positions of the image units contained in the sampling unit set according to the page initial positions of the image units contained in the sampling unit set so as to realize the simulated page turning processing of the page of the book. Therefore, according to the embodiment, through sampling processing, calculation does not need to be performed on all image units in the area grid one by one, and only needs to be performed on each image unit in the sampling unit set included in the area grid, so that the calculation amount is greatly reduced. In addition, other image units not included in the sampling unit set may be filled by an edge-rendering algorithm, a smoothing algorithm, a scaling algorithm, or the like.
Next, details of a specific implementation of the above-described simulation page turning method are described in detail by a specific example. This example includes the steps of:
the method comprises the following steps: and responding to the received page turning instruction, and acquiring displacement variation quantity between the page turning conversion position of the page turning reference point in the page of the book and the page initial position of the page turning reference point.
Specifically, the page turning instruction in this embodiment is a sliding-type page turning instruction. The page turning reference points in the pages of the book are typically: and a position point on the page boundary line adjacent to the trigger position of the page turning instruction. Fig. 4 is a schematic diagram illustrating a page turning state, as shown in fig. 4, a triggering position of a page turning instruction is located in a lower right corner region of a page of a book, and accordingly, a page turning reference point in the page of the book is a page vertex in the lower right corner of the page of the book. The page initial position of the page turning reference point is the intersection point position between the right side boundary line and the lower side boundary line of the page of the book, i.e. point F in fig. 4.
The position of the page turning reference point will be changed as the page turning operation is performed, and the changed position is referred to as a page turning change position. For example, point a in fig. 4 corresponds to the page flip transition location of the page flip reference point. Accordingly, the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and the direction of the page turning operation. The displacement variation may be determined by the length and slope of the line segment AF.
Specifically, when the displacement variation quantity between the page turning conversion position of the page turning reference point in the page of the book and the page initial position of the page turning reference point is obtained, the method is realized in the following mode: firstly, the sliding direction and/or the sliding length of a sliding page turning instruction are/is obtained. The sliding direction and/or the sliding length of the sliding-type page turning instruction are/is used for representing the sliding displacement of the sliding-type page turning instruction, and the sliding displacement depends on factors such as the duration and the sliding speed of the sliding operation. And then, according to the sliding direction and/or the sliding length, determining the displacement direction and/or the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point. The displacement direction of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point is matched with the sliding direction of the sliding type page turning instruction, and the displacement length of the page turning conversion position of the page turning reference point relative to the page initial position of the page turning reference point and the sliding length of the sliding type page turning instruction have a preset proportional relation.
Step two: and calculating the page curling radius corresponding to the page turning instruction.
The displacement variable quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and the direction of page turning operation, so that the page curling radius corresponding to the page turning instruction can be calculated. Wherein, the page curl radius refers to: and when the book page presents a curled state along with page turning operation, the radius of the cylindrical curved surface formed by the curled book page. The page curl radius is used to indicate the degree of curl of the pages of the book.
In specific implementation, the page curl radius is calculated mainly according to the displacement variation and the circle radius formula. The inventor finds that when the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is too small in the process of realizing the invention, the page turning effect is hard to perceive; when the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is too large, the page turning amplitude is too large, and the normal reading of a user is influenced. In order to solve the above problem, in this embodiment, a lower threshold and an upper threshold are preset, and if a displacement variation between a page turning conversion position of the page turning reference point and a page initial position of the page turning reference point is smaller than a preset lower threshold, a page curl radius corresponding to the page turning instruction is determined to be a preset lower limit, where the preset lower limit is a preset minimum radius. And if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit value, wherein the preset upper limit value is a preset maximum radius. And if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between a preset lower limit threshold value and a preset upper limit threshold value, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula. The circle radius formula is used for limiting the relative relation between the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point and the page curling radius. In general, a ratio between a displacement variation amount of the page turning change position of the page turning reference point relative to the page initial position of the page turning reference point and the page curl radius has a preset rule, and may be a preset constant, for example.
Step three: and determining a page turning action area contained in the page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point.
Since the page turning operation is usually only used to lift one corner of the page of the book, the page area of the page of the book, which is affected by the page turning operation and appears in a curled state, is only a local area in the page of the book, and the local area is a page turning active area. The remaining page area that is not affected by the page turning operation and remains in the flat state (non-rolled state) is a non-page turning active area. In order to simulate the true page turning curl state, it is necessary to first determine the above-mentioned page turning effect region so as to perform a curl conversion process with respect to the page turning effect region in a subsequent step.
In specific implementation, when determining the page turning action area contained in the book page according to the page curl radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point, the method is realized by the following steps: firstly, determining a reference straight line passing through a page initial position of a page turning reference point and a page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to a page curling radius; and then, determining a page turning action area contained in the page of the book according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
The reference straight line passing through the page initial position of the page turning reference point and the page turning change position of the page turning reference point is the straight line defined by the point a and the point F in fig. 4. When the target point on the reference straight line is determined according to the page curl radius, the specific position of the target point on the reference straight line is mainly determined according to the size of the page curl radius. The target point in fig. 4 is the point P. Accordingly, a boundary straight line passing through the target point and perpendicular to the reference straight line is a straight line defined by the point C and the point J in fig. 4. The boundary straight line is used for dividing a page turning active area and a non-page turning active area contained in a page of the book. For example, the lower left region of the boundary straight line corresponds to the page flip action region, and the image unit included in the partial region is subjected to the curl transformation; and the upper right area of the boundary line corresponds to the non-page-turning action area, and the image unit contained in the partial area does not have curling transformation. Therefore, the boundary straight line which passes through the target point and is perpendicular to the reference straight line can be drawn through the target point which is defined by the length of the page curl radius and is positioned on the reference straight line, and the page turning action area can be quickly determined through the boundary straight line. As shown in fig. 4, a first intersection point between the boundary line and the first page boundary line is a point C, and a second intersection point between the boundary line and the second page boundary line is a point J, and the page turning action region can be more accurately defined by the point C and the point J.
In fact, when the page curl radius is small, the page turning conversion position of the page turning reference point may be between the page initial position of the page turning reference point and the target point. In summary, the present invention does not define the specific location of the target point on the reference line.
For example, in the first case, the page curl radius is greater than the preset value, which indicates that the slide displacement corresponding to the page turning instruction is larger at this time, and the target point is between the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point. As shown in fig. 4, the target point P is located between the point a and the point F. Correspondingly, when the page turning active region contained in the book page is determined, the first sub-region which is not subjected to the curling transformation and contained in the page turning active region and the second sub-region which is subjected to the curling transformation are determined according to the target point. The first sub-area where no curl transformation occurs corresponds to a back area of the page of the book, for example, an area formed by a point A, B, K in fig. 4 is the first sub-area, the first sub-area is used for showing the back area of the book after page turning, and the back area does not have a curl transformation. The second sub-area where the curl transformation occurs includes a front area and a back area of the pages of the book.
Specifically, when a first sub-area which is not subjected to the curl transformation and is included in the page turning active area and a second sub-area which is subjected to the curl transformation are determined according to the target point, the method is implemented by the following steps:
firstly, determining a target mapping point which is positioned on a reference straight line and corresponds to a target point; and the interval between the target mapping point and the page initial position of the page turning reference point is matched with the interval between the target point and the page turning conversion position of the page turning reference point. Specifically, the target mapping point may be determined by: first, a reference line segment formed by the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, i.e., the line segment AF in fig. 4 is drawn, then, the midpoint of the line segment AF is determined as the point G, and accordingly, the distance between the target mapping point O and the target point P to the midpoint G is equal. It can be seen that the interval between the page initial positions OF the target mapping point and the page turning reference point (i.e., the length OF the line segment OF) is equal to the interval between the page turning transition positions OF the target point and the page turning reference point (i.e., the length OF the line segment AP).
Then, determining a first critical point (i.e., point B1) located at a first page boundary line of the pages of the book and a second critical point (i.e., point K1) located at a second page boundary line of the pages of the book according to a boundary mapping straight line passing through the target mapping point and perpendicular to the reference straight line; the first page boundary line is perpendicular to the second page boundary line, and the page initial position of the page turning reference point is located at the intersection point of the first page boundary line and the second page boundary line. Among them, the boundary mapping straight line passing through the target mapping point and perpendicular to the reference straight line is the straight line determined by the point B1 and the point K1 in fig. 4.
And finally, determining a triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point, and determining a first sub-area without crimp conversion and a second sub-area with crimp conversion according to the triangular area and a mapping area corresponding to the triangular area. The triangular area formed by the first critical point, the second critical point and the page initial position of the page turning reference point is the area formed by the points B1, K1 and F. Accordingly, the mapping region corresponding to the triangular region is the region formed by the points B, K and a. The point B corresponds to the curled page turning position of the point B1, and the point K corresponds to the curled page turning position of the point K1. It can be seen that the mapping region is a corresponding mapping region after being inverted from the triangular region, and the mapping region corresponds to the back of the triangular region.
Specifically, when determining the first sub-region where no warping transformation has occurred and the second sub-region where warping transformation has occurred from the triangular region and the mapping region corresponding to the triangular region, first, the triangular region and the mapping region corresponding thereto are determined as the first sub-region where warping transformation has not occurred, and the remaining region corresponds to the second sub-region where warping transformation has occurred.
Step four: and acquiring page initial positions of all image units contained in the page turning action area, and calculating and displaying the page turning transformation positions of all the image units by combining the page curling radius to realize the simulated page turning processing of the pages of the books.
Specifically, when the page of the book shows a curled state, each image unit included in the page also shows a curled state, and therefore, it is necessary to calculate a page turning conversion position corresponding to each image unit after the curling conversion according to the page initial position of each image unit included in the page turning action region. The page initial position of each image unit is as follows: before the page turning operation is executed, each image unit is located at a position in a page of the book, and can be specifically represented by page coordinates; the page turning conversion position of the image unit is as follows: after the page turning operation is performed, the respective image elements assume changed positions according to the rolled state of the book page. In specific implementation, the page curl radius can reflect the curl degree of the page of the book, so that the page turning conversion position of each image unit can be calculated based on the page curl radius. Therefore, the page turning transformation positions of the image units are calculated and displayed, and a page curling effect similar to that presented when a paper book is turned can be rendered, so that the simulated page turning processing of the book page is realized.
In specific implementation, the page initial position of each image unit contained in the page turning action region is obtained, and when the page turning change position of each image unit is calculated and displayed by combining the page curling radius, the page turning change position of each image unit in the first sub-region is determined according to the mapping relation aiming at the first sub-region in fig. 4; and for the second sub-area, determining the page turning transformation position of each image unit in the second sub-area according to a cylindrical equation determined by the page curling radius.
Each image unit included in the page turning region is also called a page image unit, and refers to a page image component of a page of a book, and for example, the image unit may be an image pixel. According to the initial page position of each image pixel point in the original book page, the page turning transformation position corresponding to the image pixel point after the image pixel point is subjected to curling transformation can be calculated by combining the page curling radius.
Since the first sub-area is not subjected to the curl transformation, but the triangular area formed by three points B1K1F is mapped into the mapping area formed by three points BKA by the mapping method, the page-turning transformation position of each image unit in the first sub-area is determined according to the mapping relation. In addition, considering that the first sub-area corresponds to the back area of the page of the book, it is necessary to first acquire the mapping image unit in the back area corresponding to each image unit in the first sub-area, and then map the mapping image unit in the back area corresponding to each image unit to the corresponding page turning transformation position. The back area corresponding to each image unit is as follows: and the area, which is positioned at the same coordinate position with the image unit, in the back page corresponding to the currently displayed book page. For example, for a certain image unit located in the lower right corner area of the page 5, the corresponding mapped image unit in the back surface area is the image unit located in the lower left corner of the page 6. Namely: the mapping image unit in the back area corresponding to a certain image unit refers to: and turning the page to obtain the image unit at the same position on the back of the image unit.
Different from the first sub-region, the image pixels in the second sub-region are subjected to curling transformation, so that the page turning transformation positions of the image units in the second sub-region are determined according to a cylindrical equation determined by the curling radius of the page for each image pixel in the second sub-region. For example, points E and H in fig. 4 are the auxiliary calculation points involved in the calculation process, and the line segment EH is the perpendicular bisector of the line segment AF. In addition, point D1 in fig. 4 is the midpoint of line segment CB1, and point I1 is the midpoint of line segment JK 1. Correspondingly, the point D is the page turning change position corresponding to the point D1, and the point I is the page turning change position corresponding to the point I1. Point M corresponds to the page flip transition position corresponding to the midpoint of segment B1D1, and point N corresponds to the page flip transition position corresponding to the midpoint of segment K1I 1. In specific implementation, aiming at a specific image pixel point, firstly judging whether the image pixel point is positioned in a first subregion or a second subregion, and if the image pixel point is positioned in the first subregion, determining a page turning transformation position corresponding to the page initial position of the image pixel point according to a mapping mode; and if the image pixel point is located in the second sub-area, substituting the initial page position of the image pixel point into a cylindrical equation determined by the page curling radius, and determining a page turning conversion position corresponding to the image pixel point according to a calculation result. For example, substituting the page initial position of point D1 into the cylinder equation yields the position of point D.
In addition, as mentioned above, the second sub-region includes both the front region and the back region of the original book page, and for this reason, in the above process, it is necessary to distinguish the second front sub-region corresponding to the front region and the second back sub-region corresponding to the back region included in the second sub-region. In order to divide the second front sub-region and the second rear sub-region, it is necessary to divide the regions according to points D1 and I1 in fig. 4.
Specifically, the second front sub-region and the second back sub-region are divided as follows: firstly, drawing a boundary straight line which passes through a target point P and is perpendicular to a reference straight line, and determining a first intersection point C between the boundary straight line and a first page boundary line and a second intersection point J between the boundary straight line and a second page boundary line; then, a first midpoint D1 between the first intersection point C and the first critical point B1 and a second midpoint I1 between the second intersection point J and the second critical point K1 are determined, and the second front sub-region (the region composed of the points C, D1, I1, J) and the second back sub-region (the region composed of the points D1, B1, K1, I1) are determined from the first midpoint D1 and the second midpoint I1. Correspondingly, for each image pixel point in the second back sub-area, a mapping image unit in the back area corresponding to each image unit in the second back sub-area needs to be acquired first, and then the mapping image unit in the back area corresponding to each image unit is mapped to the corresponding page turning conversion position.
Fig. 4 corresponds to the case that the page curl radius is larger, and fig. 5 further shows a schematic diagram of the page curl effect when the page curl radius is smaller. As shown in fig. 5, if the page curl radius is not greater than the preset value, the page turning conversion position of the page turning reference point is between the page initial position of the page turning reference point and the target point. For example, the target point P in fig. 5 is located on the extension of the line segment AF. Of course, the target point P and the page turning conversion position a of the page turning reference point may coincide with each other. However, whether the target point P is located on the extension line of the line AF or the page turning conversion position a of the target point P and the page turning reference point coincide with each other, the page turning action region cannot be divided into the first sub-region and the second sub-region, but only includes an integral region. At the moment, when the page initial position of each image unit contained in the page turning action area is obtained, and the page turning conversion position of each image unit is calculated and displayed by combining the page curling radius, the page turning conversion position of each image unit in the page turning action area is directly determined according to a cylindrical equation determined by the page curling radius.
In addition, as shown in fig. 5, when the target point P is located on the extension line of the line segment AF or the page turning transformation position a of the target point P and the page turning reference point coincide with each other, the page turning active area may still be divided into a front active area corresponding to the front content of the book page and a back active area corresponding to the back content of the book page. It can be seen that regardless of the position of the target point, the page turning active region can be divided into a front active region corresponding to the front content of the page of the book (e.g., the second front sub-region in fig. 4) and a back active region corresponding to the back content of the page of the book (e.g., the triangular region and the second back sub-region in fig. 4 can be collectively referred to as the back active region). For the back acting area corresponding to the back content of the book page, mapping image units in the back area corresponding to the image units in the back acting area need to be acquired, and then mapping the mapping image units in the back area corresponding to the image units to the corresponding page turning conversion positions.
In addition, it should be further noted that, in this embodiment, the sliding-type page turning instruction is usually triggered continuously, for example, the user slides for a certain time length along a preset direction to trigger the sliding-type page turning instruction. Correspondingly, in the triggering process of the sliding page turning instruction, the current sliding direction and the sliding length are continuously detected, the page turning conversion position of the page turning reference point is dynamically calculated according to the current real-time detection result, and the page curling radius and the page turning conversion position of each image unit in the page turning action area are dynamically calculated according to the calculated page turning conversion position of the page turning reference point. That is, in the process of continuously turning pages, the area range of the page turning active area and the corresponding page curl radius are dynamically changed. For example, it is possible that in the initial stage of page turning, the page assumes the state shown in fig. 5, and as the page turning instruction continues to run, the page assumes the state shown in fig. 4, so in this embodiment, it is necessary to dynamically perform multiple calculation processes in order to present the page states corresponding to the respective page turning stages in real time.
In this example, it is only necessary to obtain the page initial position of each sampling unit included in the page turning active region (i.e., the image unit obtained by sampling included in the sampling unit set corresponding to the corresponding region grid), calculate and display the page turning change position of each sampling unit by combining the page curl radius, and directly process other non-sampling units by using an edge rendering algorithm or a smoothing algorithm. Since the above calculation process needs to consume a large amount of calculation resources, and the refresh frequency of each picture frame should be high enough, otherwise an obvious visual stuck phenomenon will occur, and in order to avoid the visual stuck phenomenon, the present embodiment improves the calculation efficiency by a sampling manner.
In summary, the simulated page turning method in the embodiment can enable the pages of the book to present a natural curling effect along with the page turning operation. In addition, in the process of page turning and curling, each image unit on the curled page is also changed, so that a real deformation state is presented. For example, the words "honored" in FIG. 4 show the effect of curling. Therefore, the page turning state of the real paper book can be simulated, and the content displayed on the part of the page of the electronic book in the page turning process is consistent with the content corresponding to the page turning process of the paper book. In addition, page turning drawing processing can be performed on the book pages containing the video resources through the picture drawing interface, so that the applicable page types are widened; and the sampling processing of the image units of the book pages is realized through the picture drawing interface, so that the image units with huge number are simplified into sampling units with small number, and the calculation efficiency is greatly improved.
In addition, various modifications and changes may be made to the above embodiments by those skilled in the art:
in the step S210, in response to the received page turning instruction, a shadow element is added to the original book page to be turned, so as to obtain a page-turned book page containing the shadow element. The shadow elements may be various types of elements such as shadow pictures as long as the shadow effect can be achieved. After the shadow elements are added, the page not only contains the original page content, but also further contains the added shadow elements, and for convenience of description, the original book page after the shadow elements are added is called a flipbook page. For example, the shadow elements are semi-transparent picture-like elements. In specific implementation, a page boundary line contained in an original book page to be turned is determined, and a shadow element is added in an external area of the original book page along the page boundary line. Wherein the inner area of the original book page corresponds to the content part of the book page and correspondingly the outer area of the original book page corresponds to an area other than the content part of the book page, whereby it can be seen that the outer area of the original book page is in fact an area not visible to the reading user, which is located outside the book page. Since the shadow elements are added to the outer area of the original book page, the normal reading of the book is not affected. In addition, the page boundary line means: and the boundary line is positioned at the edge of the page of the book. Generally, one page of the book includes four page boundary lines, in this embodiment, a shadow element may be added only to an outer region corresponding to at least one page boundary line, and details of implementation are not limited. In order to ensure that the position of the added shadow element is matched with the page turning position of a user, when a page boundary line contained in an original book page to be turned is determined and the shadow element is added in an outer area of the original book page along the page boundary line, the method is realized by the following steps: firstly, acquiring a touch position corresponding to a page turning instruction, and determining a first page boundary line and/or a second page boundary line adjacent to the touch position; then, adding a first shadow element in the outer area of the original book page along the boundary line of the first page; and/or adding a second shadow element to an outer region of the original book page along a second page boundary line. Wherein the first page boundary line may be orthogonal to the second page boundary line. Therefore, the shadow elements can be turned and curled along with the page in the subsequent page turning process by adding the shadow elements to the page boundary line corresponding to the page turning instruction, and a natural shadow effect is presented. Preferably, in consideration of the fact that only a partial region related to a page of the book is subjected to curling transformation during the page turning process, in order to save system processing resources, the adding range of the shadow element may be set according to a page turning action region included in the page of the book. Specifically, a first shadow element is added to the outer area of the original book page along a first local line segment contained in a first page boundary line; and/or adding a second shadow element to the outer area of the original book page along a second local line segment contained in a second page boundary line; and determining the length of the first local line segment and/or the length of the second local line segment according to the sliding displacement of the sliding operation corresponding to the page turning instruction. To facilitate determining the length and position of the local line segment, in one specific example, a first local line segment included in the first page boundary line is defined by the first intersection C between the above-mentioned boundary straight line and the first page boundary line and the page initial position F of the page turning reference point; the second local line segment included in the second page boundary line is defined by the above-mentioned second intersection J of the boundary straight line and the second page boundary line and the page initial position F of the page turning reference point. In addition, it should be further noted that, in this embodiment, the adding timing of the shadow element is not limited, and the shadow element may also be added after obtaining a displacement variation between a page turning conversion position of a page turning reference point in a page of the page-turned book and a page initial position of the page turning reference point, and determining a page turning action region included in the page of the page-turned book according to the displacement variation. Therefore, the execution sequence among the steps can be flexibly adjusted. Or, the shadow element may be added first, and after the displacement variation amount between the page turning conversion position of the page turning reference point in the page of the page turning book and the page initial position of the page turning reference point is obtained, the size and the setting position of the shadow element are adjusted according to the obtained displacement variation amount.
EXAMPLE III
The embodiment of the application provides a non-volatile computer storage medium, wherein at least one executable instruction is stored in the computer storage medium, and the computer executable instruction can execute the simulation page turning method of the electronic book in any method embodiment.
The executable instructions may be specifically configured to cause the processor to:
when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface;
determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface;
and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
In an optional implementation manner, the determining, by the picture drawing interface, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
sampling image units contained in the book page through the picture drawing interface to obtain sampling units contained in the book page;
and determining a page turning action area corresponding to the page turning instruction and contained in the book page according to a sampling unit contained in the book page.
In an optional implementation manner, the sampling the image unit included in the page of the book through the picture drawing interface to obtain the sampling unit included in the page of the book includes:
dividing a page area of the book page into a plurality of area grids through the picture drawing interface, and respectively carrying out sampling processing on image units contained in each area grid to obtain a sampling unit set corresponding to each area grid;
determining, according to the sampling unit included in the page of the book, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
and determining the area grids belonging to the page turning action area according to the sampling unit sets corresponding to the area grids.
In an optional implementation manner, the calculating and displaying, by the picture drawing interface, the page turning transformation position of each image unit included in the page turning active region to implement the simulated page turning process of the book page includes:
acquiring the page initial position of each image unit contained in the sampling unit set corresponding to the area grid belonging to the page turning action area through the picture drawing interface;
and calculating and displaying the page turning transformation positions of the image units contained in the sampling unit set according to the page initial positions of the image units contained in the sampling unit set so as to realize the simulated page turning processing of the book page.
In an optional implementation manner, the determining, by the picture drawing interface, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
and determining a page turning action area contained in the page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point.
In an optional implementation manner, the determining, according to the page curl radius, the page initial position of the page turning reference point, and the page turning transformation position of the page turning reference point, a page turning active region included in the page of the book includes:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
In an optional implementation manner, the calculating the page curl radius corresponding to the page turning instruction includes:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
In an optional implementation manner, the calculating and displaying, by the picture drawing interface, the page turning transformation position of each image unit included in the page turning active region includes:
determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius;
wherein the preset picture elements include: motion pictures and/or picture elements for linking to video assets.
Example four
Fig. 3 is a schematic structural diagram of an electronic device according to another embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 3, the electronic device may include: a processor (processor)302, a communication Interface 304, a memory 306, and a communication bus 308.
Wherein: the processor 302, communication interface 304, and memory 306 communicate with each other via a communication bus 308. A communication interface 304 for communicating with network elements of other devices, such as clients or other servers. The processor 302 is configured to execute the program 310, and may specifically execute relevant steps in the above-described embodiment of the method for simulating page turning of an electronic book.
In particular, program 310 may include program code comprising computer operating instructions.
The processor 302 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 306 for storing a program 310. Memory 306 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 310 may specifically be configured to cause the processor 302 to perform the following operations:
when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface;
determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface;
and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
In an optional implementation manner, the determining, by the picture drawing interface, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
sampling image units contained in the book page through the picture drawing interface to obtain sampling units contained in the book page;
and determining a page turning action area corresponding to the page turning instruction and contained in the book page according to a sampling unit contained in the book page.
In an optional implementation manner, the sampling the image unit included in the page of the book through the picture drawing interface to obtain the sampling unit included in the page of the book includes:
dividing a page area of the book page into a plurality of area grids through the picture drawing interface, and respectively carrying out sampling processing on image units contained in each area grid to obtain a sampling unit set corresponding to each area grid;
determining, according to the sampling unit included in the page of the book, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
and determining the area grids belonging to the page turning action area according to the sampling unit sets corresponding to the area grids.
In an optional implementation manner, the calculating and displaying, by the picture drawing interface, the page turning transformation position of each image unit included in the page turning active region to implement the simulated page turning process of the book page includes:
acquiring the page initial position of each image unit contained in the sampling unit set corresponding to the area grid belonging to the page turning action area through the picture drawing interface;
and calculating and displaying the page turning transformation positions of the image units contained in the sampling unit set according to the page initial positions of the image units contained in the sampling unit set so as to realize the simulated page turning processing of the book page.
In an optional implementation manner, the determining, by the picture drawing interface, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
and determining a page turning action area contained in the page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point.
In an optional implementation manner, the determining, according to the page curl radius, the page initial position of the page turning reference point, and the page turning transformation position of the page turning reference point, a page turning active region included in the page of the book includes:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
In an optional implementation manner, the calculating the page curl radius corresponding to the page turning instruction includes:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
In an optional implementation manner, the calculating and displaying, by the picture drawing interface, the page turning transformation position of each image unit included in the page turning active region includes:
determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius;
wherein the preset picture elements include: motion pictures and/or picture elements for linking to video assets.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention 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 an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive 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 invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, 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 invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A simulation page turning method of an electronic book comprises the following steps:
when a page turning instruction triggered by a book page containing preset picture elements is detected, calling a picture drawing interface;
determining a page turning action area corresponding to the page turning instruction and contained in the page of the book through the picture drawing interface;
and calculating and displaying the page turning transformation position of each image unit contained in the page turning action area through the picture drawing interface so as to realize the simulation page turning processing of the book page.
2. The method of claim 1, wherein the determining, through the picture drawing interface, a page turning active region included in the page of the book corresponding to the page turning instruction comprises:
sampling image units contained in the book page through the picture drawing interface to obtain sampling units contained in the book page;
and determining a page turning action area corresponding to the page turning instruction and contained in the book page according to a sampling unit contained in the book page.
3. The method of claim 2, wherein the sampling the image units included in the page of the book through the picture drawing interface to obtain the sampling units included in the page of the book comprises:
dividing a page area of the book page into a plurality of area grids through the picture drawing interface, and respectively carrying out sampling processing on image units contained in each area grid to obtain a sampling unit set corresponding to each area grid;
determining, according to the sampling unit included in the page of the book, a page turning active region included in the page of the book and corresponding to the page turning instruction includes:
and determining the area grids belonging to the page turning action area according to the sampling unit sets corresponding to the area grids.
4. The method of claim 3, wherein the calculating and displaying, through the picture drawing interface, the page turning transformation position of each image unit included in the page turning active area to implement the simulated page turning process of the book page comprises:
acquiring the page initial position of each image unit contained in the sampling unit set corresponding to the area grid belonging to the page turning action area through the picture drawing interface;
and calculating and displaying the page turning transformation positions of the image units contained in the sampling unit set according to the page initial positions of the image units contained in the sampling unit set so as to realize the simulated page turning processing of the book page.
5. The method according to any one of claims 1 to 4, wherein the determining, through the picture drawing interface, a page turning active region included in the page of the book corresponding to the page turning instruction includes:
acquiring displacement variation quantity between a page turning conversion position of a page turning reference point in a page of the book and a page initial position of the page turning reference point, and calculating a page curling radius corresponding to the page turning instruction;
and determining a page turning action area contained in the page of the book according to the page curling radius, the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point.
6. The method of claim 5, wherein the determining a page turning active region included in the page of the book according to the page curl radius, the page initial position of the page turning reference point, and the page turning transformation position of the page turning reference point comprises:
determining a reference straight line passing through the page initial position of the page turning reference point and the page turning conversion position of the page turning reference point, and determining a target point on the reference straight line according to the page curling radius;
and determining a page turning active area contained in the book page according to a boundary straight line which passes through the target point and is perpendicular to the reference straight line.
7. The method of claim 5 or 6, wherein the calculating a page curl radius corresponding to the page flip instruction comprises:
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is smaller than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset lower limit value;
if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is larger than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit;
and if the displacement variation quantity between the page turning conversion position of the page turning reference point and the page initial position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curling radius according to the displacement variation quantity and a circumferential radius formula.
8. The method according to any one of claims 5-7, wherein the calculating and presenting, through the picture drawing interface, the page turning transformation position of each image unit included in the page turning active area includes:
determining the page turning transformation position of each image unit in the page turning action area according to a cylindrical equation determined by the page curling radius;
wherein the preset picture elements include: motion pictures and/or picture elements for linking to video assets.
9. An electronic device, comprising: the system comprises 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 for storing at least one executable instruction which causes the processor to execute the simulation page turning method according to any one of claims 1 to 8.
10. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform the method of simulated page turning according to any of claims 1-8.
CN202011324166.0A 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium Active CN112433657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011324166.0A CN112433657B (en) 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011324166.0A CN112433657B (en) 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN112433657A true CN112433657A (en) 2021-03-02
CN112433657B CN112433657B (en) 2022-03-29

Family

ID=74693710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011324166.0A Active CN112433657B (en) 2020-11-23 2020-11-23 Electronic book simulation page turning method, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN112433657B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946774A (en) * 2021-10-26 2022-01-18 掌阅科技股份有限公司 Book webpage skipping method, computing device and computer storage medium
CN114047997A (en) * 2021-11-29 2022-02-15 掌阅科技股份有限公司 Page turning method, electronic device and storage medium
WO2022105514A1 (en) * 2020-11-23 2022-05-27 掌阅科技股份有限公司 Page turning simulation method for electronic book, and electronic device and computer storage medium
WO2022105513A1 (en) * 2020-11-23 2022-05-27 掌阅科技股份有限公司 Simulated page turning method for electronic book, and electronic device and computer storage medium
CN115016701A (en) * 2022-07-25 2022-09-06 北京字跳网络技术有限公司 Page turning method and device, computer equipment and storage medium
CN115409930A (en) * 2022-10-31 2022-11-29 深圳市趣推科技有限公司 Scroll simulation method, device and equipment of electronic page and storage medium

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923435A (en) * 2010-08-24 2010-12-22 福州瑞芯微电子有限公司 Method for simulating real page turning effect for electronic book
CN101930340A (en) * 2010-08-24 2010-12-29 福州瑞芯微电子有限公司 Method for generating lighting effect by simulating real page turning for electronic book
CN102221980A (en) * 2011-07-29 2011-10-19 深圳芯智汇科技有限公司 Electronic book simulated flipping-over effect realization method and system
CN102375658A (en) * 2010-08-17 2012-03-14 马燕 Interface display method and device for electronic readings
US20120084646A1 (en) * 2010-10-04 2012-04-05 Fuminori Homma Information processing apparatus, information processing method, and program
US20130033499A1 (en) * 2009-09-23 2013-02-07 Milibris Stationary or mobile terminal controlled by a pointing or input peripheral
CN102981718A (en) * 2012-10-11 2013-03-20 北京掌中浩阅科技有限公司 Method for imitating real book page-turning effect of electronic books
US8413904B1 (en) * 2006-03-29 2013-04-09 Gregg E. Zehr Keyboard layout for handheld electronic book reader device
US20130268847A1 (en) * 2012-04-09 2013-10-10 Samsung Electronics Co., Ltd. System and method for displaying pages of e-book
CN103678264A (en) * 2012-09-05 2014-03-26 奇多比行动软体股份有限公司 Generation method of electronic book of composite layer and hypertext marked language and read program
CN104156144A (en) * 2013-05-14 2014-11-19 腾讯科技(深圳)有限公司 Electronic document page-turning effect realizing method and device
CN104346046A (en) * 2013-08-05 2015-02-11 北京易天新动网络科技有限公司 Three-dimensional simulation page turning method and system
CN105955599A (en) * 2016-05-13 2016-09-21 锐达互动科技股份有限公司 Realization method for simulating document reading mode in electronic device
CN106775561A (en) * 2016-12-07 2017-05-31 广东小天才科技有限公司 One kind cuts topic method, device and smart machine
CN107704171A (en) * 2017-10-10 2018-02-16 上海掌门科技有限公司 Electronic book displaying method, terminal and computer-readable recording medium
CN108664454A (en) * 2017-03-30 2018-10-16 掌阅科技股份有限公司 E-book page display method, device and terminal device
CN109002822A (en) * 2018-07-24 2018-12-14 安徽淘云科技有限公司 A kind of interest region determines method, apparatus, equipment and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8413904B1 (en) * 2006-03-29 2013-04-09 Gregg E. Zehr Keyboard layout for handheld electronic book reader device
US20130033499A1 (en) * 2009-09-23 2013-02-07 Milibris Stationary or mobile terminal controlled by a pointing or input peripheral
CN102375658A (en) * 2010-08-17 2012-03-14 马燕 Interface display method and device for electronic readings
CN101930340A (en) * 2010-08-24 2010-12-29 福州瑞芯微电子有限公司 Method for generating lighting effect by simulating real page turning for electronic book
CN101923435A (en) * 2010-08-24 2010-12-22 福州瑞芯微电子有限公司 Method for simulating real page turning effect for electronic book
US20120084646A1 (en) * 2010-10-04 2012-04-05 Fuminori Homma Information processing apparatus, information processing method, and program
CN102221980A (en) * 2011-07-29 2011-10-19 深圳芯智汇科技有限公司 Electronic book simulated flipping-over effect realization method and system
US20130268847A1 (en) * 2012-04-09 2013-10-10 Samsung Electronics Co., Ltd. System and method for displaying pages of e-book
CN103678264A (en) * 2012-09-05 2014-03-26 奇多比行动软体股份有限公司 Generation method of electronic book of composite layer and hypertext marked language and read program
CN102981718A (en) * 2012-10-11 2013-03-20 北京掌中浩阅科技有限公司 Method for imitating real book page-turning effect of electronic books
CN104156144A (en) * 2013-05-14 2014-11-19 腾讯科技(深圳)有限公司 Electronic document page-turning effect realizing method and device
CN104346046A (en) * 2013-08-05 2015-02-11 北京易天新动网络科技有限公司 Three-dimensional simulation page turning method and system
CN105955599A (en) * 2016-05-13 2016-09-21 锐达互动科技股份有限公司 Realization method for simulating document reading mode in electronic device
CN106775561A (en) * 2016-12-07 2017-05-31 广东小天才科技有限公司 One kind cuts topic method, device and smart machine
CN108664454A (en) * 2017-03-30 2018-10-16 掌阅科技股份有限公司 E-book page display method, device and terminal device
CN107704171A (en) * 2017-10-10 2018-02-16 上海掌门科技有限公司 Electronic book displaying method, terminal and computer-readable recording medium
CN109002822A (en) * 2018-07-24 2018-12-14 安徽淘云科技有限公司 A kind of interest region determines method, apparatus, equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105514A1 (en) * 2020-11-23 2022-05-27 掌阅科技股份有限公司 Page turning simulation method for electronic book, and electronic device and computer storage medium
WO2022105513A1 (en) * 2020-11-23 2022-05-27 掌阅科技股份有限公司 Simulated page turning method for electronic book, and electronic device and computer storage medium
CN113946774A (en) * 2021-10-26 2022-01-18 掌阅科技股份有限公司 Book webpage skipping method, computing device and computer storage medium
CN114047997A (en) * 2021-11-29 2022-02-15 掌阅科技股份有限公司 Page turning method, electronic device and storage medium
CN115016701A (en) * 2022-07-25 2022-09-06 北京字跳网络技术有限公司 Page turning method and device, computer equipment and storage medium
CN115409930A (en) * 2022-10-31 2022-11-29 深圳市趣推科技有限公司 Scroll simulation method, device and equipment of electronic page and storage medium
CN115409930B (en) * 2022-10-31 2023-02-14 深圳市趣推科技有限公司 Scroll simulation method, device and equipment for electronic page and storage medium

Also Published As

Publication number Publication date
CN112433657B (en) 2022-03-29

Similar Documents

Publication Publication Date Title
CN112433657B (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
CN112433796B (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
US11344806B2 (en) Method for rendering game, and method, apparatus and device for generating game resource file
JP6768695B2 (en) Methods and devices for generating composite pictures
CN112433795A (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
US11054969B2 (en) Method and device for displaying page of electronic book, and terminal device
US11455460B2 (en) Method for displaying handwritten note in electronic book, electronic device and computer storage medium
CN111127623B (en) Model rendering method and device, storage medium and terminal
TWI671647B (en) Method, device and electronic device for calculating the duration of the first screen of a page
CN107154063A (en) The shape method to set up and device in image shows region
CN111752557A (en) Display method and device
US11398065B2 (en) Graphic object modifications
WO2023066121A1 (en) Rendering of three-dimensional model
CN103003839A (en) Split storage of anti-aliased samples
US20220121307A1 (en) Method and device of drawing handwriting track, electronic apparatus, medium, and program product
CN113010252B (en) Application page display method, electronic equipment and storage medium
CN115237522A (en) Page self-adaptive display method and device
WO2022048414A1 (en) Image generation method, apparatus, and device, and storage medium
CN110737496A (en) Method for realizing calendar page turning effect, electronic equipment and computer storage medium
WO2017011680A1 (en) Device and method for processing data
CN108958872A (en) A kind of image display method and apparatus
CN111524209B (en) Electronic writing method, device, terminal and storage medium
CN109034153A (en) A kind of method and device of the image fidelity applied to image rotation
US20220245820A1 (en) Heuristics-based detection of image space suitable for overlaying media content
CN114691008A (en) Handwritten note display method of ink screen device, ink screen device and storage medium

Legal Events

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