A page turning method, device, computer equipment and storage medium
By using the graphics processor to determine and splice partial views in the book reading application, the unstable and stuttering of the frame rate of the equipment for page turn effect simulation is solved, and the smooth page turn animation is achieved and the user experience is improved.
Patent Information
- Application Number
- CN202210878747.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-07-25
AI Technical Summary
In the simulation process of page turning effects in book reading applications, the equipment frame rate is unstable, the calculation time is long, and the page turning is stuttering, resulting in the page turning effect being unsatisfactory.
By obtaining the views of the current display page of the book and its front and back pages, a graphics processor is used to determine the partial view, and perform stitching and rendering to generate simulated page turning animations that match the page turning operation, avoiding excessive dependence on the central processor and improving processing efficiency.
It realizes fast and accurate page turning view drawing, avoids page turning lag, and improves the user experience of book reading.
Smart Images

Figure CN115016701B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a page turning method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of Internet technology, various smart devices are constantly appearing in people's lives. The emergence of various smart devices has greatly facilitated people's lives. For example, people can read books anytime and anywhere through smart devices. As for book reading, it can usually be achieved by using book reading applications installed in smart devices.
[0003] When reading with a book reading application, the page turning behavior of the book usually needs to be simulated, and the page turning display is completed in the form of simulated page turning animation. However, in general, the simulation of the page turning effect has problems such as unstable device frame rate, long calculation time, and page turning jamming, resulting in unsatisfactory page turning effect. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a page turning method, apparatus, computer equipment and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for turning pages, comprising:
[0006] Acquire a first view corresponding to a current display page of a book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page;
[0007] In response to a triggered page turning operation, determining first area information and second area information in the first view and third area information in a target view matching the page turning direction according to a footer position point corresponding to a page turning direction and a page turning trigger point indicated by the page turning operation; the target view is the second view or the third view;
[0008] Determine, using a graphics processor, based on the first view, a first partial view matching the first region information and a second partial view matching the second region information; and determine, based on the target view, a third partial view matching the third region information;
[0009] The first partial view, the second partial view and the third partial view are spliced and rendered to obtain a page turning view that matches the page turning trigger point.
[0010] In a possible implementation manner, after the first partial view, the second partial view, and the third partial view are stitched and rendered to obtain a page turning view matching the page turning operation, the method further includes:
[0011] Obtaining a page turning sliding track matching the page turning operation;
[0012] Determine a page turning view corresponding to each track point in the page turning sliding track except the page turning trigger point;
[0013] Based on the page turning views respectively corresponding to the respective track points in the page turning sliding track, a simulated page turning animation matching the page turning operation is generated.
[0014] In a possible implementation, determining the first area information and the second area information in the first view and the third area information in the target view matching the page turning direction according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation includes:
[0015] Determining area boundary curve information between the first area and the second area according to the position information of the page turning trigger point and the position information of the footer position point;
[0016] Determining the first area information according to the area boundary curve information;
[0017] determining the second area information according to the position information of the page turning trigger point and the first area information;
[0018] The third area information is determined according to the first area information, the second area information and the page size information of the current display page.
[0019] In a possible implementation, determining the target view matching the page turning direction includes:
[0020] Establishing a page coordinate system with any vertex of the current display page as the origin, the width direction of the current display page as the horizontal axis direction, and the height direction of the current display page as the vertical axis direction;
[0021] In the page coordinate system, determine a first horizontal coordinate value of any point on the perpendicular bisector of the current displayed page and a second horizontal coordinate value of the page turning trigger point;
[0022] When the first horizontal coordinate value is less than the second horizontal coordinate value, determining that the target view is the third view;
[0023] When the first horizontal coordinate value is not less than the second horizontal coordinate value, the target view is determined to be the second view.
[0024] In a possible implementation, before obtaining the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page, the method further includes:
[0025] In response to the operation of starting a book reading application, acquiring device attribute information corresponding to the terminal device; the book reading application is installed in the terminal device;
[0026] The obtaining of a first view corresponding to a current display page of a book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page includes:
[0027] When the device attribute information satisfies a preset condition, the current display page of the book is determined, and a first view corresponding to the current display page of the book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page are obtained.
[0028] In a possible implementation manner, determining that the device attribute information satisfies a preset condition includes:
[0029] In the device attribute information, the device frame rate is greater than a preset frame rate threshold, and it is determined that the device attribute information meets the preset condition; or,
[0030] When the device frame rate in the device attribute information is equal to a preset frame rate threshold and the device performance score is not less than a preset score threshold, it is determined that the device attribute information meets the preset conditions; wherein the device performance score is determined after a performance test of the terminal device is performed using a target scoring platform.
[0031] In a possible implementation manner, determining that the device attribute information satisfies a preset condition includes:
[0032] When the parameter information in the device attribute information matches the sample parameters of any sample device, it is determined that the device attribute information meets the preset conditions; wherein the parameter information includes operating system parameters and / or device parameters, and the sample device is a device that, after generating simulated page turning animations corresponding to multiple page turning operations, determines that the average frame rate of multiple simulated page turning animations is greater than the test frame rate corresponding to the sample device.
[0033] In a second aspect, the present disclosure also provides a page turning device, including:
[0034] A first acquisition module, used to acquire a first view corresponding to a current display page of a book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page;
[0035] A first determining module, configured to determine, in response to a triggered page turning operation, first area information and second area information in the first view and third area information in a target view matching the page turning direction according to a footer position point corresponding to a page turning direction and a page turning trigger point indicated by the page turning operation; the target view is the second view or the third view;
[0036] a second determination module, configured to determine, using a graphics processor, based on the first view, a first partial view matching the first region information and a second partial view matching the second region information; and to determine, based on the target view, a third partial view matching the third region information;
[0037] A rendering module is used to perform splicing rendering on the first partial view, the second partial view and the third partial view to obtain a page turning view that matches the page turning trigger point.
[0038] In a possible implementation manner, the rendering module is further configured to obtain a page turning sliding track matching the page turning operation after the first partial view, the second partial view, and the third partial view are spliced and rendered to obtain a page turning view matching the page turning operation;
[0039] Determine a page turning view corresponding to each track point in the page turning sliding track except the page turning trigger point;
[0040] Based on the page turning views respectively corresponding to the respective track points in the page turning sliding track, a simulated page turning animation matching the page turning operation is generated.
[0041] In a possible implementation manner, the first determining module, when determining the first area information and the second area information in the first view and the third area information in the target view matching the page turning direction according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation, is used to determine the area boundary curve information between the first area and the second area according to the position information of the page turning trigger point and the position information of the footer position point;
[0042] Determining the first area information according to the area boundary curve information;
[0043] determining the second area information according to the position information of the page turning trigger point and the first area information;
[0044] The third area information is determined according to the first area information, the second area information and the page size information of the current display page.
[0045] In a possible implementation manner, the first determining module, when determining the target view matching the page turning direction, is used to establish a page coordinate system with any page vertex of the current display page as the origin, the width direction of the current display page as the horizontal axis direction, and the height direction of the current display page as the vertical axis direction;
[0046] In the page coordinate system, determine a first horizontal coordinate value of any point on the perpendicular bisector of the current displayed page and a second horizontal coordinate value of the page turning trigger point;
[0047] When the first horizontal coordinate value is less than the second horizontal coordinate value, determining that the target view is the third view;
[0048] When the first horizontal coordinate value is not less than the second horizontal coordinate value, the target view is determined to be the second view.
[0049] In a possible implementation, the device further includes:
[0050] A second acquisition module is used to acquire device attribute information corresponding to the terminal device in response to the operation of starting the book reading application before acquiring the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page; the book reading application is installed in the terminal device;
[0051] The first acquisition module, when acquiring the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page, is used to determine the current display page of the book if the device attribute information meets a preset condition, and acquire the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page.
[0052] In a possible implementation manner, when determining that the device attribute information satisfies a preset condition, the first acquisition module is used to determine that the device attribute information satisfies the preset condition if a device frame rate in the device attribute information is greater than a preset frame rate threshold; or
[0053] When the device frame rate in the device attribute information is equal to a preset frame rate threshold and the device performance score is not less than a preset score threshold, it is determined that the device attribute information meets the preset conditions; wherein the device performance score is determined after a performance test of the terminal device is performed using a target scoring platform.
[0054] In a possible implementation, the first acquisition module, when determining that the device attribute information satisfies the preset conditions, is used to determine that the device attribute information satisfies the preset conditions when the parameter information in the device attribute information matches the sample parameters of any sample device; wherein the parameter information includes operating system parameters and / or device parameters, and the sample device is a device that, after generating simulated page turning animations corresponding to multiple page turning operations, determines that the average frame rate of multiple simulated page turning animations is greater than the test frame rate corresponding to the sample device.
[0055] In a third aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps of the above-mentioned first aspect, or any possible implementation of the first aspect.
[0056] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0057] For a description of the effects of the page turning device, computer equipment, and computer-readable storage medium, please refer to the description of the page turning method, which will not be repeated here.
[0058] The page turning method, device, computer equipment and storage medium provided by the embodiments of the present disclosure can accurately determine the first area information and the second area information corresponding to the first view, and the third area information corresponding to the target view based on the page turning trigger point and the footer position point; and then use the image processor to determine the first partial view matching the first area information and the second partial view matching the second area information from the first view, and determine the third partial view matching the third area information from the target view. Since the image processor has good view processing performance, the speed and efficiency of obtaining the first partial view, the second partial view and the third partial view can be improved by directly processing the view using the image processor. Afterwards, by splicing and rendering the first partial view, the second partial view and the third partial view, it is possible to quickly and accurately obtain the page turning view that matches the page turning trigger point, and it is also possible to smoothly draw the page turning view to avoid the problem of page turning jams.
[0059] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0061] Figure 1 A flow chart of a page turning method provided by an embodiment of the present disclosure is shown;
[0062] Figure 2 A schematic diagram of a current display page provided by an embodiment of the present disclosure is shown;
[0063] Figure 3 A schematic diagram showing a page turning view provided by an embodiment of the present disclosure is shown;
[0064] Figure 4 A schematic diagram of determining first area information, second area information and third area information provided by an embodiment of the present disclosure is shown;
[0065] Figure 5 A schematic diagram showing a comparison of device frame rates provided by an embodiment of the present disclosure is shown;
[0066] Figure 6 A schematic diagram showing a page turning device provided by an embodiment of the present disclosure;
[0067] Figure 7 A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0069] In addition, the terms "first", "second", etc. in the description and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0070] The "multiple or several" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0071] After research, it was found that for the simulation of page turning effects, the existing technology adopts the following method: using the central processing unit (CPU) to draw the bitmap corresponding to the view of the current display page, the bitmap corresponding to the view of the previous page of the current display page, and the bitmap corresponding to the view of the next page of the current display page, and allocate memory space in the CPU for the three bitmaps for storage. When it is determined that there is a page turning operation, the target bitmap to be processed is determined from the three stored bitmaps, and then the target bitmap is processed to obtain the simulated page turning animation corresponding to the page turning operation. The entire simulation process requires the CPU to store the bitmap and process the calculated target bitmap, which brings a large processing pressure to the CPU, resulting in the entire simulation process There are problems such as unstable device frame rate, long calculation time, and page turning jams, affecting the page turning experience of the book.
[0072] Based on the above research, the present disclosure provides a page turning solution. Based on the page turning trigger point and the footer position point, the first area information and the second area information corresponding to the first view and the third area information corresponding to the target view can be accurately determined; then the image processor is used to determine the first local view matching the first area information and the second local view matching the second area information from the first view, and the third local view matching the third area information from the target view. Since the image processor has good view processing performance, the speed and efficiency of obtaining the first local view, the second local view and the third local view can be improved by directly processing the view using the image processor. Afterwards, by splicing and rendering the first local view, the second local view and the third local view, the page turning view that matches the page turning trigger point can be obtained quickly and accurately, and the page turning view can be smoothly drawn to avoid the problem of page turning jams.
[0073] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0074] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0075] To facilitate understanding of the present embodiment, a page turning method disclosed in the embodiment of the present disclosure is first introduced in detail. The executor of the page turning method provided in the embodiment of the present disclosure is generally a terminal device or other processing device with certain computing capabilities, wherein the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a personal digital assistant (PDA), a handheld device, a computer device, etc.; in some possible implementation methods, the page turning method may be implemented by a processor calling computer-readable instructions stored in a memory.
[0076] The following describes the page turning method provided by the embodiment of the present disclosure by taking the execution subject as a terminal device as an example.
[0077] like Figure 1 As shown, it is a flow chart of a page turning method provided by an embodiment of the present disclosure, which may include the following steps:
[0078] S101: Acquire a first view corresponding to a current display page of a book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page.
[0079] Here, the book can be any book that can be obtained through the Internet, such as online novels, online essays, online journals, etc. Specifically, the book can be read using a book reading application installed in the terminal device, or the book can be read on the web page using a browser in the terminal device.
[0080] Books usually include multiple pages, one page corresponds to a page number, each page may include different book contents, and each page in the book has the same page size. The current display page is the page currently being read, for example, the first page of the book, the 100th page of the book, the 500th page of the book, etc. The view is View, and the view of each page includes all the information of the page, such as the text information, title information, picture information, page frame information, etc. corresponding to the page; the view can be displayed on the screen of the terminal device in the form of a component. The previous page of the current display page is a page whose page number is adjacent to the page number of the current display page and whose page number is smaller than the page number of the current display page; the next page of the current display page is a page whose page number is adjacent to the page number of the current display page and whose page number is larger than the page number of the current display page. For example, the current display page is page 50, the previous page refers to page 49, and the next page refers to page 51.
[0081] The first view is the view corresponding to the currently displayed page, the second view is the view corresponding to the previous page, and the third view is the view corresponding to the next page.
[0082] In specific implementation, when a user opens any book through a book reading application, the terminal device can determine the page that needs to be displayed, that is, the current display page, and then obtain the first view corresponding to the current display page, the second view corresponding to the previous page, and the third view corresponding to the next page.
[0083] S102: In response to a triggered page turning operation, determine the first area information and the second area information in the first view, and the third area information in the target view that matches the page turning direction according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation; the target view is the second view or the third view.
[0084] Here, the page turning operation is an operation initiated by the user, and different page turning operations correspond to different page turning directions. Specifically, the page turning direction may include a forward page turning direction and a backward page turning direction. The page turning trigger point indicated by the page turning operation may specifically be a click position on the screen of the terminal device when the user determines that a page needs to be turned. Figure 2 As shown, it is a schematic diagram of a current display page provided by an embodiment of the present disclosure, wherein the page turning trigger point can be Figure 2 For any position point in the page shown, when the page turning direction is the backward page turning direction, the footer position point corresponding to the page turning direction is point W; when the page turning direction is the forward page turning direction, the footer position point corresponding to the page turning direction is point U.
[0085] The first area information is used to characterize the view range that matches the page turning operation in the first view (i.e., the first area hereinafter), and the second area information is used to characterize the view range that matches the page turning operation in the flipped view after the first view is flipped (i.e., the second area hereinafter). The target view is related to the page turning direction indicated by the page turning operation. Specifically, when the page turning direction is the direction of flipping backward, the target view is the third view; when the page turning direction is the direction of flipping forward, the target view is the second view. The third area information is used to characterize the view range that matches the page turning operation in the third view (i.e., the third area hereinafter). Figure 3 , which is a schematic diagram of a page turning view provided by an embodiment of the present disclosure, wherein the page turning operation corresponding to the page turning view shown in the image is to turn the page backward, the region information corresponding to region A is the first region information corresponding to the first view, the region information corresponding to region B is the second region information corresponding to the first view, and the region information corresponding to region C is the third region information corresponding to the target view. Figure 3 , the target view is the third view.
[0086] In specific implementation, when the user has a need to turn pages, the page turning operation can be triggered by clicking any position point on the screen of the terminal device. Afterwards, the terminal device can determine the page turning direction and page turning trigger point corresponding to the page turning operation in response to the page turning operation triggered by the user. At the same time, the footer position point matching the page turning direction and the target view matching the page turning operation can be determined.
[0087] In one embodiment, the page turning direction corresponding to the page turning operation and the target view matching the page turning operation may be determined according to the following steps:
[0088] Step 1: Establish a page coordinate system with any vertex of the current display page as the origin, the width direction of the current display page as the horizontal axis direction, and the height direction of the current display page as the vertical axis direction.
[0089] Here, any page may include 4 page vertices, and the current display page also includes 4 page vertices. Figure 2 Points U, V, W, and Z in the figure are the vertices of the current display page. Points U and W are also the two footer positions of the current display page. Figure 2 In the example, the width direction of the current display page may be the direction where the straight line VZ is located or the direction where the straight line UW is located; the height direction of the current display page may be the direction where the straight line VU is located or the direction where the straight line ZW is located.
[0090] exist Figure 2A schematic diagram of a page coordinate system is shown in the figure, wherein the origin of the page coordinate system is the page vertex V, the positive direction of the horizontal axis is the direction of the ray VZ, and the positive direction of the vertical axis is the direction of the ray VU, wherein the positive direction of the horizontal axis is the positive direction of the X-axis, and the positive direction of the vertical axis is the positive direction of the Y-axis.
[0091] Step 2: In the page coordinate system, determine the first horizontal coordinate value of any point on the perpendicular bisector of the current display page and the second horizontal coordinate value of the page turning trigger point.
[0092] Still Figure 2 Take this step as an example to continue explaining:
[0093] The vertical bisector of the current display page is Figure 2 Since any point in the perpendicular bisector up of the current display page has the same first horizontal coordinate value in the page coordinate system, any point in the perpendicular bisector can be selected as a reference point, and then the first horizontal coordinate value of the reference point in the page coordinate system can be determined. At the same time, the horizontal coordinate value of the page turning trigger point in the horizontal axis direction in the page coordinate system can be determined, and this value can be used as the second horizontal coordinate value.
[0094] Step three: when the first horizontal coordinate value is less than the second horizontal coordinate value, determine the target view to be the third view; when the first horizontal coordinate value is not less than the second horizontal coordinate value, determine the target view to be the second view.
[0095] During specific implementation, after determining the first horizontal coordinate value and the second horizontal coordinate value, the size relationship between the first horizontal coordinate value and the second horizontal coordinate value can be determined. When it is determined that the first horizontal coordinate value is less than the second horizontal coordinate value, it means that the page trigger point is located in the right half of the page, and it is more likely to turn the page backward. In this case, it can be determined that the page turning direction corresponding to the page turning operation is the direction of turning the page backward, and it can be determined that the target view matching the page turning direction is the third view. On the contrary, when it is determined that the first horizontal coordinate value is not less than the second horizontal coordinate value, it means that the page trigger point is located in the left half of the page, and it is more likely to turn the page forward. In this case, it can be determined that the page turning direction corresponding to the page turning operation is the direction of turning the page forward, and it can be determined that the target view matching the page turning direction is the second view.
[0096] In this way, by establishing a page coordinate system to determine the page turning direction and the target view, the accuracy of the determined page turning direction and the target view can be guaranteed.
[0097] Further, with respect to the above S102, after determining the target view, the first area information corresponding to the first view, the second area information corresponding to the view after the first view is flipped, and the third area information corresponding to the target view can be determined based on the position information of the footer position point corresponding to the page turning direction and the position information of the page turning trigger point.
[0098] In one embodiment, the step of determining the first area information, the second area information, and the third area information in S102 may be implemented according to the following steps:
[0099] S102 - 1 : Determine region boundary curve information between the first region and the second region according to the position information of the page turning trigger point and the position information of the footer position point.
[0100] Here, the position information of the page turning trigger point may be the coordinate information of the page turning trigger point, and the position information of the footer position point may be the coordinate information of the footer position point, and the coordinate information may be determined according to a pre-established page coordinate system. The first area is the area range indicated by the first area information, and the second area is the area range indicated by the second area information. The area boundary curve information may specifically be the curve equation corresponding to the boundary curve between the first area and the second area.
[0101] like Figure 4 FIG. 1 is a schematic diagram of determining first area information, second area information and third area information provided by an embodiment of the present disclosure.
[0102] Taking the page turning direction as the backward page turning example, you can refer to Figure 4 The first area information, the second area information and the third area information are determined from the various position points shown. Specifically, the page turning trigger point is Figure 4 The page position point corresponding to the page turning direction is Figure 4n points in . Based on the position information of point m and point n, the intersection points e and f of the perpendicular bisector 1 of the line segment mn and the edge of the current display page can be determined first, where the midpoint of the perpendicular bisector 1 is represented by o. Based on the position information of point m and point o, the intersection points a and a' of the perpendicular bisector 2 of the line segment mo and the edge of the current display page are determined, where the midpoint of the perpendicular bisector 2 is represented by g. Based on the position information of point g and point o, the intersection points c and c' of the perpendicular bisector 3 of the line segment go and the edge of the current display page are determined, where the midpoint of the perpendicular bisector 3 is represented by h. According to the position information of point m and point e in straight line me, and the position information of point a and point a' in straight line aa', the position information of intersection point b between straight line me and straight line aa' is determined. Similarly, the position information of intersection point b' between straight line mf and straight line aa', the position information of intersection point d between straight line me and straight line cc', and the position information of intersection point d' between straight line mf and straight line cc' can be obtained.
[0103] Furthermore, point e can be taken as the vertex, point a and point b as the base points, and according to the position information of point e, point a and point b, a second-order Bezier curve aeb corresponding to aeb can be determined. At the same time, point f can be taken as the vertex, point a' and point b' as the base points, and a second-order Bezier curve a'fb' corresponding to a'fb' can be determined.
[0104] Then, the path "Bezier curve aeb—bm—mb'—Bezier curve a'fb'" can be used as the area boundary curve between the first area and the second area. Furthermore, based on the position information of each point included in the area boundary curve, the curve equation corresponding to the boundary curve, that is, the area boundary curve information, can be determined.
[0105] S102-2: Determine first region information according to region boundary curve information.
[0106] In specific implementation, after obtaining the region boundary curve information, the first region (i.e., Figure 4 Then, according to the position information of the first area in the current display page, the first area information is determined.
[0107] S102 - 3 : Determine second area information according to the position information of the page turning trigger point and the first area information.
[0108] In specific implementation, the initial area can be determined based on the position information of each point in the path "m—b—midpoint of cd—midpoint of c'd'—b'—m". Then, the overlapping area between the initial area and the first area indicated by the first area information is determined, and the second area (i.e. Figure 4 Further, the second area information is determined according to the position information of the second area in the flip page of the current display page.
[0109] S102-4: Determine third area information according to the first area information, the second area information and the page size information of the current display page.
[0110] Here, the page size information is used to represent the page size of the current display page, and the page size may specifically include the page width and the page height.
[0111] In a specific implementation, the page area corresponding to the page size represented by the page size information can be subtracted from the first area represented by the first area information, and the second area represented by the second area information, to obtain the third area corresponding to the target view (i.e. Figure 4 Afterwards, the third region information may be determined according to the position information of the third region in the next page corresponding to the target view.
[0112] S103: using a graphics processor to determine, based on the first view, a first partial view matching the first region information and a second partial view matching the second region information; and determining, based on the target view, a third partial view matching the third region information.
[0113] Here, a graphics processing unit (GPU) is a processing unit in a terminal device, which can be dedicated to processing views corresponding to an image. The first partial view is a partial view in the first view, the second partial view is a partial view in the view corresponding to the first view after flipping, and the third partial view is a partial view in the third view.
[0114] In a specific implementation, after obtaining the first view, the second view, and the third view, all three views can be sent to a simulated page turning drawing module. Among them, the simulated page turning drawing module is a module provided in an embodiment of the present disclosure, and is used to execute the page turning method provided in an embodiment of the present disclosure to realize drawing a simulated page turning animation. The simulated page turning drawing module may include a GPU. After obtaining the first area information, the second area information, and the third area information, the GPU in the simulated page turning drawing module can be used to crop the first view according to the first area represented by the first area information to obtain a first partial view. At the same time, the GPU can be used to first flip the first view to obtain the flipped first view, and then the flipped first view can be cropped according to the second area represented by the second area information to obtain the second partial view. In addition, the GPU can also be used to crop the target view according to the third area represented by the third area information to obtain a third partial view.
[0115] S104: performing splicing and rendering on the first partial view, the second partial view and the third partial view to obtain a page turning view that matches the page turning trigger point.
[0116] Here, the page turning view is a view that matches the page turning trigger point, which may include a first partial view, a second partial view, and a third partial view. Figure 3 The view shown in FIG. 1 is a page turning view for turning pages backward.
[0117] In a specific implementation, the first partial view, the second partial view and the third partial view may be spliced according to the relative position relationship among the first partial view, the second partial view and the third partial view to obtain a spliced view. Thereafter, the spliced view may be rendered according to the view content corresponding to the spliced view to obtain a page turning view, and the page turning view may be displayed to the user.
[0118] Alternatively, the first partial view, the second partial view, and the third partial view may be rendered separately to obtain the rendered partial views; then, the rendered partial views may be spliced according to the relative position relationship among the first partial view, the second partial view, and the third partial view to obtain the page turning view. Finally, the page turning view may be displayed to the user.
[0119] In this way, based on the page turning trigger point and the footer position point, the first area information and the second area information corresponding to the first view, as well as the third area information corresponding to the target view can be accurately determined; then the image processor is used to determine the first partial view matching the first area information and the second partial view matching the second area information from the first view, and the third partial view matching the third area information from the target view. Since the image processor has good view processing performance, the speed and efficiency of obtaining the first partial view, the second partial view and the third partial view can be improved by directly processing the view using the image processor. Afterwards, by splicing and rendering the first partial view, the second partial view and the third partial view, the page turning view matching the page turning trigger point can be obtained quickly and accurately, and the page turning view can be smoothly drawn to avoid the problem of page turning jams.
[0120] In one embodiment, when a user performs a page turning operation, he or she often slides on the screen of the terminal device to form a sliding track, and the starting point in the sliding track is the above-mentioned page turning starting point. In order to obtain a better simulated page turning effect, simulation can usually be performed according to the user's sliding track. Therefore, after the first partial view, the second partial view, and the third partial view are spliced and rendered to obtain a page turning view that matches the page turning operation, a page turning sliding track that matches the page turning operation can also be obtained. Here, the page turning sliding track can specifically be a track formed by the user sliding on the screen of the terminal device.
[0121] Then, the page turning view corresponding to each track point in the page turning sliding track except the page turning trigger point can be determined. Here, the starting point of the sliding track is the page turning starting point, because the page turning view corresponding to the page turning trigger point has been determined. Therefore, for each track point except the page turning trigger point, its corresponding page turning view needs to be determined.
[0122] Specifically, for each track point except the page turning trigger point, each track point can be used as a new page turning trigger point in turn according to the triggering order or triggering time of each track point in the page turning sliding track, and then return to execute the above S102 to S104, and determine the page turning view corresponding to each new page turning trigger point in turn.
[0123] Afterwards, based on the page turning views corresponding to the respective track points in the page turning sliding track, a simulated page turning animation matching the page turning operation can be generated.
[0124] Specifically, the page turning view corresponding to each track point can be displayed in sequence according to the triggering order or triggering time of each track point in the page turning sliding track. In this way, by determining and displaying the page turning view corresponding to the page turning trigger point and the page turning view corresponding to each track point, a simulated page turning animation matching the current page turning operation can be formed.
[0125] Here, since the method for determining the page turning view corresponding to each trajectory point is the same as the page turning trigger method corresponding to the page turning trigger point, the GPU in the terminal device is effectively utilized when determining each page turning view in the simulated page turning animation. That is, the formation and display process of the above-mentioned simulated page turning animation directly utilizes the GPU to process the view, achieving the effect of hardware buffering of the view using the GPU. Therefore, the page turning method provided by the embodiment of the present disclosure can not only improve the stability of the device frame rate when loading each simulated page turning animation, realize smooth drawing, but also effectively avoid the problem of loading jams.
[0126] like Figure 5 FIG. 1 is a schematic diagram showing a comparison of device frame rates provided by an embodiment of the present disclosure, wherein: Figure 5 Figure 5-1 is a schematic diagram of the actual frame rate of a device that uses the method in the prior art (i.e., the bitmap method) to complete simulated page turning, wherein each page turning operation takes a certain amount of time and corresponds to different frame rates at different time points. The time and actual frame rate corresponding to four complete page turning operations are shown in 5-1. Figure 5 5-2 in FIG. 5 is a schematic diagram of the actual frame rate of a device that uses the page turning method provided by the embodiment of the present disclosure to complete simulated page turning. 5-2 also shows the time and actual frame rate corresponding to four complete page turning operations.
[0127] According to 5-1 and 5-2, it can be seen that the page turning method provided by the embodiment of the present disclosure is used to complete the simulated page turning, and the time required to draw the simulated page turning animation corresponding to each page turning operation is stable. The frame rate of the simulated page turning animation corresponding to each page turning operation is also more stable than the frame rate corresponding to the simulated page turning animation drawn using the method in the prior art.
[0128] Optionally, since the track length of the page turning sliding trajectory corresponding to each user may be different, in order to achieve a better simulated page turning effect, a target length can be preset. When the track length of the user's page turning sliding trajectory is inconsistent with the target length, the sliding trajectory can be predicted based on the user's page turning sliding trajectory until the sum of the predicted track length and the track length of the user's page turning sliding trajectory reaches the target length.
[0129] Then, the page turning view corresponding to each predicted track point in the predicted track can be determined. Afterwards, a complete simulated page turning animation corresponding to a page turning operation can be generated based on the page turning view corresponding to each track point in the page turning sliding track and the page turning view corresponding to each predicted track point.
[0130] In one embodiment, before obtaining the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page, it is also necessary to respond to the operation of starting a book reading application and obtain device attribute information corresponding to the terminal device; the book reading application is installed in the terminal device.
[0131] Here, although the page turning method provided by the embodiment of the present disclosure can realize the smooth drawing of the page turning view and avoid the page turning jam, it may not be suitable for all terminal devices due to the actual performance of each terminal device. Therefore, before executing the above S101, it can be determined whether the terminal device can use the page turning method provided by the embodiment of the present disclosure.
[0132] Specifically, it can be seen from the above embodiments that a user can open any book for reading through a book reading application. Therefore, before obtaining the first view, the second view, and the third view, the user must have opened the book reading application installed in the terminal device currently in use, and then the device attribute information corresponding to the terminal device currently in use can be obtained in response to the operation of starting the book reading application.
[0133] The device attribute information may include parameter information such as device frame rate, device performance score, operating system parameters, and device parameters. The operating system parameters are used to characterize the software configuration of the terminal device, and the device parameters are used to characterize the hardware configuration of the terminal device.
[0134] After acquiring the device attribute information, it can be determined whether the device attribute information meets a preset condition, wherein the preset condition is a preset condition that a terminal device that can use the page turning method provided by the embodiment of the present disclosure needs to meet.
[0135] If it is determined that the device attribute information meets the preset conditions, it can be determined that the terminal device currently in use can use the page turning method provided by the embodiment of the present disclosure to simulate page turning. Otherwise, it is determined that the terminal device currently in use cannot use the page turning method provided by the embodiment of the present disclosure to simulate page turning, and can only use the method in the prior art (i.e., the method using bitmap) to complete the simulated page turning. Regarding determining whether the device attribute information meets the preset conditions, there may be different determination methods when the preset conditions are different:
[0136] Method 1: The preset condition is to determine whether the device frame rate in the device attribute information is greater than the preset frame rate threshold, or the preset condition is to determine whether the device frame rate in the device attribute information is equal to the preset frame rate threshold, and whether the device performance score in the device attribute information is not less than the preset score threshold.
[0137] The device performance score is determined by using the target scoring platform to perform a performance test on the terminal device currently in use. The preset frame rate threshold may be a minimum device frame rate determined based on experience, such as 60 frames, 80 frames, etc. The preset score threshold may be a minimum performance score determined based on experience, such as 8 points, 9 points, etc.
[0138] In specific implementation, the preset condition may indicate a preset frame rate threshold and a preset score threshold. After obtaining the device attribute information of the currently used terminal device, it can be determined whether the device frame rate in the device attribute information is greater than the preset frame rate threshold. If so, it can be directly determined that the device attribute information meets the preset condition.
[0139] If the device frame rate is not greater than the preset frame rate threshold, then continue to determine whether the device frame rate in the device attribute information is equal to the preset frame rate threshold. If the device frame rate is equal to the preset frame rate threshold, then continue to determine whether the device performance score in the device attribute information is not less than the preset score threshold. If the device performance score is not less than the preset score threshold, then the device attribute information can meet the preset conditions.
[0140] If it is determined that the device performance score is less than the preset score threshold, it is determined that the device attribute information does not meet the preset condition. Alternatively, if it is determined that the device frame rate is less than the preset frame rate threshold, it can also be determined that the device attribute information does not meet the preset condition.
[0141] Method 2: The preset condition is to determine whether the parameter information in the device attribute information matches the sample parameters of any sample device; that is, the preset condition is to determine whether the parameter information in the device attribute information is consistent with the sample parameters of any sample device.
[0142] The parameter information may include operating system parameters and / or device parameters, and may also include device model, device manufacturer and other information, and the parameter information is not specifically limited here. In practical applications, the parameter information related to the terminal device should fall within the protection scope of this disclosure.
[0143] The sample parameters are the device parameters of the sample device. The sample device is a device that determines that the average frame rate of multiple simulated page turning animations is greater than the test frame rate corresponding to the sample device after generating multiple simulated page turning animations corresponding to the page turning operations. The test frame rate is the average frame rate of the sample device when performing multiple simulated page turning operations using the method in the prior art (i.e., the method using bitmap).
[0144] In the specific implementation of the second method, after obtaining the device attribute information of the currently used terminal device, the parameter information of the currently used terminal device can be determined from the device attribute information. Then, from the parameter information corresponding to each sample device, it is determined whether there is matching parameter information that is consistent with the parameter information of the terminal device. If so, it can be determined that the device attribute information meets the preset condition; if not, it can be determined that the device attribute information does not meet the preset condition.
[0145] Of course, in actual application, the first method and the second method can also be used together, and the embodiment of the present disclosure does not specifically limit this.
[0146] In this way, based on the above-mentioned method 1 and method 2, it is possible to accurately determine whether the device attribute information of the terminal device meets the preset conditions, and further, it is possible to accurately determine whether the terminal device can use the page turning method provided in the embodiment of the present disclosure to simulate page turning.
[0147] Regarding the above sample equipment, it can be determined as follows:
[0148] For any terminal device, after the book reading application is opened for the first time, the device frame rate and device performance score of the terminal device can be obtained. Then, according to the above-mentioned method one, the target page turning method that can be used by the terminal device after the book reading application is opened for the first time is determined from the methods in the prior art and the page turning methods provided in the embodiments of the present disclosure. The description will continue with the example that the determined target page turning method is the page turning method provided in the embodiments of the present disclosure. After determining the target page turning method, the target page turning method can be used to simulate page turning, and the average frame rate of the terminal device after multiple simulated page turnings using the target page turning method is determined. Then, the page turning method used by the terminal device is switched from the target page turning method to another page turning method.
[0149] When the target page turning method is the page turning method provided by the embodiment of the present disclosure, the other page turning method is a method in the prior art. Afterwards, the method in the prior art can be used to simulate page turning, and the test frame rate of the terminal device after multiple simulated page turnings using the method in the prior art can be determined.
[0150] Afterwards, it is determined whether the average frame rate is greater than the test frame rate. If so, the terminal device is determined to be a sample device, and the parameter information of the terminal device is used as a sample parameter, that is, the terminal device can preferentially use the page turning method provided by the embodiment of the present disclosure. If it is determined that the average frame rate is not greater than the test frame rate, the terminal device is not used as a sample device, and the parameter information of the terminal device is not used as a sample parameter, that is, the terminal device can preferentially use the method in the prior art.
[0151] Based on the above steps, after testing a large number of terminal devices, each sample device and its corresponding sample parameter can be determined from the large number of terminal devices. Afterwards, each sample device and its corresponding sample parameter can be stored to facilitate the use of the above second method.
[0152] Optionally, after testing a large number of terminal devices based on the above steps, the page turning methods that can be used preferentially for various devices can be obtained and stored. When the page turning method to be used by any terminal device is subsequently determined, the page turning method that can be used preferentially for the terminal device can be determined based on the stored page turning methods that can be used preferentially for various devices.
[0153] After determining whether the device attribute information of the terminal device meets the preset conditions, for the above S101, if it is determined that the device attribute information meets the preset conditions, the current display page of the book can be determined. Here, when the user views the book for the first time, the current display page can be the homepage of the book. When the user is not viewing the book for the first time, the user's viewing record can be obtained to determine the page displayed to the user when the user viewed the book most recently, and the page is used as the current display page.
[0154] After determining the current display page, the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page can be obtained and sent to the GPU in the simulated page turning drawing module, and then the above S102 to S104 can be continued to be executed, which will not be repeated here. Here, if the current display page is the first page, the second view corresponding to the previous page can be empty, and if the current display page is the last page, the third view corresponding to the next page can be empty.
[0155] When it is determined that the device attribute information does not meet the preset conditions, the method in the prior art (ie, the method using bitmap) can be used to complete the simulated page turning.
[0156] In addition, for any terminal device, after determining the simulated page turning method that the terminal device needs to use based on the device attribute information, the average frame rate when the simulated page turning is performed using the determined simulated page turning method can also be determined. If the average frame rate is lower than the preset target frame rate, another simulated page turning method can be switched to complete the simulated page turning.
[0157] Exemplarily, when it is determined that the device attribute information corresponding to the terminal device A meets the preset conditions, the terminal device A can use the page turning method provided in the embodiment of the present disclosure to simulate page turning. However, if the average frame rate of the terminal device A is less than the preset target frame rate after multiple simulated page turnings are performed using the page turning method provided in the embodiment of the present disclosure, it means that the effect of the simulated page turning performed by the terminal device A using the page turning method provided in the embodiment of the present disclosure is not ideal. The page turning method used by the terminal device A can be switched to a method in the prior art (i.e., a method using a bitmap), and for subsequent page turning operations, the method in the prior art can be used to simulate page turning.
[0158] In this way, the average frame rate is used to flexibly switch the page turning method used by the terminal device, which can not only provide flexibility in simulated page turning, but also maximize the average frame rate of simulated page turning and reduce the average memory usage of the book reading application.
[0159] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0160] Based on the same inventive concept, the embodiment of the present disclosure also provides a page turning device corresponding to the page turning method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned page turning method of the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0161] like Figure 6 FIG. 1 is a schematic diagram of a page turning device provided by an embodiment of the present disclosure, comprising:
[0162] A first acquisition module 601 is used to acquire a first view corresponding to a current display page of a book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page;
[0163] A first determining module 602 is used to determine, in response to a triggered page turning operation, first area information and second area information in the first view and third area information in a target view matching the page turning direction according to a footer position point corresponding to a page turning direction and a page turning trigger point indicated by the page turning operation; the target view is the second view or the third view;
[0164] A second determination module 603 is configured to determine, using a graphics processor, based on the first view, a first partial view matching the first region information and a second partial view matching the second region information; and determine, based on the target view, a third partial view matching the third region information;
[0165] The rendering module 604 is used to perform splicing rendering on the first partial view, the second partial view and the third partial view to obtain a page turning view that matches the page turning trigger point.
[0166] In a possible implementation manner, the rendering module 604 is further configured to obtain a page turning sliding track matching the page turning operation after the first partial view, the second partial view, and the third partial view are spliced and rendered to obtain a page turning view matching the page turning operation;
[0167] Determine a page turning view corresponding to each track point in the page turning sliding track except the page turning trigger point;
[0168] Based on the page turning views respectively corresponding to the respective track points in the page turning sliding track, a simulated page turning animation matching the page turning operation is generated.
[0169] In a possible implementation manner, the first determining module 602, when determining the first area information and the second area information in the first view and the third area information in the target view matching the page turning direction according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation, is used to determine the area boundary curve information between the first area and the second area according to the position information of the page turning trigger point and the position information of the footer position point;
[0170] Determining the first area information according to the area boundary curve information;
[0171] determining the second area information according to the position information of the page turning trigger point and the first area information;
[0172] The third area information is determined according to the first area information, the second area information and the page size information of the current display page.
[0173] In a possible implementation manner, the first determining module 602, when determining the target view matching the page turning direction, is configured to establish a page coordinate system with any page vertex of the current display page as the origin, the width direction of the current display page as the horizontal axis direction, and the height direction of the current display page as the vertical axis direction;
[0174] In the page coordinate system, determine a first horizontal coordinate value of any point on the perpendicular bisector of the current displayed page and a second horizontal coordinate value of the page turning trigger point;
[0175] When the first horizontal coordinate value is less than the second horizontal coordinate value, determining that the target view is the third view;
[0176] When the first horizontal coordinate value is not less than the second horizontal coordinate value, the target view is determined to be the second view.
[0177] In a possible implementation, the device further includes:
[0178] The second acquisition module 605 is used to acquire device attribute information corresponding to the terminal device in response to the operation of starting the book reading application before acquiring the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page; the book reading application is installed in the terminal device;
[0179] The first acquisition module 601, when acquiring the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page, is used to determine the current display page of the book if the device attribute information meets a preset condition, and acquire the first view corresponding to the current display page of the book, the second view corresponding to the previous page of the current display page, and the third view corresponding to the next page of the current display page.
[0180] In a possible implementation manner, when determining that the device attribute information satisfies a preset condition, the first acquisition module 601 is configured to determine that the device attribute information satisfies the preset condition if a device frame rate in the device attribute information is greater than a preset frame rate threshold; or
[0181] When the device frame rate in the device attribute information is equal to a preset frame rate threshold and the device performance score is not less than a preset score threshold, it is determined that the device attribute information meets the preset conditions; wherein the device performance score is determined after a performance test of the terminal device is performed using a target scoring platform.
[0182] In a possible implementation, the first acquisition module 601, when determining that the device attribute information satisfies the preset conditions, is used to determine that the device attribute information satisfies the preset conditions when parameter information in the device attribute information matches sample parameters of any sample device; wherein the parameter information includes operating system parameters and / or device parameters, and the sample device is a device that, after generating simulated page turning animations corresponding to multiple page turning operations, determines that an average frame rate of multiple simulated page turning animations is greater than a test frame rate corresponding to the sample device.
[0183] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0184] Based on the same technical concept, the embodiment of the present application also provides a computer device. Figure 7 FIG. 1 is a schematic diagram of a computer device provided in an embodiment of the present application, including:
[0185] Processor 71 , memory 72 and bus 73 . The memory 72 stores machine-readable instructions executable by the processor 71, and the processor 71 is used to execute the machine-readable instructions stored in the memory 72. When the machine-readable instructions are executed by the processor 71, the processor 71 performs the following steps: S101: obtaining a first view corresponding to a current display page of the book, a second view corresponding to a previous page of the current display page, and a third view corresponding to a subsequent page of the current display page; S102: in response to a triggered page turning operation, determining first area information and second area information in the first view, and third area information in a target view matching the page turning direction according to a footer position point corresponding to the page turning direction and a page turning trigger point indicated by the page turning operation; the target view is the second view or the third view; S103: using a graphics processor, based on the first view, determining a first partial view matching the first area information and a second partial view matching the second area information; and based on the target view, determining a third partial view matching the third area information; and S104: splicing and rendering the first partial view, the second partial view, and the third partial view to obtain a page turning view matching the page turning trigger point.
[0186] The above-mentioned memory 72 includes a memory 721 and an external memory 722; the memory 721 here is also called an internal memory, which is used to temporarily store the calculation data in the processor 71, as well as the data exchanged with the external memory 722 such as a hard disk. The processor 71 exchanges data with the external memory 722 through the memory 721. When the computer device is running, the processor 71 and the memory 72 communicate through the bus 73, so that the processor 71 executes the execution instructions mentioned in the above method embodiment.
[0187] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the page turning method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0188] The computer program product of the page turning method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the page turning method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0189] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0190] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0191] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0192] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0193] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0194] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0195] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for turning pages. It is characterized in that include: In response to the operation of starting the book reading application, obtaining device attribute information corresponding to the terminal device; The book reading application is installed in the terminal device; In the case that the device attribute information does not meet the preset conditions, the current display page of the book is determined, and in response to the triggered page turning operation, the target display page corresponding to the page turning operation is determined according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation, and the bitmap of the current display page and the bitmap of the target display page are drawn and processed by a central processing unit to obtain a page turning animation corresponding to the page turning operation; If the device attribute information satisfies a preset condition, determining a current display page of the book, and acquiring a first view corresponding to the current display page of the book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page; In response to a triggered page turning operation, determining first region information and second region information in the first view, and third region information in a target view matching the page turning direction, according to a footer position point corresponding to a page turning direction and a page turning trigger point indicated by the page turning operation; The target view is the second view or the third view; After acquiring the first region information, the second region information, and the third region information, directly using a graphics processor, based on the first view, determines a first partial view matching the first region information and a second partial view matching the second region information; and determining, based on the target view, a third partial view matching the third area information; The first partial view, the second partial view and the third partial view are spliced and rendered to obtain a page turning view matching the page turning trigger point, Wherein, determining that the device attribute information meets a preset condition includes: When the parameter information in the device attribute information matches the sample parameters of any sample device, it is determined that the device attribute information meets the preset conditions; wherein the parameter information includes operating system parameters and / or device parameters, and the sample device is a device that, after generating simulated page turning animations corresponding to multiple page turning operations, determines that the average frame rate of multiple simulated page turning animations is greater than the test frame rate corresponding to the sample device.
2. The method according to claim 1, It is characterized in that After the first partial view, the second partial view and the third partial view are stitched and rendered to obtain a page turning view matching the page turning operation, the method further includes: Obtaining a page turning sliding track matching the page turning operation; Determine a page turning view corresponding to each track point in the page turning sliding track except the page turning trigger point; Based on the page turning views respectively corresponding to the respective track points in the page turning sliding track, a simulated page turning animation matching the page turning operation is generated.
3. The method according to claim 1 or 2, It is characterized in that The determining, according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation, the first area information and the second area information in the first view, and the third area information in the target view matching the page turning direction, comprises: Determining area boundary curve information between the first area and the second area according to the position information of the page turning trigger point and the position information of the footer position point; Determining the first area information according to the area boundary curve information; determining the second area information according to the position information of the page turning trigger point and the first area information; The third area information is determined according to the first area information, the second area information and the page size information of the current display page.
4. The method according to claim 1, It is characterized in that Determining the target view matching the page turning direction includes: Establishing a page coordinate system with any vertex of the current display page as the origin, the width direction of the current display page as the horizontal axis direction, and the height direction of the current display page as the vertical axis direction; In the page coordinate system, determine a first horizontal coordinate value of any point on the perpendicular bisector of the current displayed page and a second horizontal coordinate value of the page turning trigger point; When the first horizontal coordinate value is less than the second horizontal coordinate value, determining that the target view is the third view; When the first horizontal coordinate value is not less than the second horizontal coordinate value, the target view is determined to be the second view.
5. The method according to claim 1, It is characterized in that Determining that the device attribute information meets a preset condition further includes: In the device attribute information, the device frame rate is greater than a preset frame rate threshold, and it is determined that the device attribute information meets the preset condition; or, When the device frame rate in the device attribute information is equal to a preset frame rate threshold and the device performance score is not less than a preset score threshold, it is determined that the device attribute information meets the preset conditions; wherein the device performance score is determined after a performance test of the terminal device is performed using a target scoring platform.
6. A page turning device, It is characterized in that include: A second acquisition module, configured to acquire device attribute information corresponding to the terminal device in response to the operation of starting the book reading application; The book reading application is installed in the terminal device; A first processing module is used to determine the current display page of the book when the device attribute information does not meet the preset conditions, and in response to the triggered page turning operation, determine the target display page corresponding to the page turning operation according to the footer position point corresponding to the page turning direction and the page turning trigger point indicated by the page turning operation, and use a central processing unit to draw and process the bitmap of the current display page and the bitmap of the target display page to obtain a page turning animation corresponding to the page turning operation; A first acquisition module, configured to determine the current display page of the book when the device attribute information satisfies a preset condition, and acquire a first view corresponding to the current display page of the book, a second view corresponding to a page before the current display page, and a third view corresponding to a page after the current display page; A first determining module, configured to determine, in response to a triggered page turning operation, first area information and second area information in the first view and third area information in a target view matching the page turning direction according to a footer position point corresponding to a page turning direction and a page turning trigger point indicated by the page turning operation; The target view is the second view or the third view; a second determining module, configured to determine, by directly using a graphics processor and based on the first view, a first partial view matching the first region information and a second partial view matching the second region information after acquiring the first region information, the second region information and the third region information; and determining, based on the target view, a third partial view matching the third area information; a rendering module, configured to render the first partial view, the second partial view, and the third partial view in a spliced manner to obtain a page turning view that matches the page turning trigger point, Wherein, when determining that the device attribute information meets a preset condition, the first acquisition module is used to: When the parameter information in the device attribute information matches the sample parameters of any sample device, it is determined that the device attribute information meets the preset conditions; wherein the parameter information includes operating system parameters and / or device parameters, and the sample device is a device that, after generating simulated page turning animations corresponding to multiple page turning operations, determines that the average frame rate of multiple simulated page turning animations is greater than the test frame rate corresponding to the sample device.
7. A computer device, It is characterized in that include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the page turning method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the page turning method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and apparatus for turning pages in terminal
CN104272246A
Simulation page turning method of electronic book, electronic equipment and computer storage medium
CN112433657A
