CN113032695B - Method, apparatus, device and storage medium for replacing data source - Google Patents
Method, apparatus, device and storage medium for replacing data source Download PDFInfo
- Publication number
- CN113032695B CN113032695B CN201911360418.2A CN201911360418A CN113032695B CN 113032695 B CN113032695 B CN 113032695B CN 201911360418 A CN201911360418 A CN 201911360418A CN 113032695 B CN113032695 B CN 113032695B
- Authority
- CN
- China
- Prior art keywords
- book
- chapter
- books
- data source
- source
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application provides a method, a device, equipment and a storage medium for replacing a data source, and relates to the technical field of Internet. The method comprises the following steps: displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source; receiving a source changing reading instruction; and after receiving the source-changing reading instruction, displaying text content of the second book under the second data source in a reading interface. According to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the reading interface for displaying the text content, and the text content under the replaced data source is displayed. In contrast to the related art, the user needs to search through the reading website to complete the replacement of the reading website. According to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the text content reading interface, so that the path for replacing the data source is shortened, and the operation efficiency of source replacement reading is improved.
Description
Technical Field
The embodiment of the application relates to the technical field of Internet, in particular to a method, a device, equipment and a storage medium for replacing a data source.
Background
When a user reads the novel, the user can read through the website corresponding to the novel, and when a plurality of reading websites can read the novel, the user can exchange stations to read, namely exchange the reading stations.
In the related art, the station exchange reading includes the steps of: clicking on the reading novel, and displaying a novel detail page; opening a reading interface, wherein the reading interface comprises a reading site searching control; clicking the reading site searching control by a user, displaying a reading site searching result page, wherein a plurality of reading sites are displayed in the reading site searching result page; the user can select one of the reading sites and display a reading interface under the reading site.
In the related art described above, a path for replacing the reading station is long, and the operation efficiency is low.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for replacing a data source, which can be used for improving the operation efficiency of replacing a read data source. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for replacing a data source, the method including:
displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source;
Receiving a source changing reading instruction, wherein the source changing reading instruction is used for requesting to change a data source;
after receiving the source-changing reading instruction, displaying text content of a second book under a second data source in the reading interface, wherein the second book and the first book have an association relationship, and the association relationship refers to different books with the same content or the same attribute and belong to different data sources.
In another aspect, an embodiment of the present application provides a method for replacing a data source, the method including:
receiving a source changing reading request, wherein the source changing reading request is used for requesting to change a data source, and the source changing reading request comprises identification information of a first book under a first data source;
determining a second book under a second data source with an association relation with the first book according to the book information of the first book, wherein the association relation refers to different books with the same content or the same attribute and belong to different data sources;
and sending the book information of the second book.
In yet another aspect, an embodiment of the present application provides an apparatus for replacing a data source, the apparatus including:
the interface display module is used for displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source;
The instruction receiving module is used for receiving a source changing reading instruction, wherein the source changing reading instruction is used for requesting to change a data source;
and the content display module is used for responding to the received source-changing reading instruction and displaying text content of a second book under a second data source in the reading interface, wherein the second book and the first book have an association relationship, and the association relationship refers to different books with the same content or the same attribute and belong to different data sources.
In yet another aspect, an embodiment of the present application provides an apparatus for replacing a data source, the apparatus including:
the system comprises a request receiving module, a source changing reading module and a data source changing module, wherein the request receiving module is used for receiving a source changing reading request, the source changing reading request is used for requesting to change the data source, and the source changing reading request comprises identification information of a first book under a first data source;
the book determining module is used for determining a second book under a second data source with an association relation with the first book according to the book information of the first book, wherein the association relation refers to different books with the same content or the same attribute and belong to different data sources;
and the information sending module is used for sending the book information of the second book.
In yet another aspect, embodiments of the present application provide a computer device including a processor and a memory having at least one instruction, at least one program, code set, or instruction set stored therein, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by the processor to implement a method of replacing a data source as described in the above aspects.
Optionally, the computer device is a terminal or a server.
In yet another aspect, embodiments of the present application provide a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, the at least one instruction, the at least one program, the set of codes, or the set of instructions loaded and executed by a processor to implement a method of replacing a data source as described in the above aspects.
In yet another aspect, embodiments of the present application provide a computer program product for implementing the method of replacing a data source as described in the above aspects when the computer program product is executed by a processor.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
The data source is directly replaced in a reading interface for displaying the text content, and the text content under the replaced data source is displayed. In contrast to the related art, a user needs to search through a reading website to complete a replacement of the reading website (also referred to as a data source). According to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the text content reading interface, so that the path for replacing the data source is shortened, and the operation efficiency of source replacement reading is improved.
Drawings
FIG. 1 is a schematic illustration of an implementation environment provided by one embodiment of the present application;
FIG. 2 is a flow chart of a method for replacing a data source according to one embodiment of the present application;
FIG. 3 is a flow chart of a method for replacing a data source according to another embodiment of the present application;
FIG. 4 illustrates a schematic diagram of a toolbar of the present application;
FIG. 5 is a schematic diagram illustrating a process for replacing a data source according to the present application;
FIG. 6 is a schematic diagram illustrating another process of replacing a data source according to the present application;
FIG. 7 is a flow chart of a method for replacing a data source according to another embodiment of the present application;
FIG. 8 is a flow chart illustrating a method of determining an associated book in accordance with the present application;
FIG. 9 is a block diagram of an apparatus for replacing a data source according to another embodiment of the present application;
FIG. 10 is a block diagram of an apparatus for replacing a data source according to another embodiment of the present application;
FIG. 11 is a block diagram of an apparatus for replacing a data source according to another embodiment of the present application;
FIG. 12 is a block diagram of an apparatus for replacing a data source according to another embodiment of the present application;
fig. 13 is a block diagram of a terminal according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
Referring to fig. 1, a schematic diagram of an implementation environment provided by an embodiment of the present application is shown. The implementation environment may include: a terminal 10 and a server 20.
The terminal 10 may be an electronic reading device such as a cell phone, tablet computer, PDA (Personal Digital Assistant, palmtop), PC (Personal Computer ), electronic reader, etc.
Alternatively, the terminal 10 may have installed therein a target application, which may be an application that enables a user to read a book. For example, the target application may be a browser application, a book reading application, or a news application, which is not limited in the embodiment of the present application.
The server 20 may communicate with the terminal 10 through a wired or wireless network.
The server 20 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and an artificial intelligence platform.
Cloud technology (Cloud technology) refers to a hosting technology that unifies serial resources such as hardware, software, networks and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The cloud technology is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on cloud computing business model application, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud Computing (Cloud Computing) refers to the delivery and usage model of an IT infrastructure, meaning that required resources are obtained in an on-demand, easily scalable manner over a network; generalized cloud computing refers to the delivery and usage patterns of services, meaning that the required services are obtained in an on-demand, easily scalable manner over a network. Such services may be IT, software, internet related, or other services. Cloud Computing is a product of fusion of traditional computer and network technology developments such as Grid Computing (Grid Computing), distributed Computing (Distributed Computing), parallel Computing (Parallel Computing), utility Computing (Utility Computing), network storage (Network Storage Technologies), virtualization (Virtualization), load balancing (Load balancing), and the like.
The technical scheme of the application is described and illustrated by the following examples.
Referring to fig. 2, a flowchart of a method for replacing a data source according to an embodiment of the application is shown. In this embodiment, the method is mainly applied to the terminal in the implementation environment shown in fig. 1 for illustration. The method may comprise the following steps:
step 201, displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source.
When a user wants to read a certain book, a target application program can be run, and the reading interface is displayed. The reading interface is an interface for displaying text content of books. Taking the example that the target application program is a browser, the user can open the browser, search the book in the search column of the browser, and further access the book address of the book, so that the terminal can display the reading interface. The text content of the book may be displayed in the reading interface. The book address of the book refers to an address for acquiring the book, and the book address of the book may be a URL (Uniform Resource Locator ) of the book, where the URL is a concise representation of a location and an access method of a resource available from the internet, and is an address of a standard resource on the internet.
The first book may have multiple sources of data. The first data source refers to one of a plurality of data sources of the first book. The data sources refer to reading websites of books, and one book may have a plurality of reading websites for users to select, and each reading website may include a plurality of books, which are different from each other. Different reading websites can comprise the same books or different books.
It should be noted that, the data source of the book may also be referred to as a reading station of the book, and may also be referred to as a reading source of the book. And may also be referred to by other names in some other embodiments, which embodiments of the application are not limited to.
The book may include cover, content brief, chapter list, text content, etc. Wherein the cover of the book generally refers to the first page of the book, and may include the name of the book, the name of the author, the name of the publisher, etc. The content of the book is simply introduced into the text content of the book, and the main content of the book can be roughly known by reading the content. The chapter list is used for indicating the structure of the book, the book possibly comprises a plurality of chapters, the text content of each chapter is different, the structure of the book can be more clearly understood by the chapter list, and the writing purpose of an author can be further understood by the reader. The text content of the book is the core part of the book. In the embodiment of the application, the book refers to an electronic book (or called an electronic book). Electronic books refer to digitized publications suitable for users to read, as distinguished from conventional publications in which paper is the carrier. Electronic books are digitally recorded in optical, electronic and magnetic media devices and need to be read, copied and transmitted by means of electronic reading devices. In short, electronic books are usually in the form of computer files, which have the main format PDF, EXE, CHM, UMD, PDG, JAR, PDB, TXT, BRM, EPUB, MOBI, etc., and further, can be extended to generally refer to all forms of reading provided to people by using electronic reading devices. Those skilled in the art should not understand the books of the present application in a limiting manner.
Alternatively, the user may report the book address of the book to the server when reading the book.
Step 202, receiving a source changing reading instruction.
The source change reading instruction is used for requesting to change the data source.
Optionally, a source-changing reading control may be displayed in the user interface, and the user may click on the source-changing reading control, thereby triggering a source-changing reading instruction. In addition, the user can trigger the source changing reading instruction in the modes of physical keys, gestures, voice and the like of the terminal.
The user may have multiple reading websites while reading the first book. For example, a user may read a novel, and may include the novel in a plurality of reading websites, so that the user may exchange the novel among the plurality of reading websites, that is, exchange the data source of the first book.
And step 203, in response to receiving the source-changing reading instruction, displaying text content of the second book under the second data source in a reading interface.
After receiving the source changing reading instruction, the terminal switches and displays the text content of the first book under the original first data source as the text content of the second book under the second data source in the reading interface.
Wherein the second book and the first book have an association relationship. The association relationship refers to different books with the same content or the same attribute and belonging to different data sources. The content is the same or the text content of the book is partially the same, for example, for different versions of the same book, the text content may have partial differences; the same attribute means that the books have the same characteristics, such as that two books belong to different parts of the same set of books, two books belong to the same type, two books belong to the same author, two books belong to the same publishing company, and the like.
Optionally, the second book and the first book have an association relationship, which means that the second book and the first book are two versions of the same book under two different data sources. The version of the book refers to the release version of the book, reflecting the number of revisions to the book by the author. The text content is not the same for different versions of the same book. When the book is first disclosed, the first version of the book is the first version of the book; when the author makes a revision to the book and then discloses the book again, the second version of the book is obtained; when the author makes a further revision to the book and then discloses it again, it is a third version … … of the book. For example, the first book is a first version of the a book and the second book is a second version of the a book, wherein the text content of the second book may be more than the text content of the first book.
Optionally, the second book and the first book have an association relationship, which may also mean that the first book and the second book belong to different parts of the same set of books. The same set of books may include multiple books whose text content is not identical but is related to each other. For example, the golgi self-transfer case number includes three books: the children's year is a first book, the people's room is a second book, the university of my is a third book, and the text contents of the three books are related to each other in time sequence. The first book can be children 'in the three books, and the second book can be people' in the three books; the first book may also be "childhood" in the three books, and the second book may be "my university" in the three books; the first book can also be 'in people' in the three books, the second book can be 'my university' in the three books, and the like, and the second book and the first book have an association relationship.
Optionally, the second book and the first book have an association relationship, which may also mean that the first book and the second book belong to the same type of book. The types of books are generally classified according to the subject content of the books and the subject type, and mainly may include literature class, art class, novel class, management class, economic class, and the like. The same type of book may include multiple books. For example, books belonging to the economy class are included in "economy principle", macro economy ", micro economy", western economy ", metering economy", etc., and if the first book is "economy principle", the second book may be any book other than "economy principle" in the economy class book. In the embodiment of the present application, the dividing manner of the book type is not limited, and the book type may be divided into different granularities according to actual situations.
Optionally, the second book and the first book have an association relationship, which may also mean that the first book and the second book belong to the same author. For example, the work contradicted by the composer includes "night", "frosty leaf like february flower", "erosion", "populus gift", "linjie son", etc., and if the first book is "night", the second book may be any book other than "night" in the contradictory work.
Optionally, the second book and the first book have an association relationship, which may also mean that the first book and the second book belong to books published by the same publishing company. The publishing society refers to an organization for performing a publishing activity of performing optimal copyright removal of books, pictures, newspapers and the like, such as people education publishing houses, beijing university publishing houses, chinese agriculture publishing houses and the like. The same publisher may publish different books. For example, the teaching edition of the Western-style diary, the teaching edition of the Chaohuakan, the teaching edition of the simple lover, and the like belong to books published by people publishing houses, if the first book is "the teaching version of the West-tour-recorder", the second book may be any book published by people publishing society except "the teaching version of the West-tour-recorder".
In an exemplary embodiment, the user may set the association relationship in a user-defined manner, the user may set different versions of the same book as the association relationship, may set different portions of the same book as the association relationship, and so on. And then, the terminal switches the data sources according to the association relation set by the user. Of course, in some other examples, the association relationship may be set by default, which is not limited by the embodiment of the present application.
In summary, according to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the reading interface for displaying the text content, and the text content under the replaced data source is displayed. In contrast to the related art, a user needs to search through a reading website to complete a replacement of the reading website (also referred to as a data source). According to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the text content reading interface, so that the path for replacing the data source is shortened, and the operation efficiency of source replacement reading is improved.
Referring to fig. 3, a flowchart of a method for replacing a data source according to another embodiment of the application is shown. In this embodiment, the method is mainly applied to the terminal in the implementation environment shown in fig. 1 for illustration. The method may comprise the following steps:
step 301, displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source.
This step is the same as or similar to the step 201 in the embodiment of fig. 2, and is not repeated here.
Step 302, obtaining at least two candidate data sources corresponding to a first book.
After displaying the reading interface, the terminal may obtain at least two candidate data sources corresponding to the first book. The candidate data sources refer to other data sources except the first data source among the plurality of data sources of the first book.
Optionally, the priority order of the at least two candidate data sources is determined according to an influence factor, where the influence factor includes at least one of the following: the quality of books in the candidate data sources, the display speed of the books in the candidate data sources and the heat of the candidate data sources. In addition, other influencing factors may be included, which are not limited by the embodiments of the present application.
The quality of the books in the candidate data sources is used for representing the degree of errors such as word error, word missing, page missing and the like in the books, and if more errors occur in the books, the quality of the books is poor; otherwise, if errors are fewer, the quality of the books is better. The quality of the books in the candidate data sources is proportional to the priority order of the candidate data sources, and the better the quality of the books, the higher the priority of the candidate data sources corresponding to the books.
Alternatively, the quality of the above book may be represented by a quality score. The quality score may be determined based on the score corresponding to the error level. The error level may include punctuation level, word level, page level, chapter level, and the like. Wherein, punctuation level refers to the occurrence of punctuation symbol errors; word level refers to the occurrence of word errors; page level refers to the occurrence of a missing page; chapter level refers to the occurrence of chapter deletions. The scores corresponding to the different error levels are different, and the scores corresponding to the punctuation level, the word level, the page level and the chapter level are sequentially increased. The corresponding score for each error level is a score indicating that the error deduction for that level occurred once.
Illustratively, it is assumed that the score corresponding to the punctuation level is 1 score, the score corresponding to the word level is 2 score, the score corresponding to the page level is 5 score, and the score corresponding to the chapter level is 10 score. Assuming that the first book in the first candidate data source has punctuation errors 5 times, word errors 3 times, and no page fault and chapter deletion, the quality score of the first book is 100-5*1-3*2-0-0=89; assuming that the second book in the second candidate data source has punctuation errors 3 times, word errors 5 times, page breaks 2 times, and no chapter deletions, the quality score for the second book is 100-3*1-5*2-2*5-0 = 77. Thus, the quality of the first book is better than that of the second book, and the priority of the second candidate data source corresponding to the second book is higher than that of the first candidate data source corresponding to the first book.
The display speed of the books in the candidate data sources is used for representing the access speed of the candidate data sources. The display speed of the books in the candidate data sources is proportional to the priority order of the candidate data sources, and the higher the display speed of the books is, the higher the priority of the candidate data sources corresponding to the books is.
The popularity of the candidate data source is used to characterize the popularity of the candidate data source. The popularity of candidate data sources may be determined based on factors such as the click rate of the user, the reading rate, and comments of the user. The heat of a candidate data source is proportional to the priority order of the candidate data sources, the higher the heat of a candidate data source, the higher the priority of the candidate data source. Alternatively, the heat of the candidate data sources may be embodied using heat values.
Alternatively, when the influencing factors include at least two, the priority order of the candidate data sources may be determined based on a weighted sum of the at least two influencing factors. For example, taking the example of including the above 3 influencing factors at the same time, the priority order of the candidate data sources may be determined according to the following calculation result s, s=w1×s1+w2×s2+w3×s3. The larger s indicates the higher priority. Wherein, the quality score is S1, the display speed is S2, the heat value is S3, firstly, the S1, the S2 and the S3 can be normalized to obtain S1, S2 and S3; w1 represents the weight occupied by the quality score, w2 represents the weight occupied by the display speed, w3 represents the weight occupied by the heat value, and each weight can be preset according to actual requirements.
Step 303, selecting one candidate data source from the at least two candidate data sources as the second data source according to the priority order.
After the priority order of the at least two candidate data sources is obtained, a second data source may be determined based on the priority order.
For example, the candidate data source with the highest priority may be determined as the second data source.
In practical situations, the user can set the terminal according to the needs, and the embodiment of the application is not limited to the situation.
In step 304, in response to detecting the touch signal acting on the reading interface, a toolbar is displayed, wherein the toolbar comprises a source-changing reading control.
The user can perform touch operation on the reading interface, and correspondingly, the terminal can detect a touch signal acting on the reading interface. The touch operation may be a click operation, a slide operation, a long press operation, or the like. The embodiment of the present application is not limited thereto.
After detecting the touch signal, the terminal may display a toolbar. Optionally, the toolbar may be displayed below the reading interface, may be displayed on a side of the reading interface, and may be displayed in the reading interface. The embodiment of the application does not limit the display position of the toolbar.
The toolbar comprises a source changing reading control which is used for a user to change sources for reading. The embodiment of the application does not limit the display form of the source changing reading control.
Illustratively, as shown in FIG. 4, a source change reading control 41 is included in the toolbar 40. Optionally, a home page return control 42, a desktop add control 43, a brief reading control 44, and an exit control 45 may also be included in the toolbar 40. Wherein the homepage return control 42 is used for the user to return to the homepage of the data source; the desktop adding control 43 is used for a user to add a shortcut of the first book on the desktop; the brief reading control 44 is for a user to read a brief content of the first book; the exit control 45 is used for the user to exit reading the first book. In addition, other controls may be displayed in toolbar 40, which is not limited by embodiments of the present application.
In step 305, in response to receiving the touch signal corresponding to the source changing reading control, receiving the source changing reading instruction is confirmed.
In response to receiving the source change reading instruction, book information for the second book is obtained from the second data source, step 306.
After receiving the source-changing reading instruction, the terminal may obtain book information of the second book from the second data source. The book information includes body addresses of the respective chapters. The text content of the chapter can be obtained through the text address of the chapter.
Alternatively, the text address of the chapter may be a URL (Uniform Resource Locator, uniform resource location address) of the chapter text.
Step 307, determining a second chapter corresponding to the first chapter of the first book from the second book according to the chapter mapping relation of the first book and the second book.
The first chapter is a chapter where text content displayed in a reading interface of the first book is located.
The chapter mapping relation between the first book and the second book is used for representing the chapter mapping relation between the first book and the second book. The detailed description of the chapter mapping relationship will refer to the embodiment of fig. 7, and will not be repeated here.
And step 308, displaying the text content of the second chapter in the reading interface according to the text address of the second chapter.
According to the text address of the second chapter, the terminal can acquire the text content of the second chapter, and further, the text content of the second chapter can be displayed in the reading interface.
Illustratively, as shown in FIG. 5, a schematic diagram of a process for replacing a data source is illustratively shown. First, as shown in part (a) of fig. 5, text content of a first book under a first source data source, such as "first chapter north spirits such as inflammation … …", is displayed in the reading interface 50; after the user performs touch operation on the reading interface, a source-changing reading control 41 is displayed; thereafter, the user may click on the source-changing reading control 41, and correspondingly, as shown in part (b) of fig. 5, the terminal receives the source-changing reading instruction and displays the text content of the second chapter in the reading interface 50.
Optionally, a source change result may also be displayed in the reading interface, where the source change result is used to prompt the user to change the data source successfully or successfully.
Optionally, a source change control may also be displayed in the reading interface; wherein the source change control is for changing from the second data source to another data source corresponding to the first book. In one possible real-time approach, the source change control is used for a user to change multiple data sources. In this case, the source change control may comprise one. For example, the user may click on the source change control multiple times, changing one data source per click. In another possible embodiment, the source change control user provides for user change to a target data source. In this case, the source change control may include a plurality of. For example, three source change controls may be included: source change control 1, source change control 2 and source change control 3, the user clicks source change control 1, change to the data source 1; the user clicks the source change control 2 and changes to the data source 2; the user clicks the source change control 3 and changes to the data source 3.
If the obtaining of the text content of the second chapter from the second data source fails, a chapter list of the second book is obtained 309.
In some cases, the terminal may not be able to obtain the text content of the second chapter from the second data source, and the terminal may obtain the chapter list of the second book from the second data source. The chapter list is used for indicating the structure of the book, the book possibly comprises a plurality of chapters, the text content of each chapter is different, the structure of the book can be more clearly understood by the chapter list, and the writing purpose of an author can be further understood by the reader.
Step 310, a chapter list of the second book is displayed.
The terminal may display a chapter list of the second book.
Illustratively, as shown in FIG. 6, a schematic diagram of another process for replacing a data source is illustrated. First, text content of a first book under a first data source, such as "first Chapter Beiling court burning sun such as inflammation … …", is displayed in the reading interface 50; after the user performs touch operation on the reading interface, a source-changing reading control 41 is displayed; after that, the user may click on the source-changing reading control 41, and correspondingly, the terminal receives the source-changing reading instruction and displays a chapter list of the second book.
In summary, according to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the reading interface for displaying the text content, and the text content of the book under the replaced data source or the chapter list of the book is displayed. Compared with the related art, the technical scheme provided by the embodiment of the application has the advantages that the data source is directly replaced in the text content reading interface, the path for replacing the data source is shortened, and the operation efficiency of source replacement reading is improved.
Referring to fig. 7, a flowchart of a method for replacing a data source according to an embodiment of the application is shown. In this embodiment, the method is mainly applied to the server in the implementation environment shown in fig. 1 for illustration. The method may comprise the following steps:
step 701, receiving a source change reading request.
When a user wants to read a certain book, the target application can be run and a reading interface can be displayed. The reading interface can comprise a source-changing reading control, and the user can click on the source-changing reading control, so that the terminal is triggered to send a source-changing reading request to the server. The source change reading request is used for requesting to change the data source.
The source-changing reading request comprises identification information of a first book under a first data source. The identification information of the first book is used for uniquely identifying the first book.
Alternatively, the identification information of the first book may include a book address of the first book.
Step 702, determining a second book under a second data source having an association relationship with the first book according to the identification information of the first book.
After receiving the source-changing reading request, the server can determine a second book under a second data source having an association relationship with the first data according to the identification information of the first book included in the source-changing reading request.
The above-mentioned association relationship refers to different books with the same content or the same attribute and belonging to different data sources. The association relationship refers to different books with the same content or the same attribute and belonging to different data sources. The content is the same or the text content of the book is partially the same, for example, for different versions of the same book, the text content may have partial differences; the same attribute means that the books have the same characteristics, such as that two books belong to different parts of the same set of books, two books belong to the same type, two books belong to the same author, two books belong to the same publishing company, and the like.
For a detailed description of the above association, reference may be made to the content of step 203 in the embodiment of fig. 2, which is not repeated here.
Alternatively, the server may store a plurality of categories of books in advance, each of the books included in the categories being books having the above-described association relationship.
Step 703, sending book information of the second book.
After the second book is determined, the book information of the second book may be sent to the terminal, so that the terminal displays text content of the second book in the reading interface according to the book information of the second book.
The book information of the second book is used to indicate the components of the second book, and the book information of the second book may include a book name, text content, a chapter list, a content profile, and the like of the second book.
In summary, according to the technical solution provided in the embodiments of the present application, after receiving the source-changing reading request sent by the terminal, the server may determine another book having an association relationship with the data according to the identification information of the book included in the request, and send the book information of the another book to the terminal, so that the terminal may display the text content of the another book in the reading interface based on the book information of the another book. Compared with the related art, the method shortens the path for replacing the data source and improves the operation efficiency of source replacement reading.
In an alternative embodiment based on the embodiment of fig. 7, before determining the second book under the second data source having the association relationship with the first book according to the identification information of the first book in step 702, the following steps may be further performed:
referring to fig. 8, a flowchart of a method for determining an associated book according to the present application is shown. In this embodiment, the method is mainly applied to the server in the implementation environment shown in fig. 1 for illustration.
Step 801, n book addresses are acquired.
When a user reads a book, the book address of the book can be reported to a server. Correspondingly, the server may obtain the book address.
The book address of the book is an address for acquiring the book, and the book address of the book may be a URL of the book. The URL is described above, and will not be described here.
The n book addresses correspond to n books, the n book addresses originate from at least one data source, and n is an integer greater than 1. The data sources are described above and will not be described in detail here.
Step 802, determining the similarity between every two books in the n books.
The similarity is used for representing the similarity degree between every two books. The higher the similarity, the more similar the two books are, and the greater the relevance.
Optionally, the determining the similarity between every two books in the n books may include the following steps:
(1) Acquiring book information of n books according to n book addresses;
after the server obtains the n book addresses, the server may obtain book information of the n books according to the n book addresses.
The book information includes a chapter list.
(2) And determining the similarity between every two books in the n books according to the chapter list of every two books in the n books.
After the book information of the n books is obtained, the similarity between every two books in the n books can be further determined according to the book information of the n books.
In one possible implementation manner, the book information includes a chapter list, so that the similarity between every two books in the n books can be determined according to the chapter list of every two books in the n books.
In another possible embodiment, the book information may further include a book name, so that the similarity between every two books in the n books may be determined according to the book name of every two books in the n books.
In yet another possible embodiment, the book information includes a book name and a chapter list, and the server may determine the similarity between every two books in the n books according to the book name and the chapter list.
Optionally, considering that the chapter list and/or the book name also usually includes some blank characters, punctuation marks, and the like, before the similarity between every two books in the n books is determined, the chapter list and/or the book name may be preprocessed, and the blank characters, the punctuation marks, and the like in the chapter list and/or the book name may be removed. Wherein, the null character may include: blank spaces, tab, etc.
Optionally, the determining the similarity between every two books in the n books according to the chapter list of every two books in the n books may include the following sub-steps:
(1) And for the first book and the second book in the n books, determining the chapter similarity of each chapter between the first book and the second book.
The chapter similarity refers to the similarity of chapter names. The first book and the second book may be any two books among the n books.
For the first book and the second book, the server may extract the chapter names of the respective chapters of the first book and the second book, and then the server may calculate the similarity of the respective chapter names of the first book and the second book.
Alternatively, the similarity may be represented by a hamming distance, a euclidean distance, an editing distance, or the like, which is not limited by the embodiment of the present application. Taking hamming distance as an example, the smaller the value of hamming distance, the higher the similarity of the two chapter names. In addition, the server may also invoke a similarity calculation model to determine a chapter similarity for each chapter between the first book and the second book.
(2) And determining the similarity between the first book and the second book according to the chapter similarity of each chapter between the first book and the second book.
For the first book and the second book, after the chapter similarity of each chapter between the two books is determined, the similarity between the two books can be determined, and further the similarity between the first book and the second book can be determined.
Alternatively, after determining the chapter similarities of the respective chapters between the first book and the second book, an average value of the chapter similarities of the respective chapters may be calculated, and this weighted average value may be determined as the similarity between the first book and the second book.
Optionally, after determining the similarity between the first book and the second book according to the chapter similarity of each chapter between the first book and the second book, the following steps may be further performed: determining a chapter mapping relation of the first book and the second book according to chapter similarity of each chapter between the first book and the second book; the chapter map is stored.
After determining the chapter similarity of each chapter between the first book and the second book, judging whether the chapter similarity of each chapter between the first book and the second book is greater than a preset similarity, if the chapter similarity of a certain chapter (such as the first chapter) in the first book and another chapter (such as the second chapter) in the second book is greater than the preset similarity, indicating that the first chapter and the second chapter have a mapping relationship; the server may then store the mapping between the first chapter and the second chapter.
In step 803, n books are divided into m categories according to the similarity, wherein each category includes books with association relation, and m is a positive integer less than or equal to n.
After determining the similarity between every two books in the n books, the n books may be divided into m categories according to the similarity. For example, 6 books A, B, C, D and E in total, the similarity between books a and B is 98%, the similarity between books a and C is 97%, the similarity between books a and D is 5%, the similarity between books a and E is 3%, the similarity between books B and C is 97%, the similarity between books B and D is 2%, the similarity between books B and E is 3%, the similarity between books C and D is 4%, the similarity between books C and E is 98%, the similarity between books D and E is 99%, and according to the above-mentioned similarities, books a, B and C may be classified into the same category; that is, books a, B, and C are books having an association relationship with each other, and books D and E are books having an association relationship with each other.
Alternatively, the server may store the mapping relationship between the books in each category and the data sources of the books, so as to provide the mapping relationship for the terminal to use.
Alternatively, when the second book and the first book have an association relationship, that means that the first book and the second book belong to different parts of the same set of books, the book information acquired by the server may include an author of the book, a name of a main character of the book, and the like. The server may divide n books into m categories according to the author of the n books, the names of the main tasks of the books, and the like, and books included in each category are books having an association relationship. For example, n is equal to 5, if 3 books in 5 books have golgi authors and the main character names of the books include "a Liao Sha", it may be determined that the 3 books are different parts of the same set of books; in addition, the authors of the 2 books are all barks, and the main character names of the books comprise new sense, so that the 2 books can be determined to be different parts of the same set of books; therefore, 5 books can be divided into 2 types, one type is books with authors all being Golgi, and the main character names of the books all comprise A Liao Sha, and the books comprise 3 books, and the 3 books are books with association relations; the other category is books with the author being Bajin and the main character names of the books including 'new sense', including 2 books, wherein the 2 books are books with association relations.
Optionally, when the second book and the first book have an association relationship, that means that the first book and the second book belong to the same type of book, the book information acquired by the server may further include a book type of the book, and the server may divide the n books into m categories according to the book type of the n books, where the books included in each category are books having an association relationship. For example, n is equal to 5, if 3 books in the 5 books are philosophy books, and 2 books are economic books, the 5 books can be divided into 2 types, one type is author being philosophy books, including 3 books, and the 3 books are books with association relation; the other category is that the author is an economic book, comprising 2 books, wherein the 2 books are books with association relations.
Optionally, when the second book and the first book have an association relationship, that means that the first book and the second book belong to the same author, the server may further include the author of the book in the book information obtained by the server. For n books, the server may divide the n books into m categories according to authors of the n books, and books included in each category are books having an association relationship. For example, n is equal to 5, if 3 books have their authors in 5 books are golgi, and 2 books have their authors in contradiction, the 5 books can be classified into 2 types, one type is books having their authors in golgi, including 3 books, and the 3 books are books with association relationship; the other category is books with contradictory authors, including 2 books, wherein the 2 books are books with association relations.
Optionally, the second book and the first book have an association relationship, which may also mean that when the first book and the second book belong to books published by the same publishing company, the publishing company of the book may also be included in the book information obtained by the server. For n books, the server may divide the n books into m categories according to respective publishers of the n books, where the books included in each category are books having an association relationship. For example, n is equal to 5, if 3 publishers of the books in the 5 books are people education publishers, and in addition, 2 publishers of the books are beijing university publishers, the 5 books can be divided into 2 types, one type is books published by people education publishers, including 3 books, and the 3 books are books with association relations; the other category is books published by beijing university press, which comprises 2 books, wherein the 2 books are books with association relation.
In summary, according to the technical scheme provided by the embodiment of the application, the server can determine the similarity of the books in pairs, and further divide the books into at least one category, wherein the books included in each category are books with association relations, so that a plurality of data sources of the books can be provided for the terminal.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 9, a block diagram of an apparatus for replacing a data source according to an embodiment of the application is shown. The device has the function of realizing the method example of replacing the data source at the terminal side, wherein the function can be realized by hardware or can be realized by executing corresponding software by hardware. The device may be the terminal described above or may be provided on the terminal. The apparatus 900 may include: an interface display module 910, an instruction receiving module 920, and a content display module 930.
The interface display module 910 is configured to display a reading interface, where the reading interface includes text content of the first book under the first data source.
The instruction receiving module 920 is configured to receive a source change reading instruction, where the source change reading instruction is used to request to change a data source.
And the content display module 930 is configured to display, in response to receiving the source-changing reading instruction, text content of a second book under a second data source in the reading interface, where the second book and the first book have an association relationship, and the association relationship refers to different books that have the same content or the same attribute and belong to different data sources.
In summary, according to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the reading interface for displaying the text content, and the text content under the replaced data source is displayed. In contrast to the related art, a user needs to search through a reading website to complete a replacement of the reading website (also referred to as a data source). According to the technical scheme provided by the embodiment of the application, the data source is directly replaced in the text content reading interface, so that the path for replacing the data source is shortened, and the operation efficiency of source replacement reading is improved
In some possible designs, as shown in fig. 10, the content display module 930 includes: an information acquisition unit 931, a chapter determination unit 932, and a content display unit 933.
An information obtaining unit 931, configured to obtain book information of the second book from the second data source, where the book information includes text addresses of respective chapters.
A chapter determination unit 932 configured to determine a second chapter corresponding to a first chapter of the first book from the second book according to a chapter mapping relationship between the first book and the second book; and the first chapter is a chapter where text content displayed in the reading interface by the first book is located.
A content display unit 933, configured to display, in the reading interface, text content of the second chapter according to the text address of the second chapter.
In some possible designs, as shown in fig. 10, the apparatus 900 further includes: a list acquisition module 940 and a list display module 950.
A list obtaining module 940, configured to obtain a chapter list of the second book when obtaining the text content of the second chapter from the second data source fails.
And a list display module 950, configured to display a chapter list of the second book.
In some possible designs, as shown in fig. 10, the apparatus 900 further includes: a source acquisition module 960 and a source determination module 970.
A source acquisition module 960 configured to acquire at least two candidate data sources corresponding to the first book; wherein the order of priority of the at least two candidate data sources is determined according to influencing factors including at least one of: the quality of the books in the candidate data sources, the display speed of the books in the candidate data sources and the heat of the candidate data sources.
The source determining module 970 is configured to select one candidate data source from the at least two candidate data sources as the second data source according to the priority order.
In some possible designs, the instruction receiving module 920 is configured to display a toolbar in response to detecting a touch signal acting on the reading interface, where the toolbar includes a source-changing reading control; and in response to receiving a touch signal corresponding to the source changing reading control, confirming receiving the source changing reading instruction.
In some possible designs, as shown in fig. 10, the apparatus 900 further includes: control display module 980.
The control display module 980 is used for displaying a source replacement control in the reading interface; wherein the source change control is for changing from the second data source to other data sources corresponding to the first book.
In some possible designs, the second book and the first book have an association relationship, meaning that the second book and the first book are two versions of the same book under two different data sources.
Referring to fig. 11, a block diagram of an apparatus for replacing a data source according to another embodiment of the application is shown. The device has the function of realizing the method example of replacing the data source at the server side, wherein the function can be realized by hardware or can be realized by executing corresponding software by hardware. The device may be the server described above or may be provided on the server. The apparatus 1100 may include: a request receiving module 1110, a book determining module 1120, and an information transmitting module 1130.
The request receiving module 1110 is configured to receive a source change reading request, where the source change reading request is used to request to change a data source, and the source change reading request includes identification information of a first book under a first data source.
The book determining module 1120 is configured to determine, according to the book information of the first book, a second book under a second data source having an association relationship with the first book, where the association relationship refers to different books having the same content or the same attribute and belonging to different data sources.
And an information sending module 1130, configured to send book information of the second book.
In summary, according to the technical solution provided in the embodiments of the present application, after receiving the source-changing reading request sent by the terminal, the server may determine another book having an association relationship with the data according to the identification information of the book included in the request, and send the book information of the another book to the terminal, so that the terminal may display the text content of the another book in the reading interface based on the book information of the another book. Compared with the related art, the method shortens the path for replacing the data source and improves the operation efficiency of source replacement reading.
In some possible designs, as shown in fig. 12, the apparatus 1100 further comprises: an address acquisition module 1140, a similarity determination module 1150, and a relationship determination module 1160.
The address obtaining module 1140 is configured to obtain n book addresses, where the n book addresses correspond to n books, the n book addresses originate from at least one data source, and n is an integer greater than 1.
The similarity determining module 1150 is configured to determine a similarity between every two books in the n books.
The relationship determining module 1160 is configured to divide the n books into m categories according to the similarity, where each book included in each category is a book having an association relationship, and m is a positive integer less than or equal to n.
In some possible designs, as shown in fig. 12, the similarity determining module 1150 includes: an information acquisition unit 1151 and a similarity determination unit 1152.
An information acquiring unit 1151, configured to acquire book information of the n books according to the n book addresses, where the book information includes a chapter list.
And a similarity determining unit 1152, configured to determine a similarity between every two books in the n books according to the chapter list of every two books in the n books.
In some possible designs, the similarity determining unit 1152 is configured to determine, for a first book and a second book in the n books, a chapter similarity of each chapter between the first book and the second book, where the chapter similarity refers to a similarity of chapter names; and determining the similarity between the first book and the second book according to the chapter similarity of each chapter between the first book and the second book.
In some possible designs, as shown in fig. 12, the apparatus 1100 further comprises: a chapter determination module 1170 and a relationship storage module 1180.
The chapter determination module 1170 is configured to determine a chapter mapping relationship between the first book and the second book according to a chapter similarity of each chapter between the first book and the second book.
And a relation storage module 1180, configured to store the chapter mapping relation.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to fig. 13, a block diagram of a terminal according to an embodiment of the present application is shown. In general, the terminal 1300 includes: a processor 1301, and a memory 1302.
Processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. Processor 1301 may be implemented in hardware in at least one of DSP (Digital Signal Processing ), FPGA (Field Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). Processor 1301 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, processor 1301 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and rendering of content required to be displayed by the display screen. In some embodiments, the processor 1301 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1302 may include one or more computer-readable storage media, which may be non-transitory. Memory 1302 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1302 is used to store at least one instruction, at least one program, a set of codes, or a set of instructions for execution by processor 1301 to implement a method for terminal-side replacement data source provided by a method embodiment of the present application.
In some embodiments, the terminal 1300 may further optionally include: a peripheral interface 1303 and at least one peripheral. The processor 1301, the memory 1302, and the peripheral interface 1303 may be connected by a bus or signal lines. The respective peripheral devices may be connected to the peripheral device interface 1303 through a bus, a signal line, or a circuit board. Specifically, the peripheral device may include: at least one of a communication interface 1304, a display screen 1305, audio circuitry 1306, a camera assembly 1307, a positioning assembly 1308, and a power supply 1309.
Those skilled in the art will appreciate that the structure shown in fig. 13 is not limiting of terminal 1300 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
Referring to fig. 14, a schematic structural diagram of a server according to an embodiment of the application is shown. Specifically, the present application relates to a method for manufacturing a semiconductor device.
The server 1400 includes a CPU (Central Processing Unit ) 1401, a system Memory 1404 including a RAM (Random Access Memory ) 1402 and a ROM (Read Only Memory) 1403, and a system bus 1405 connecting the system Memory 1404 and the central processing unit 1401. The server 1400 also includes a basic I/O (Input/Output) system 1406 that facilitates the transfer of information between various devices within the computer, and a mass storage device 1407 for storing an operating system 1413, application programs 1414, and other program modules 1412.
The basic input/output system 1406 includes a display 1408 for displaying information and an input device 1409, such as a mouse, keyboard, etc., for a user to input information. Wherein the display 1408 and the input device 1409 are connected to the central processing unit 1401 via an input output controller 1410 connected to the system bus 1405. The basic input/output system 1406 may also include an input/output controller 1410 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input output controller 1410 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1407 is connected to the central processing unit 1401 through a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1407 and its associated computer-readable media provide non-volatile storage for the server 1400. That is, the mass storage device 1407 may include a computer readable medium (not shown) such as a hard disk or CD-ROM (Compact Disc Read-Only Memory) drive.
The computer readable medium may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory) erasable programmable read-only memory), flash memory or other solid state memory technology, CD-ROM, DVD or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the one described above. The system memory 1404 and mass storage device 1407 described above may be collectively referred to as memory.
The server 1400 may also operate in accordance with various embodiments of the application, through a network, such as the internet, to remote computers connected to the network. I.e., server 1400, may be connected to the network 1412 through a network interface unit 1411 coupled to the system bus 1405, or other types of networks or remote computer systems (not shown) may be coupled to the server using the network interface unit 1411.
The memory also includes at least one instruction, at least one program, code set, or instruction set stored in the memory and configured to be executed by one or more processors to implement the server-side method of replacing a data source described above.
In an exemplary embodiment, a computer device is also provided. The computer device may be a terminal or a server. The computer device comprises a processor and a memory, wherein at least one instruction, at least one section of program, code set or instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or instruction set is loaded and executed by the processor to realize the method of replacing the data source of the terminal side or realize the method of replacing the data source of the server side.
In an exemplary embodiment, a computer readable storage medium is also provided, in which at least one instruction, at least one program, a code set, or an instruction set is stored, the at least one instruction, the at least one program, the code set, or the instruction set, when executed by a processor, implementing the method for replacing a data source on a terminal side or implementing the method for replacing a data source on a server side.
In an exemplary embodiment, a computer program product is also provided, which, when being executed by a processor, is adapted to carry out the above-mentioned method of replacing a data source on the terminal side or to carry out the above-mentioned method of replacing a data source on the server side.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The foregoing description of the exemplary embodiments of the application is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the application.
Claims (13)
1. A method of replacing a data source, the method comprising:
displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source;
receiving a source changing reading instruction, wherein the source changing reading instruction is used for requesting to change a data source;
in response to receiving the source-changing reading instruction, acquiring book information of a second book from a second data source, wherein the book information comprises text addresses of all chapters;
determining a second chapter corresponding to a first chapter of the first book from the second book according to the chapter mapping relation of the first book and the second book; the first chapter is a chapter where text content displayed in the reading interface by the first book is located;
displaying the text content of the second chapter in the reading interface according to the text address of the second chapter;
the second books and the first books have an association relationship, wherein the association relationship refers to different books with the same content or the same attribute and belong to different data sources; the chapter mapping relationship between the first book and the second book is used for representing the corresponding relationship of chapters between the first book and the second book.
2. The method of claim 1, wherein after determining a second chapter corresponding to a first chapter of the first book from the second book according to a chapter mapping relationship between the first book and the second book, further comprising:
if the text content of the second chapter from the second data source fails to be acquired, acquiring a chapter list of the second book;
and displaying a chapter list of the second book.
3. The method of claim 1, wherein after displaying the reading interface, further comprising:
acquiring at least two candidate data sources corresponding to the first book; wherein the order of priority of the at least two candidate data sources is determined according to influencing factors including at least one of: the quality of books in the candidate data sources, the display speed of the books in the candidate data sources and the heat of the candidate data sources;
and selecting one candidate data source from the at least two candidate data sources as the second data source according to the priority order.
4. A method according to any one of claims 1 to 3, wherein after displaying the text content of the second book under the second data source in the reading interface, further comprising:
Displaying a site replacement control in the reading interface;
wherein the site replacement control is for replacing from the second data source to other data sources corresponding to the first book.
5. A method according to any one of claims 1 to 3, wherein the second book and the first book have an association, meaning that the second book and the first book are two versions of the same book under two different data sources.
6. A method of replacing a data source, the method comprising:
receiving a source changing reading request, wherein the source changing reading request is used for requesting to change a data source, and the source changing reading request comprises identification information of a first book under a first data source;
determining a chapter mapping relation of the first book and the second book according to chapter similarity of each chapter between the first book and the second book; storing the chapter mapping relation; the chapter mapping relation between the first book and the second book is used for representing the corresponding relation of chapters between the first book and the second book;
determining a second book under a second data source with an association relation with the first book according to the identification information of the first book, wherein the association relation refers to different books with the same content or the same attribute and belong to different data sources;
And transmitting the book information of the second book, wherein the book information of the second book comprises at least one of a book name, text content, a chapter list and a content brief of the second book.
7. The method of claim 6, further comprising, prior to determining a second book under a second data source having an association with the first book from book information of the first book:
acquiring n book addresses, wherein the n book addresses correspond to n books, the n book addresses are derived from at least one data source, and n is an integer greater than 1;
determining the similarity between every two books in the n books;
dividing the n books into m categories according to the similarity, wherein books included in each category are books with the association relation, and m is a positive integer less than or equal to n.
8. The method of claim 7, wherein determining the similarity between every two books in the n books comprises:
acquiring book information of the n books according to the n book addresses, wherein the book information comprises a chapter list;
and determining the similarity between every two books in the n books according to the chapter list of every two books in the n books.
9. The method of claim 8, wherein determining the similarity between the n books according to the chapter list of the n books comprises:
for a first book and a second book in the n books, determining the chapter similarity of each chapter between the first book and the second book, wherein the chapter similarity refers to the similarity of chapter names;
and determining the similarity between the first book and the second book according to the chapter similarity of each chapter between the first book and the second book.
10. An apparatus for replacing a source of data, the apparatus comprising:
the interface display module is used for displaying a reading interface, wherein the reading interface comprises text content of a first book under a first data source;
the instruction receiving module is used for receiving a source changing reading instruction, wherein the source changing reading instruction is used for requesting to change a data source;
the content display module is used for responding to the received source-changing reading instruction and acquiring book information of a second book from a second data source, wherein the book information comprises text addresses of all chapters; determining a second chapter corresponding to a first chapter of the first book from the second book according to the chapter mapping relation of the first book and the second book; the first chapter is a chapter where text content displayed in the reading interface by the first book is located; displaying the text content of the second chapter in the reading interface according to the text address of the second chapter;
The second books and the first books have an association relationship, wherein the association relationship refers to different books with the same content or the same attribute and belong to different data sources; the chapter mapping relationship between the first book and the second book is used for representing the corresponding relationship of chapters between the first book and the second book.
11. An apparatus for replacing a source of data, the apparatus comprising:
the system comprises a request receiving module, a source changing reading module and a data source changing module, wherein the request receiving module is used for receiving a source changing reading request, the source changing reading request is used for requesting to change the data source, and the source changing reading request comprises identification information of a first book under a first data source;
the chapter determining module is used for determining chapter mapping relation of the first book and the second book according to chapter similarity of each chapter between the first book and the second book;
the relation storage module is used for storing the chapter mapping relation; the chapter mapping relation between the first book and the second book is used for representing the corresponding relation of chapters between the first book and the second book;
the book determining module is used for determining a second book under a second data source with an association relation with the first book according to the book information of the first book, wherein the association relation refers to different books with the same content or the same attribute and belong to different data sources;
And the information sending module is used for sending the book information of the second book.
12. A computer device comprising a processor and a memory, wherein the memory has stored therein at least one program that is loaded and executed by the processor to implement the method of any one of claims 1 to 5 or to implement the method of any one of claims 6 to 9.
13. A computer readable storage medium, characterized in that at least one program is stored in the computer readable storage medium, which is loaded and executed by a processor to implement the method of any one of claims 1 to 5 or the method of any one of claims 6 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911360418.2A CN113032695B (en) | 2019-12-25 | 2019-12-25 | Method, apparatus, device and storage medium for replacing data source |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911360418.2A CN113032695B (en) | 2019-12-25 | 2019-12-25 | Method, apparatus, device and storage medium for replacing data source |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113032695A CN113032695A (en) | 2021-06-25 |
CN113032695B true CN113032695B (en) | 2023-10-17 |
Family
ID=76458949
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911360418.2A Active CN113032695B (en) | 2019-12-25 | 2019-12-25 | Method, apparatus, device and storage medium for replacing data source |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113032695B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104965825A (en) * | 2014-04-16 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and terminal for processing data |
CN105229631A (en) * | 2013-04-25 | 2016-01-06 | 微软技术许可有限责任公司 | The collection of reading content, follow the tracks of and present |
CN105373604A (en) * | 2015-11-09 | 2016-03-02 | 北京奇虎科技有限公司 | Method and device for mining and purifying similar books in book library |
KR101826594B1 (en) * | 2016-10-13 | 2018-02-07 | 한국과학기술원 | Method and system for recommending e-book based on knowledge structure |
CN108090124A (en) * | 2017-11-13 | 2018-05-29 | 深圳市华阅文化传媒有限公司 | Read the method and device that APP is ranked up source website |
CN108710679A (en) * | 2018-05-18 | 2018-10-26 | 广州阿里巴巴文学信息技术有限公司 | E-book reading processing method, device and equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090298036A1 (en) * | 2008-06-02 | 2009-12-03 | Think Computer Corporation | Replacing Physical Publication Appendices With Enhanced Electronic Versions |
-
2019
- 2019-12-25 CN CN201911360418.2A patent/CN113032695B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105229631A (en) * | 2013-04-25 | 2016-01-06 | 微软技术许可有限责任公司 | The collection of reading content, follow the tracks of and present |
CN104965825A (en) * | 2014-04-16 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and terminal for processing data |
CN105373604A (en) * | 2015-11-09 | 2016-03-02 | 北京奇虎科技有限公司 | Method and device for mining and purifying similar books in book library |
KR101826594B1 (en) * | 2016-10-13 | 2018-02-07 | 한국과학기술원 | Method and system for recommending e-book based on knowledge structure |
CN108090124A (en) * | 2017-11-13 | 2018-05-29 | 深圳市华阅文化传媒有限公司 | Read the method and device that APP is ranked up source website |
CN108710679A (en) * | 2018-05-18 | 2018-10-26 | 广州阿里巴巴文学信息技术有限公司 | E-book reading processing method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113032695A (en) | 2021-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110362372A (en) | Page translation method, device, medium and electronic equipment | |
US9342233B1 (en) | Dynamic dictionary based on context | |
US20240143904A1 (en) | Human-Computer Interaction Method And Apparatus Thereof | |
US20150200893A1 (en) | Document review system | |
CN106648569B (en) | Target serialization realization method and device | |
CN1749995A (en) | Creation and management of content-related objects | |
JP2008176721A (en) | Computer device, computer program, and method for calculating degree of importance of electronic document on computer network based on comment about relevant electronic document in other electronic documents related to relevant electronic document | |
US10698876B2 (en) | Distinguish phrases in displayed content | |
CN110688145B (en) | Android MVP code automatic generation method and device, medium and electronic equipment | |
CN111427577A (en) | Code processing method and device and server | |
US9141867B1 (en) | Determining word segment boundaries | |
US20180248837A1 (en) | Interactive splitting of entries in social collaboration environments | |
CN111897778B (en) | Computer file merging method, device and system | |
CN112783482A (en) | Visual form generation method, device, equipment and storage medium | |
CN112052368A (en) | Method, system, storage medium and electronic device for automatically extracting list data | |
CN112835864B (en) | File storage method, device, equipment and storage medium | |
CN113032695B (en) | Method, apparatus, device and storage medium for replacing data source | |
CN117389538A (en) | Page component content development method, device, equipment and storage medium | |
CN110321262B (en) | Application content monitoring method and device and terminal | |
US20170364496A1 (en) | Visualization interface for information object system | |
CN110457659B (en) | Clause document generation method and terminal equipment | |
JP2019057137A (en) | Information processing apparatus and information processing program | |
CN113722334B (en) | Data processing method, device, electronic equipment and medium | |
US12067073B2 (en) | URL exchange | |
CN115035527B (en) | Method, device and equipment for identifying electronic signature position |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |