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

By adding shadow elements to the e-book and calculating the displacement change of the page turning area, drawing the transformation position of the page image unit and the shadow element, simulating the curling effect of paper books, it solves the problem that the e-book page turning method cannot simulate paper books. The problem of page turning realizes the real page turning experience and shadow effect.

CN112433795BActive Publication Date: 2024-09-24ZHANGYUE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011322290.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-23
Publication Date
2024-09-24
Estimated Expiration
2040-11-23

AI Technical Summary

Technical Problem

The existing e-book page turning method cannot simulate the page turning effect of traditional paper books and lacks a real visual experience.

Method used

By adding shadow elements to the e-book and calculating the displacement change of the page turning area, drawing the page image unit and the transformation position of the shadow element, simulating the curling effect of the paper book, and adding a shadow effect during the page turning process.

Benefits of technology

It realizes the simulated page turning of e-books, provides users with a real paper book page turning experience, and improves the authenticity of the page turning effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112433795B
    Figure CN112433795B
Patent Text Reader

Abstract

The present invention discloses a simulated page turning method of an electronic book, an electronic device and a computer storage medium. The method comprises: in response to a received page turning instruction, adding a shadow element to an original book page to obtain a page turning book page; obtaining a displacement change between a page turning transformation position of a page turning reference point in the page turning book page relative to the page initial position of the page turning reference point, and determining a page turning action area contained in the page turning book page according to the displacement change; obtaining the page initial position of each page image unit and the shadow element contained in the page turning action area, and calculating and displaying the page turning transformation position of each page image unit and the shadow element contained in the page turning action area. This method can display the page turning state of a book presented by the curling process of the book page, giving the user a page turning visual experience when reading a real paper book, and can also add a shadow element to the page, so that the part after the page turning has a shadow effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of computers, and in particular to an electronic book simulation page turning method, electronic equipment and computer storage medium. Background Art

[0002] At present, with the increasing popularity of electronic devices, more and more users are accustomed to reading e-books through electronic devices to replace traditional paper books. Since e-books have the advantage of portability, users can open e-books for reading anytime and anywhere. In the traditional way, when a user performs a page turning operation through an e-book, the page content conversion process is completed by instantaneous page switching.

[0003] However, the above-mentioned page turning method is rather abrupt and cannot simulate the traditional page turning method of paper reading. For example, when a user reads a paper book, the page turning operation is usually completed by lifting a corner of the book page to make the book page appear curled. It can be seen that the existing e-book page turning method cannot simulate the page turning effect of a real paper book. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide an electronic book simulation page turning method, electronic device and computer storage medium that overcome the above problems or at least partially solve the above problems.

[0005] According to one aspect of the present invention, a method for simulating page turning of an electronic book is provided, comprising:

[0006] 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 turning book page including the shadow element;

[0007] Acquire a displacement variation between a page turning transformation position of a page turning reference point in the page of the page turning book relative to an initial page position of the page turning reference point, and determine a page turning action area contained in the page of the page turning book according to the displacement variation;

[0008] The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

[0009] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0010] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the following operations:

[0011] 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 turning book page including the shadow element;

[0012] Acquire a displacement variation between a page turning transformation position of a page turning reference point in the page of the page turning book relative to an initial page position of the page turning reference point, and determine a page turning action area contained in the page of the page turning book according to the displacement variation;

[0013] The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

[0014] According to another aspect of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables the processor to perform the following operations:

[0015] 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 turning book page including the shadow element;

[0016] Acquire a displacement variation between a page turning transformation position of a page turning reference point in the page of the page turning book relative to an initial page position of the page turning reference point, and determine a page turning action area contained in the page of the page turning book according to the displacement variation;

[0017] The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

[0018] In the simulated page turning method, electronic device and computer storage medium of the electronic book provided by the present invention, a shadow element can be added to the original book page to be turned according to the page turning instruction to obtain a page turning book page containing the shadow element, and the page turning action area contained in the page turning book page is determined according to the displacement change between the page turning transformation position of the page turning reference point in the page turning book page relative to the page initial position of the page turning reference point, thereby drawing each page image unit contained in the page turning action area and the page turning transformation position of the shadow element to realize the simulated page turning processing of the book page. It can be seen that this method can display the book page turning state presented by the curling process of the book page, giving the user a page turning visual experience when reading a real paper book, and can also add shadow elements to the page, so that the part after the page turning has a shadow effect, further improving the effect of simulated page turning.

[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0021] Figure 1 A flow chart of a simulated page turning method for an electronic book provided by an embodiment of the present invention is shown;

[0022] Figure 2 A flow chart showing a simulated page turning method of an electronic book provided by another embodiment of the present invention;

[0023] Figure 3 A schematic structural diagram of an electronic device according to another embodiment of the present invention is shown;

[0024] Figure 4 A schematic diagram showing a page turning state;

[0025] Figure 5 A schematic diagram showing another page turning state;

[0026] Figure 6 A schematic diagram of the structure of a flip book page after adding a shadow element is shown;

[0027] Figure 7 A schematic diagram showing yet another form of shadow element. DETAILED DESCRIPTION

[0028] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0029] Embodiment 1

[0030] Figure 1 FIG. 1 is a flow chart showing a method for simulating page turning of an electronic book provided by an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0031] Step S110: 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 turning book page containing the shadow element.

[0032] The shadow element can be any type of element such as a shadow image, as long as the shadow effect can be achieved. After adding the shadow element, the page not only contains the original page content, but also further contains the added shadow element. For ease of description, the original book page after adding the shadow element is called a flip book page.

[0033] Step S120: obtaining the displacement variation of the page turning transformation position of the page turning reference point in the page turning book relative to the page initial position of the page turning reference point, and determining the page turning action area contained in the page turning book according to the displacement variation.

[0034] Since the page turning operation is usually used to turn up only a corner of a book page, the page area in the book page that is affected by the page turning operation and presents a curled state is only a local area of ​​the book page, and this local area is the page turning effect area. The remaining page area that is not affected by the page turning operation and still maintains a flat state (non-curled state) is the non-page turning effect area.

[0035] In specific implementation, the page turning instruction is usually triggered by a sliding operation. The page turning reference point in a book page is usually: a position point on the page boundary line adjacent to the trigger position of the page turning instruction. For example, when the trigger position of the page turning instruction is located in the lower right corner area of ​​the book page, the page turning reference point is the page vertex at the lower right corner of the book page. Correspondingly, the page initial position of the page turning reference point is the intersection position between the right boundary line and the lower boundary line of the book page. As the page turning operation is executed, the position of the page turning reference point will change, and the changed position is called the page turning transformation position. Accordingly, the displacement change amount between the page turning transformation position of the page turning reference point relative to the page initial position of the page turning reference point can reflect the amplitude and direction of the page turning operation, and then the page turning action area contained in the page of the page turning book can be determined according to the above displacement change amount.

[0036] Step S130: obtaining the initial page position of each page image unit and shadow element contained in the page turning action area, calculating and displaying the page turning transformation position of each page image unit and shadow element contained in the page turning action area, so as to realize the simulated page turning processing of the book page.

[0037] Specifically, when a book page presents a curled state, each page image unit contained in the page will also present a curled state. Therefore, it is necessary to calculate the corresponding page turning transformation position of each page image unit after the curling transformation according to the page initial position of each page image unit contained in the page turning action area. Among them, the page initial position of each page image unit refers to: before the page turning operation is performed, the position of each page image unit in the book page is located, which can be specifically represented by the page coordinates; the page turning transformation position of the page image unit refers to: after the page turning operation is performed, the position of each page image unit after the change due to the curling state of the book page. In specific implementation, since the above-mentioned displacement change amount can reflect the curling degree of the book page, the page turning transformation position of each page image unit can be obtained based on the displacement change amount. Among them, the shadow element also adopts a similar processing method: first determine the page initial position of each shadow element, and then calculate the page turning transformation position of each shadow element. It can be seen that by calculating and displaying the page turning transformation position of each page image unit and the shadow element, a page curling effect similar to that presented when a paper book is turned can be rendered, thereby realizing the simulated page turning processing of the book page. Moreover, it can also simulate real shadow effects.

[0038] In the simulated page turning method of the electronic book provided by the present invention, a shadow element can be added to the original book page to be turned according to the page turning instruction to obtain a page turning book page containing the shadow element, and the page turning action area contained in the page turning book page is determined according to the displacement change between the page turning transformation position of the page turning reference point in the page turning book page relative to the page initial position of the page turning reference point, thereby drawing each page image unit contained in the page turning action area and the page turning transformation position of the shadow element to realize the simulated page turning processing of the book page. It can be seen that this method can display the book page turning state presented by the curling process of the book page, giving the user a page turning visual experience when reading a real paper book, and can also add shadow elements to the page, so that the part after the page turning has a shadow effect, further improving the effect of simulated page turning.

[0039] Embodiment 2

[0040] Figure 2 FIG. 2 is a flow chart showing a method for simulating page turning of an electronic book provided by another embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0041] 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 turning book page including the shadow element.

[0042] The shadow element can be any type of element such as a shadow image, as long as the shadow effect can be achieved. After the shadow element is added, the page not only contains the original page content, but also further contains the added shadow element. For the sake of description, the original book page after the shadow element is added is called a flip book page. For example, the shadow element is a semi-transparent image element.

[0043] During specific implementation, the page boundary line contained in the original book page to be turned is determined, and a shadow element is added to the outer area of ​​the original book page along the page boundary line. Among them, 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 the area other than the content part of the book page. It can be seen that the outer area of ​​the original book page is actually an invisible area for the reading user, which is located on the outside of the book page. Since the shadow element is added to the outer area of ​​the original book page, it will not affect the normal reading of the book. In addition, the page boundary line refers to: a boundary line located at the edge of the book page. Usually, a book page includes four page boundary lines. In this embodiment, a shadow element can be added only to the outer area corresponding to at least one of the page boundary lines, and the specific implementation details are not limited.

[0044] In order to ensure that the position of the added shadow element matches the user's page turning position, when determining the page boundary line contained in the original book page to be turned, and adding the shadow element in the outer area of ​​the original book page along the page boundary line, it is achieved in the following way: first, obtain the touch position corresponding to the page turning instruction, and determine the first page boundary line and / or the second page boundary line adjacent to the touch position; then, add the first shadow element in the outer area of ​​the original book page along the first page boundary line; and / or, add the second shadow element in the outer area of ​​the original book page along the second page boundary line. The first page boundary line may be perpendicular to the second page boundary line. For example, Figure 6 The schematic diagram of the structure of the flip book page after adding the shadow element is shown. Figure 6 As shown, the original book page 60 before adding the shadow element has four page boundary lines. Assuming that the touch position corresponding to the page turning instruction is point Y in the figure, the two page boundary lines adjacent to the touch position Y are respectively the first page boundary line 61 and the second page boundary line 62 which are perpendicular to each other. Accordingly, the first shadow element 63 is added to the outer area of ​​the original book page along the first page boundary line 61, and the second shadow element 64 is added to the outer area of ​​the original book page along the second page boundary line 62. It can be seen that the page turning book page after adding the shadow element includes: the original book page 60, the first shadow element 63 and the second shadow element 64. It can be seen that by adding the shadow element to the page boundary line corresponding to the page turning instruction, the shadow element can be turned and curled together with the page in the subsequent page turning process, thereby presenting a natural shadow effect.

[0045] Preferably, considering that only a part of the book page is involved in the curling transformation during the page turning process, in order to save system processing resources, the range of adding shadow elements can be set according to the page turning effect area contained in the book page. Specifically, a first shadow element is added to the outer area of ​​the original book page along the first local line segment contained in the first page boundary line; and / or a second shadow element is added to the outer area of ​​the original book page along the second local line segment contained in the second page boundary line; wherein the line segment length of the first local line segment and / or the second local line segment is determined according to the sliding displacement of the sliding operation corresponding to the page turning instruction.

[0046] Step S220: obtaining a displacement variation of a page turning transformation position of a page turning reference point in a page of a page turning book relative to an initial position of the page of the page turning reference point.

[0047] The page turning reference point in a book page is usually: a position point on the page boundary line adjacent to the trigger position of the page turning instruction. For example, when the trigger position of the page turning instruction is located in the lower right corner area of ​​the book page, the page turning reference point is the page vertex at the lower right corner of the book page. Accordingly, the page initial position of the page turning reference point is the intersection position between the right boundary line and the lower boundary line of the book page. As the page turning operation is performed, the position of the page turning reference point will change, and the changed position is called the page turning transformation position. Accordingly, the displacement change between the page turning transformation position of the page turning reference point relative to the page initial position of the page turning reference point can reflect the amplitude and direction of the page turning operation.

[0048] Step S230: determining the page turning effect area contained in the page of the book according to the displacement change amount.

