Book grading method and book grading equipment
By extracting and weighting the grading features of books, it solves the problem of low efficiency and accuracy when parents choose books, and improves the matching of reading materials for children and teenagers.
Patent Information
- Application Number
- CN202111288642.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2024-10-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When parents choose books for their children, they are less efficient and less accurate, making it difficult to match reading difficulty and reading comprehension ability.
By obtaining book information, multiple grading features such as semantic complexity, number of sentence types and number of sentences of each sentence pattern are extracted, weighted processing is performed, the target level of the book is determined, and displayed on the mobile terminal or grading server.
It improves the accuracy of determining book levels and helps users reasonably choose books suitable for children and teenagers to read.
Smart Images

Figure CN113935332B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a book grading method and a book grading device. Background Art
[0002] Children have different reading comprehension abilities at different stages. When parents choose books for their children, they need to choose books that match the reading difficulty and the children's reading comprehension ability to ensure that the children can read books scientifically.
[0003] In the related art, parents usually select books whose reading difficulty matches the reading comprehension ability of young children based on experience, which results in low efficiency in selecting books and low accuracy in the selected books. Summary of the invention
[0004] The present application provides a book grading method and a book grading device, which can solve the problems of low efficiency in selecting books and low accuracy in the selected books in the related art. The technical solution is as follows:
[0005] On the one hand, a book grading method is provided, which is applied to a book grading device; the method comprises:
[0006] Acquire book information of a book to be graded, the book information including: content of the book and / or an identification of the book;
[0007] Based on the book information, feature extraction is performed on the content of the book to obtain a plurality of hierarchical features of the book, wherein the plurality of hierarchical features include at least two of the following features: semantic complexity of the book, the number of types of sentence patterns contained in the book, and the number of sentences of each sentence pattern in the book, wherein the semantic complexity is represented by a numerical value;
[0008] Performing weighted processing on the multiple grading features to obtain a target grade of the book;
[0009] The target level is displayed.
[0010] In another aspect, a book grading device is provided, the book grading device comprising: a processor; the processor is configured to:
[0011] Acquire book information of a book to be graded, the book information including: content of the book and / or an identification of the book;
[0012] Based on the book information, feature extraction is performed on the content of the book to obtain a plurality of hierarchical features of the book, wherein the plurality of hierarchical features include at least two of the following features: semantic complexity of the book, the number of types of sentence patterns contained in the book, and the number of sentences of each sentence pattern in the book, wherein the semantic complexity is represented by a numerical value;
[0013] Performing weighted processing on the multiple grading features to obtain a target grade of the book;
[0014] The target level is displayed.
[0015] Optionally, the plurality of hierarchical features further include at least one of the following features: number of pages, number of words, number of first words, number of second words, number of illustrations, sentence length, number of entities, number of attributes, and number of relationships;
[0016] The first word is a word in the book that belongs to a high-frequency word set, and the second word is a word in the book that belongs to a low-frequency word set;
[0017] The entity quantity refers to the total number of entities included in the book, the attribute quantity refers to the total number of attributes of each entity in the book, and the relationship quantity refers to the total number of relationships between each entity in the book.
[0018] Optionally, the processor is used to:
[0019] Using a plurality of different weight groups to perform weighted processing on the plurality of grading features respectively, to obtain a plurality of candidate grades of the book, wherein each of the candidate grades is obtained based on one of the weight groups, and each of the weight groups includes: a plurality of weights corresponding to the plurality of grading features one by one;
[0020] Based on the multiple candidate ratings, a target rating for the book is determined.
[0021] Optionally, the processor is used to:
[0022] The candidate level with the largest number of appearances among the multiple candidate levels is determined as the target level of the book.
[0023] Optionally, the processor is used to:
[0024] Performing normalization processing on each of the classification features;
[0025] The normalized multiple grading features are weighted to obtain a target grade of the book.
[0026] Optionally, the processor is used to:
[0027] Performing weighted processing on the normalized multiple hierarchical features through multiple first neurons included in the hidden layer of the neural network to obtain output values of the multiple first neurons;
[0028] The output values of the plurality of first neurons are processed by the plurality of second neurons included in the output layer of the neural network to obtain the probability that the grade of the book output by each second neuron is the corresponding reference grade, and the reference grades corresponding to the plurality of second neurons are different from each other;
[0029] Determining a target level of the book based on a reference level with the greatest probability among the reference levels corresponding to the plurality of second neurons;
[0030] Among them, the output value h of the qth first neuron q (U) Satisfy:
[0031]
[0032] The probability P of the kth second neuron output (k) satisfy:
[0033]
[0034] q is an integer greater than or equal to 1 and less than or equal to M, M is the total number of first neurons included in the hidden layer, e is a natural constant, Q is a weight vector of the qth first neuron, the weight vector of each first neuron includes a plurality of weights corresponding one-to-one to the plurality of hierarchical features after normalization, T is a transposition symbol, and U is a feature set consisting of the plurality of hierarchical features after normalization;
[0035] z k is the result obtained by the k-th second neuron performing weighted processing on the plurality of output values using the weight vector of the k-th second neuron, r is a result obtained by the r-th second neuron using the weight vector of the r-th second neuron to perform weighted processing on the multiple output values, the weight vector of each second neuron includes multiple weights corresponding to the multiple first neurons one by one, r is an integer greater than or equal to 1 and less than or equal to g, g is the total number of second neurons included in the output layer, the weight vectors of any two second neurons are different, and the weight vectors of any two first neurons are different.
[0036] Optionally, the book grading device is a mobile terminal, the mobile terminal includes a display screen, and the processor is used for:
[0037] displaying the target level on the display screen;
[0038] The processor is further configured to:
[0039] After obtaining the target level of the book, if it is determined that the difference between the target level and the reference reading level is greater than a difference threshold, a prompt message is issued, and the reference reading level is the reading level configured in the mobile terminal.
[0040] Optionally, the book grading device is a grading server. The processor is used for:
[0041] Receiving book information of books to be graded sent by a mobile terminal;
[0042] The target level is sent to the mobile terminal, where the target level is used for display by the mobile terminal.
[0043] Optionally, the processor is used to:
[0044] extracting a plurality of sentences from the content of the book;
[0045] Sending the plurality of statements to the first server, each statement being used for the first server to input into a statement analysis model, to obtain analysis results of the statement, the analysis results including semantic complexity and sentence pattern;
[0046] determining the plurality of grading features based on the analysis result of each of the statements sent by the second server;
[0047] The semantic complexity of the first book is an average value of the semantic complexity of the multiple sentences.
[0048] On the other hand, a book grading device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the book grading method as described in the above aspects when executing the computer program.
[0049] On the other hand, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the book grading method as described in the above aspects is implemented.
[0050] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the book rating method according to the above aspect.
[0051] The beneficial effects of the technical solution provided by this application include at least:
[0052] The present application provides a book grading method and a book grading device. The book grading device can extract features of a book to be graded to obtain multiple grading features of the book, and perform weighted processing on the multiple grading features to obtain a target grade of the book to be graded. Since the method provided by the present application can determine the grade of a book through multiple grading features of the book, the accuracy of determining the grade of the book is effectively improved. Furthermore, it can facilitate users to reasonably select books based on the grade of the book determined by the book grading device. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments 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 creative work.
[0054] Figure 1 is a flow chart of a book grading method provided in an embodiment of the present application;
[0055] Figure 2 is a flow chart of another book grading method provided in an embodiment of the present application;
[0056] Figure 3 This is a schematic diagram of the connection between a book grading device, a first server and a second server provided in an embodiment of the present application;
[0057] Figure 4 This is a schematic diagram of a connection between a book grading device and a mobile terminal provided in an embodiment of the present application;
[0058] Figure 5 This is a schematic diagram of an interface in which a mobile terminal sends book information of a book to be graded to a grading server, provided in an embodiment of the present application;
[0059] Figure 6 This is a schematic diagram of an interface showing a target grade of a book to be graded displayed on a mobile terminal according to an embodiment of the present application;
[0060] Figure 7 This is a schematic diagram of an interface for displaying a prompt message on a mobile terminal provided in an embodiment of the present application;
[0061] Figure 8 It is a schematic diagram of a BP neural network training model provided in an embodiment of the present application;
[0062] Fig. 9 It is a structural schematic diagram of a book grading device provided in an embodiment of the present application;
[0063] Fig.10This is a software structure diagram of a book grading device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0065] The embodiment of the present application provides a book grading method, which is applied to a book grading device. Optionally, the book grading device can be a mobile terminal or a grading server. The mobile terminal can be a mobile phone, a tablet computer, a desktop computer or a wearable device. For example, the mobile terminal can be a mobile phone. The grading server can be a server, a server cluster composed of several servers, or a cloud computing service center. Figure 1 , the method comprising:
[0066] Step 101: Obtain book information of books to be graded.
[0067] The book information of the book includes: the content of the book and / or the identification of the book. For example, the book information may include: the content of the book. The identification of the book may include: the book name of the book.
[0068] Step 102: Based on the book information of the book, feature extraction is performed on the content of the book to obtain multiple hierarchical features of the book, and the multiple hierarchical features include at least two of the following features: semantic complexity of the book, the number of types of sentences contained in the book, and the number of sentences of each sentence type in the book.
[0069] For example, the multiple hierarchical features of a book may include: the semantic complexity of the book, the number of types of sentences contained in the book, and the number of sentences of each sentence type in the book.
[0070] The semantic complexity is represented by a numerical value. The sentence pattern may refer to the type of sentences in the book, and the sentence pattern may be a declarative sentence, a judgment sentence, an interrogative sentence, an elliptical sentence, or an inverted sentence.
[0071] Step 103: Perform weighted processing on multiple grading features to obtain the target grade of the book.
[0072] The target level of a book can be used to characterize the reading difficulty of the book, and the reading difficulty of the book is positively correlated with the target level of the book.
[0073] In the embodiment of the present application, the book grading device can directly perform weighted processing on multiple grading features of the book to obtain the target grade of the book. Alternatively, the book grading device can first perform normalization processing on each grading feature, and then perform weighted processing on the multiple grading features after normalization processing to obtain the target grade of the book. After normalization processing on each feature, multiple grading features can be made to be at the same order of magnitude, thereby ensuring that the accuracy of the determined target grade is high.
[0074] Optionally, the book grading device may perform weighted summation on multiple grading features based on pre-stored weights corresponding to the multiple grading features, thereby obtaining the target grade of the book. Alternatively, the book grading device may input multiple grading features of the book to be graded into a book grading model, so that the book grading model performs weighted processing on the multiple grading features, thereby obtaining the target grade of the book output by the book grading model.
[0075] Step 104: Display the target level of the book.
[0076] In an embodiment of the present application, if the book grading device is a mobile terminal, the mobile terminal can directly display the target grade of the book on its display screen so that the user can know the target grade of the book. If the book grading device is a grading server, the grading server can send the target grade of the book to the mobile terminal. After receiving the target grade, the mobile terminal can display the target grade on its display screen so that the user can know the target grade of the book.
[0077] In summary, the embodiment of the present application provides a book grading method, and the book grading device can perform feature extraction on the book to be graded to obtain multiple grading features of the book, and perform weighted processing on the multiple grading features to obtain the target grade of the book to be graded. Since the method provided by the embodiment of the present application can determine the grade of the book through the multiple grading features of the book, the accuracy of determining the grade of the book is effectively improved. Furthermore, it can facilitate users to reasonably select books based on the grade of the book determined by the book grading device.
[0078] In the embodiment of the present application, a book grading device inputs a plurality of normalized grading features of a book to be graded into a book grading model, and the book grading model is obtained by training the book grading device as an example to exemplify the book grading method provided in the embodiment of the present application. Figure 2 , the method may include:
[0079] Step 201: Obtain multiple sample data.
[0080] Each sample data may include: multiple feature samples of a history book and the grade of the history book. The multiple feature samples of the history book may be determined by the book grading device based on the content of the history book, and the content and the grade of the history book may be pre-stored by the book grading device. The grade of the history book can be used to characterize the reading difficulty of the history book, and the reading difficulty of the history book is positively correlated with the grade of the history book.
[0081] In an embodiment of the present application, the multiple feature samples of history books may include at least two of the following features: the semantic complexity of the history books, the number of sentence types contained in the history books, and the number of sentences of each sentence type in the history books.
[0082] Optionally, the multiple feature samples of history books may also include at least one of the following features: the number of pages of the history book, the number of words (i.e., the sum of the number of the third words and the number of the fourth words described below), the number of third words, the number of fourth words, the ratio of the number of third words to the number of words, the ratio of the number of fourth words to the number of words, the number of illustrations, sentence length, the number of entities, the number of attributes and the number of relationships.
[0083] For example, the multiple feature samples of each history book may include: the semantic complexity of the history book, the number of types of sentences contained in the history book, the number of sentences of each sentence in the history book, the number of pages of the history book, the number of words, the number of third words, the number of fourth words, the ratio of the number of third words to the number of words, the ratio of the number of fourth words to the number of words, the number of illustrations, the length of sentences, the number of entities, the number of attributes and the number of relationships. It can be seen that the multiple feature samples of the history book obtained by the book grading device are relatively comprehensive, so that the reliability of the book grading model trained based on the multiple feature samples of the history book can be ensured to be high, and then the accuracy of the grade of the book to be graded output by the book grading model can be high.
[0084] Among them, the semantic complexity of the history book is represented by a numerical value, and the semantic complexity of the history book can refer to the average value of the semantic complexity of multiple sentences in the history book. The sentence pattern can refer to the type of sentence in the book, and the sentence pattern can be a declarative sentence, a judgment sentence, an interrogative sentence, an elliptical sentence, or an inverted sentence. The third word is a word belonging to a high-frequency word set in the history book, and the fourth word is a word belonging to a low-frequency word set in the history book. The low-frequency word set can include all words in multiple words except the high-frequency words belonging to the high-frequency word set. It can be seen that the fourth word in the history book can be a word in the second figure that does not belong to the high-frequency word set.
[0085] The sentence length of a history book can be the average length of all sentences in the history book, and the length of each sentence can refer to the number of words included in the sentence. The number of entities refers to the total number of entities included in the history book. The number of attributes refers to the total number of attributes of each entity in the history book. The number of relationships refers to the total number of relationships between entities in the history book. Entities are usually nouns, representing abstract objects of people, things, and objects. Attributes are usually attributives used to limit entities, and relationships are usually verbs.
[0086] For example, the sentence in the story Little Red Riding Hood "Once upon a time there was a little girl who liked to wear a red velvet hat given by her grandmother, so everyone called her Little Red Riding Hood" includes five entities: the little girl, the grandmother, the hat, everyone, and Little Red Riding Hood. The attribute of the hat is red velvet, the relationship between the little girl and the hat is "wear", the relationship between the grandmother and the hat is "give", and the relationship between everyone and Little Red Riding Hood is "call".
[0087] In the embodiment of the present application, a plurality of feature samples of a history book including: semantic complexity of the history book, the number of types of sentences contained in the history book, the number of sentences of each sentence pattern in the history book, the number of pages of the history book, the number of words, the number of third words, the number of fourth words, the ratio of the number of third words to the number of words, the ratio of the number of fourth words to the number of words, the number of illustrations, the length of sentences, the number of entities, the number of attributes and the number of relationships are taken as an example to exemplify the process of determining the plurality of feature samples of the history book by the book grading device based on the content of the history book:
[0088] The book grading device first analyzes the content of the history book to obtain the total number of words, pages, words, illustrations, multiple words, sentences and sentence lengths included in the history book. Then, the book grading device determines at least one third word and at least one fourth word from the multiple words, and obtains the number of third words, the number of fourth words, the ratio of the number of third words to the number of words, and the ratio of the number of fourth words to the number of words included in the history book. Afterwards, for each sentence, the book grading device can determine the semantic complexity of the sentence, the sentence pattern of the sentence, the entities included in the sentence, the attributes of each entity, and the relationship between entities, thereby obtaining the semantic complexity of the sentences of the history book, the number of types of sentence patterns included in the history book, the number of sentences of each sentence pattern, the number of entities in the book, the number of attributes, and the number of relationships.
[0089] In an alternative implementation, see Figure 3, the book grading device 110 can establish a communication connection with the first server 120. After parsing a plurality of different words, the book grading device can send the plurality of words to the first server. For example, for each word, the book grading device can send the word to the first server by calling the first interface.
[0090] After the first server receives the multiple words, for each word, the first server can detect the word set to which the word belongs, obtain the detection result of the word, and send the detection result of the word to the book grading device. Afterwards, the book grading device can count the number of third words and the number of fourth words in the historical books based on the detection result of each word sent by the first server.
[0091] Since the book grading device can send the word to the first server so that the first server can detect the word set to which the word belongs, it is possible to avoid increasing the processing pressure of the book grading device.
[0092] For example, a high-frequency word set is pre-stored in the first server. For each word received, the first server can detect whether the word belongs to the high-frequency word set, that is, detect whether the word is the same as any high-frequency word in the high-frequency word set. If the first server determines that the word is the same as any high-frequency word in the high-frequency word set, it can be determined that the word belongs to the high-frequency word set, and a first detection result is sent to the book grading device, and the first detection result is used to indicate that the word is the third word.
[0093] If the first server determines that the word is different from any word in the high-frequency word set, it can be determined that the word does not belong to the high-frequency word set, and then the second detection result can be sent to the book grading device, and the second detection result is used to indicate that the word is the fourth word. Afterwards, the book grading device can count the number of the third words and the number of the fourth words in the multiple words in the historical books based on the received detection results (i.e., the first detection result and / or the second detection result described above).
[0094] In another optional implementation, the book grading device itself can detect the word set to which the word belongs, obtain the detection result of the word, and based on the detection result of the word, count the number of third words and the number of fourth words in the historical books.
[0095] Among them, the process of the book grading device detecting the word set to which each word belongs to obtain the detection result of the word can refer to the relevant implementation process of the first server obtaining the detection result of each word, and the embodiment of the present application will not be repeated here.
[0096] For an alternative example, see Figure 3The book grading device 110 may also establish a communication connection with the second server 130. After parsing and obtaining multiple statements, the book grading device may send the multiple statements to the second server. For example, for each statement, the book grading device may send the statement to the second server by calling the second interface. The second interface is different from the first interface.
[0097] After the second server receives multiple sentences, for each sentence, the second server can input the sentence into the sentence analysis model to obtain the analysis result of the sentence. The analysis result includes: the semantic complexity of the sentence, the sentence pattern, the entities included in the sentence, the attributes of the entities included in the sentence, and the relationship between the entities in the sentence. Then, the second server can send the analysis result of the sentence to the book grading device. After that, the book grading device can determine the semantic complexity of the historical book based on the analysis result of each sentence sent by the second server, and count the number of types of sentence patterns contained in the historical book, the number of sentences of each sentence pattern, the number of entities, the number of attributes, and the number of relationships.
[0098] In an embodiment of the present application, the sentence analysis model may include: a semantic complexity determination model, a sentence discrimination model, an entity extraction model, an attribute extraction model, and a relationship extraction model. For each sentence, the second server may input the sentence into the semantic complexity determination model, the sentence discrimination model, the entity extraction model, the attribute extraction model, and the relationship extraction model, respectively, to obtain the semantic complexity of the sentence output by the semantic complexity determination model, the sentence pattern of the sentence output by the sentence discrimination model, the entities included in the sentence output by the entity extraction model, the attributes of the entities included in the sentence output by the attribute extraction model, and the relationship between the entities included in the sentence output by the relationship extraction model.
[0099] Among them, the semantic complexity determination model can be trained based on multiple sentences determined by semantic complexity, the sentence discrimination determination model can be trained based on multiple sentences determined by sentence patterns, the entity extraction model can be trained based on multiple sentences determined by entities, the attribute extraction model can be trained based on multiple sentences determined by attributes, and the relationship extraction model can be trained based on multiple sentences determined by relationships.
[0100] Since the book grading device can send the statement to the second server so that the second server can determine the analysis result of the statement, it is possible to avoid increasing the processing pressure of the book grading device.
[0101] In another optional example, a sentence analysis model is provided in the book grading device. After the book grading device parses the history book to obtain multiple sentences, each sentence can be input into the sentence analysis model to obtain the analysis result of each sentence in the multiple sentences. Afterwards, the book grading device can determine the semantic complexity of the history book based on the analysis result of each sentence in the multiple sentences, and count the number of sentence types contained in the history book, the number of sentences of each sentence type in the gravel book, the number of entities, the number of attributes, and the number of relationships.
[0102] In the embodiment of the present application, the history book may be an extracurricular reading book for primary and secondary schools under the new curriculum recommended by the Ministry of Education, and the grade of the history book may refer to the grade of the students recommended by the Ministry of Education to read the history book. For example, if the Ministry of Education recommends a history book for second graders to read, the grade of the history book is 2. If the Ministry of Education recommends a history book for sixth graders to read, the grade of the history book is 6.
[0103] That is, the method provided in the embodiment of the present application can classify the new curriculum standard extracurricular reading books for primary and secondary schools recommended by the Ministry of Education into 9 levels according to grade, and use this to determine the target level of the book.
[0104] Step 202: Use a training algorithm to perform model training on multiple sample data to obtain a book classification model.
[0105] After obtaining multiple sample data, the book grading device can use a training algorithm to perform model training on the multiple sample data to obtain a book grading model. Optionally, the book grading device can use multiple different training algorithms to perform model training on the multiple sample data respectively to obtain multiple book grading models.
[0106] The plurality of different training algorithms may include at least two of the following training algorithms: vector machine, extreme gradient boosting (extreme gradient boosting, XGBoost), decision tree, random forest and neural network. For example, the plurality of different training algorithms include: vector machine, XGBoost, decision tree, random forest and neural network. Optionally, the neural network may be a back propagation (BP) neural network.
[0107] Optionally, after obtaining a plurality of sample data, the book grading device may first normalize each feature sample in each sample data, and then the book grading device may perform model training on the normalized plurality of sample data to obtain a book grading model.
[0108] Step 203: Obtain book information of the book to be graded.
[0109] The book information of the book to be graded may include: the content of the book and / or the identification of the book. For example, the book information of the book to be graded may include: the content of the book to be graded. Among them, the identification of the book to be graded may include: the name of the book to be graded. Optionally, the identification of the book to be graded may also include: the name of the author of the book to be graded.
[0110] In the embodiment of the present application, if the book grading device is a grading server, please refer to Figure 4 , the grading server 110 may be connected to the mobile terminal 140. The process of the grading server acquiring the book information of the book to be graded may include: the grading server receiving the book information of the book to be graded sent by the mobile terminal. If the book grading device is a mobile terminal, the mobile terminal may acquire the book information of the book to be graded in response to the user's input operation or selection operation.
[0111] Optionally, the books to be graded may be paper books or electronic books. In the scenario where the books to be graded are paper books, the mobile terminal may collect an image of the content of the first book and perform recognition processing on the image to obtain the content of the first book.
[0112] The embodiment of the present application takes the book grading device as a grading server as an example to exemplify how the book grading device acquires book information of a book to be graded.
[0113] A level determination application may be installed in the mobile terminal, and the grading server may be a background server of the level determination application. Figure 5 The user touches the application identifier of the level determination application installed in the mobile terminal. The mobile terminal can display a book name input box 01, a book author name input box 02, a content selection control 03, and a query control 04 in response to the user's touch operation on the application identifier.
[0114] Please continue to refer to Figure 5 , assuming that the user of the mobile terminal needs to query the rating of the book "Little Pony Crossing the River", the user can enter the book name "Little Pony Crossing the River" in the book name input box 01. Accordingly, the mobile terminal obtains the book name "Little Pony Crossing the River" in response to the user's input operation. Since the first book is a fable, there is no need to enter the author's name of the first book. Afterwards, the user clicks on the query control 04. Accordingly, the mobile terminal can send the book name "Little Pony Crossing the River" of the first book to the rating server in response to the user's touch operation on the query control 04.
[0115] Alternatively, if the content of the first book is stored in the mobile terminal, the user may touch the content selection control 03. The mobile terminal may display multiple book titles in response to the user's touch operation on the content selection control 03. Afterwards, the mobile terminal may send the content of the book "Little Pony Crossing the River" to the classification server in response to the user's touch operation on "Little Pony Crossing the River" among the multiple book titles.
[0116] Step 204: Based on the book information of the book to be classified, feature extraction is performed on the content of the book to obtain multiple classification features of the book, and the multiple classification features include at least two of the following features: the semantic complexity of the book, the number of types of sentences contained in the book, and the number of sentences of each sentence type in the book.
[0117] The semantic complexity is represented by a numerical value, and the semantic complexity may be an average value of the semantic complexity of multiple sentences in the book.
[0118] Optionally, the multiple grading features of the books to be graded may also include at least one of the following features: number of pages, number of words, number of first words, number of second words, ratio of first words to number of words, ratio of second words to number of words, number of illustrations, sentence length, number of entities, number of attributes and number of relationships.
[0119] For example, the multiple classification features of the books to be classified may include: the semantic complexity of the book, the number of types of sentences contained in the book, the number of sentences of each sentence type in the book, the number of pages, the number of words, the number of first words, the number of second words, the ratio of the first words to the number of words, the ratio of the second words to the number of words, the number of illustrations, the length of sentences, the number of entities, the number of attributes, and the number of relationships. Among them, the first words are words belonging to the high-frequency word set in the first book, and the second words are words belonging to the low-frequency word set in the first book.
[0120] According to the above description, the book grading device provided in the embodiment of the present application adopts more comprehensive grading features of books in the process of determining the target grade of the books to be graded, thereby ensuring that the accuracy of the determined target grade of the books is high.
[0121] Optionally, the book grading device can extract the total number of words, pages, words, illustrations, multiple words, sentences and sentence lengths included in the book from the content of the book to be graded. Then, the book grading device can send the multiple words to the first server. After receiving the multiple words, the first server can detect the word set to which each word belongs, obtain the detection result of each word, and send the detection result of each word to the book grading device. Accordingly, the book grading device can receive the detection result of each word and count the number of first words and the number of second words in the multiple words.
[0122] The book grading device can also send multiple sentences to the second server. After the second server receives the multiple sentences, for each sentence, the second server can input the sentence into the sentence analysis model to obtain the analysis result of each sentence in the multiple sentences. The analysis result of each sentence can include: the semantic complexity of the sentence, the sentence pattern, the entities included in the sentence, the attributes of the entities included in the sentence, and the relationship between the entities in the sentence. Afterwards, the second server can send the analysis result of each sentence to the book grading device. Accordingly, the book grading device can determine the semantic complexity of the book to be graded based on the analysis result of each sentence received, and count the number of sentence patterns contained in the book to be graded, the number of sentences of each sentence pattern, the number of entities, the number of attributes, and the number of relationships.
[0123] In the embodiment of the present application, the book grading device extracts features from the content of the book to be graded to obtain a specific implementation process of multiple grading features of the book to be graded. The implementation process of the above-mentioned book grading device determining multiple feature samples of historical books can be referred to, and the embodiment of the present application will not be repeated here.
[0124] In the embodiment of the present application, the first server also stores a large amount of book content. For a scenario where the book information of the book to be graded obtained by the book grading device is the identifier of the book, the book grading device can first forward the identifier to the first server. After receiving the identifier, the first server can use the identifier as a search keyword to retrieve the content corresponding to the identifier and send the content to the book grading device. Accordingly, the book grading device can obtain the content of the book to be graded.
[0125] For example, assuming that the book to be graded is the book "Little Pony Crossing the River", the feature data of the book to be graded obtained by the book grading device may include: the number of pages is 3, the total number of words is 690, the number of words is 60, the number of first words is 55, the number of second words is 5, the ratio of first words to the number of words is 11 / 12 (i.e. eleven out of twelve), the ratio of second words to the number of words is 1 / 12, the number of illustrations is 3, the sentence length is 8, the number of declarative sentences is 17, the number of judgment sentences is 8, the number of interrogative sentences is 10, the number of omitted sentences is 2, the number of entities is 10, the attributes of entities are 8, the relationship between entities is 5, and the semantic complexity is level 1.
[0126] Step 205: normalize each of the multiple classification features.
[0127] After the book grading device obtains multiple grading features of the book, for each grading feature, the mean and standard deviation corresponding to the grading feature can be used to normalize the grading feature to obtain multiple grading features after normalization. The multiple grading features after normalization are in the same order of magnitude. Among them, the grading feature X' after normalization satisfies the following formula:
[0128]
[0129] In the above formula, X is any grading feature among the multiple grading features. μ is the mean corresponding to the grading feature, and σ is the standard deviation corresponding to the grading feature.
[0130] In an embodiment of the present application, for a target grading feature among multiple grading features, the mean of the target grading feature may be the average value of the corresponding multiple feature samples, and the standard deviation of the target grading feature may be the standard deviation of the multiple feature samples. Among them, the target grading feature may be any grading feature among the multiple grading features. Each feature sample comes from a history book, and the type of each feature sample is the same as the type of the target grading feature. For example, if the target grading feature is the semantic complexity of the book to be graded, then each corresponding feature sample is the semantic complexity of the history book. If the target grading feature is the number of pages of the book to be graded, then each corresponding feature sample is the number of pages of the history book.
[0131] Step 206: Input the normalized multiple grading features into the book grading model to obtain the target grade of the book.
[0132] The book grading device can input the normalized multiple grading features into the book grading model respectively, so that the book grading model performs weighted processing on the multiple grading features, obtains the alternative grades output by the book grading model, and determines the target grade of the book to be graded based on the alternative grades.
[0133] Since the book grading device can perform weighted processing on multiple grading features at the same order of magnitude, it can ensure that the target grade of the books to be graded has a high accuracy.
[0134] In an embodiment of the present application, for a scenario in which a book grading device uses multiple different training algorithms to train multiple book grading models, the book grading device inputs the normalized multiple grading features into the multiple book grading models respectively. Each of the multiple book grading models can perform weighted processing on the multiple grading features to output candidate grades of the books to be graded. Afterwards, the book grading device can determine the target grade of the books to be graded based on the multiple candidate grades output by the multiple book grading models.
[0135] Different book grading models use different weight groups for weighting the multiple grading features. The weight group may include multiple weights corresponding to the multiple grading features.
[0136] Since the book grading device can use different training algorithms to train the same sample data to obtain different book grading models, and determine the target grade of the graded book based on the candidate grades output by the multiple book grading models, the problem of large errors in the book grade output by a single model can be avoided, thereby effectively improving the accuracy of the determined target grade of the book.
[0137] The embodiments of the present application take the following two optional implementation methods as examples to exemplify the process of a book grading device determining a target grade of a book to be graded based on multiple candidate grades output by multiple book grading models.
[0138] In an optional implementation, the target grade of the book to be graded is the candidate grade with the largest number of candidates among the multiple candidate grades output by the multiple book grading models. That is, the book grading device can use a voting mechanism to determine the target grade of the book to be graded from the multiple candidate grades.
[0139] For example, assume that the book grading device inputs multiple grading features of the book "Little Pony Crossing the River" to be graded into five book grading models respectively, and the candidate grades output by the five book grading models are: grade 1, grade 2, grade 2, grade 1, grade 2. Since grade 2 appears the most among the five candidate grades, the book grading device can determine that the target grade of the book "Little Pony Crossing the River" to be graded is grade 2.
[0140] Among them, the five book grading models can be obtained by training multiple sample data using five training algorithms, namely, vector machine, XGBoost, decision tree, random forest and neural network, respectively.
[0141] In another optional implementation, the target grade of the book to be graded is the average of multiple candidate grades output by multiple book grading models. Optionally, the average may be an arithmetic mean, a geometric mean, or a root mean square mean.
[0142] It should be noted that if the average value of multiple candidate grades is a decimal, the target grade of the book to be graded may be an integer obtained by rounding off the decimal.
[0143] For example, assume that the candidate grades of the book "Little Pony Crossing the River" to be graded output by the five book grading models are: grade 1, grade 2, grade 2, grade 1, grade 2. Since the average value of the five candidate grades is 8 / 5=1.6, the target grade of the book to be graded is grade 2.
[0144] In the embodiment of the present application, a book grading device inputs a plurality of normalized grading features into a book grading model trained by a neural network (e.g., a BP neural network) to obtain candidate grades of books to be graded output by the book grading model as an example, and exemplarily illustrates the weighted processing of the plurality of grading features by the book grading model.
[0145] After the book grading device inputs the normalized multiple grading features into the book grading model obtained by neural network training, the input layer of the neural network can receive the normalized multiple grading features. The input layer of the neural network can then transmit the normalized multiple grading features to each first neuron of the hidden layer of the neural network. In addition, the book grading device can perform weighted processing on the normalized multiple grading features through the multiple first neurons of the hidden layer to obtain the output values of the multiple first neurons.
[0146] Among them, the output value h of the qth first neuron q (U) Satisfy:
[0147]
[0148] In formula (2), q is an integer greater than or equal to 1 and less than or equal to M, and M is the total number of first neurons included in the hidden layer. e is a natural constant, and Q is the weight vector of the qth first neuron. The weight vector of each first neuron includes weights corresponding to multiple hierarchical features after normalization. T is a transposition symbol, and U is a feature set composed of multiple hierarchical features after normalization. In addition, the weight vectors of any two first neurons in the hidden layer are different.
[0149] Then, the book grading device can process the output values of the multiple first neurons through the multiple second neurons included in the output layer of the BP neural network to obtain the probability that the grade of the book to be graded output by each second neuron is the corresponding reference grade. Each second neuron corresponds to a reference grade, and the reference grades corresponding to the second neurons are different from each other. Among them, the multiple reference grades are: grade 1, grade 2, grade 3, ..., grade 9.
[0150] Among them, the probability P of the kth second neuron output (k) satisfy:
[0151]
[0152] In formula (3), z k The result obtained by weighting multiple output values of the k-th second neuron using the weight vector of the k-th second neuron. r The result obtained by weighting the multiple output values by the r-th second neuron using the weight vector of the r-th second neuron. The weight vector in each second neuron includes multiple weights corresponding to multiple first neurons. r is an integer greater than or equal to 1 and less than or equal to g. g is the total number of multiple second neurons included in the output layer, that is, g is the total number of multiple reference levels. For example, g can be 9. In addition, the weight vectors of any two second neurons are different.
[0153] Afterwards, the book grading device may determine the reference grade with the highest probability among the reference grades corresponding to the multiple second neurons as the candidate grade output by the book grading model. Furthermore, the book grading device may determine the target grade of the book to be graded based on the candidate grade. For example, if the book grading device only inputs the normalized multiple grading features into the book grading model obtained by training with a neural network, the book grading device may directly determine the candidate grade as the target grade of the book to be graded. If the book grading device inputs the normalized multiple grading features into multiple different book grading models, the target grade of the book to be graded may be determined based on the multiple candidate grades output by the multiple book grading models.
[0154] Step 207: Display the target grades of the books to be graded.
[0155] After obtaining the target grade of the book to be graded, the book grading device can display the target grade.
[0156] If the book grading device is a mobile terminal, the mobile terminal can directly display the target grade of the book on its display screen so that the user can know the target grade of the book. If the book grading device is a grading server, the grading server can send the target grade of the book to the mobile terminal. After receiving the target grade, the mobile terminal can display the target grade on its display screen so that the user can know the target grade of the book.
[0157] Optionally, the book grading device can also display multiple grading features of the books to be graded so that the user can learn more about the book. In addition, the book grading device can also display the user's reading history. The reading history may include: the number and level of the historical books read by the user. The process of the book grading device displaying the multiple grading features and the user's reading history can refer to the above-mentioned process of displaying the target level, and the embodiments of the present application will not be repeated here.
[0158] Optionally, the book grading device can display the user's reading history in the form of a pie chart, so that the user can intuitively know the number of historical books of each level read.
[0159] For example, assuming that the book grading device is a mobile terminal, the target grade of the book to be graded "Little Pony Crossing the River" is level 2, and the mobile terminal displays the user's reading history in the form of a pie chart, then the mobile terminal can display Figure 6 The interface shown. Figure 6 It can be seen that the interface displays illustrations 05 of the book to be graded, grading features 06 , book grade level 2, and reading history 07 .
[0160] From the reading history 07, it can be seen that the user has read 15 first-level books, 5 second-level books, and 2 third-level books.
[0161] In an embodiment of the present application, if the book grading device is a mobile terminal, the mobile terminal can directly send a prompt message when obtaining the target grade of the book to be graded and determining that the difference between the target grade and the reference reading grade is greater than the difference threshold.
[0162] If the book grading device is a grading server, the grading server can send a prompt instruction to the mobile terminal when obtaining the target grade of the book to be graded and determining that the difference between the target grade and the reference reading grade is greater than the difference threshold. The prompt instruction is used to instruct the mobile terminal to send a prompt message.
[0163] The difference between the target level and the reference reading level of the book to be graded may refer to the value obtained by subtracting the reference reading level from the target level. The reference reading level is the reading level configured in the book grading device. The reference reading level can be used to characterize the reading level of the user of the mobile terminal. The difference threshold may be pre-stored in the mobile terminal. For example, the difference threshold may be 2. The prompt message is used to prompt the user that the reading difficulty of the first book exceeds the user's reading level and the user is not recommended to read it.
[0164] Optionally, the reference reading level can be determined by the book grading device based on the level of historical books read by the user. For the scenario where the book grading device is a mobile terminal, the reference reading level can also be determined by the mobile terminal in response to the user inputting the level.
[0165] The embodiment of the present application takes the determination of the reference reading level based on the level of the historical books read by the user as an example, and exemplarily illustrates how the book grading device determines the reference reading level:
[0166] The book grading device may first determine the multiple levels to which the multiple historical books read by the user belong. For each level, the book grading device may count the number of historical books of the level to obtain multiple numbers corresponding to the multiple levels. Afterwards, the book grading device may determine the level corresponding to the number with the largest value among the multiple numbers as the reference reading level.
[0167] In an embodiment of the present application, after determining the target grade of the book to be graded, the book grading device can determine the difference between the target grade and the reference reading grade. Then, the book grading device can compare the difference with the difference threshold. If the difference is greater than the difference threshold, the mobile terminal can issue a prompt message. If the difference is less than or equal to the difference threshold, the book grading device does not need to perform any operation.
[0168] Optionally, the prompt message may be a text message, and accordingly, the mobile terminal may display the prompt message on its display screen. And / or, the prompt message may be a voice message, and accordingly, the mobile terminal may control its speaker to play the prompt message.
[0169] For example, assuming that the difference threshold is 2, the reference reading level is 2, and the target level of the book to be graded is 5, since the difference 3 between the target level 5 and the reference reading level 2 is greater than the difference threshold 2, the mobile terminal can also display Figure 7 The prompt box 08 is shown.
[0170] from Figure 7 It can be seen that the prompt box 08 displays a prompt message "Tip: The reading difficulty of the current book is high and is not suitable for you to read."
[0171] The embodiment of the present application takes the example of a book grading device using BP neural network training to obtain a book grading model, and exemplifies the process of obtaining the book grading model through the above steps 201 and 202.
[0172] First, the book classification model can extract features from the contents of N historical books to obtain a training set S. Where N is an integer greater than or equal to 1, S = {(x (i) ,y (i) ),1≤i≤N}. represents the mth feature sample among multiple feature samples included in the i-th history book among N history books. (i) Includes all feature samples of the i-th history book. (i) represents the grade of the i-th history book. Since each history book is an extracurricular reading book for primary and secondary schools recommended by the Ministry of Education, the grade of each history book can be greater than or equal to 1 and less than or equal to 9, that is, 1≤y (i) ≤9.
[0173] According to the above description, the training set S includes multiple feature samples of each of the N history books, as well as the level of the history book. Figure 8 As shown, the book grading device can use multiple feature samples of each of N historical books as input data, and use the grade of the historical book as output data for model training. Figure 8 Each circle in the figure represents a node (also called a neuron) in a neural network.
[0174] Before model training, the book grading device can perform standardization processing (also called normalization processing) on the multiple feature samples included in each history book in the training set S, so that the multiple feature samples have the same order of magnitude. The following formula can be satisfied:
[0175]
[0176] Among them, μ' is the average value of the feature samples of N target types, and σ' is the standard deviation of the feature samples of N target types. The target type is the type of the mth feature sample in the i-th history book.
[0177] For each grade of history books in the training set, the book grading device can perform one-hot encoding on the grade. The grade after encoding can be represented by a vector consisting of 9 digits, each digit is 0 or 1, and the 9 digits only include one 1. For example, if the grade of the i-th history book is 4, then y (i) ={0,0,0,1,0,0,0,0,0}. If the level of the i-th history book is 9, then y (i) ={0,0,0,0,0,0,0,0,1}.
[0178] Then, the book grading device can establish a BP neural network and perform model training to obtain a book grading model that meets the precision, recall and F1 scores. The F1 score is the harmonic mean of the precision and recall. The BP neural network may include: an input layer, at least one hidden layer and an output layer. For example, Figure 8 As shown, the BP neural network includes: an input layer 08, a hidden layer 09 and an output layer 10. Each layer in the input layer 08, the hidden layer 09 and the output layer 10 may include multiple nodes. Figure 8 It can also be seen that the output layer 10 of the BP neural network may include second neurons corresponding to multiple levels one by one.
[0179] The learning process of the BP neural network consists of two processes: forward propagation of signals and back propagation of errors. In the forward propagation stage, after multiple feature samples in a sample data of the book grading device are transmitted to the input layer, the hidden layer can process the multiple feature samples layer by layer, and then transmit them to the output layer after processing. If the actual output of the output layer does not match the expected output (i.e., the grade in the sample data), the error can be back propagated. Back propagation of errors is to propagate the output error back to the input layer layer by layer through the hidden layer, and distribute the error to all nodes in each layer, so as to obtain the error signal of each layer unit. This error signal can be used as the basis for correcting the weights of each node.
[0180] The activation function of the hidden layer can be a Sigmoid function (also known as an S-shaped growth curve). That is, in the forward propagation stage, for each first neuron in the hidden layer, the book grading device can use the Sigmoid function to calculate the output value of the first neuron. The output value h of the vth first neuron in the hidden layer is v (x (i) ) satisfies the following formula:
[0181]
[0182] In formula (5), is the weight vector of the vth first neuron in the BP neural network, and θ0,θ1,θ2, to θ m For x (i) In to, One-to-one corresponding weights. Where 1 is the bias of the neuron. It can be seen that the weight vector can include weights corresponding to multiple feature samples one-to-one.
[0183] The activation function of the output layer is the Softmax function (also known as the normalized exponential function). That is, in the forward propagation stage, each second neuron in the output layer can use the Softmax function to process the output values of multiple first neurons in the hidden layer to obtain the probability that the level of the history book output by the second neuron is the level corresponding to the second neuron. Among them, the probability of the hth second neuron outputting Satisfies the following formula:
[0184]
[0185] In formula (6), z i is the product of the weight vector of the hth second neuron and the output of the previous layer (i.e., the output value of each first neuron in the hidden layer). h is greater than or equal to 1 and less than or equal to g. j is the product of the weight vector of the jth second neuron in the output layer and the output of the previous layer. The weight vector of each second neuron includes a plurality of weights corresponding to a plurality of first neurons in the previous layer.
[0186] The loss function used by the book grading device can be cross entropy. That is, in the back propagation stage, the book grading device can use cross entropy to calculate the error between the actual output of the output layer and the expected output. The error J satisfies the following formula:
[0187]
[0188] in, The probability that the level of the historical book output by the jth second neuron is the corresponding level.
[0189] After obtaining the error J between the actual output of the output layer and the expected output, the book grading device can determine the gradient of each second neuron. The gradient of the hth second neuron is Satisfies the following formula:
[0190]
[0191] Afterwards, for each second neuron, the book grading device can update the weight of the second neuron based on the gradient of the second neuron. The updated weight of the hth second neuron is Satisfies the following formula:
[0192]
[0193] In formula (9), α is the learning rate, ω is h is the initial weight of the hth second neuron. The book grading device can pre-store the learning rate and the initial weight.
[0194] In the process of gradually inputting multiple sample data into the BP neural network for training, after each sample data is input, the book grading device can determine the F1 score of the trained BP neural network. If the book grading device determines that the F1 score is not less than the score threshold, it can be determined that the trained BP neural network meets the requirements.
[0195] Among them, the F1 score can satisfy the following formula:
[0196]
[0197] In formula (10), precision is the accuracy, which represents the percentage of actual (i.e. expected output) true samples among all samples whose predictions (i.e. actual output) are true. Recall represents the percentage of predicted true samples among all samples whose actual outputs are true.
[0198] It should be noted that the above embodiment is an exemplary description of a book grading device inputting multiple grading features of a book to be graded into multiple book grading models respectively, so that different book grading models use different weight groups to weight the multiple grading features to obtain the target grade of the book. It can be understood that the book grading device can pre-store multiple different weight groups, and can use the multiple different weight groups to weight the multiple grading features respectively, to obtain multiple candidate grades of the book, and then determine the target grade of the book. Each candidate grade is obtained based on a weight group, and each weight group includes: multiple weights corresponding to multiple grading features one by one.
[0199] It should also be noted that the order of the steps of the book grading method provided in the embodiment of the present application can be appropriately adjusted, and the steps can also be increased or decreased accordingly according to the situation. For example, step 203 may not be performed. Any technician familiar with the technical field can easily think of a method of variation within the technical scope disclosed in this application, which should be included in the protection scope of this application, so it will not be repeated.
[0200] In summary, the embodiment of the present application provides a book grading method, and the book grading device can perform feature extraction on the book to be graded to obtain multiple grading features of the book, and perform weighted processing on the multiple grading features to obtain the target grade of the book to be graded. Since the method provided by the embodiment of the present application can determine the grade of the book through the multiple grading features of the book, the accuracy of determining the grade of the book is effectively improved. Furthermore, it can facilitate users to reasonably select books based on the grade of the book determined by the book grading device.
[0201] The present application embodiment provides a book grading device, which can be used to execute the book grading method applied to the book grading device provided in the above method embodiment. Fig. 9 The book grading device 110 includes a processor 1101. The processor 1101 is used to:
[0202] Obtaining book information of the book to be graded, the book information including: the content of the book and / or the identification of the book;
[0203] Based on the book information, feature extraction is performed on the content of the book to obtain a plurality of hierarchical features of the book, wherein the plurality of hierarchical features include at least two of the following features: semantic complexity of the book, the number of types of sentence patterns contained in the book, and the number of sentences of each sentence pattern in the book, wherein the semantic complexity is represented by a numerical value;
[0204] Perform weighted processing on multiple grading features to obtain the target grade of the book;
[0205] The target level is displayed.
[0206] Optionally, the plurality of hierarchical features further include at least one of the following features: number of pages, number of words, number of first words, number of second words, number of illustrations, sentence length, number of entities, number of attributes, and number of relationships;
[0207] The first word is a word belonging to a high-frequency word set in the book, and the second word is a word belonging to a low-frequency word set in the book;
[0208] The number of entities refers to the total number of entities included in the book, the number of attributes refers to the total number of attributes of each entity in the book, and the number of relationships refers to the total number of relationships between each entity in the book.
[0209] Optionally, the processor 1101 may be configured to:
[0210] Using a plurality of different weight groups to perform weighted processing on the plurality of grading features respectively, a plurality of candidate grades of the book is obtained, wherein each candidate grade is obtained based on a weight group, and each weight group includes: a plurality of weights corresponding to the plurality of grading features one by one;
[0211] Based on multiple candidate ratings, determine the target rating for the book.
[0212] Optionally, the processor 1101 may be configured to:
[0213] The candidate level with the largest number of appearances among multiple candidate levels is determined as the target level of the book.
[0214] Optionally, the processor 1101 may be configured to:
[0215] Normalize each classification feature;
[0216] The normalized multiple grading features are weighted to obtain the target grade of the book.
[0217] Optionally, the processor 1101 may be configured to:
[0218] Performing weighted processing on the normalized multiple hierarchical features through the multiple first neurons included in the hidden layer of the neural network to obtain output values of the multiple first neurons;
[0219] The output values of the plurality of first neurons are processed by the plurality of second neurons included in the output layer of the neural network to obtain the probability that the grade of the book output by each second neuron is the corresponding reference grade, and the reference grades corresponding to the plurality of second neurons are different from each other;
[0220] Determine a target level of the book based on a reference level with the highest probability among the reference levels corresponding to the plurality of second neurons;
[0221] Among them, the output value h of the qth first neuron q (U) Satisfy:
[0222]
[0223] The probability P of the kth second neuron output (k) satisfy:
[0224]
[0225] q is an integer greater than or equal to 1 and less than or equal to M, M is the total number of first neurons included in the hidden layer, e is a natural constant, Q is a weight vector of the qth first neuron, the weight vector of each first neuron includes a plurality of weights corresponding one-to-one to a plurality of hierarchical features after normalization, T is a transposition symbol, and U is a feature set consisting of a plurality of hierarchical features after normalization;
[0226] z kis the result obtained by weighting multiple output values of the k-th second neuron using the weight vector of the k-th second neuron, z r is the result obtained by weighted processing of multiple output values by the r-th second neuron using the weight vector of the r-th second neuron, the weight vector of each second neuron includes multiple weights corresponding to multiple first neurons one by one, r is an integer greater than or equal to 1 and less than or equal to g, g is the total number of second neurons included in the output layer, the weight vectors of any two second neurons are different, and the weight vectors of any two first neurons are different.
[0227] Optionally, the book grading device is a mobile terminal, and the mobile terminal includes a display screen. The processor 1101 may be configured to: display the target grade on the display screen;
[0228] The processor 1101 may also be used for:
[0229] After obtaining the target level of the book, if it is determined that the difference between the target level and the reference reading level is greater than the difference threshold, a prompt message is issued, and the reference reading level is the reading level configured in the mobile terminal.
[0230] Optionally, the book grading device is a grading server. The processor 1101 can be used for:
[0231] Receiving book information of books to be graded sent by a mobile terminal;
[0232] The target level is sent to the mobile terminal, and the target level is used for display by the mobile terminal.
[0233] Optionally, the processor 1101 may be configured to:
[0234] Extract multiple sentences from the content of the book;
[0235] Sending a plurality of sentences to the first server, each sentence is used for the first server to input into the sentence analysis model, and obtaining the analysis result of the sentence, the analysis result including the semantic complexity and the sentence pattern;
[0236] determining a plurality of grading features based on the analysis results of each statement sent by the second server;
[0237] The semantic complexity of the first book is the average value of the semantic complexity of multiple sentences.
[0238] In summary, the embodiment of the present application provides a book grading device, which can perform feature extraction on a book to be graded to obtain multiple grading features of the book, and perform weighted processing on the multiple grading features to obtain a target grade of the book to be graded. Since the method provided in the embodiment of the present application can determine the grade of a book through multiple grading features of the book, the accuracy of determining the grade of the book is effectively improved. Furthermore, it can facilitate users to reasonably select books based on the grade of the book determined by the book grading device.
[0239] Optional, such as Fig. 9 As shown, the book grading device 110 provided in the embodiment of the present application may also include: a display unit 130, a radio frequency (RF) circuit 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a Bluetooth module 180, a power supply 190 and a camera 121 and other components.
[0240] Among them, the camera 121 can be used to capture static pictures or videos. The object generates an optical picture through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 1101 to convert it into a digital picture signal.
[0241] The processor 1101 is the control center of the book grading device 110. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the book grading device 110 and processes data by running or executing software programs stored in the memory 140 and calling data stored in the memory 140. In some embodiments, the processor 1101 may include one or more processing units; the processor 1101 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1101. In the present application, the processor 1101 can run an operating system and an application program, can control the user interface display, and can implement the book grading method provided in the embodiment of the present application. In addition, the processor 1101 is coupled to the input unit and the display unit 130.
[0242] The display unit 130 can be used to receive input digital or character information and generate signal input related to user settings and function control of the book grading device 110. Optionally, the display unit 130 can also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the book grading device 110. The display unit 130 may include a display screen 131 disposed on the front of the book grading device 110. The display screen 131 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 130 can be used to display various graphical user interfaces described in this application.
[0243] The display unit 130 includes: a display screen 131 and a touch screen 132 disposed on the front of the book grading device 110. The display screen 131 can be used to display preview images. The touch screen 132 can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc. Among them, the touch screen 132 can be covered on the display screen 131, and the touch screen 132 can also be integrated with the display screen 131 to realize the input and output functions of the book grading device 110. After integration, it can be simply called a touch display screen.
[0244] The memory 140 can be used to store software programs and data. The processor 1101 executes various functions and data processing of the book grading device 110 by running the software programs or data stored in the memory 140. The memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 140 stores an operating system that enables the book grading device 110 to run. In the present application, the memory 140 can store an operating system and various application programs, and can also store code for executing the book grading method provided in the embodiment of the present application.
[0245] The RF circuit 150 can be used to receive and send signals during the process of sending and receiving information or making calls. It can receive downlink data from the base station and hand it over to the processor 1101 for processing; it can send uplink data to the base station. Generally, the RF circuit includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer and other devices.
[0246] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the book grading device 110. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output. The book grading device 110 can also be equipped with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the RF circuit 150 to be sent to, for example, another terminal, or the audio data is output to the memory 140 for further processing. In the present application, the microphone 162 can obtain the user's voice.
[0247] Wi-Fi is a short-range wireless transmission technology. The book grading device 110 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 170, which provides users with wireless broadband Internet access.
[0248] The Bluetooth module 180 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the book grading device 110 can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 180 to exchange data.
[0249] The book grading device 110 also includes a power supply 190 (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 1101 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption. The book grading device 110 can also be configured with a power button for turning on and off the terminal, as well as locking the screen and other functions.
[0250] The book grading device 110 may include at least one sensor 1110, such as a motion sensor 11101, a distance sensor 11102, a fingerprint sensor 11103, and a temperature sensor 11104. The book grading device 110 may also be equipped with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
[0251] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the book grading device and each device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0252] Fig.10This is a software structure diagram of the book grading device provided in the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime environment (ART) and the system library, and the kernel layer.
[0253] The application layer can include a series of application packages. Fig.10 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0254] like Fig.10 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0255] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0256] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, pictures, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0257] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0258] The telephone manager is used to provide communication functions for the book grading device 110, such as the management of the call status (including connecting, hanging up, etc.).
[0259] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0260] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt tone is emitted, the communication terminal vibrates, and the indicator light flashes.
[0261] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0262] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0263] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0264] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as openGL ES), 2D graphics engine (such as SGL), etc.
[0265] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0266] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0267] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
[0268] A 2D graphics engine is a drawing engine for 2D drawings.
[0269] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0270] The present application embodiment provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the book grading method provided in the above embodiment, for example Figure 1 or Figure 2 The method shown.
[0271] The present application also provides a computer program product including instructions. When the computer program product is run on a computer, the computer is enabled to execute the book grading method provided by the above method embodiment. For example, Figure 1 or Figure 2 The method shown.
[0272] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0273] It should be understood that the "and / or" mentioned in this article indicates that there may be three relationships. For example, A and / or B may indicate that A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated with each other are in an "or" relationship. In addition, the term "at least one" in this application means one or more, and the term "plurality" in this application means two or more.
[0274] In this application, the terms "first", "second", etc. are used to distinguish the same or similar items with substantially the same role and function. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limit on the number and execution order. For example, without departing from the scope of the various examples described, the first book can be referred to as a history book, and similarly, the history book can be referred to as the first book.
[0275] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A book grading method, characterized in that: Applied to book grading equipment; the method comprises: Acquire book information of a book to be graded, the book information including: content of the book and / or an identification of the book; Based on the book information, feature extraction is performed on the content of the book to obtain a plurality of hierarchical features of the book, wherein the plurality of hierarchical features include at least two of the following features: semantic complexity of the book, the number of types of sentence patterns contained in the book, and the number of sentences of each sentence pattern in the book, wherein the semantic complexity is represented by a numerical value; Performing weighted processing on the multiple grading features to obtain a target grade of the book; Displaying the target level; The step of performing weighted summation on the multiple grading features to obtain the target grade of the book includes: Using a plurality of different weight groups to perform weighted processing on the plurality of grading features respectively, to obtain a plurality of candidate grades of the book, wherein each of the candidate grades is obtained based on one of the weight groups, and each of the weight groups includes: a plurality of weights corresponding to the plurality of grading features one by one; Based on the multiple candidate ratings, a target rating for the book is determined.
2. The method according to claim 1, characterized in that The plurality of hierarchical features further comprises at least one of the following features: number of pages, number of words, number of first words, number of second words, number of illustrations, sentence length, number of entities, number of attributes, and number of relationships; The first word is a word in the book that belongs to a high-frequency word set, and the second word is a word in the book that belongs to a low-frequency word set; The entity quantity refers to the total number of entities included in the book, the attribute quantity refers to the total number of attributes of each entity in the book, and the relationship quantity refers to the total number of relationships between each entity in the book.
3. The method according to claim 1, characterized in that: The step of determining a target level of the book based on the multiple candidate levels comprises: The candidate level with the largest number of appearances among the multiple candidate levels is determined as the target level of the book.
4. The method according to any one of claims 1 to 3, characterized in that: The step of weighting the plurality of grading features to obtain the target grade of the book includes: Performing normalization processing on each of the classification features; The normalized multiple grading features are weighted to obtain a target grade of the book.
5. The method according to claim 4, characterized in that The step of weighting the normalized multiple grading features to obtain the target grade of the book includes: Performing weighted processing on the normalized multiple hierarchical features through multiple first neurons included in the hidden layer of the neural network to obtain output values of the multiple first neurons; The output values of the plurality of first neurons are processed by the plurality of second neurons included in the output layer of the neural network to obtain the probability that the grade of the book output by each second neuron is the corresponding reference grade, and the reference grades corresponding to the plurality of second neurons are different from each other; Determining a target level of the book based on a reference level with the greatest probability among the reference levels corresponding to the plurality of second neurons; Among them, the output value of the qth first neuron is satisfy: ; The probability of the kth second neuron output satisfy: ; q is an integer greater than or equal to 1 and less than or equal to M, M is the total number of first neurons included in the hidden layer, e is a natural constant, Q is a weight vector of the qth first neuron, the weight vector of each first neuron includes a plurality of weights corresponding one-to-one to the plurality of hierarchical features after normalization, T is a transposition symbol, and U is a feature set consisting of the plurality of hierarchical features after normalization; is a result obtained by weighting the k-th second neuron with the weight vector of the k-th second neuron on the plurality of output values, is a result obtained by the r-th second neuron using the weight vector of the r-th second neuron to perform weighted processing on the multiple output values, the weight vector of each second neuron includes multiple weights corresponding to the multiple first neurons one by one, r is an integer greater than or equal to 1 and less than or equal to g, g is the total number of second neurons included in the output layer, the weight vectors of any two second neurons are different, and the weight vectors of any two first neurons are different.
6. The method according to any one of claims 1 to 3, characterized in that: The book grading device is a mobile terminal, and the mobile terminal includes a display screen; the displaying of the target grade includes: displaying the target level on the display screen; After obtaining the target grade of the book, the method further includes: If it is determined that the difference between the target level and the reference reading level is greater than the difference threshold, a prompt message is issued, and the reference reading level is the reading level configured in the mobile terminal.
7. The method according to any one of claims 1 to 3, characterized in that: The book grading device is a grading server; the step of obtaining book information of a book to be graded includes: Receiving book information of books to be graded sent by a mobile terminal; The displaying of the target level includes: The target level is sent to the mobile terminal, where the target level is used for display by the mobile terminal.
8. The method according to any one of claims 1 to 3, characterized in that: The method of extracting features of the content of the book based on the book information to obtain multiple hierarchical features of the book includes: extracting a plurality of sentences from the content of the book; Sending the plurality of statements to the first server, each statement being used for the first server to input into a statement analysis model, to obtain analysis results of the statement, the analysis results including semantic complexity and sentence pattern; determining the plurality of grading features based on the analysis result of each of the statements sent by the first server; The semantic complexity is an average value of the semantic complexity of the multiple sentences.
9. A book grading device, characterized in that: The book grading device comprises: a processor; the processor is used for: Acquire book information of a book to be graded, the book information including: content of the book and / or an identification of the book; Based on the book information, feature extraction is performed on the content of the book to obtain a plurality of hierarchical features of the book, wherein the plurality of hierarchical features include at least two of the following features: semantic complexity of the book, the number of types of sentence patterns contained in the book, and the number of sentences of each sentence pattern in the book, wherein the semantic complexity is represented by a numerical value; Performing weighted processing on the multiple grading features to obtain a target grade of the book; Displaying the target level; The step of performing weighted summation on the multiple grading features to obtain the target grade of the book includes: Using a plurality of different weight groups to perform weighted processing on the plurality of grading features respectively, to obtain a plurality of candidate grades of the book, wherein each of the candidate grades is obtained based on one of the weight groups, and each of the weight groups includes: a plurality of weights corresponding to the plurality of grading features one by one; Based on the multiple candidate ratings, a target rating for the book is determined.
Citation Information
Patent Citations
Book classification method and system
CN107590126A
Children grading reading aid method and system for autonomous reading ability acquisition
CN113052730A
