Information synchronization method, device, electronic device and storage medium
By adjusting the user's reading and reading progress information in the smart terminal device and synchronizing it, the problem of inconsistent progress of users' reading and listening is solved, ensuring that the starting position of text reading and audio listening is consistent with the user's actual behavior.
Patent Information
- Application Number
- CN201910587134.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-01
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2039-12-11
AI Technical Summary
In smart terminal devices, the user's reading progress and listening progress are inconsistent, resulting in the text reading starting position and the audio listening starting position inconsistent with the user's actual reading behavior.
By obtaining the user's first reading method progress information and the second reading method progress information, if the recording time stamp of the first reading method progress information is greater than the recording time stamp of the second reading method progress information, the second reading method progress information is adjusted according to the first reading method progress information to ensure that the two are synchronized.
The text reading start position and audio listening start position are matched with the user's reading behavior, improving synchronization accuracy.
Smart Images

Figure CN112182198B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information synchronization method, device, electronic device and storage medium. Background Art
[0002] As a part of daily life, reading has always been an important channel for users to obtain external information. Since entering the smart era, the medium of reading has changed from paper manuscripts to electronic manuscripts, which are convenient for users to carry and can help users read in fragmented time.
[0003] If a user reads a book in a smart terminal device, the corresponding smart terminal will record the user's reading progress. With the popularization of book audio, users can not only read the book text, but also listen to the book audio. However, users may only read or listen to the book. When the user needs to listen to the book audio or read the data text again, the text reading start position and the audio listening start position are determined according to the user's reading progress, which results in the text reading start position and the audio listening start position not being consistent with the user's actual reading behavior.
[0004] For example, the user has listened to the audio of the book up to Chapter 5, but has only read the text up to Chapter 2, and the reading progress is recorded as Chapter 2. When the user wants to play the audio of the book again, the smart terminal will play the audio of Chapter 2 according to the reading progress, but because the user has listened to Chapter 5 last time, the user wants to continue playing the audio of Chapter 5, resulting in an inaccurate audio listening start position. Summary of the invention
[0005] The embodiments of the present application provide an information synchronization method, device, electronic device, and storage medium, which can match the text reading start position and the audio listening start position with the user's reading behavior.
[0006] The present application provides an information synchronization method, which is applied to a client and includes:
[0007] Acquire the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book;
[0008] If the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, adjusting the second reading mode progress information according to the first reading mode progress information;
[0009] A reading operation is performed on the target electronic book according to the adjusted second reading mode progress information.
[0010] The adjusting the second reading mode progress information according to the first reading mode progress information includes:
[0011] In the target electronic book, determining a target character corresponding to the first reading mode progress information, and obtaining a target offset of the target character in the target electronic book;
[0012] The second reading mode progress information is adjusted according to the target offset to obtain adjusted second reading mode progress information.
[0013] Wherein, the first reading mode progress information is book reading progress information; the second reading mode progress information is book listening progress information;
[0014] Determining, in the target electronic book, a target character corresponding to the first reading mode progress information, and obtaining a target offset of the target character in the target electronic book includes:
[0015] Extracting the original reading offset in the reading progress information;
[0016] Determining a listening character corresponding to the original reading offset in the target electronic book; the listening character belongs to the target character;
[0017] Acquire the time offset of the listening character in the target electronic book; the time offset belongs to the target offset;
[0018] The adjusting the second reading mode progress information according to the target offset to obtain the adjusted second reading mode progress information includes:
[0019] The original listening offset in the book listening progress information is replaced with the time offset to obtain adjusted book listening progress information; the adjusted book listening progress information includes the time offset.
[0020] Wherein, determining the listening character corresponding to the original reading offset in the target electronic book comprises:
[0021] Extracting the original chapter data identifier in the reading progress information;
[0022] In the target electronic book, the chapter text data indicated by the original chapter data identifier is used as the target chapter data;
[0023] Determine a target page corresponding to the original reading offset according to the target chapter data;
[0024] The listening character is determined in the target page.
[0025] The step of determining the target page corresponding to the original reading offset according to the target chapter data includes:
[0026] Acquire the page size of the terminal device, and typeset the target chapter data according to the page size to obtain a page set;
[0027] In the page set, the page corresponding to the original reading offset is used as the target page.
[0028] Wherein, determining the listening character in the target page includes:
[0029] The character at the first position of the target page is used as the first character of the page;
[0030] If the first character of the page is of the first character type of a sentence, the first character of the page is used as the listening character;
[0031] If the first character of the page does not belong to the first character type of the sentence, the character at the first position of the adjacent sentence in the target chapter data will be used as the listening character; the adjacent sentence is a sentence adjacent to the sentence where the first character of the page is located, and the sentence identifier of the adjacent sentence is greater than the sentence identifier of the sentence where the first character of the page is located.
[0032] Wherein, the target electronic book includes target audio data; the reading operation includes an audio playing operation;
[0033] The performing a reading operation on the target electronic book according to the adjusted second reading mode progress information includes:
[0034] In response to the target user's request to play the target electronic book, extract the target unit audio data from the target audio data with the time offset in the adjusted audio book progress information as the starting point and the end timestamp of the target audio data as the end point;
[0035] The audio playing operation is performed on the target unit audio data.
[0036] Wherein, the first reading mode progress information is the progress information of listening to a book; the second reading mode progress information is the progress information of reading a book;
[0037] Determining, in the target electronic book, a target character corresponding to the first reading mode progress information, and obtaining a target offset of the target character in the target electronic book includes:
[0038] Extracting the original listening offset in the book listening progress information;
[0039] Determining a reading character corresponding to the original listening offset in the target electronic book; the reading character belongs to the target character;
[0040] Acquire the position offset of the reading character in the target electronic book; the position offset belongs to the target offset;
[0041] The adjusting the second reading mode progress information according to the target offset to obtain the adjusted second reading mode progress information includes:
[0042] The original reading offset in the book reading progress information is replaced with the position offset to obtain adjusted book listening progress information; the adjusted book reading progress information includes the time offset.
[0043] The step of determining the reading character corresponding to the original listening offset in the target electronic book comprises:
[0044] In the target electronic book, the sentence corresponding to the original listening offset is used as a progress sentence;
[0045] The first character of the progress statement is used as the reading character.
[0046] The step of replacing the original reading offset in the reading progress information with the position offset to obtain the adjusted listening progress information includes:
[0047] In the target electronic book, obtaining a target chapter data identifier of the chapter data to which the reading character belongs;
[0048] The original reading offset in the reading progress information is replaced with the position offset, and the original chapter data identifier in the reading progress information is replaced with the target chapter data identifier to obtain the adjusted reading progress information; the adjusted reading progress information includes the position offset and the target chapter data identifier.
[0049] Wherein, the reading operation includes a jump display operation;
[0050] The performing a reading operation on the target electronic book according to the adjusted second reading mode progress information includes:
[0051] In response to the target user's reading request for the target electronic book, the page size of the terminal device is acquired, and the chapter text data indicated by the target chapter data identifier in the adjusted reading progress information is typeset according to the page size to obtain a plurality of pages;
[0052] Among the multiple pages, a page corresponding to the position offset in the adjusted reading progress information is used as a jump page;
[0053] The jump display operation is performed on the target electronic book to display the jump page.
[0054] The step of obtaining the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book includes:
[0055] Acquire the cloud reading record of the target user for the target electronic book sent by the backend server; the cloud reading record includes a cloud device identifier and cloud progress information;
[0056] Get the local device ID of the terminal device;
[0057] If the local device identifier is different from the cloud device identifier, determining the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book according to the cloud progress information;
[0058] If the local device identifier is the same as the cloud device identifier, the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book are locally acquired.
[0059] The determining, according to the cloud progress information, of the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book comprises:
[0060] Using the cloud progress information as the first reading mode progress information, and creating null value progress information as the second reading mode progress information;
[0061] A recording timestamp is set for the first reading mode progress information, and a recording timestamp is set for the second reading mode progress information; the recording timestamp set for the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information.
[0062] Among them, it also includes:
[0063] If the recording timestamp of the progress information of the first reading mode is equal to the recording timestamp of the progress information of the second reading mode, displaying a prompt message;
[0064] In response to a selection operation on the prompt message, the second reading mode progress information is adjusted according to the first reading mode progress information, and a reading operation is performed on the target electronic book according to the adjusted second reading mode progress information.
[0065] Another aspect of the present application embodiment provides an information synchronization method, which is applied to a background server, including:
[0066] Acquire multiple original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identifier and progress information of a terminal device where the client is located;
[0067] From the multiple original reading records, select the original reading record with the largest record timestamp as the cloud reading record, use the progress information in the cloud reading record as the cloud progress information, and use the device identifier in the cloud reading record as the cloud device identifier;
[0068] The cloud reading record is sent to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book.
[0069] Another aspect of the present application embodiment provides an information synchronization device, applied to a client, including:
[0070] An acquisition module, used for acquiring the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book;
[0071] an adjustment module, configured to adjust the second reading mode progress information according to the first reading mode progress information if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information;
[0072] The reading operation module is used to perform a reading operation on the target electronic book according to the adjusted progress information of the second reading mode.
[0073] Wherein, the adjustment module includes:
[0074] an acquiring unit, configured to determine, in the target electronic book, a target character corresponding to the first reading mode progress information, and acquire a target offset of the target character in the target electronic book;
[0075] The progress determination unit is used to adjust the second reading mode progress information according to the target offset to obtain adjusted second reading mode progress information.
[0076] Wherein, the first reading mode progress information is book reading progress information; the second reading mode progress information is book listening progress information;
[0077] The acquisition unit comprises:
[0078] A first extraction subunit, used for extracting the original reading offset in the reading progress information;
[0079] A first character determination subunit is used to determine a listening character corresponding to the original reading offset in the target electronic book; the listening character belongs to the target character;
[0080] An offset determination subunit, used for obtaining a time offset of the listening character in the target electronic book; the time offset belongs to the target offset;
[0081] The progress determination unit comprises:
[0082] The first replacing subunit is used to replace the original listening offset in the listening progress information with the time offset to obtain adjusted listening progress information; the adjusted listening progress information includes the time offset.
[0083] Wherein, the first character determination subunit includes:
[0084] A third extraction subunit is used to extract the original chapter data identifier in the reading progress information;
[0085] The third extraction subunit is further used to use the chapter text data indicated by the original chapter data identifier as target chapter data in the target electronic book;
[0086] A page determination subunit, configured to determine a target page corresponding to the original reading offset according to the target chapter data;
[0087] The listening character determination subunit is used to determine the listening character in the target page.
[0088] Wherein, the page determination subunit includes:
[0089] A typesetting subunit, used for acquiring a page size of a terminal device, typeset the target chapter data according to the page size, and obtains a page set;
[0090] The selection subunit is used to select the page corresponding to the original reading offset as the target page in the page set.
[0091] Wherein, the listening character determination subunit includes:
[0092] A first determining subunit is used to use the character located at the first position of the target page as the first character of the page;
[0093] The first determining subunit is further configured to use the first character of the page as the listening character if the first character of the page belongs to the first character type of a sentence;
[0094] The second determination subunit is used for, if the first character of the page does not belong to the first character type of the sentence, using the character at the first position of the adjacent sentence in the target chapter data as the listening character; the adjacent sentence is a sentence adjacent to the sentence where the first character of the page is located, and the sentence identifier of the adjacent sentence is greater than the sentence identifier of the sentence where the first character of the page is located.
[0095] Wherein, the target electronic book includes target audio data; the reading operation includes an audio playing operation;
[0096] The reading operation module includes:
[0097] An audio determination unit, configured to respond to a playback request of the target user for the target electronic book, extract target unit audio data from the target audio data with the time offset in the adjusted audio book progress information as a starting point and an end timestamp of the target audio data as an end point;
[0098] The playing unit is used to perform the audio playing operation on the target unit audio data.
[0099] Wherein, the first reading mode progress information is the progress information of listening to a book; the second reading mode progress information is the progress information of reading a book;
[0100] The acquisition unit comprises:
[0101] A second extraction subunit is used to extract the original listening offset in the book listening progress information;
[0102] A second character determination subunit is used to determine a reading character corresponding to the original listening offset in the target electronic book; the reading character belongs to the target character;
[0103] The second extraction subunit is further used to obtain the position offset of the reading character in the target electronic book; the position offset belongs to the target offset;
[0104] The progress determination unit comprises:
[0105] The second replacement subunit is used to replace the original reading offset in the reading progress information with the position offset to obtain adjusted listening progress information; the adjusted reading progress information includes the time offset.
[0106] Wherein, the second character determination subunit includes:
[0107] A search subunit, used for taking the sentence corresponding to the original listening offset as the progress sentence in the target electronic book;
[0108] The book reading character determination subunit is used to use the first character of the progress sentence as the book reading character.
[0109] Wherein, the second replacement subunit includes:
[0110] An acquisition subunit, used for acquiring a target chapter data identifier of the chapter data to which the reading character belongs in the target electronic book;
[0111] The third replacement subunit is used to replace the original reading offset in the reading progress information with the position offset, and replace the original chapter data identifier in the reading progress information with the target chapter data identifier to obtain the adjusted reading progress information; the adjusted reading progress information includes the position offset and the target chapter data identifier.
[0112] Wherein, the reading operation includes a jump display operation;
[0113] The reading operation module includes:
[0114] a page determination unit, configured to respond to a reading request of the target user for the target electronic book, obtain a page size of a terminal device, and typeset the chapter text data indicated by the target chapter data identifier in the adjusted reading progress information according to the page size to obtain a plurality of pages;
[0115] The page determination unit is further configured to use, among the multiple pages, a page corresponding to the position offset in the adjusted reading progress information as a jump page;
[0116] The jump unit is used to perform the jump display operation on the target electronic book to display the jump page.
[0117] Wherein, the acquisition module includes:
[0118] A receiving unit, configured to obtain a cloud reading record of the target user for the target electronic book sent by a backend server; the cloud reading record includes a cloud device identifier and cloud progress information;
[0119] The receiving unit is further used to obtain a local device identifier of the terminal device;
[0120] A first determining unit, configured to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book according to the cloud progress information if the local device identifier is different from the cloud device identifier;
[0121] The second determining unit is configured to locally obtain the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book if the local device identifier is the same as the cloud device identifier.
[0122] Wherein, the first determining unit includes:
[0123] A first setting subunit, configured to use the cloud progress information as the first reading mode progress information, and create null value progress information as the second reading mode progress information;
[0124] The second setting subunit is used to set a recording timestamp for the first reading mode progress information and a recording timestamp for the second reading mode progress information; the recording timestamp set for the first reading mode progress information is greater than the recording timestamp for the second reading mode progress information.
[0125] Among them, it also includes:
[0126] A display module, configured to display a prompt message if the recording timestamp of the progress information in the first reading mode is equal to the recording timestamp of the progress information in the second reading mode;
[0127] The display module is further configured to respond to a selection operation on the prompt message, adjust the second reading mode progress information according to the first reading mode progress information, and perform a reading operation on the target electronic book according to the adjusted second reading mode progress information.
[0128] Another aspect of the present application embodiment provides an information synchronization device, which is applied to a background server, including:
[0129] A receiving module, used for acquiring a plurality of original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identification and progress information of a terminal device where the client is located;
[0130] A selection module, configured to select an original reading record having a maximum record timestamp from the plurality of original reading records as the cloud reading record, and use the progress information in the cloud reading record as the cloud progress information, and use the device identifier in the cloud reading record as the cloud device identifier;
[0131] A sending module is used to send the cloud reading record to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book.
[0132] Another aspect of the present application embodiment provides an electronic device, including: a processor and a memory;
[0133] The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute a method as in one aspect of an embodiment of the present application.
[0134] Another aspect of the present application embodiment provides an electronic device, including: a processor and a memory;
[0135] The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute a method as in another aspect of an embodiment of the present application.
[0136] On the other hand, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the method in one aspect of the embodiment of the present application is executed.
[0137] Another aspect of an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method in another aspect of the embodiment of the present application is executed.
[0138] The embodiment of the present application obtains the first reading mode progress information and the second reading mode progress information of the target user on the target electronic book. If the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, the second reading mode progress information is adjusted based on the first reading mode progress information, and the reading operation is performed on the target electronic book based on the adjusted second reading mode progress information. As can be seen from the above, by adjusting the other progress information based on the progress information with the latest recording timestamp, the two progress information can be synchronized. No matter whether the text reading start position or the audio listening start position is to be determined subsequently, it is essentially determined based on the latest progress information, avoiding the inconsistency between one of the progress information and the user's actual reading behavior due to the user only reading or only listening to the book, and can improve the accuracy of the text reading start position or the audio listening start position, so that the text reading start position and the audio listening start position match the user's reading behavior. BRIEF DESCRIPTION OF THE DRAWINGS
[0139] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0140] Figure 1 This is a system architecture diagram of information synchronization provided by an embodiment of the present application;
[0141] Figure 2a This is a schematic diagram of an information synchronization scenario provided by an embodiment of the present application;
[0142] Figure 2b is a schematic diagram of another information synchronization scenario provided by an embodiment of the present application;
[0143] Figure 3 It is a flowchart of an information synchronization method provided in an embodiment of the present application;
[0144] Figure 4 It is a schematic diagram of a process for determining progress information provided by an embodiment of the present application;
[0145] Figure 5 is a schematic diagram of determining a reading offset provided by an embodiment of the present application;
[0146] Figure 6 It is a flowchart of another information synchronization method provided in an embodiment of the present application;
[0147] Figure 7 It is a flowchart of another information synchronization method provided in an embodiment of the present application;
[0148] Figure 8 It is a flowchart of another information synchronization method provided in an embodiment of the present application;
[0149] Fig. 9 is a structural diagram of an information synchronization device provided in an embodiment of the present application;
[0150] Fig.10 is a structural diagram of another information synchronization device provided in an embodiment of the present application;
[0151] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0152] Fig.12 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0153] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0154] See also Figure 1 , is a system architecture diagram of information synchronization provided by an embodiment of the present application. The present application involves a backend server 10d and a user terminal cluster, and the user terminal cluster may include: user terminal 10a, user terminal 10b, ..., user terminal 10c, etc.
[0155] When a user reads and / or listens to a book in a book reading client in a user terminal, the book reading client generates a first reading mode progress information and / or a second reading mode progress information. The book reading client reports the first reading mode progress information and / or the second reading mode progress information to the backend server 10d. When the user wakes up the book again in the book reading client, the book reading client sends a request to the backend server 10d. The backend server 10d detects the generation timestamp of the first reading mode progress information and the generation timestamp of the second reading mode progress information based on the request. If the generation timestamp of the first reading mode progress information is greater than the generation timestamp of the second reading mode progress information, the backend server 10d adjusts the second reading mode progress information according to the first reading mode progress information. The backend server 10d sends the first reading mode progress information and the adjusted second reading mode progress information to the book reading client, and the book reading client determines the jump page and the audio listening start position according to the first reading mode progress information and the adjusted second reading mode progress information.
[0156] If the user needs to read a book later, the book reading client can scroll to the jump page; if the user needs to listen to a book, the book reading client can start playing the book audio from the audio listening start position.
[0157] Of course, the progress information adjustment behavior of the backend server 10d can also be completed by the book reading client. Figure 2a-2b A specific description is given by taking how a book reading client adjusts progress information and how to perform a reading operation according to the adjusted progress information as an example.
[0158] in, Figure 1The user terminal 10a, user terminal 10b, ..., user terminal 10c, etc. shown in the figure may include a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), a wearable device (such as a smart watch, a smart bracelet, etc.), etc.
[0159] See also Figure 2a , is a schematic diagram of an information synchronization scenario provided by an embodiment of the present application. Figure 2a As shown on page 20a in the figure, the user is currently reading the second chapter of the book "Lakeside" (the book audio is not currently playing), and the current timestamp is 2019 / 1 / 20 / 13:00. If the user closes page 20a at this time, the book reading client generates reading progress information 20b: 2019 / 1 / 20 / 13:00 Lakeside / Chapter 2 / 50, where "2019 / 1 / 20 / 13:00" in the reading progress information 20b indicates the timestamp when the reading progress information is generated; "Lakeside / Chapter 2 / 50" in the reading progress information 20b indicates the user's reading progress, that is, the user has read the 50th character of the second chapter of the book "Lakeside" this time, and 50 is the reading offset.
[0160] The book reading client then obtains the user's listening progress information 20c about the book "Lakeside". From the listening progress information 20c, it can be known that the timestamp of the user's last stop playing the audio of the book "Lakeside" is: 2019 / 1 / 5 / 10:00, and the audio of the entire book "Lakeside" has been played to the 4th second, and 4 is the listening offset.
[0161] Since the timestamp of the reading progress information 20b is greater than the timestamp of the listening progress information 20c, the book reading client adjusts the listening progress information 20c based on the reading progress information 20b to obtain the adjusted listening progress information 20d.
[0162] The specific process of adjusting the listening progress information 20c according to the reading progress information 20b is as follows: the book reading client typesets the text of the second chapter of the book "Lakeside" according to the screen size of the user terminal, obtains multiple pages, and determines the page where the 50th character is located as the target page. The book reading client extracts the character at the first position of the target page. If the character is the first character of a sentence, the time offset of the character in the audio of the book "Lakeside" is determined (for example, the time offset of the character in the book "Lakeside" is 300), and the time offset 300 is replaced by the listening offset 4 in the listening progress information 20c, and the timestamp "2019 / 1 / 5 / 10:00" in the listening progress information 20c is replaced by the timestamp "2019 / 1 / 20 / 13:00" in the reading progress information 20b, and the adjusted listening progress information 20d can be obtained: 2019 / 1 / 20 / 13:00 Lakeside / 300.
[0163] If the character at the first position of the target page is not the first character of a sentence, the book reading client determines the first character of the sentence adjacent to the sentence where the character is located, and then determines the time offset of the first character in the audio of the book "Lakeside" (for example, the time offset corresponding to the first character is 300). Similarly, the book reading client replaces the listening offset 4 in the listening progress information 20c with the time offset 300, and replaces the timestamp "2019 / 1 / 5 / 10:00" in the listening progress information 20c with the timestamp "2019 / 1 / 20 / 13:00" in the reading progress information 20b, and obtains the adjusted listening progress information 20d: 2019 / 1 / 20 / 13:00 Lakeside / 300.
[0164] As shown in page 20e, when the user opens the book again, the jump page 20f is determined to be the page where the 50th character of the second chapter of the book "Lakeside" is located according to the reading progress information 20b, and the jump page 20f is displayed on the screen.
[0165] If the user clicks the "Listen" button in page 20f, the book reading client starts playing from the 300th second of the audio of the book "Lakeside" according to the adjusted time offset 300 in the listening progress information 20d, as shown in page 20g, starting from "The Namiki couple's room is arranged on the second floor" in page 20g.
[0166] See also Figure 2b , is a schematic diagram of another information synchronization scenario provided by an embodiment of the present application. Figure 2bAs shown on page 30a in the figure, the user is currently playing the 308th second of the audio of the book "Lakeside" (not currently reading the book), and the current timestamp is 2019 / 1 / 25 / 10:00. If the user stops playing the above audio at this time, the book reading client generates the listening progress information 30c: 2019 / 1 / 25 / 10:00 Lakeside / 308, where "2019 / 1 / 25 / 10:00" in the listening progress information 30c indicates the timestamp of generating the listening progress information; "Lakeside / 308" in the listening progress information 30c indicates the user's listening progress, that is, the user is listening to the 308th second of the audio of the book "Lakeside" this time, and 308 is the listening offset.
[0167] The book reading client then obtains the user's reading progress information 30b about the book "Lakeside". From the reading progress information 30b, it can be known that the timestamp of the user's last reading of the book "Lakeside" is: 2019 / 1 / 10 / 13:00, and when closing the reading page, the user has read the 10th character of the first chapter, and 10 is the reading offset.
[0168] Since the timestamp of the listening progress information 30c is greater than the timestamp of the reading progress information 30b, the book reading client adjusts the reading progress information 30b based on the listening progress information 30c to obtain the adjusted reading progress information 30d.
[0169] The specific process of adjusting the reading progress information 30b according to the listening progress information 30c is as follows: the book reading client determines the chapter identifier of the chapter data of the 308th second of the audio of the book "Lakeside" (for example, the chapter identifier corresponding to the listening offset "308" is: Chapter 2). The book reading client replaces the chapter identifier "Chapter 1" in the reading progress information 30b with "Chapter 2".
[0170] The book reading client determines the character corresponding to the 308th second of the audio of the book "Lakeside", and obtains the position offset of the first character of the sentence where the character is located in the corresponding chapter data (for example, the position offset is 75). The book reading client replaces the reading offset 10 in the reading progress information 30b with the position offset 75, and replaces the timestamp "2019 / 1 / 10 / 13:00" in the reading progress information 30b with the timestamp "2019 / 1 / 25 / 10:00" in the listening progress information 30c, that is, the adjusted reading progress information 30d can be obtained: 2019 / 1 / 25 / 10:00 Lakeside / Chapter 2 / 75.
[0171] As shown in page 30e, when the user opens the book again, the book reading client typesets the chapter data of the second chapter of the book "Lakeside" according to the adjusted reading progress information 30d, determines multiple pages, selects the page where the 75th character is located from the multiple pages as the jump page, and displays the jump page 30f.
[0172] When the user clicks the "Listen" button in page 30f, the book reading client starts playing from the 308th second of the audio of the book "Lakeside" according to the time offset 308 in the listening progress information 30c, as shown in page 30g, starting from "Is our whole family sleeping here?" in page 30g.
[0173] Wherein, obtaining the first reading mode progress information and the second reading mode progress information (as described above) Figure 2a Reading progress information 20b and listening progress information 20c in the embodiment; Figure 2b In the embodiment, the reading progress information 30b, the listening progress information 30c), the jump page is determined (as described above Figure 2a The corresponding page 20f in the embodiment, Figure 2b The specific process of the page 30f) in the corresponding embodiment can be referred to as follows Figure 3-Figure 8 The corresponding embodiments.
[0174] The main application scenario of the present application is the synchronization between two progress information on the same electronic book (for example, reading progress information or listening progress information). When the user needs to read the electronic book again or listen to the audio of the electronic book again, the two progress information can be synchronized in real time, and then the reading start position and the audio playback start position can be determined according to the synchronized progress information; after the user closes the electronic book, the client can automatically synchronize the two progress information, and subsequently when the target user needs to open the target electronic book again, the reading start position and the audio playback start position can be directly determined according to the synchronized progress information.
[0175] See also Figure 3 , is a flow chart of an information synchronization method provided in an embodiment of the present application, and the information synchronization method can be applied to a client, such as Figure 3 As shown, the information synchronization method may include:
[0176] Step S101: obtaining first reading mode progress information and second reading mode progress information of a target user for a target electronic book.
[0177] Specifically, the client (as mentioned above Figure 2a , Figure 2b The book reading client in the corresponding embodiment) obtains the target user's electronic book (such as the above Figure 2a , Figure 2b The progress information of the first reading mode and the second reading mode (such as the reading progress information 20b and the audiobook progress information 20c in the above Figure 2a embodiment) on the target e - book (the book "Lakeside" in Figure 2b the above - mentioned embodiment, the reading progress information 30b and the audiobook progress information 30c).
[0178] The target e - book may include target text data and corresponding target audio data. The target text data may be text data about a book or text data about a public account, etc. The target text data is composed of multiple statements, and each statement carries a time tag, which is used to identify the playback time information of the first character of the statement in the target audio data.
[0179] For example, the target text data contains the following 2 sentences:
[0180] [00:01:00] Chapter One
[0181] [00:05:94] Turn off the light and tidy up the room
[0182] From the target text data, it can be known that when playing the target audio data, the playback timestamp of the first character "第" in the first sentence "Chapter One" starts at 00:01:00; and the playback time period of the first sentence "Chapter One" is: [00:01:00, 00:05:94). The playback timestamp of the first character "关" in the second sentence "Turn off the light and tidy up the room" is 00:05:94; and the playback time period of the second sentence "Turn off the light and tidy up the room" is: [00:05:94, 00:09:48], where 00:09:48 is the end timestamp of the target audio data.
[0183] The progress information of the first reading mode is the progress information of the target user's most recent reading of the target e - book in the first reading mode; correspondingly, the progress information of the second reading mode is the progress information of the user's most recent reading of the target e - book in the second reading mode. When the user reads the target e - book in the first reading mode / second reading mode and the reading progress of the target user changes, the client periodically generates the progress information belonging to the first reading mode / second reading mode; or when the target user stops reading the target e - book in the first reading mode / second reading mode, the client generates the progress information belonging to the first reading mode / second reading mode.
[0184] The first reading mode can be the reading - by - book mode, and the second reading mode can be the audiobook mode. Then the progress information of the first reading mode can be the reading progress information, and the progress information of the second reading mode can be the audiobook progress information;
[0185] On the contrary, the first reading mode may be an audio-reading mode, and the second reading mode may be a reading mode. Then, the first reading mode progress information may be audio-reading progress information, and the second reading mode progress information may be reading progress information.
[0186] Step S102: if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, adjusting the second reading mode progress information according to the first reading mode progress information.
[0187] Specifically, the client obtains the recording timestamp of the progress information of the first reading mode, and obtains the recording timestamp of the progress information of the second reading mode.
[0188] If the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, the second reading mode progress information is adjusted based on the first reading mode progress information so that the first reading mode progress information and the adjusted second reading mode progress information have the same reading progress.
[0189] The process of adjusting the progress information of the second reading mode may be: in the target electronic book, determining the target character corresponding to the offset in the progress information of the first reading mode, and obtaining the offset of the target character in the target electronic book related to the second reading mode (called the target offset).
[0190] The target character carries character identification information, which includes a chapter identifier and an offset. The chapter identifier in the character identification information refers to the chapter identifier of the chapter text data to which the character belongs. The offset in the character identification information refers to the character number of the chapter text data to which the character belongs. The character carrying the character identification information is unique and exclusive in the entire target text data.
[0191] If the second reading mode is reading by reading a book, then the offset associated with the second reading mode refers to the offset of the target character in the target text data with respect to the position; if the second reading mode is reading by listening to a book, then the offset associated with the second reading mode refers to the offset of the target character in the target audio data with respect to the time. The client replaces the offset in the progress information of the second reading mode with the target offset to obtain the adjusted progress information of the second reading mode.
[0192] In other words, each character in the target electronic book has a position offset associated with the target text data and a time offset associated with the target audio data, or an offset associated with the first reading mode and an offset associated with the second reading mode.
[0193] After completing the progress synchronization between the first reading mode progress information and the second reading mode progress information, the client can obtain the current timestamp and modify the recording timestamp of the first reading mode progress information and the adjusted recording timestamp of the second reading mode progress information to the current timestamp; or the recording timestamp of the adjusted second reading mode progress information can be modified to the recording timestamp of the first reading mode progress information.
[0194] The above process can be understood as: when two progress information need to be synchronized, the progress information with the largest timestamp is used to adjust the other progress information. For example, if the user was listening to a book when he closed the target e-book last time, then when he needs to read the target e-book again, the reading progress information is adjusted with the latest listening progress information; for another example, if the user has been reading a book, when the user needs to listen to the audio of the target e-book, the listening progress information is adjusted with the latest reading progress information.
[0195] Step S103: performing a reading operation on the target electronic book according to the adjusted progress information of the second reading mode.
[0196] Specifically, the client can perform a reading operation on the target electronic book according to the adjusted progress information of the second reading mode and the progress information of the first reading mode. When the reading operation belongs to the first reading mode, the reading operation belonging to the first reading mode can be performed on the target electronic book according to the progress information of the first reading mode; when the reading operation belongs to the second reading mode, the reading operation belonging to the second reading mode can be performed on the target electronic book according to the adjusted progress information of the second reading mode.
[0197] It should be noted that after adjusting the progress information of the second reading mode, as long as the client does not generate new progress information of the first reading mode or new progress information of the second reading mode, the reading operation belonging to the first reading mode is determined by the progress information of the first reading mode; the reading operation belonging to the second reading mode is determined by the adjusted progress information of the second reading mode.
[0198] Optionally, if the recorded timestamp of the acquired progress information of the first reading mode is the same as the timestamp of the progress information of the second reading mode, the client may display a prompt message. This situation may correspond to the target user reading the target electronic book in the first reading mode and in the second reading mode. The recorded timestamp of the first reading progress information and the recorded timestamp of the second reading progress information generated by the client may be the same.
[0199] If the target user selects "yes", in response to the target user's selection operation on the prompt message, the client can adjust the second reading mode progress information according to the first reading mode progress information, and perform a reading operation on the target electronic book according to the adjusted second reading mode progress information and the first reading mode progress information. That is, the adjusted progress information is the second reading mode progress information, and the benchmark progress information is the first reading mode progress information.
[0200] For example, if there is existing reading progress information and listening progress information, the prompt message may be: "Overwrite reading progress information?" If the user selects "Yes", the listening progress information may be used as the first reading mode progress information, and the reading progress information may be used as the second reading mode progress information, and then the second reading mode progress information (i.e., reading progress information) may be adjusted according to the first reading mode progress information (i.e., listening progress information).
[0201] See also Figure 4 , is a schematic diagram of a process for determining progress information provided by an embodiment of the present application, wherein determining progress information includes the following steps S201 to S204, and steps S201 to S204 are the above Figure 3 Specific implementation of step S101 in the corresponding embodiment:
[0202] Step S201, obtaining the cloud reading record of the target user for the target electronic book sent by the backend server; the cloud reading record includes a cloud device identifier and cloud progress information.
[0203] Specifically, when the client receives a reading request for a target electronic book from a target user, it receives a reading record of the target user on the target electronic book (called a cloud reading record) sent by a background server; wherein the cloud reading record includes a cloud device identifier and cloud progress information, and the cloud reading record is the original reading record with the largest record timestamp among all original reading records.
[0204] Step S202: Obtain the local device identifier of the client.
[0205] Specifically, the client obtains the device identifier of the terminal device where the client is located (referred to as the local device identifier).
[0206] Step S203: if the local device identifier is different from the cloud device identifier, determining the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book according to the cloud progress information.
[0207] Specifically, if the local device identifier is different from the cloud device identifier, it indicates that the client has changed devices. The client uses the cloud progress information obtained from the cloud reading records as the progress information of the first reading mode, and creates null progress information as the progress information of the second reading mode. The null progress information includes the e-book identifier of the target e-book.
[0208] The client sets recording timestamps for the progress information of the first reading mode and the progress information of the second reading mode respectively, and the recording timestamp of the progress information of the first reading mode is greater than the recording timestamp of the progress information of the second reading mode.
[0209] For example, if the cloud progress information is: [Journey to the West / 100], that is, the target e-book is: Journey to the West, then the client can create null progress information: [Journey to the West / _ / _]. The second position in the above null progress information represents the chapter identifier, and the third position in the null progress information represents the reading offset. The client can use the cloud progress information "[Journey to the West / 100]" as the progress information of the first reading mode, and use the null progress information "[Journey to the West / _ / _]" as the progress information of the second reading mode, and the recording timestamp of the progress information of the first reading mode is greater than the recording timestamp of the progress information of the second reading mode.
[0210] Among them, the reading offset refers to the offset of the current reading character in the corresponding chapter data. This offset can be the number of the character that the current reading character is in the chapter data, or it can also be the percentage of the position occupied by the current reading character in the chapter it belongs to.
[0211] For example, please refer to Figure 5 , which is a schematic diagram for determining the reading offset provided by an embodiment of the present application. As Figure 5 shown, the chapter data is: "Beijing is the center of China". The above chapter data contains 8 characters. The reading offset of the first character "北" can be 1 (the reading offset can also be 12.5%); the reading offset of the second character "京" can be 2 (the reading offset can also be 25%)... The reading offset of the last character "心" can be 8 (the reading offset can also be 100%).
[0212] For another example, if the cloud progress information is: [Journey to the West / Chapter 2 / 20], the target electronic book is: Journey to the West. The client can create an empty value progress information: [Journey to the West / _], where the second position in the above empty value progress information represents the listening offset. The client can use the cloud progress information "[Journey to the West / Chapter 2 / 20]" as the first reading mode progress information, and the above empty value progress information "[Journey to the West / _]" as the second reading mode progress information, and the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information. The above listening offset refers to the offset (or time information) of the played audio data in the entire target audio data. Generally speaking, the listening offset refers to the number of seconds of the current playback of the target audio data.
[0213] Step S204: if the local device identifier is the same as the cloud device identifier, locally obtaining the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book.
[0214] Specifically, the client obtains the local device identifier. If the local device identifier is the same as the cloud device identifier, it means that the client has not changed the device. Therefore, the client obtains the first reading mode progress information and the second reading mode progress information from the local device.
[0215] From the above, it can be seen that by taking the progress information with the latest recorded timestamp as the benchmark and adjusting the other progress information, the two progress information can be synchronized. Subsequently, whether the starting position of text reading or the starting position of audio listening is to be determined, it is essentially determined based on the latest progress information, avoiding the inconsistency between one of the progress information and the user's actual reading behavior due to the user only reading or listening to the book. The accuracy of the text reading starting position or the audio listening starting position can be improved, so that the text reading starting position and the audio listening starting position match the user's reading behavior.
[0216] See also Figure 6 , is a flow chart of another information synchronization method provided in an embodiment of the present application, the information synchronization method comprises the following steps:
[0217] Step S301: obtaining first reading mode progress information and second reading mode progress information of a target user for a target electronic book.
[0218] The specific process of step S301 can be found in the above Figure 3 The corresponding step S101 and Figure 4 Steps S201 to S204 in the corresponding embodiment.
[0219] Step S302, if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, then extract the original reading offset in the book reading progress information, and determine the listening character corresponding to the original reading offset in the target electronic book; the first reading mode progress information is the book reading progress information, and the second reading mode progress information is the listening progress information; the listening character belongs to the target character;.
[0220] Specifically, the first reading mode progress information is the book reading progress information, and the second reading mode progress information is the book listening progress information. The book reading progress information includes the electronic book identifier, the original chapter identifier, and the original reading offset of the target electronic book, wherein the original reading offset refers to the offset (or position information) of the current reading character of the target user in the chapter text data corresponding to the original chapter identifier. Since the client displays the pages to the user one by one, the current reading character is the first character of the currently displayed page.
[0221] For example, the reading progress information is: [Journey to the West / Chapter 2 / 30], which means that the target user is currently reading the 30th character of Chapter 2 of Journey to the West.
[0222] The listening progress information includes the electronic book identifier of the target electronic book and the original listening offset, wherein the original listening offset refers to the offset (or time information) of the played audio data (or the currently played character) in the entire target audio data.
[0223] For example, the audio book progress information is: Journey to the West / 120, which means that the audio data of Journey to the West is currently being played to the 120th second.
[0224] In the target text data in the target electronic book, the client uses the chapter text data corresponding to the original chapter identifier in the reading progress information as the target chapter data.
[0225] Get the page size of the terminal device where the client is located, and typeset the target chapter data according to the page size to obtain a page set containing multiple pages. Each page carries a page progress interval, which includes the start page progress and the end page progress. The offset of the first character in the page in the target chapter data is the start page progress; the offset of the last character in the page in the target chapter data is the end page progress. The client uses the page in the page progress interval to which the original reading offset belongs as the target page.
[0226] For example, the target chapter data contains 30 characters, and the 1st to 10th characters belong to the first page; the 11th to 20th characters belong to the second page; the 21st to 30th characters belong to the third page. It can be known that the page progress interval of the first page is: [1-10]; the page progress interval of the second page is: [11-20]; the page progress interval of the third page is: [21-30]. If the original reading offset is equal to 15, then the second page is the target page.
[0227] The client extracts the first character of the target page as the first character of the page, and the first character of the page carries character identification information. The character identification information includes a chapter identification and an offset. The chapter identification in the character identification information refers to the chapter identification of the chapter text data to which the character belongs. The offset in the character identification information refers to the character number of the chapter text data to which the character belongs. The character carrying the character identification information is unique and exclusive in the entire target text data.
[0228] The client detects whether the first character of the page belongs to the sentence first character type, wherein the first character of any sentence in the target text data belongs to the sentence first character type, and the continuous characters between adjacent commas or periods are called sentences.
[0229] If the first character of the page is a sentence first character type, the client can directly use the first character of the page as the listening character. The listening character is also a character carrying character identification information, that is, the listening character is also unique and exclusive in the target text data.
[0230] If the first character of the page does not belong to the first character type of the sentence, then in the target chapter data, the client will use the sentence adjacent to the sentence where the first character of the page is located as the adjacent sentence, and use the character at the beginning of the adjacent sentence as the listening character. The client will use the determined listening character as the target character.
[0231] Similarly, the listening character also carries character identification information, and the adjacent sentence in the target chapter data can be the sentence before the sentence where the first character of the page is located (that is, the sentence identification of the adjacent sentence is smaller than the sentence identification of the sentence where the first character of the page is located), or it can be the sentence after the sentence where the first character of the page is located (that is, the sentence identification of the adjacent sentence is larger than the sentence identification of the sentence where the first character of the page is located).
[0232] For example, the target chapter data is: "The Forbidden City in Beijing is the imperial palace of the Ming and Qing dynasties in China. It is located at the center of the Beijing Central Axis and is also the essence of ancient Chinese palace architecture", and the first character of the page is "Axis", and the first character of the page carries character identification information: [Chapter 2, 23] (this character identification information indicates that the first character "Axis" of the page is the 23rd character in Chapter 2). Since the first character "Axis" of the above page does not belong to the type of the first character of a sentence, the client can use the first character "North" of the previous sentence of the sentence where the first character "Axis" of the page is located as the listening character, and this listening character "North" carries character identification information: [Chapter 2, 1]; the client can also use the first character "Also" of the next sentence of the sentence where the first character "Axis" of the page is located as the listening character, and this listening character "Also" carries character identification information: [Chapter 2, 27].
[0233] Step S303, obtain the time offset of the listening character in the target e - book; the time offset belongs to the target offset.
[0234] Specifically, after the client determines the listening character, it determines the playback time information (referred to as the time offset) of the listening character in the target audio data of the target e - book. The client uses this time offset as the target offset. As can be seen from the foregoing step S101, each sentence in the target text data of the target e - book carries a time tag, and this time tag is used to identify the playback time information of the first character of this sentence in the target audio data. Since the listening character is also the first character of a certain sentence in the target text data, the client only needs to search for the time tag of the sentence where the listening character is located in the target text data, and use the time information in the found time tag as the time offset of the listening character in the target e - book.
[0235] Step S304, replace the original listening offset in the audiobook progress information with the time offset to obtain the adjusted audiobook progress information; the adjusted audiobook progress information includes the time offset.
[0236] Specifically, the audiobook progress information includes the e - book identifier of the target e - book and the original listening offset. For example, the audiobook progress information is: Journey to the West / 00:05:00, where "Journey to the West" represents the e - book identifier of the target e - book, and "00:05:00" represents the original listening offset. This audiobook progress information indicates that the target user is currently listening to the 5th second of the audio of Journey to the West.
[0237] The client replaces the original listening offset in the above - mentioned audiobook progress information with the time offset of the listening character, and can obtain the adjusted audiobook progress information, and the adjusted audiobook progress information includes the time offset of the listening character.
[0238] Step S305, in response to the target user's request to play the target electronic book, extract the target unit audio data from the target audio data with the time offset in the adjusted audio book progress information as the starting point and the end timestamp of the target audio data as the end point.
[0239] Specifically, the target user initiates a playback request of the target electronic book to the client, that is, the target user wants to play the target audio data in the target electronic book. The client responds to the playback request, obtains the end timestamp of the target audio data, and extracts the audio data (called the target unit audio data) from the target audio data, taking the time offset in the adjusted audio book progress information as the starting point and the end timestamp of the target audio data as the end point.
[0240] Step S306: performing the audio playing operation on the target unit audio data.
[0241] Specifically, an audio playing operation is performed on the target unit audio data, that is, when the client is required to play the target audio data in the target electronic book, the target audio data is played starting from the time offset corresponding to the listening character.
[0242] For example, the book listening progress information is: Journey to the West / 00:05:00. If the time offset of the listening character in the "Journey to the West" audio is: 00:06:42, then the adjusted book listening progress information can be obtained: Journey to the West / 00:06:42.
[0243] When the client needs to play the audio of "Journey to the West", the end timestamp of the audio of "Journey to the West" is obtained as 00:26:17, and the audio data between 00:06:42 and 00:26:17 is used as the target unit audio data. The target unit audio data is played, that is, the audio of "Journey to the West" is played from 00:06:42.
[0244] Optionally, in addition to playing the target audio data of the target electronic book, the target user can also read the target text data of the target electronic book. The target user initiates a reading request of the target electronic book to the client, that is, reads the target text data in the target electronic book. The client responds to the reading request and typesets the chapter text data corresponding to the original chapter identifier in the reading progress information (that is, the target chapter data mentioned above) according to the page size of the terminal device where the client is located, and obtains a page set containing multiple pages. The client determines the page where the original reading offset in the reading progress information is located as the target page (wherein, the specific process of determining the target page can be seen in the above step S301), jumps to and displays the target page.
[0245] In general, after adjusting the listening progress information, when the target audio data needs to be played, the playback start position is determined according to the adjusted listening progress information; when the target text data needs to be read, the display page is determined according to the reading progress information.
[0246] See also Figure 7 , is a flow chart of another information synchronization method provided in an embodiment of the present application, the information synchronization method comprises the following steps:
[0247] Step S401: obtaining first reading mode progress information and second reading mode progress information of a target user for a target electronic book.
[0248] The specific process of step S401 can be found in the above Figure 3 The corresponding step S101 and Figure 4 Steps S201 to S204 in the corresponding embodiment.
[0249] Step S402: if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, extract the original listening offset in the listening progress information, and determine the reading character corresponding to the original listening offset in the target electronic book; the first reading mode progress information is the listening progress information, and the second reading mode progress information is the reading progress information; the reading character belongs to the target character.
[0250] Specifically, the first reading mode progress information is the listening progress information, and the second reading mode progress information is the reading progress information. The listening progress information includes the electronic book identifier of the target electronic book and the original listening offset. The original listening offset refers to the offset (or time information) of the played audio data (or the currently played character) in the entire target audio data. For example, the listening progress information is: Journey to the West / 120, which means that the currently played audio data of Journey to the West is at the 120th second.
[0251] In addition to the time tag contained in each sentence in the target text data, each character has corresponding time information, which is used to represent the playback timestamp of the corresponding character in the target audio data. The client searches for the character corresponding to the original listening offset in the target text data in the target electronic book as the progress character, where the progress character carries character identification information. The character identification information includes a chapter identification and an offset. The chapter identification in the character identification information refers to the chapter identification of the chapter text data to which the character belongs. The offset in the character identification information refers to the character number of the character in the chapter text data to which the character belongs. The character carrying the character identification information is unique and exclusive in the entire target text data.
[0252] The client searches the target text data for the first character of the sentence where the progress character is located as the reading character. Similarly, the reading character also carries character identification information, so the reading character is also unique and exclusive, and the reading character is used as the target character.
[0253] Optionally, in addition to determining the reading character in the above manner, the sentence to which the original listening offset belongs (called the progress sentence) can be found according to the time tag corresponding to each sentence in the target text data, and the first character of the found sentence can be used as the reading character. In this way, the reading character can be determined only if each sentence in the target text data carries a time tag, and the time information corresponding to each character in the target text data is not required.
[0254] Step S403, obtaining the position offset of the reading character in the target electronic book; the position offset belongs to the target offset.
[0255] Specifically, the client obtains the offset of the reading character in the text data of the corresponding chapter in the target text data of the target electronic book as the position offset, and uses the position offset as the target offset.
[0256] Step S404: Replace the original reading offset in the book reading progress information with the position offset to obtain adjusted book listening progress information; the adjusted book reading progress information includes the time offset.
[0257] Specifically, the reading progress information includes the electronic book identifier, original chapter identifier and original reading offset of the target electronic book, wherein the original reading offset refers to the offset (or position information) of the target user's current reading character in the chapter text data corresponding to the original chapter identifier. Since the client displays the information to the user page by page, the current reading character is the first character of the currently displayed page.
[0258] For example, the reading progress information is: [Journey to the West / Chapter 2 / 30], which means that the target user is currently reading the 30th character of Chapter 2 of Journey to the West.
[0259] The client determines the chapter identifier (called the target chapter data identifier) of the chapter text data to which the reading character belongs in the target text data of the target electronic book.
[0260] The client replaces the original chapter identifier in the reading progress information with the above target chapter identifier, and replaces the original reading offset in the reading progress information with the above position offset, to obtain the adjusted reading progress information. It can be known that the adjusted reading progress information includes the above position offset and the target chapter data identifier.
[0261] Step S405, responding to the target user's reading request for the target electronic book, obtaining the page size of the client, and typeset the chapter text data indicated by the target chapter data identifier in the adjusted reading progress information according to the page size to obtain multiple pages.
[0262] Specifically, the target user initiates a reading request for the target electronic book to the client, that is, reads the target text data in the target electronic book. The client responds to the reading request, obtains the page size of the terminal device where the client is located, and typesets the chapter text data indicated by the target chapter data identifier according to the page size, so as to obtain multiple pages.
[0263] Step S406: Among the multiple pages, use the page corresponding to the position offset in the adjusted reading progress information as a jump page, and perform the jump display operation on the target electronic book to display the jump page.
[0264] Specifically, the client determines the page progress interval of each page, and the page progress interval includes the starting page progress and the ending page progress, wherein the offset of the first character in the page in the corresponding chapter text data is the starting page progress; the character offset of the last character in the page in the corresponding chapter text data is the ending page progress.
[0265] The client uses the page in the page progress interval to which the position offset in the adjusted reading progress information belongs as the jump page, and jumps to and displays the jump page.
[0266] For example, the reading progress information is: [Journey to the West / Chapter 2 / 20]. If the offset of the reading character in the "Journey to the West" text data is: 28, and the reading character belongs to Chapter 2, then the adjusted reading progress information can be obtained: [Journey to the West / Chapter 2 / 28].
[0267] When the target user wants to read the text of "Journey to the West", the client typeset the chapter text data corresponding to the target chapter data identifier "Chapter 2" in the adjusted reading progress information, and determines multiple pages. The client then determines the page to which the 28th character belongs among the multiple pages as the jump page, and displays the jump page.
[0268] Optionally, in addition to reading the target text data of the target electronic book, the target user can also listen to the target audio data of the target electronic book. The target user initiates a play request for the target electronic book to the client, that is, plays the target audio data in the target electronic book, and the client responds to the play request. The client extracts the original listening offset from the listening progress information, and in the target audio data, extracts the audio data (referred to as the audio data to be played) with the original listening offset as the starting point and the end timestamp of the target audio data as the end point, and plays the audio data to be played. In other words, the audio continues to be played from the position where the target user last left.
[0269] In general, after adjusting the reading progress information, when the target text data needs to be read, the jump page is determined according to the adjusted reading progress information; when the target audio data needs to be played, the playback start position is determined according to the listening progress information.
[0270] See also Figure 8 , is a flow chart of another information synchronization method provided in an embodiment of the present application. The information synchronization method can be applied to a background server. The information synchronization method includes the following steps:
[0271] Step S501 : acquiring a plurality of original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identification and progress information of a terminal device where the client is located.
[0272] Specifically, when the target user reads the target electronic book in the client, or closes the target electronic book, the client generates progress information.
[0273] The client combines the generated progress information, the device identification of the terminal device where the client is located, and the recording timestamp of the progress information into an original reading record. The client reports the generated multiple original reading records to the corresponding backend server.
[0274] Step S502: Select an original reading record with a maximum record timestamp from the multiple original reading records as the cloud reading record, use the progress information in the cloud reading record as the cloud progress information, and use the device identifier in the cloud reading record as the cloud device identifier.
[0275] Specifically, the backend server selects the original reading record with the largest record timestamp from the received multiple original reading records as the cloud reading record. The backend server uses the progress information in the cloud reading record as the cloud progress information, and uses the device identifier in the cloud reading record as the cloud device identifier.
[0276] Step S503, sending the cloud reading record to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book.
[0277] Specifically, the backend server sends the cloud reading record to the client, and the client uses the cloud progress information in the cloud reading record as the first reading mode progress information, and creates the second reading mode progress information. The specific process of the client determining the first reading mode progress information and determining the second reading mode progress information according to the cloud reading record can be referred to above. Figure 4 This corresponds to step S203 in the embodiment.
[0278] The client performs a reading operation on the target electronic book based on the first reading mode progress information and the second reading mode progress information. The specific process of the client performing the reading operation based on the first reading mode progress information and the second reading mode progress information can be referred to in the above Figure 5 Steps S302 to S306 in the corresponding embodiment, and see the above Figure 4 This corresponds to step S402 to step S406 in the embodiment.
[0279] From the above, it can be seen that by taking the progress information with the latest recorded timestamp as the benchmark and adjusting the other progress information, the two progress information can be synchronized. Subsequently, whether the starting position of text reading or the starting position of audio listening is to be determined, it is essentially determined based on the latest progress information, avoiding the inconsistency between one of the progress information and the user's actual reading behavior due to the user only reading or listening to the book. The accuracy of the text reading starting position or the audio listening starting position can be improved, so that the text reading starting position and the audio listening starting position match the user's reading behavior.
[0280] For further information, see Fig. 9 , is a schematic diagram of the structure of an information synchronization device provided in an embodiment of the present application. Fig. 9 As shown, the information synchronization device 1 can be applied to the above Figure 3-Figure 8 Corresponding to the client in the embodiment, the information synchronization device 1 may include: an acquisition module 11 , an adjustment module 12 , and a reading operation module 13 .
[0281] An acquisition module 11 is used to acquire the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book;
[0282] An adjusting module 12, configured to adjust the second reading mode progress information according to the first reading mode progress information if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information;
[0283] The reading operation module 13 is used to perform a reading operation on the target electronic book according to the adjusted progress information of the second reading mode.
[0284] The specific functional implementation of the acquisition module 11, the adjustment module 12, and the reading operation module 13 can be found in the above Figure 3 Steps S101 to S103 in the corresponding embodiment will not be described in detail here.
[0285] See also Fig. 9 The adjustment module 12 may include: an acquisition unit 121 and a progress determination unit 122 .
[0286] An acquiring unit 121 is used to determine, in the target electronic book, a target character corresponding to the first reading mode progress information, and acquire a target offset of the target character in the target electronic book;
[0287] The progress determining unit 122 is configured to adjust the second reading mode progress information according to the target offset to obtain adjusted second reading mode progress information.
[0288] The specific functional implementation of the acquisition unit 121 and the progress determination unit 122 can be found in the above Figure 3 The step S102 in the corresponding embodiment will not be described in detail here.
[0289] See also Fig. 9 , the first reading mode progress information is the book reading progress information; the second reading mode progress information is the book listening progress information;
[0290] The acquiring unit 121 may include: a first extracting subunit 1211 , a first character determining subunit 1212 , and an offset determining subunit 1213 .
[0291] The first extraction subunit 1211 is used to extract the original reading offset in the reading progress information;
[0292] The first character determination subunit 1212 is used to determine the listening character corresponding to the original reading offset in the target electronic book; the listening character belongs to the target character;
[0293] The offset determination subunit 1213 is used to obtain the time offset of the listening character in the target electronic book; the time offset belongs to the target offset;
[0294] The progress determination unit 122 may include: a first replacement subunit 1221 .
[0295] The first replacing subunit 1221 is used to replace the original listening offset in the listening progress information with the time offset to obtain adjusted listening progress information; the adjusted listening progress information includes the time offset.
[0296] The specific functional implementation of the first extraction subunit 1211, the first character determination subunit 1212, the offset determination subunit 1213, and the first replacement subunit 1221 can be referred to above. Figure 6 Steps S302 to S304 in the corresponding embodiment are not described in detail here.
[0297] See also Fig. 9 , the first character determination subunit 1212 may include: a third extraction subunit 12121, a page determination subunit 12122, and a listening character determination subunit 12123;
[0298] The third extraction subunit 12121 is used to extract the original chapter data identifier in the reading progress information;
[0299] The third extraction subunit 12121 is further configured to use the chapter text data indicated by the original chapter data identifier as target chapter data in the target electronic book;
[0300] A page determination subunit 12122 is used to determine a target page corresponding to the original reading offset according to the target chapter data;
[0301] The listening character determining subunit 12123 is used to determine the listening character in the target page.
[0302] The specific functional implementation of the third extraction subunit 12121, the page determination subunit 12122, and the listening character determination subunit 12123 can be found in the above Figure 6 The step S302 in the corresponding embodiment will not be described in detail here.
[0303] See also Fig. 9 The page determination subunit 12122 may include: a typesetting subunit 121221 and a selection subunit 121222.
[0304] The typesetting subunit 121221 is used to obtain the page size of the terminal device, and typeset the target chapter data according to the page size to obtain a page set;
[0305] The selection subunit 121222 is used to select the page corresponding to the original reading offset as the target page in the page set.
[0306] The specific functional implementation of the layout subunit 121221 and the selection subunit 121222 can be found in the above Figure 6 The step S302 in the corresponding embodiment will not be described in detail here.
[0307] See also Fig. 9 The listening character determination subunit 12123 may include: a first determination subunit 121231 and a second determination subunit 121232.
[0308] The first determining subunit 121231 is used to use the character located at the first position of the target page as the first character of the page;
[0309] The first determining subunit 121231 is further configured to use the first character of the page as the listening character if the first character of the page belongs to the first character type of a sentence;
[0310] The second determination subunit 121232 is used for, if the first character of the page does not belong to the first character type of the sentence, using the character at the first position of the adjacent sentence in the target chapter data as the listening character; the adjacent sentence is a sentence adjacent to the sentence where the first character of the page is located, and the sentence identifier of the adjacent sentence is greater than the sentence identifier of the sentence where the first character of the page is located.
[0311] The specific functional implementation of the first determination subunit 121231 and the second determination subunit 121232 can be referred to above. Figure 6 The step S302 in the corresponding embodiment will not be described in detail here.
[0312] See also Fig. 9 , the target electronic book includes target audio data; the reading operation includes an audio playing operation;
[0313] The reading operation module 13 may include: an audio determination unit 131 and a playback unit 132;
[0314] The audio determination unit 131 is used to respond to the target user's request to play the target electronic book, extract the target unit audio data from the target audio data with the time offset in the adjusted audio book progress information as the starting point and the end timestamp of the target audio data as the end point;
[0315] The playing unit 132 is used to perform the audio playing operation on the target unit audio data.
[0316] The specific functional implementation of the audio determination unit 131 and the playback unit 132 can be found in the above Figure 6 Steps S305 to S306 in the corresponding embodiment will not be described in detail here.
[0317] See also Fig. 9 , the first reading mode progress information is the progress information of listening to a book; the second reading mode progress information is the progress information of reading a book;
[0318] The acquiring unit 121 may include: a second extracting subunit 1214 and a second character determining subunit 1215 .
[0319] The second extraction subunit 1214 is used to extract the original listening offset in the listening progress information;
[0320] The second character determination subunit 1215 is used to determine a reading character corresponding to the original listening offset in the target electronic book; the reading character belongs to the target character;
[0321] The second extraction subunit 1214 is further used to obtain the position offset of the reading character in the target electronic book; the position offset belongs to the target offset;
[0322] The progress determination unit 122 may include: a second replacement subunit 1222 .
[0323] The second replacement subunit 1222 is used to replace the original reading offset in the reading progress information with the position offset to obtain adjusted listening progress information; the adjusted reading progress information includes the time offset.
[0324] The specific functional implementation of the second extraction subunit 1214, the second character determination subunit 1215, and the second replacement subunit 1222 can be referred to above. Figure 7 Steps S402 to S404 in the corresponding embodiment are not described in detail here.
[0325] See also Fig. 9 The second character determination subunit 1215 may include: a search subunit 12151 and a book character determination subunit 12152.
[0326] The search subunit 12151 is used to use the sentence corresponding to the original listening offset as the progress sentence in the target electronic book;
[0327] The reading character determination subunit 12152 is used to use the first character of the progress statement as the reading character.
[0328] The specific functional implementation of the search subunit 12151 and the reading character determination subunit 12152 can be referred to above. Figure 7 The step S402 in the corresponding embodiment will not be described in detail here.
[0329] See also Fig. 9 The second replacement subunit 1222 may include: an acquisition subunit 12221 and a third replacement subunit 12222.
[0330] An acquisition subunit 12221 is used to acquire, in the target electronic book, a target chapter data identifier of the chapter data to which the reading character belongs;
[0331] The third replacement subunit 12222 is used to replace the original reading offset in the reading progress information with the position offset, and replace the original chapter data identifier in the reading progress information with the target chapter data identifier to obtain the adjusted reading progress information; the adjusted reading progress information includes the position offset and the target chapter data identifier.
[0332] The specific functional implementation of the acquisition subunit 12221 and the third replacement subunit 12222 can be found in the above Figure 7 The step S404 in the corresponding embodiment will not be described in detail here.
[0333] See also Fig. 9 ,The reading operation includes a jump display operation;
[0334] The reading operation module 13 may include: a page determination unit 133 and a jump unit 134 .
[0335] The page determination unit 133 is used to respond to the reading request of the target user for the target electronic book, obtain the page size of the terminal device, and typeset the chapter text data indicated by the target chapter data identifier in the adjusted reading progress information according to the page size to obtain multiple pages;
[0336] The page determination unit 133 is further configured to use, among the multiple pages, a page corresponding to the position offset in the adjusted reading progress information as a jump page;
[0337] The jump unit 134 is used to perform the jump display operation on the target electronic book to display the jump page.
[0338] The specific functional implementation of the page determination unit 133 and the jump unit 134 can be found in the above Figure 7 Steps S405 and S406 in the corresponding embodiment will not be described in detail here.
[0339] See also Fig. 9 The acquisition module 11 may include: a receiving unit 111, a first determining unit 112, and a second determining unit 113.
[0340] The receiving unit 111 is used to obtain the cloud reading record of the target user for the target electronic book sent by the backend server; the cloud reading record includes a cloud device identifier and cloud progress information;
[0341] The receiving unit 111 is further configured to obtain a local device identifier of a terminal device;
[0342] A first determining unit 112 is configured to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book according to the cloud progress information if the local device identifier is different from the cloud device identifier;
[0343] The second determining unit 113 is configured to locally obtain the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book if the local device identifier is the same as the cloud device identifier.
[0344] The specific functional implementation of the receiving unit 111, the first determining unit 112, and the second determining unit 113 can be referred to above. Figure 4 Steps S201 to S204 in the corresponding embodiment are not described in detail here.
[0345] See also Fig. 9 The first determining unit 112 may include: a first setting subunit 1121 and a second setting subunit 1122.
[0346] A first setting subunit 1121 is used to use the cloud progress information as the first reading mode progress information, and create null value progress information as the second reading mode progress information;
[0347] The second setting subunit 1122 is used to set a recording timestamp for the first reading mode progress information and a recording timestamp for the second reading mode progress information; the recording timestamp set for the first reading mode progress information is greater than the recording timestamp for the second reading mode progress information.
[0348] The specific functional implementation of the first setting subunit 1121 and the second setting subunit 1122 can be referred to above. Figure 4 The step S203 in the corresponding embodiment will not be described in detail here.
[0349] See also Fig. 9The information synchronization device 1 may include: an acquisition module 11, an adjustment module 12, a reading operation module 13; and may also include: a display module 14;
[0350] A display module 14, configured to display a prompt message if the recording timestamp of the progress information of the first reading mode is equal to the recording timestamp of the progress information of the second reading mode;
[0351] The display module 14 is further configured to respond to a selection operation on the prompt message, adjust the second reading mode progress information according to the first reading mode progress information, and perform a reading operation on the target electronic book according to the adjusted second reading mode progress information.
[0352] The specific function implementation of the display module 14 can be found in the above Figure 3 The step S103 in the corresponding embodiment will not be described in detail here.
[0353] For further information, see Fig.10 , is a schematic diagram of the structure of another information synchronization device provided in an embodiment of the present application. Fig.10 As shown, the information synchronization device 2 can be applied to the above Figure 3-Figure 8 Corresponding to the background server in the embodiment, the information synchronization device 2 may include: a receiving module 21 , a selecting module 22 , and a sending module 23 .
[0354] The receiving module 21 is used to obtain a plurality of original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identification and progress information of a terminal device where the client is located;
[0355] A selection module 22, configured to select an original reading record with a maximum record timestamp from the plurality of original reading records as the cloud reading record, and use the progress information in the cloud reading record as the cloud progress information, and use the device identifier in the cloud reading record as the cloud device identifier;
[0356] The sending module 23 is used to send the cloud reading record to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book.
[0357] The specific functional implementation of the receiving module 21, the selecting module 22, and the sending module 23 can be found in the above Figure 8 Steps S501 to S503 in the corresponding embodiment are not described in detail here.
[0358] From the above, it can be seen that by taking the progress information with the latest recorded timestamp as the benchmark and adjusting the other progress information, the two progress information can be synchronized. Subsequently, whether the starting position of text reading or the starting position of audio listening is to be determined, it is essentially determined based on the latest progress information, avoiding the inconsistency between one of the progress information and the user's actual reading behavior due to the user only reading or listening to the book. The accuracy of the text reading starting position or the audio listening starting position can be improved, so that the text reading starting position and the audio listening starting position match the user's reading behavior.
[0359] For further information, see Fig.11 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3-Figure 8 The terminal device where the client in the corresponding embodiment is located may be an electronic device 1000, such as Fig.11 As shown, the electronic device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006 and a memory 1008. The signal receiver 1016 is used to receive or send data via a cellular interface 1010, a WIFI interface 1012, ..., or an NFC interface 1014. The encoder 1006 encodes the received data into a data format for computer processing. A computer program is stored in the memory 1008, and the processor 1004 is configured to perform the steps in any of the above method embodiments through the computer program. The memory 1008 may include a volatile memory (e.g., a dynamic random access memory DRAM), and may also include a non-volatile memory (e.g., a one-time programmable read-only memory OTPROM). In some instances, the memory 1008 may further include a memory remotely arranged relative to the processor 1004, and these remote memories may be connected to the electronic device 1000 via a network. The user interface 1002 may include: a keyboard 1018 and a display 1020.
[0360] exist Fig.11 In the electronic device 1000 shown, the processor 1004 may be used to call a computer program stored in the memory 1008 to implement:
[0361] Acquire the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book;
[0362] If the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, adjusting the second reading mode progress information according to the first reading mode progress information;
[0363] The target electronic book is read according to the adjusted progress information of the second reading mode. Figures 3 to 8 The description of the information synchronization method in the corresponding embodiment can also be performed as described above. Fig. 9 The description of the information synchronization device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0364] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores a computer program executed by the information synchronization device 1 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figures 3 to 8 The description of the information synchronization method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0365] For further information, see Fig.12 , is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. Figure 3-Figure 8 The backend server in the corresponding embodiment may be an electronic device 1000, such as Fig.12 As shown, the electronic device 2000 may include: a user interface 2002, a processor 2004, an encoder 2006 and a memory 2008. The signal receiver 2016 is used to receive or send data via a cellular interface 2010, a WIFI interface 2012, ..., or an NFC interface 2014. The encoder 2006 encodes the received data into a data format for computer processing. A computer program is stored in the memory 2008, and the processor 2004 is configured to perform the steps in any of the above method embodiments through the computer program. The memory 2008 may include a volatile memory (e.g., a dynamic random access memory DRAM), and may also include a non-volatile memory (e.g., a one-time programmable read-only memory OTPROM). In some instances, the memory 2008 may further include a memory remotely arranged relative to the processor 2004, and these remote memories may be connected to the electronic device 2000 via a network. The user interface 2002 may include: a keyboard 2018 and a display 2020.
[0366] exist Fig.12 In the electronic device 2000 shown, the processor 2004 can be used to call the computer program stored in the memory 2008 to implement:
[0367] Acquire multiple original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identifier and progress information of a terminal device where the client is located;
[0368] From the multiple original reading records, select the original reading record with the largest record timestamp as the cloud reading record, use the progress information in the cloud reading record as the cloud progress information, and use the device identifier in the cloud reading record as the cloud device identifier;
[0369] The cloud reading record is sent to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book.
[0370] It should be understood that the electronic device 2000 described in the embodiment of the present application can execute the above Figures 3 to 8 The description of the information synchronization method in the corresponding embodiment can also be performed as described above. Fig.10 The description of the information synchronization device 2 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0371] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores a computer program executed by the information synchronization device 2 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figures 3 to 8 The description of the information synchronization method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0372] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0373] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. An information synchronization method, applied to the synchronization between two progress information on the same electronic book on a client, characterized in that: include: Acquire the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; The first reading mode progress information is progress information of the target user reading the target electronic book in a first reading mode, and the second reading mode progress information is progress information of the target user reading the target electronic book in a second reading mode, and the first reading mode and the second reading mode are different; If the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, determining a target character corresponding to the first reading mode progress information in the target electronic book, obtaining a target offset of the target character in the target electronic book, and adjusting the second reading mode progress information according to the target offset to obtain adjusted second reading mode progress information; A reading operation is performed on the target electronic book according to the adjusted second reading mode progress information.
2. The method according to claim 1, characterized in that The first reading mode progress information is book reading progress information; the second reading mode progress information is book listening progress information; Determining, in the target electronic book, a target character corresponding to the first reading mode progress information, and obtaining a target offset of the target character in the target electronic book includes: Extracting the original reading offset in the reading progress information; Determining a listening character corresponding to the original reading offset in the target electronic book; the listening character belongs to the target character; Acquire the time offset of the listening character in the target electronic book; the time offset belongs to the target offset; The adjusting the second reading mode progress information according to the target offset to obtain the adjusted second reading mode progress information includes: The original listening offset in the book listening progress information is replaced with the time offset to obtain adjusted book listening progress information; the adjusted book listening progress information includes the time offset.
3. The method according to claim 2, characterized in that The step of determining the listening character corresponding to the original reading offset in the target electronic book comprises: Extracting the original chapter data identifier in the reading progress information; In the target electronic book, the chapter text data indicated by the original chapter data identifier is used as the target chapter data; Determine a target page corresponding to the original reading offset according to the target chapter data; The listening character is determined in the target page.
4. The method according to claim 3, characterized in that The step of determining a target page corresponding to the original reading offset according to the target chapter data includes: Acquire the page size of the terminal device, and typeset the target chapter data according to the page size to obtain a page set; In the page set, the page corresponding to the original reading offset is used as the target page.
5. The method according to claim 3, characterized in that: The step of determining the listening character in the target page includes: The character at the first position of the target page is used as the first character of the page; If the first character of the page is of the first character type of a sentence, the first character of the page is used as the listening character; If the first character of the page does not belong to the first character type of the sentence, the character at the first position of the adjacent sentence in the target chapter data will be used as the listening character; the adjacent sentence is a sentence adjacent to the sentence where the first character of the page is located, and the sentence identifier of the adjacent sentence is greater than the sentence identifier of the sentence where the first character of the page is located.
6. The method according to claim 2, characterized in that The target electronic book includes target audio data; the reading operation includes an audio playing operation; The performing a reading operation on the target electronic book according to the adjusted second reading mode progress information includes: In response to the target user's request to play the target electronic book, extract the target unit audio data from the target audio data with the time offset in the adjusted audio book progress information as the starting point and the end timestamp of the target audio data as the end point; The audio playing operation is performed on the target unit audio data.
7. The method according to claim 1, characterized in that The first reading mode progress information is the progress information of listening to a book; the second reading mode progress information is the progress information of reading a book; Determining, in the target electronic book, a target character corresponding to the first reading mode progress information, and obtaining a target offset of the target character in the target electronic book includes: Extracting the original listening offset in the book listening progress information; Determining a reading character corresponding to the original listening offset in the target electronic book; the reading character belongs to the target character; Acquire the position offset of the reading character in the target electronic book; the position offset belongs to the target offset; The adjusting the second reading mode progress information according to the target offset to obtain the adjusted second reading mode progress information includes: The original reading offset in the reading progress information is replaced with the position offset to obtain adjusted reading progress information; the adjusted reading progress information includes the position offset.
8. The method according to claim 7, characterized in that The step of determining the reading character corresponding to the original listening offset in the target electronic book comprises: In the target electronic book, the sentence corresponding to the original listening offset is used as a progress sentence; The first character of the progress statement is used as the reading character.
9. The method according to claim 7, characterized in that: The step of replacing the original reading offset in the reading progress information with the position offset to obtain the adjusted listening progress information includes: In the target electronic book, obtaining a target chapter data identifier of the chapter data to which the reading character belongs; The original reading offset in the reading progress information is replaced with the position offset, and the original chapter data identifier in the reading progress information is replaced with the target chapter data identifier to obtain the adjusted reading progress information; the adjusted reading progress information includes the position offset and the target chapter data identifier.
10. The method according to claim 7, characterized in that The reading operation includes a jump display operation; The performing a reading operation on the target electronic book according to the adjusted second reading mode progress information includes: In response to the target user's reading request for the target electronic book, the page size of the terminal device is acquired, and the chapter text data indicated by the target chapter data identifier in the adjusted reading progress information is typeset according to the page size to obtain a plurality of pages; Among the multiple pages, a page corresponding to the position offset in the adjusted reading progress information is used as a jump page; The jump display operation is performed on the target electronic book to display the jump page.
11. The method according to claim 1, characterized in that: The step of obtaining the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book comprises: Acquire the cloud reading record of the target user for the target electronic book sent by the backend server; the cloud reading record includes a cloud device identifier and cloud progress information; Get the local device ID of the terminal device; If the local device identifier is different from the cloud device identifier, determining the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book according to the cloud progress information; If the local device identifier is the same as the cloud device identifier, the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book are locally acquired.
12. The method according to claim 11, characterized in that The determining, according to the cloud progress information, the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book comprises: Using the cloud progress information as the first reading mode progress information, and creating null value progress information as the second reading mode progress information; A recording timestamp is set for the first reading mode progress information, and a recording timestamp is set for the second reading mode progress information; the recording timestamp set for the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information.
13. The method according to claim 1, characterized in that Also includes: If the recording timestamp of the progress information of the first reading mode is equal to the recording timestamp of the progress information of the second reading mode, displaying a prompt message; In response to a selection operation on the prompt message, the second reading mode progress information is adjusted according to the first reading mode progress information, and a reading operation is performed on the target electronic book according to the adjusted second reading mode progress information.
14. An information synchronization method, applied to a background server, characterized in that: Synchronize the progress information of two items on the same e-book, including: Acquire multiple original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identifier and progress information of a terminal device where the client is located; From the multiple original reading records, select an original reading record with a maximum record timestamp as a cloud reading record, use progress information in the cloud reading record as cloud progress information, and use a device identifier in the cloud reading record as a cloud device identifier; The cloud reading record is sent to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information is the progress information of the target user reading the target electronic book in the first reading mode, and the second reading mode progress information is the progress information of the target user reading the target electronic book in the second reading mode, and the first reading mode and the second reading mode are different; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book, including: if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, determining a target character corresponding to the first reading mode progress information in the target electronic book, obtaining a target offset of the target character in the target electronic book, adjusting the second reading mode progress information according to the target offset, and obtaining the adjusted second reading mode progress information; and performing a reading operation on the target electronic book according to the adjusted second reading mode progress information.
15. An information synchronization device, used for synchronizing two progress information on the same electronic book on a client, characterized in that: include: An acquisition module, used for acquiring the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; The first reading mode progress information is progress information of the target user reading the target electronic book in a first reading mode, and the second reading mode progress information is progress information of the target user reading the target electronic book in a second reading mode, and the first reading mode and the second reading mode are different; an adjustment module, configured to determine, if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, a target character corresponding to the first reading mode progress information in the target electronic book, obtain a target offset of the target character in the target electronic book, and adjust the second reading mode progress information according to the target offset to obtain adjusted second reading mode progress information; The reading operation module is used to perform a reading operation on the target electronic book according to the adjusted progress information of the second reading mode.
16. An information synchronization device, applied to a background server, characterized in that: Synchronize the progress information of two items on the same e-book, including: A receiving module, used for acquiring a plurality of original reading records of a target user for a target electronic book sent by a client; each original reading record includes a device identification and progress information of a terminal device where the client is located; A selection module, configured to select an original reading record with a maximum record timestamp from the plurality of original reading records as a cloud reading record, and use the progress information in the cloud reading record as the cloud progress information, and use the device identifier in the cloud reading record as the cloud device identifier; The sending module is used to send the cloud reading record to the client; the cloud reading record is used to determine the first reading mode progress information and the second reading mode progress information of the target user for the target electronic book; the first reading mode progress information is the progress information of the target user reading the target electronic book in the first reading mode, and the second reading mode progress information is the progress information of the target user reading the target electronic book in the second reading mode, and the first reading mode and the second reading mode are different; the first reading mode progress information and the second reading mode progress information are used by the client to perform a reading operation on the target electronic book, including: if the recording timestamp of the first reading mode progress information is greater than the recording timestamp of the second reading mode progress information, determining a target character corresponding to the first reading mode progress information in the target electronic book, obtaining a target offset of the target character in the target electronic book, adjusting the second reading mode progress information according to the target offset, and obtaining the adjusted second reading mode progress information; and performing a reading operation on the target electronic book according to the adjusted second reading mode progress information.
17. An electronic device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method according to any one of claims 1 to 14.
18. A computer storage medium, characterized in that: The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 14 is executed.
Citation Information
Patent Citations
Automatically creating a mapping between text data and audio data
CN103703431A
System and method for synchronizing reading progresses of paper-made book and electronic book
CN105306584A
Text and audio mixed display method, device and terminal device and storage medium
CN107657973A