[0049] Since the page turning operation is usually used to turn up only a corner of a book page, the page area in the book page that is affected by the page turning operation and presents a curled state is only a local area of ​​the book page, and this local area is the page turning effect area. The remaining page area that is not affected by the page turning operation and still maintains a flat state (non-curled state) is the non-page turning effect area.

[0050] Step S240: obtaining the initial page position of each page image unit and shadow element contained in the page turning action area, calculating and displaying the page turning transformation position of each page image unit and shadow element contained in the page turning action area, so as to realize the simulated page turning processing of the book page.

[0051] Specifically, when a book page presents a curled state, each page image unit contained in the page will also present a curled state. Therefore, it is necessary to calculate the corresponding page turning transformation position of each page image unit after the curling transformation according to the page initial position of each page image unit contained in the page turning action area. Among them, the page initial position of each page image unit refers to: before the page turning operation is performed, the position of each page image unit in the book page is located, which can be specifically represented by the page coordinates; the page turning transformation position of the page image unit refers to: after the page turning operation is performed, the position of each page image unit after the change due to the curling state of the book page. In specific implementation, since the above-mentioned displacement change amount can reflect the curling degree of the book page, the page turning transformation position of each page image unit can be obtained based on the displacement change amount. Among them, the shadow element also adopts a similar processing method: first determine the page initial position of each shadow element, and then calculate the page turning transformation position of each shadow element. It can be seen that by calculating and displaying the page turning transformation position of each page image unit and the shadow element, a page curling effect similar to that presented when a paper book is turned can be rendered, thereby realizing the simulated page turning processing of the book page. Moreover, it can also simulate real shadow effects.

[0052] Next, the specific implementation details of the above-mentioned simulated page turning method are described in detail through a specific example. The example includes the following steps:

[0053] Step 1: In response to the received page turning instruction, a shadow element is added to the original book page to be turned to obtain a page turning book page containing the shadow element; and the displacement change between the page turning transformation position of the page turning reference point in the page turning book page relative to the page initial position of the page turning reference point is obtained.

[0054] Specifically, the page turning instruction in this embodiment is a sliding type page turning instruction. The page turning reference point in the book page is usually: a position point on the page boundary line adjacent to the trigger position of the page turning instruction. Figure 4 A schematic diagram showing a page turning state is shown, such as Figure 4 As shown, the trigger position of the page turning instruction is located in the lower right corner of the book page. Accordingly, the page turning reference point in the book page is the page vertex at the lower right corner of the book page. The initial page position of the page turning reference point is the right boundary line of the book page (corresponding to Figure 6 The second page boundary line 64 in Figure 6 The intersection position between the first page boundary line 63 in Figure 4 Point F in .

[0055] As the page turning operation is performed, the position of the page turning reference point will change, and the changed position is called the page turning transformation position. Figure 4 Point A in corresponds to the page turning transformation position of the page turning reference point. Accordingly, the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and direction of the page turning operation. The displacement change can be determined by the length and slope of line segment AF.

[0056] Specifically, when obtaining the displacement change amount between the page turning transformation position of the page turning reference point in the book page relative to the page initial position of the page turning reference point, it is achieved in the following manner: first, the sliding direction and / or sliding length of the sliding type page turning instruction is obtained. Among them, the sliding direction and / or sliding length of the sliding type page turning instruction are used to represent the sliding displacement amount of the sliding type page turning instruction, and the sliding displacement amount depends on factors such as the duration of the sliding operation and the sliding speed. Then, according to the sliding direction and / or sliding length, the displacement direction and / or displacement length of the page turning transformation position of the page turning reference point relative to the page initial position of the page turning reference point is determined. Among them, the displacement direction of the page turning transformation position of the page turning reference point relative to the page initial position of the page turning reference point matches the sliding direction of the sliding type page turning instruction, and the displacement length of the page turning transformation position of the page turning reference point relative to the page initial position of the page turning reference point has a preset proportional relationship with the sliding length of the sliding type page turning instruction.

[0057] Among them, in this step, shadow elements can be added to the original book page. Specifically, when adding, the first shadow element can be directly added in the outer area of ​​the original book page along the first page boundary line; and the second shadow element can be added in the outer area of ​​the original book page along the second page boundary line. Alternatively, the size of the shadow element can be further adjusted according to the displacement change between the page turning transformation position of the page turning reference point in the page turning book page relative to the page initial position of the page turning reference point. For example, the first shadow element is added to the outer area of ​​the original book page along the first local line segment included in the first page boundary line; the second shadow element is added to the outer area of ​​the original book page along the second local line segment included in the second page boundary line, and the line segment lengths of the first local line segment and the second local line segment are determined according to the displacement change between the page turning transformation position of the page turning reference point in the page turning book page relative to the page initial position of the page turning reference point.

[0058] Step 2: Calculate the page curl radius corresponding to the page turning instruction.

[0059] Since the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point can reflect the amplitude and direction of the page turning operation, the page curling radius corresponding to the page turning instruction can be calculated. The page curling radius refers to: when the book page is curled with the page turning operation, the radius of the cylindrical surface formed by the curled book page. The page curling radius is used to indicate the curling degree of the book page.

[0060] In specific implementation, the page curling radius is mainly calculated according to the displacement change and the circumferential radius formula. Among them, the inventor found in the process of implementing the present invention that when the displacement change between the page turning change position of the page turning reference point and the page initial position of the page turning reference point is too small, the page turning effect will be difficult to detect; and when the displacement change between the page turning change 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 will be too large, thereby affecting the normal reading of the user. In order to solve the above problems, in this embodiment, a lower limit threshold and an upper limit threshold are pre-set. If the displacement change between the page turning change position of the page turning reference point and the page initial position of the page turning reference point is less than the preset lower limit threshold, the page curling radius corresponding to the page turning instruction is determined to be the preset lower limit value, wherein the preset lower limit value is the preset minimum radius. If the displacement change between the page turning change position of the page turning reference point and the page initial position of the page turning reference point is greater than the preset upper limit threshold, the page curling radius corresponding to the page turning instruction is determined to be the preset upper limit value, wherein the preset upper limit value is the preset maximum radius. If the displacement change between the page turning transformation 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 and a preset upper limit threshold, the page curling radius is calculated according to the displacement change and the circumferential radius formula. The circumferential radius formula is used to define the relative relationship between the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point and the page curling radius. Generally, the ratio between the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point and the page curling radius has a preset rule, for example, it may be a preset constant.

[0061] Step 3: Determine the page turning effect area contained in the book page 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.

[0062] Since the page turning operation is usually only used to turn up a corner of a book page, the page area in the book page that is affected by the page turning operation and presents a curled state is only a local area in the book page, and this local area is the page turning action area. The remaining page area that is not affected by the page turning operation and still maintains a flat state (non-curled state) is the non-page turning action area. In order to simulate the real page turning curl state, it is necessary to first determine the above-mentioned page turning action area so that the curl transformation processing is performed on the page turning action area in the subsequent steps.

[0063] In a specific implementation, when determining the page turning effect area contained in a book page 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, it is achieved in the following manner: first, a reference straight line passing through the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point is determined, and a target point located on the reference straight line is determined according to the page curling radius; then, the page turning effect area contained in the book page is determined according to a boundary straight line passing through the target point and perpendicular to the reference straight line.

[0064] The reference straight line passing through the initial position of the page at the page turning reference point and the page turning transformation position at the page turning reference point is Figure 4 The straight line defined by point A and point F in the reference straight line. When determining the target point on the reference straight line according to the page curling radius, the specific position of the target point on the reference straight line is mainly determined according to the size of the page curling radius. Figure 4 The target point in is point P. Accordingly, the boundary line passing through the target point and perpendicular to the reference line is Figure 4 The straight line defined by point C and point J in the figure. The boundary line is used to divide the page turning area and the non-page turning area contained in the book page. For example, the lower left area of ​​the boundary line corresponds to the page turning area, and the image units contained in this area will undergo a curling transformation; while the upper right area of ​​the boundary line corresponds to the non-page turning area, and the image units contained in this area will not undergo a curling transformation. It can be seen that through the target point on the reference line defined by the length of the page curling radius, a boundary line passing through the target point and perpendicular to the reference line can be drawn, and the page turning area can be quickly determined through the boundary line. Figure 4 As shown, the first intersection point between the boundary line and the first page boundary line is point C, and the second intersection point between the boundary line and the second page boundary line is point J. Point C and point J can more accurately define the page turning effect area.

[0065] in, Figure 4 The target point shown is located between the initial page position of the page turning reference point and the page turning transformation position of the page turning reference point. In fact, when the page curling radius is small, the page turning transformation position of the page turning reference point may be between the initial page position of the page turning reference point and the target point. In short, the present invention does not limit the specific position of the target point on the reference line.

[0066] For example, in the first case, the page curl radius is greater than the preset value, indicating that the sliding displacement corresponding to the page turning instruction is large, and the target point is between the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point. Figure 4As shown, the target point P is located between point A and point F. Accordingly, when determining the page turning effect area contained in the book page, the first sub-area that has not undergone curling transformation and the second sub-area that has undergone curling transformation contained in the page turning effect area are determined according to the target point. The first sub-area that has not undergone curling transformation corresponds to the back area of ​​the book page, for example, Figure 4 The area formed by points A, B, and K is the first sub-area, which is used to display the back area of ​​the book after the page is turned, and the back area does not undergo a curling transformation. The second sub-area that undergoes a curling transformation includes the front area and the back area of ​​the book page.

[0067] Specifically, when determining the first sub-region in the page turning action region where the curling transformation does not occur and the second sub-region where the curling transformation occurs according to the target point, it is achieved in the following manner:

[0068] First, determine the target mapping point that is located on the reference line and corresponds to the target point; wherein the interval between the target mapping point and the initial page position of the page turning reference point matches the interval between the target point and the page turning transformation position of the page turning reference point. Specifically, the target mapping point can be determined by first drawing a reference line segment consisting of the initial page position of the page turning reference point and the page turning transformation position of the page turning reference point, that is, Figure 4 Then, the midpoint of the line segment AF is determined to be point G. Accordingly, the distances from the target mapping point O and the target point P to the midpoint G are equal. It can be seen that the interval between the target mapping point and the initial position of the page of the page turning reference point (i.e., the length of the line segment OF) is equal to the interval between the target point and the page turning reference point (i.e., the length of the line segment AP).

[0069] Then, according to the boundary mapping line passing through the target mapping point and perpendicular to the reference line, the first critical point (i.e., point B1) located on the first page boundary line of the book page and the second critical point (i.e., point K1) located on the second page boundary line of the book page are determined; wherein the first page boundary line is perpendicular to the second page boundary line, and the initial position of the page turning reference point is located at the intersection of the first page boundary line and the second page boundary line. Figure 4 The straight line determined by point B1 and point K1 in .

[0070] Finally, determine the triangular area formed by the first critical point, the second critical point and the initial position of the page of the page turning reference point, and determine the first sub-area where no curling transformation occurs and the second sub-area where curling transformation occurs based on the triangular area and the mapping area corresponding to the triangular area. Among them, the triangular area formed by the first critical point, the second critical point and the initial position of the page of the page turning reference point is the area formed by points B1, K1 and F. Correspondingly, the mapping area corresponding to the triangular area is the area formed by points B, K and A. Among them, point B corresponds to the page turning transformation position of point B1 after curling transformation, and point K corresponds to the page turning transformation position of point K1 after curling transformation. It can be seen that the mapping area is the corresponding mapping area after the triangular area is flipped, and the mapping area corresponds to the back of the triangular area.

[0071] Specifically, when determining the first sub-region where no curling transformation has occurred and the second sub-region where curling transformation has occurred based on the triangular region and the mapping region corresponding to the triangular region, first, the triangular region and its corresponding mapping region are determined as the first sub-region where no curling transformation has occurred, and the remaining region corresponds to the second sub-region where curling transformation has occurred.

[0072] Step 4: Obtain the initial page position of each image unit contained in the page turning action area, calculate and display the page turning transformation position of each image unit in combination with the page curling radius, so as to realize the simulated page turning processing of the book page.

[0073] Specifically, when a book page is in a curled state, each image unit contained in the page will also be in a curled state. Therefore, it is necessary to calculate the corresponding page turning transformation position of each image unit after the curling transformation according to the page initial position of each image unit contained in the page turning action area. Among them, the page initial position of each image unit refers to: before the page turning operation is performed, the position of each image unit in the book page is located, which can be specifically represented by the page coordinates; the page turning transformation position of the image unit refers to: after the page turning operation is performed, the position of each image unit after the change due to the curling state of the book page. In specific implementation, since the page curling radius can reflect the curling degree of the book page, the page turning transformation position of each image unit can be calculated based on the page curling radius. It can be seen that by calculating and displaying the page turning transformation position of each image unit, a page curling effect similar to that presented when a paper book is turned can be rendered, thereby realizing the simulated page turning processing of the book page.

[0074] In a specific implementation, the initial page position of each image unit contained in the page turning effect area is obtained, and the page turning transformation position of each image unit is calculated and displayed in combination with the page curling radius. Figure 4For the first sub-region in the image processing apparatus, the page turning position of each image unit in the first sub-region is determined according to the mapping relationship; for the second sub-region, the page turning position of each image unit in the second sub-region is determined according to the cylinder equation determined by the page curling radius.

[0075] The image units contained in the page turning action area are also called page image units, which refer to the page image constituent elements of the book page, for example, the image units can be image pixels. According to the initial page position of each image pixel in the original book page, the page turning transformation position corresponding to the image pixel after the curling transformation can be calculated in combination with the page curling radius.

[0076] Since the first sub-region mentioned above does not undergo a curling transformation, it only maps the triangular region formed by the three points B1K1F to the mapping region formed by the three points BKA by mapping, therefore, the page turning transformation position of each image unit in the first sub-region is determined according to the mapping relationship. In addition, considering that the first sub-region corresponds to the back area of ​​the book page, it is necessary to first obtain the mapping image unit in the back area corresponding to each image unit in the first sub-region, and then map the mapping image unit in the back area corresponding to each image unit to the corresponding page turning transformation position. Among them, the back area corresponding to each image unit refers to: the area in the back page corresponding to the currently displayed book page that is located at the same coordinate position as the image unit. For example, for an image unit located in the lower right corner area of ​​page 5, the corresponding mapping image unit in the back area is the image unit located in the lower left corner of page 6. That is: the mapping image unit in the back area corresponding to a certain image unit refers to: the image unit at the same position on the back of the image unit obtained after the page is turned over.

[0077] Different from the first sub-region, each image pixel in the second sub-region is curled, so for each image pixel in the second sub-region, the page turning position of each image unit in the second sub-region is determined according to the cylinder equation determined by the page curling radius. Figure 4 Points E and H in are auxiliary calculation points involved in the calculation process, and line segment EH is the perpendicular bisector of line segment AF. In addition, Figure 4Point D1 in is the midpoint of line segment CB1, and point I1 is the midpoint of line segment JK1. Correspondingly, point D is the page turning position corresponding to point D1, and point I is the page turning position corresponding to point I1. Point M corresponds to the page turning position corresponding to the midpoint of line segment B1D1, and point N corresponds to the page turning position corresponding to the midpoint of line segment K1I1. In specific implementation, for a specific image pixel point, first determine whether the image pixel point is located in the first sub-area or the second sub-area. If it is located in the first sub-area, the page turning position corresponding to the initial position of the page of the image pixel point is determined according to the mapping method; if it is located in the second sub-area, the initial position of the page of the image pixel point is substituted into the cylinder equation determined by the page curling radius, and the page turning position corresponding to the image pixel point is determined according to the calculation result. For example, the page initial position of point D1 is substituted into the cylinder equation to obtain the position of point D.

[0078] In addition, as mentioned above, the second sub-region includes both the front and back regions of the original book page. Therefore, in the above process, it is necessary to first distinguish the second front sub-region corresponding to the front region and the second back sub-region corresponding to the back region contained in the second sub-region. In order to divide the above second front sub-region and the second back sub-region, it is necessary to divide the second front sub-region and the second back sub-region according to Figure 4 It is divided by point D1 and point I1.

[0079] Specifically, the second front sub-region and the second back sub-region are divided in the following manner: first, a boundary line passing through the target point P and perpendicular to the reference line is drawn, and the first intersection C between the boundary line and the first page boundary line and the second intersection J between the boundary line and the second page boundary line are determined; then, the first midpoint D1 between the first intersection C and the first critical point B1 and the second midpoint I1 between the second intersection J and the second critical point K1 are determined, and the second front sub-region (the region formed by points C, D1, I1, and J) and the second back sub-region (the region formed by points D1, B1, K1, and I1) are determined based on the first midpoint D1 and the second midpoint I1. Accordingly, for each image pixel point in the second back sub-region, it is necessary to first obtain the mapping image unit in the back region corresponding to each image unit in the second back sub-region, and then map the mapping image unit in the back region corresponding to each image unit to the corresponding page turning position.

[0080] Figure 4 Corresponding to the case where the page curl radius is larger, Figure 5 The schematic diagram of the page curling effect when the page curling radius is small is further shown. Figure 5 As shown, if the page curling radius is not greater than the preset value, the page turning transformation position of the page turning reference point is between the page initial position of the page turning reference point and the target point. Figure 5 The target point P in the figure is located on the extension line of the line segment AF. Of course, it is also possible that the target point P and the page turning transformation position A of the page turning reference point coincide with each other. However, whether the target point P is located on the extension line of the line segment AF or the target point P and the page turning transformation position A of the page turning reference point coincide with each other, the page turning action area cannot be divided into the first sub-area and the second sub-area mentioned above, but only includes one overall area. At this time, when obtaining the page initial position of each image unit included in the page turning action area, and calculating and displaying the page turning transformation position of each image unit in combination with the page curling radius, the page turning transformation position of each image unit in the page turning action area is directly determined according to the cylinder equation determined by the page curling radius.

[0081] In addition, if Figure 5 As shown in FIG. 1 , when the target point P is located on the extension line of the line segment AF or the target point P coincides with the page turning transformation position A of the page turning reference point, the page turning effect area can still be divided into a front effect area corresponding to the front content of the book page and a back effect area corresponding to the back content of the book page. It can be seen that no matter what the position of the target point is, the page turning effect area can be divided into a front effect area corresponding to the front content of the book page (for example, Figure 4 The second front sub-area in the figure) and the back action area corresponding to the back content of the book page (for example, Figure 4 The triangular area in the back side and the second back side sub-area can be collectively referred to as the back side action area). For the back side action area corresponding to the back side content of the book page, it is necessary to obtain the mapping image units in the back side area corresponding to each image unit in the back side action area, and then map the mapping image units in the back side area corresponding to each image unit to the corresponding page turning transformation position.

[0082] In addition, as mentioned above, the first shadow element can be added in the outer area of ​​the original book page along the first local line segment included in the first page boundary line, and the second shadow element can be added in the outer area of ​​the original book page along the second local line segment included in the second page boundary line. In order to facilitate the determination of the length and position of the local line segment, in a specific example, the first local line segment included in the first page boundary line is defined by the first intersection C between the boundary straight line and the first page boundary line mentioned above 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 second intersection J between the boundary straight line and the second page boundary line mentioned above and the page initial position F of the page turning reference point. Figure 7 FIG. 2 shows a schematic diagram of another form of shadow element. Figure 7As shown, the first page boundary line includes a first local line segment 71, and the second page boundary line includes a second local line segment 72. Accordingly, a first shadow element 73 is added to the outer area of ​​the original book page along the first local line segment 71, and a second shadow element 74 is added to the outer area of ​​the original book page along the second local line segment 72.

[0083] In addition, it should be noted that the present embodiment does not limit the timing of adding shadow elements, and shadow elements can also be added after obtaining the displacement change between the page turning transformation position of the page turning reference point in the page turning book relative to the page initial position of the page turning reference point, and determining the page turning action area contained in the page turning book according to the displacement change. It can be seen that the execution order between the above-mentioned steps can be flexibly adjusted. Alternatively, the shadow element can be added first, and after obtaining the displacement change between the page turning transformation position of the page turning reference point in the page turning book relative to the page initial position of the page turning reference point, the size and setting position of the shadow element can be adjusted according to the obtained displacement change.

[0084] It can be seen that, since the present embodiment adds shadow elements to the outside of the original book page before calculating the page turning transformation position of each page image unit, the page turning transformation position of each pixel point in the shadow element can be calculated according to the initial page position of each pixel point in the shadow element. This method can make the added shadow effect more realistic, and there is no need to perform an additional shadow adding operation after calculating the page turning transformation position of each page image unit, so that the shadow element and the page image unit undergo curling transformation together.

[0085] In addition, it should be noted that, in the present embodiment, the sliding type page turning instruction is usually triggered continuously, for example, the user slides in a preset direction for a certain period of time to trigger the sliding type page turning instruction. Accordingly, in the process of triggering the sliding type page turning instruction, the current sliding direction and sliding length are continuously detected, and the page turning transformation 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 transformation position of each image unit in the page turning action area are dynamically calculated according to the calculated page turning transformation position of the page turning reference point. In other words, in the process of continuous page turning, the area range of the page turning action area and its corresponding page curling radius are dynamically changing. For example, it is possible that in the initial stage of page turning, the page presentation Figure 5 As the page turning command continues to run, the page appears Figure 4 Therefore, in this embodiment, multiple calculation processes need to be performed dynamically to present the page states corresponding to each page turning stage in real time.

[0086] In summary, through the simulation page-turning method in this embodiment, the book pages can be made to present a natural curling effect along with the page-turning operation. Moreover, during the process of page-turning and curling, each image unit on the curled page also changes accordingly, thus presenting a real deformation state. For example, Figure 4 the words "Honorable Class" in Figure 4 show a curling effect. Thus, it can be seen that this embodiment can simulate the page-turning state of a real paper book, making the content displayed on a part of the e-book page during the page-turning process consistent with the corresponding content during the page-turning process of the paper book. Additionally, by pre-adding shadow elements, the operation of adding shadows to the page is completed simultaneously with the curling transformation operation, without the need to perform shadow transformation processing again after the page is curled, which not only improves the processing efficiency but also achieves a real simulation page-turning effect.

[0087] In addition, those skilled in the art may also make various changes and variations to the above embodiments: Specifically, in step S210, when a page turning instruction is detected for a book page containing a preset picture element, a picture drawing interface is called to perform subsequent steps. Wherein, a book page containing a preset picture element refers to: a page content containing dynamic pictures or picture elements for linking to video resources and other contents. For example, dynamic video resources are inserted into an e-book by means of picture links, etc., so that users can obtain information in the form of pictures or videos while reading the e-book, thereby improving the efficiency of book reading. Specifically, the page turning instruction is usually triggered by a sliding operation. Accordingly, when a page turning instruction triggered by a sliding operation is detected, a picture drawing interface is called to implement subsequent page turning drawing operations. Wherein, the picture drawing interface refers to: an interface dedicated to implementing a picture drawing function. For example, in an Android system, it can be implemented by an interface with a drawing function provided by the Android system. For another example, in an iOS system, it can be implemented by a custom-developed interface with a drawing function. Since the interface logic of the picture drawing interface can be flexibly adjusted according to actual business needs, it is particularly suitable for page turning drawing processing of complex book pages containing pictures. Among them, the inventor found in the process of realizing the present invention that most of the traditional methods use OpenGL to realize drawing processing, but the OpenGL drawing method has the following limitations: it cannot be applied to the processing of book pages containing pictures. That is to say, the OpenGL drawing method can only be applied to the drawing processing of conventional book pages containing text, and it cannot be applied when the book page contains pictures or picture links for linking to video resources. Therefore, in order to solve the above problem, when a page turning instruction is detected, the page description information of the book page corresponding to the page turning instruction is further obtained, and the page description information of the book page is used to determine whether the book page contains a preset picture element. If so, the above picture drawing interface is called to realize the page turning drawing processing; if not, it can be flexibly selected whether to process through the conventional OpenGL drawing method. Among them, the preset picture element is used to display dynamic picture resources, that is, video resources or animated picture resources. By inserting the preset picture element in the page, the video content can be played during the e-book reading process, thereby improving the efficiency of users in obtaining information. Specifically, when judging whether the book page contains a preset picture element according to the page description information of the book page, it can be achieved by parsing the page source code corresponding to the book page to judge whether the page source code contains a source code identifier that matches the preset picture element. Accordingly, in step S220 and step S230, the page turning action area corresponding to the page turning instruction contained in the book page is determined through the picture drawing interface. Specifically, when determining the page turning action area, calculation processing is required. In order to reduce the amount of calculation operations, in this embodiment, the number of image units to be calculated is reduced by sampling, thereby improving the calculation efficiency.Specifically, the image units (i.e., page image units) contained in the book page are sampled and processed through the picture drawing interface to obtain the sampling units contained in the book page; and the page turning action area corresponding to the page turning instruction contained in the book page is determined according to the sampling units contained in the book page. Among them, the image unit can be image information in the form of image pixels, etc., and the sampling is used to reduce the number of image units to reduce the amount of calculation. In specific implementation, the page area of ​​the book page is divided into multiple regional grids through the picture drawing interface, and the image units contained in each regional grid are sampled and processed respectively to obtain a set of sampling units corresponding to each regional grid; accordingly, according to the set of sampling units corresponding to each regional grid, the regional grid belonging to the page turning action area is determined. For example, the size of each regional grid is pre-set, and accordingly, each regional grid is divided according to the corresponding size, so that the page area of ​​the entire book page is divided into multiple regional grids arranged in sequence. Specifically, when the sampling process is performed for each regional grid, a number of image units in the regional grid can be extracted according to a preset sampling ratio, wherein the extracted image unit is also called a sampling unit, and accordingly, the extracted image units together constitute a set of sampling units corresponding to the regional grid. Correspondingly, in the above step S240, the page turning transformation positions of each page image unit and shadow element included in the page turning action area are calculated through the picture drawing interface, and the calculated page turning transformation positions of each page image unit and shadow element are rendered to realize the simulated page turning processing of the book page. In specific implementation, the page initial position of each image unit included in the sampling unit set corresponding to the regional grid belonging to the page turning action area is obtained through the picture drawing interface; according to the page initial position of each image unit included in the sampling unit set, the page turning transformation position of each image unit included in the sampling unit set is calculated and displayed to realize the simulated page turning processing of the book page. It can be seen that this embodiment does not need to perform calculations one by one for all image units in the regional grid through sampling processing, but only needs to perform calculations for each image unit in the sampling unit set included in the regional grid, which greatly reduces the amount of calculation. In addition, for other image units not included in the sampling unit set, they can be filled by edge drawing algorithms, smoothing algorithms, or shrinking algorithms.

[0088] Embodiment 3

[0089] An embodiment of the present application provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the electronic book simulation page turning method in any of the above method embodiments.

[0090] The executable instructions may be specifically used to cause the processor to perform the following operations:

[0091] 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 turning book page including the shadow element;

[0092] Acquire a displacement variation between a page turning transformation position of a page turning reference point in the page of the page turning book relative to an initial page position of the page turning reference point, and determine a page turning action area contained in the page of the page turning book according to the displacement variation;

[0093] The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

[0094] In an optional implementation, adding a shadow element to the original book page to be turned includes:

[0095] A page boundary line included in the original book page to be turned is determined, and a shadow element is added to an outer area of ​​the original book page along the page boundary line.

[0096] In an optional implementation, determining a page boundary line included in the original book page to be turned, and adding a shadow element to an outer area of ​​the original book page along the page boundary line includes:

[0097] Acquire a touch position corresponding to the page turning instruction, and determine a first page boundary line and / or a second page boundary line adjacent to the touch position;

[0098] A first shadow element is added to an outer area of ​​the original book page along the first page boundary line; and / or a second shadow element is added to an outer area of ​​the original book page along the second page boundary line.

[0099] In an optional implementation, the first page boundary line and the second page boundary line are perpendicular to each other; and the shadow element is a semi-transparent picture element.

[0100] In an optional implementation, adding a first shadow element to an outer area of ​​the original book page along the first page boundary line; and / or adding a second shadow element to an outer area of ​​the original book page along the second page boundary line includes:

[0101] Adding the first shadow element in the outer area of ​​the original book page along a first local line segment included in the first page boundary line; and / or adding the second shadow element in the outer area of ​​the original book page along a second local line segment included in the second page boundary line;

[0102] The segment length of the first partial line segment and / or the second partial line segment is determined according to the sliding displacement of the sliding operation corresponding to the page turning instruction.

[0103] In an optional implementation, determining the page turning effect area contained in the page of the book according to the displacement change comprises:

[0104] Calculating the page curling radius corresponding to the page turning instruction according to the displacement change;

[0105] A page turning effect area contained in the book page is determined 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.

[0106] In an optional implementation, determining the page turning effect area contained in the book page 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 includes:

[0107] Determine a reference straight line passing through the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point, and determine a target point located on the reference straight line according to the page curling radius;

[0108] The page turning effect area contained in the book page is determined according to a boundary straight line passing through the target point and perpendicular to the reference straight line.

[0109] In an optional implementation, the calculating the page curl radius corresponding to the page turning instruction includes:

[0110] If the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point is less than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is the preset lower limit value;

[0111] If the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point is greater than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit value;

[0112] If the displacement change between the page turning transformation 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, the page curling radius is calculated according to the displacement change and the circular radius formula.

[0113] Embodiment 4

[0114] Figure 3A schematic structural diagram of an electronic device according to another embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0115] like Figure 3 As shown, the electronic device may include: a processor (processor) 302 , a communication interface (Communications Interface) 304 , a memory (memory) 306 , and a communication bus 308 .

[0116] The processor 302, the communication interface 304, and the memory 306 communicate with each other via the communication bus 308. The communication interface 304 is used to communicate with other devices such as a client or other server network elements. The processor 302 is used to execute the program 310, which can specifically execute the relevant steps in the embodiment of the electronic book simulation page turning method.

[0117] Specifically, the program 310 may include program codes, which include computer operation instructions.

[0118] 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 the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0119] The memory 306 is used to store the program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0120] The program 310 may be specifically configured to enable the processor 302 to perform the following operations:

[0121] 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 turning book page including the shadow element;

[0122] Acquire a displacement variation between a page turning transformation position of a page turning reference point in the page of the page turning book relative to an initial page position of the page turning reference point, and determine a page turning action area contained in the page of the page turning book according to the displacement variation;

[0123] The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

[0124] In an optional implementation, adding a shadow element to the original book page to be turned includes:

[0125] A page boundary line included in the original book page to be turned is determined, and a shadow element is added to an outer area of ​​the original book page along the page boundary line.

[0126] In an optional implementation, determining a page boundary line included in the original book page to be turned, and adding a shadow element to an outer area of ​​the original book page along the page boundary line includes:

[0127] Acquire a touch position corresponding to the page turning instruction, and determine a first page boundary line and / or a second page boundary line adjacent to the touch position;

[0128] A first shadow element is added to an outer area of ​​the original book page along the first page boundary line; and / or a second shadow element is added to an outer area of ​​the original book page along the second page boundary line.

[0129] In an optional implementation, the first page boundary line and the second page boundary line are perpendicular to each other; and the shadow element is a semi-transparent picture element.

[0130] In an optional implementation, adding a first shadow element to an outer area of ​​the original book page along the first page boundary line; and / or adding a second shadow element to an outer area of ​​the original book page along the second page boundary line includes:

[0131] Adding the first shadow element in the outer area of ​​the original book page along a first local line segment included in the first page boundary line; and / or adding the second shadow element in the outer area of ​​the original book page along a second local line segment included in the second page boundary line;

[0132] The segment length of the first partial line segment and / or the second partial line segment is determined according to the sliding displacement of the sliding operation corresponding to the page turning instruction.

[0133] In an optional implementation, determining the page turning effect area contained in the page of the book according to the displacement change comprises:

[0134] Calculating the page curling radius corresponding to the page turning instruction according to the displacement change;

[0135] A page turning effect area contained in the book page is determined 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.

[0136] In an optional implementation, determining the page turning effect area contained in the book page 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 includes:

[0137] Determine a reference straight line passing through the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point, and determine a target point located on the reference straight line according to the page curling radius;

[0138] The page turning effect area contained in the book page is determined according to a boundary straight line passing through the target point and perpendicular to the reference straight line.

[0139] In an optional implementation, the calculating the page curl radius corresponding to the page turning instruction includes:

[0140] If the displacement change between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point is less than a preset lower limit threshold, determining that the page curling radius corresponding to the page turning instruction is the preset lower limit value;

[0141] If the displacement variation between the page turning transformation position of the page turning reference point and the page initial position of the page turning reference point is greater than a preset upper limit threshold, determining that the page curling radius corresponding to the page turning instruction is a preset upper limit value;

[0142] If the displacement change between the page turning transformation 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, the page curling radius is calculated according to the displacement change and the circular radius formula.

[0143] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0144] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0145] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0146] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0147] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0148] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A method for simulating page turning of an electronic book, comprising: 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 turning book page including the shadow element; Obtaining a displacement change amount between a page turning transformation position of a page turning reference point in a page of the page turning book relative to an initial page position of the page turning reference point, and calculating a page curl radius corresponding to the page turning instruction according to the displacement change amount; wherein, if the displacement change amount between the page turning transformation position of the page turning reference point relative to the initial page position of the page turning reference point is less than a preset lower limit threshold, determining that the page curl radius corresponding to the page turning instruction is a preset lower limit value; if the displacement change amount between the page turning transformation position of the page turning reference point relative to the initial page position of the page turning reference point is greater than a preset upper limit threshold, determining that the page curl radius corresponding to the page turning instruction is a preset upper limit value; if the displacement change amount between the page turning transformation position of the page turning reference point relative to the initial page position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curl radius according to the displacement change amount and a circular radius formula; Determining a page turning effect area contained in the book page 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; The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

2. The method according to claim 1, wherein: The adding of shadow elements to the original book page to be turned includes: A page boundary line included in the original book page to be turned is determined, and a shadow element is added to an outer area of ​​the original book page along the page boundary line.

3. The method according to claim 2, wherein: Determining a page boundary line included in the original book page to be turned, and adding a shadow element to an outer area of ​​the original book page along the page boundary line includes: Acquire a touch position corresponding to the page turning instruction, and determine a first page boundary line and / or a second page boundary line adjacent to the touch position; A first shadow element is added to an outer area of ​​the original book page along the first page boundary line; and / or a second shadow element is added to an outer area of ​​the original book page along the second page boundary line.

4. The method according to claim 3, wherein: The first page boundary line and the second page boundary line are perpendicular to each other; and the shadow element is a semi-transparent picture element.

5. The method according to claim 3 or 4, wherein: adding a first shadow element in an outer area of ​​the original book page along the first page boundary line; And / or, adding a second shadow element in an outer area of ​​the original book page along the second page boundary line includes: Adding the first shadow element in the outer area of ​​the original book page along a first local line segment included in the first page boundary line; and / or adding the second shadow element in the outer area of ​​the original book page along a second local line segment included in the second page boundary line; The segment length of the first partial line segment and / or the second partial line segment is determined according to the sliding displacement of the sliding operation corresponding to the page turning instruction.

6. The method according to claim 1, wherein: The step of determining the page turning effect area contained in the book page 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 comprises: Determine a reference straight line passing through the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point, and determine a target point located on the reference straight line according to the page curling radius; The page turning effect area contained in the book page is determined according to a boundary straight line passing through the target point and perpendicular to the reference straight line.

7. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the following operations: 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 turning book page including the shadow element; Obtaining a displacement variation between a page turning transformation position of a page turning reference point in a page of the page turning book relative to an initial page position of the page turning reference point, and calculating a page curl radius corresponding to the page turning instruction according to the displacement variation; wherein, if the displacement variation between the page turning transformation position of the page turning reference point relative to the initial page position of the page turning reference point is less than a preset lower limit threshold, determining that the page curl radius corresponding to the page turning instruction is a preset lower limit value; if the displacement variation between the page turning transformation position of the page turning reference point relative to the initial page position of the page turning reference point is greater than a preset upper limit threshold, determining that the page curl radius corresponding to the page turning instruction is a preset upper limit value; if the displacement variation between the page turning transformation position of the page turning reference point relative to the initial page position of the page turning reference point is between the preset lower limit threshold and the preset upper limit threshold, calculating the page curl radius according to the displacement variation and a circumferential radius formula; Determining a page turning effect area contained in the book page 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; The initial page positions of each page image unit and shadow element contained in the page turning effect area are obtained, and the page turning transformation positions of each page image unit and shadow element contained in the page turning effect area are calculated and displayed to realize the simulated page turning processing of the book page.

8. The electronic device according to claim 7, wherein: The executable instructions cause the processor to perform the following operations: A page boundary line included in the original book page to be turned is determined, and a shadow element is added to an outer area of ​​the original book page along the page boundary line.

9. The electronic device according to claim 8, wherein: The executable instructions cause the processor to perform the following operations: Acquire a touch position corresponding to the page turning instruction, and determine a first page boundary line and / or a second page boundary line adjacent to the touch position; adding a first shadow element in an outer area of ​​the original book page along the first page boundary line; And / or, adding a second shadow element in an outer area of ​​the original book page along the second page boundary line.

10. The electronic device according to claim 9, wherein: The first page boundary line and the second page boundary line are perpendicular to each other; and the shadow element is a semi-transparent picture element.

11. The electronic device according to claim 9 or 10, wherein: The executable instructions cause the processor to perform the following operations: Adding the first shadow element in the outer area of ​​the original book page along a first local line segment included in the first page boundary line; and / or adding the second shadow element in the outer area of ​​the original book page along a second local line segment included in the second page boundary line; The segment length of the first partial line segment and / or the second partial line segment is determined according to the sliding displacement of the sliding operation corresponding to the page turning instruction.

12. The electronic device according to claim 7, wherein: The executable instructions cause the processor to perform the following operations: Determine a reference straight line passing through the page initial position of the page turning reference point and the page turning transformation position of the page turning reference point, and determine a target point located on the reference straight line according to the page curling radius; The page turning effect area contained in the book page is determined according to a boundary straight line passing through the target point and perpendicular to the reference straight line.

13. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute the simulated page turning method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for simulating real page turning effect for electronic book

    CN101923435A

  • Electronic book simulated flipping-over effect realization method and system

    CN102221980A