CN112434127B - Text information searching method, apparatus and readable storage medium - Google Patents

Text information searching method, apparatus and readable storage medium Download PDF

Info

Publication number
CN112434127B
CN112434127B CN202011209229.8A CN202011209229A CN112434127B CN 112434127 B CN112434127 B CN 112434127B CN 202011209229 A CN202011209229 A CN 202011209229A CN 112434127 B CN112434127 B CN 112434127B
Authority
CN
China
Prior art keywords
name
virtual
role
text
search
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011209229.8A
Other languages
Chinese (zh)
Other versions
CN112434127A (en
Inventor
奚晓钰
李敏
陆彦良
李东晓
周效军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011209229.8A priority Critical patent/CN112434127B/en
Publication of CN112434127A publication Critical patent/CN112434127A/en
Application granted granted Critical
Publication of CN112434127B publication Critical patent/CN112434127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3322Query formulation using system suggestions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a text information searching method, text information searching equipment and a readable storage medium, and relates to the technical field of information searching. When the text information searching method is applied to a client, the method comprises the following steps: receiving a first input for a virtual character name search; in response to the first input, a multi-persona search option is displayed that includes at least one avatar name. The technical scheme provided by the application solves the problem that the existing searching method aiming at the virtual roles is inflexible in searching.

Description

Text information searching method, apparatus and readable storage medium
Technical Field
The present application relates to the field of information searching technologies, and in particular, to a text information searching method, apparatus, and readable storage medium.
Background
With the development of internet technology, electronic reading is increasingly favored by users in the information age due to convenience and high efficiency, and a search scheme is also increasingly suitable for the demands of readers. Currently, in searching for a virtual character in electronic reading, a virtual character name is generally input, all paragraphs or sentences where the virtual character name is located are returned to be displayed, and when a user expects text paragraphs including the virtual character and other virtual characters, the user needs to search among a plurality of results, and even needs to search again. It can be seen that the existing searching method for virtual characters has the problem of inflexibility in searching.
Disclosure of Invention
The embodiment of the application provides a text information searching method, text information searching equipment and a readable storage medium, which are used for solving the problem that the existing searching method aiming at virtual roles is inflexible in searching.
In a first aspect, an embodiment of the present application provides a text information searching method, applied to a client, including:
receiving a first input for a virtual character name search;
in response to the first input, a multi-persona search option is displayed that includes at least one avatar name.
Optionally, the multi-persona search option containing at least one virtual persona name is determined based on a persona relationship between virtual personas.
Optionally, the determining of the multi-role search option including at least one virtual role name based on the role relationship between the virtual roles includes:
a multi-persona search option including at least one virtual character name is determined based on at least one of a gender of each virtual character, a number of occurrences of each virtual character, and a total number of chapters in which each virtual character occurs.
Optionally, after displaying a multi-persona search option including at least one avatar name in response to the first input, the method further comprises:
Receiving a second input for the first search option; the first search option includes a target avatar name;
and displaying text search results containing the target virtual character name in response to the second input.
Optionally, the displaying, in response to the second input, a text search result including the name of the target avatar includes:
responsive to the second input, obtaining at least one target text comprising the target avatar name;
displaying text search results containing the at least one target text;
the target text comprises a first text paragraph in which the target virtual character name is located and at least one of the first T paragraphs and the last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
Optionally, the number of text search results is a plurality, and after displaying the text search result including the target avatar name in response to the second input, the method further includes:
displaying a first text page corresponding to a first text search result under the condition that a third input aiming at the first text search result is received; the first text search result is any one of a plurality of text search results;
Displaying a second text page corresponding to a second text search result when a fourth input acting on the first text page is received; among the plurality of text search results, the second text search result is arranged before or after the first text search result.
In a second aspect, an embodiment of the present application further provides a text information searching method, which is applied to a server, and includes:
receiving a search request for the virtual character name sent by a client;
determining, in response to the search request, a multi-persona search option containing at least one virtual persona name;
and sending the multi-role search option to the client.
Optionally, the determining a multi-role search option including at least one virtual role name includes:
the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between the virtual personas.
Optionally, the determining the multi-role search option including at least one virtual role name based on the role relation among the virtual roles includes:
determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
And determining a multi-role search option containing at least one virtual role name according to all the virtual role names and the occurrence times of each virtual role name.
Optionally, the determining, according to the all virtual character names and the occurrence times of each virtual character name, a multi-role search option including at least one virtual character name includes:
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
Optionally, the determining the multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name includes:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
The N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
Optionally, before determining the multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name, the method further includes:
determining the gender of the corresponding virtual character based on the virtual character name;
the determining a multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name includes:
sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
and arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
Optionally, the determining the gender of the corresponding virtual character based on the virtual character name includes:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
In a third aspect, an embodiment of the present application further provides a text information searching apparatus, including a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the text information searching method as described in the first aspect or the steps of the text information searching method as described in the second aspect when executed by the processor.
In a fourth aspect, an embodiment of the present application further provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the text information search method as described in the first aspect, or implements the steps of the text information search method as described in the second aspect.
In the embodiment of the application, the client can receive the first input aiming at the virtual character name search, display the multi-role search option comprising at least one virtual character name, provide more choices for the search of the user, and determine the search option without multiple inputs of the user, thereby effectively simplifying the user operation, improving the search efficiency and bringing better reading experience for the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a flowchart of a text information searching method provided in an embodiment of the present application;
FIG. 1a is a schematic diagram of an interface of a client for applying a text information searching method according to an embodiment of the present application;
FIG. 1b is a second schematic interface diagram of a client for applying a text information searching method according to an embodiment of the present application;
FIG. 1c is a third interface diagram of a client for applying a text information searching method according to an embodiment of the present application;
FIG. 2 is a flowchart of another text information searching method according to an embodiment of the present application;
fig. 3 is a block diagram of a text information searching apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of another text information searching apparatus according to an embodiment of the present application;
Fig. 5 is a block diagram of another text information searching apparatus provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The text information searching method provided by the application is described below through specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a text information searching method according to an embodiment of the present application, where the text information searching method is applied to a client, such as a mobile phone, a tablet computer, a notebook computer, an electronic book reader, etc.
As shown in fig. 1, the text information searching method includes the steps of:
step 101, a first input for a virtual character name search is received.
It should be noted that the text information searching method provided by the present application may be applied to a written work including text information, such as a novel, a prose, a poem, a paper, etc., and the scheme provided by the present application will be specifically described below by taking the novel as an example. Alternatively, the virtual character may refer to a persona in a novel, and the virtual character name may refer to a name of a person in the novel. Of course, when the text information searching method is applied to other literal works, the virtual character name may also refer to other virtual character names, for example, may be cartoon character names, even building names, etc., which are not repeated in the present application.
In the embodiment of the present application, the first input of the search for the virtual character name may refer to an input operation of inputting the virtual character name in a search input box of a novel, such as inputting virtual character names of "Zhang Sang", "Lisi Tetra" and the like.
Step 102, in response to the first input, displaying a multi-persona search option including at least one virtual persona name.
In the embodiment of the application, when the first input for searching the virtual character names is received, the text information searching device displays a multi-role searching option containing at least one virtual character name.
For example, if the virtual character name input by the user is "Zhang san", the displayed target search options may be three multi-character search options, i.e., zhang san Liu, and Zhang Sanwang five, which all include the virtual character name of Zhang san, and of course, the multi-character search option may also include only one virtual character name, i.e., zhang san.
In the embodiment of the application, the multi-role search option containing at least one virtual role name is determined based on the role relation among the virtual roles. It will be appreciated that, taking a novel as an example, the text to be searched typically includes a plurality of virtual character names, and a certain character relationship exists among the plurality of virtual characters, for example, "Zhang Sano" and "Liqu" are classmate character relationships or superior-subordinate character relationships in the novel, and so on. For example, when receiving the first input for the search for the virtual character name "Zhang Sanu", the client can combine other virtual character names having a character relationship with "Zhang Sanu" in the text to be searched with "Zhang Sanu" to display a multi-role search option including at least "Zhang Sanu", such as "Zhang SanLifour", and the like.
For example, when the user inputs "Zhang Sanning", it may be that a search option including only "Zhang Sanning" is displayed, as shown in fig. 1a, and a text including the virtual character name of "Zhang Sanning" is correspondingly displayed in all or part of the text to be searched; or when the user inputs "Zhang Sanhe", it may also be a search option for displaying two virtual character names including "Zhang Sanli four" in the character relationship with "Zhang Sanli", as shown in fig. 1b, and correspondingly displaying all or part of the text to be searched includes the text of the virtual character name "Zhang Sanli four" at the same time.
In this way, when the client receives the first input of searching for a certain virtual character name, searching can be performed based on the virtual character name and the character relation related to the virtual character name, and then a multi-role search option containing at least one virtual character name is displayed, so that more choices can be provided for searching of the user, and the user can select a desired search option in the multi-role search option to search without multiple inputs of the user.
Alternatively, the user may make the first input on the first page of the reading class application. For example, the user inputs the virtual character name in the front page of the reading class application program, and then the reading class application program searches all literary works in the resource library, judges whether the novel of the virtual character name is contained, and displays the novel. For example, the user inputs "Zhang Sano", and then displays all the literary works including the virtual character name of "Zhang Sano", from which the user can select a literary work for further searching.
In the embodiment of the application, the first input is an input operation acting on a specific text to be searched, for example, when a client receives a click input of a user acting on a role positioning button under the condition that a text page of a novel A is displayed, a multi-role search option is displayed; the multi-persona search options include multi-persona search options for at least one primary virtual persona name combination in the novel a. Therefore, the user can trigger the client to display the multi-role search option by triggering a specific button, the user does not need to input the virtual role name, and the search operation of the user is further simplified.
In the embodiment of the present application, the determining, based on the role relationship between the virtual roles, of the multi-role search option including at least one virtual role name includes:
a multi-persona search option including at least one virtual character name is determined based on at least one of a gender of each virtual character, a number of occurrences of each virtual character, and a total number of chapters in which each virtual character occurs.
That is, the multi-persona search option may be determined based on the sex of each virtual character, the number of occurrences of each virtual character, etc. in the text to be searched. For example, when receiving the first input for the search of "Zhang Sanu", the client can combine, for example, "Zhang Sanu" with "Zhang Sanu" which occurs most frequently in other virtual character names having a character relationship with "Zhang Sanu" in the text to be searched, and then display the multi-role search option "Zhang SanLiu".
Optionally, the determining the multi-role search option including at least one virtual character name based on at least one of the sex of each virtual character, the number of occurrences of each virtual character, and the total number of chapters in which each virtual character occurs may include:
determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
and determining a multi-role search option containing at least one virtual role name according to all the virtual role names and the occurrence times of each virtual role name.
It may be appreciated that after determining the text to be searched based on the virtual character name corresponding to the first input, for example, the text to be searched is a novel a, all the virtual character names in the novel a and the occurrence times of each virtual character name in the novel a are obtained. Alternatively, the virtual character names in the novel a and the occurrence times of the virtual character names may be counted through keyword extraction and part-of-speech tagging in natural semantic processing, and specific statistical algorithms may refer to related technologies, which are not described in detail in this embodiment.
Further, a multi-role search option corresponding to novel a including at least one virtual role name is determined according to the virtual role name and the number of occurrences of each virtual role name. For example, the multi-role search option may include one virtual role name, which is a combination of any two virtual role names, or may be a combination of any three or more virtual role names, which is not specifically limited in the present application. In this way, the client can display a plurality of multi-role search options to provide more choices for text information search of the user, so that the user can search for text information more flexibly.
As an optional implementation manner, the determining a multi-role search option including at least one virtual role name according to the all virtual role names and the occurrence times of each virtual role name includes:
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
And determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
For example, assuming that the total number of chapters of the novel A total is chapter C, the total number of virtual character names in the novel A total is R, and the number of virtual character names appearing in the novel A chapters is C r (1 < = R), e.g. c 1 Indicating the number of chapters in which role 1 appears in novel A, i.e. c in novel A 1 Role 1 appears in each chapter. The number of virtual character names appearing in the corresponding chapter is set as r c (1 < = C), e.g. r 2 Representing the total number of virtual character names appearing in chapter 2, i.e. the 2 nd chapter in novel A shares r 2 The virtual character names. The number of names of specific virtual characters appearing in the corresponding chapter is set to x rc (1 < = R,1 < = C), e.g. x 12 Indicating the number of occurrences of character 1 in chapter 2, i.e. chapter 2 has x in novel A 12 And role 1. Based on the parameters, the target parameter value corresponding to the name of the r-th virtual role can be calculated by combining the weights, and the calculation formula is as follows:
wherein s is r The method comprises the steps of setting a target parameter value corresponding to the name of the r-th virtual role in the novel A;
α c weight, alpha, representing the number of occurrences of virtual character names in a particular section r The weight for representing the occurrence probability of the r-th virtual character name in the chapter can be preset and can be regulated by a model training result of natural semantic processing;
x rc (1 < = R,1 < = C) is the number of occurrences of the first avatar name in the target chapter, such as x 12 Indicating the number of occurrences of character 1 in chapter 2, i.e. x in section 2 of novel A 12 A personal role 1;
c r (1 < = R) is the total number of chapters in novel A where the first avatar name appears, e.g. c 1 Indicating the number of chapters in which role 1 appears in novel A, i.e. c in novel A 1 Each chapter has role 1;
r c (1 < = C) is the total number of virtual character names appearing in the target chapter, e.g. r 2 Representing the total number of roles that appear in chapter 2, i.e., the 2 nd chapter in novel A shares r 2 The roles.
Based on the above formula, the target parameter value corresponding to the first virtual character name (i.e., character 1) can be calculated. The first virtual character name is any one of the virtual character names in the novel a, the target parameter values corresponding to the virtual character names can be obtained based on the same calculation mode of the target parameter values, and the multi-role search option comprising at least one virtual character name can be determined according to the target parameter values corresponding to the virtual character names. For example, the virtual character names corresponding to the first three target parameter values with larger values and the virtual character names of each other may be combined to obtain the multi-role search option.
Optionally, the determining, according to the target parameter value corresponding to each virtual role name, a multi-role search option including at least one virtual role name includes:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
the N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
In this embodiment, after the target parameter values corresponding to the virtual character names are obtained based on the above calculation method, the target parameter values may be prioritized in order from the large to the small, and at least two virtual character names with the priority being ranked in front may be ranked and combined, so as to obtain the multiple character search option. For example, the three virtual character names with the top priority order are "Zhang Sanli", "Liqu" and "Wang Wu", respectively, and the multi-role search option obtained by permutation and combination of these three virtual character names includes "Zhang SanLiqu", "Zhang Sanwang five" and "Liqu Wu".
It will be appreciated that the prioritized virtual character names, i.e., the virtual character names that appear more frequently in novel a, may be considered the more dominant virtual characters in novel a. The multiple role search options are obtained by arranging and combining the virtual role names with the priority arranged in front, so that the obtained multiple role search options are the options with larger search probability, more effective search options can be recommended for users, and the search and reading experience of the users is improved.
It should be noted that, the multi-role search options obtained based on the above manner may not be able to well reflect the relationship between the main roles, and the recommended roles that the page may display may be prioritized, and may not be able to display all the multi-role search options arranged, so that some combinations of the important roles, such as the main roles of a man and a woman, the first man and the woman, etc., may be displayed. In the embodiment of the application, the multi-role search option can be determined according to the gender of the virtual role.
Further, before determining the multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name, the method further includes:
determining the gender of the corresponding virtual character based on the virtual character name;
the determining a multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name includes:
sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
And arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
That is, the sex corresponding to each virtual character name is determined based on the name of each virtual character. Specifically, the determining the gender of the corresponding virtual character based on the virtual character name includes:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
In the embodiment of the present application, the first gender may refer to a male or female, and the second gender may refer to a female or male. In the following embodiments, the first sex will be male and the second sex will be female.
It will be appreciated that, taking the example of a third target avatar name, the third target avatar name may be any one of the avatar names in novel a. In the embodiment of the application, the preset balance parameter is added to regulate the influence of the probability that each character in the virtual character name appears in the male name or the female name. For example, for a avatar name, the magnitude of the probability of appearing in a male or female name may be compared by calculating a weighted average of the probabilities of each character appearing in the male or female name, and if the probability of appearing in a male name is greater than the probability of appearing in a female name, the avatar is primarily determined to be male and vice versa. Specifically, the probability that the avatar name appears in the male name and the female name can be calculated by the following formula:
Wherein p is M For probability of appearing in male name, p F Probability of appearing in a female name; alpha and beta respectively represent balance parameters of probabilities of last name and first name in male and female sexual names; n is n x And n m The numbers of words respectively representing the last name and the first name; j and K respectively represent the j-th word in surname, and K represents the n-th word in first name x +k words;represents the probability of the jth last name appearing in men,/->Represents the nth x Probability of +k word occurrence in men; n is the number of words of the avatar name, e.g. "Zhang San", then n is 2.
Comparison p M And p F If p M Greater than p F Preliminarily judging that the virtual character is male; if p M Less than p F The virtual character is primarily determined to be female. Based on the above manner, the sex of the virtual character corresponding to each virtual character can be determined.
In the embodiment of the application, after the gender of the virtual character corresponding to each virtual character is determined, the target parameter values corresponding to each virtual character can be respectively prioritized according to the gender of the virtual character, so that a male character priority sequence and a female character priority sequence are obtained, the first M male character names in the male character priority sequence and the first L female character names in the female character priority sequence are respectively obtained, the M male character names and the L female character names are arranged and combined, and a multi-role search option is obtained, and therefore, the obtained multi-role search option comprises both the male character and the female character, the obtained multi-role search option can better represent the task character relation of the text to be searched, and more targeted search selection and search reference are provided for users.
For example, for a male character and a female character, the first parameter values are respectively arranged in the first characters such as a male owner and a female owner, a male second and a female second, and the like, and the other characters are sequentially arranged, so that after the male sex and the female sex are separated, the first characters of the male character and the first characters of the female character can be combined into a multi-role search option of the male and female owner.
In addition, when the multi-role combination of the main roles is determined, an angle selection strategy can be set according to the types of the texts to be searched, so that multi-role search options are recommended for the texts to be searched of different types, the search expectations of users are met, and the user experience is improved. For example, if a novel of the large girl master type, the recommended multi-persona search options may be mainly: first female and first male, first female and second male (first in female character priority sequence and second in male character priority sequence), etc.; in the case of a large man-made novel, the recommended multi-role combination may be mainly: male and female, male and female (first in the Male role priority sequence and second in the female role priority sequence); if the novice of sibling types, the recommended multi-role combinations may be mainly: male one and Male two (first and second in the Male role priority sequence); etc. It should be noted that, the type of the text to be searched may be set by the user, or may be determined by a background server of the reading application program.
In the embodiment of the application, after the client receives the first input of the user and displays the multi-role search options, the user can select any one of the multi-role search options to perform text search. Optionally, after the step 102, the method further includes:
receiving a second input for the first search option; the first search option includes a target avatar name;
and displaying text search results containing the target virtual character name in response to the second input.
It should be noted that, after receiving the first input of the user, the client may display at least one multi-role search option, where the first search option is any one of the at least one multi-role search option. As shown in fig. 1a, the first search option selected by the user is "Zhang san", that is, the name of the target virtual character, and then the search results of all the text paragraphs including "Zhang san" in the text to be searched are displayed, and when the search results are more, the search results may be displayed in the form of a list. In this way, the user can select one of the search results to quickly locate the text page on which the search result is located, so as to facilitate reading by the user.
According to the technical scheme provided by the embodiment of the application, the client receives the first input aiming at the virtual character name search, and displays the multi-role search options containing at least one virtual character name, so that more choices can be provided for the search of the user, the user does not need to perform multiple inputs to determine the search options, the user operation is effectively simplified, and the search efficiency can be improved; when a second input aiming at any one of the multi-role search options is received, a text search result comprising the target virtual role name is displayed, so that a user can quickly locate a relevant text page for reading based on the search result, and better reading experience is brought to the user.
Optionally, the displaying, in response to the second input, a text search result including the name of the target avatar includes:
responsive to the second input, obtaining at least one target text comprising the target avatar name;
displaying text search results containing the at least one target text;
the target text comprises a first text paragraph in which the target virtual character name is located and at least one of the first T paragraphs and the last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
For example, the first search option is a search option including the virtual character name "Zhang san", all target texts including "Zhang san" in the texts to be searched are obtained, at least one target text can be displayed, and then the user can quickly jump to a text page including the target text by selecting a specific target text, so that the user can read conveniently.
In the embodiment of the application, each target text comprises the first text paragraph with the virtual character name of 'Zhang Sanj', and the first T paragraphs and/or the last R paragraphs of the first text paragraph, so that a more complete scene can be formed through a plurality of paragraphs, the target text displayed to the user is not only a single paragraph text but also a scene text comprising a plurality of paragraphs, the understanding of the user is facilitated, the user can distinguish the plurality of target texts more conveniently, the text pages expected to be read can be positioned more accurately and rapidly, and better reading experience is brought to the user.
Optionally, the number of text search results is a plurality, and after displaying the text search result including the target avatar name in response to the second input, the method further includes:
Displaying a first text page corresponding to a first text search result under the condition that a third input aiming at the first text search result is received; the first text search result is any one of a plurality of text search results;
displaying a second text page corresponding to a second text search result when a fourth input acting on the first text page is received; among the plurality of text search results, the second text search result is arranged before or after the first text search result.
It will be appreciated that when a third input is received by the user acting on a first text search result, a first text page corresponding to the first text search result can then be displayed. For example, when the client displays a text search result including the target virtual character name "Zhang Sanli four", if a third input, such as a click input, is received on a first text search result acted on by the user, a first text page corresponding to the first text search result is displayed, as shown in fig. 1 c. Possibly, the first text page may not be the text page that the user desires to read, or when the user desires to read the text page corresponding to the other text search results, a second text page corresponding to the second text search result may be displayed by performing the fourth input.
For example, the fourth input may be an up-slide operation, a down-slide operation, a preset track-slide operation, or the like, which is not limited in this embodiment, acting on the first text page. It should be noted that, the fourth input needs to be distinguished from the already specified page up and down operation, for example, sliding to the left to page down and sliding to the right to page up, and then the fourth input may be a sliding up operation to jump to the text search result that is the next text search result to the first text search result. Therefore, the method and the device can quickly jump to text pages corresponding to other text search results, do not need to be switched and searched one by a user, do not need to return to the text search results again for reselection by the user, effectively improve the search efficiency of the user, simplify the user operation and bring better reading experience to the user.
Referring to fig. 2, fig. 2 is a flowchart of another text information searching method provided in the embodiment of the present application, where in the embodiment of the present application, the text information searching method is applied to a server, and the server may be used to provide services for a client in the embodiment shown in fig. 1, and for example, the server may be referred to as a background server corresponding to a reading application program.
As shown in fig. 2, the text information searching method includes the steps of:
step 201, receiving a search request for a virtual role name sent by a client.
It will be appreciated that when the client receives the first input for the avatar name search, the client can send a search request for the avatar name to the server. For example, taking a client as a mobile phone, when the mobile phone displays a reading application program, if the mobile phone receives a first input of searching for Zhang Sanu which is acted on the reading application program by a user, the mobile phone sends a searching request for Zhang Sanu to a server corresponding to the reading application program; in this way, the server can respond to the search request to perform a text information search for "Zhang Sanj".
Step 202, in response to the search request, determining a multi-persona search option containing at least one virtual persona name.
It can be appreciated that, after receiving a search request for a virtual character, the server can determine a multi-persona search option including at least one virtual character name based on an analytical calculation of text to be searched.
Wherein the determining a multi-persona search option containing at least one avatar name comprises:
the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between the virtual personas.
It will be appreciated that, taking a novel as an example, the text to be searched typically includes a plurality of virtual character names, and a certain character relationship exists among the plurality of virtual characters, for example, "Zhang Sano" and "Liqu" are classmate character relationships or superior-subordinate character relationships in the novel, and so on. For example, when a search request for the virtual character name "Zhang Sanu" is received, the server side can combine other virtual character names having a character relationship with "Zhang Sanu" in the text to be searched with "Zhang Sanu" to determine a multi-role search option including at least "Zhang Sanu", such as "Zhang Sanli Sanu", and the like.
The determining the multi-role search option including at least one virtual role name based on the role relationships among the virtual roles includes:
determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
And determining a multi-role search option containing at least one virtual role name according to all the virtual role names and the occurrence times of each virtual role name.
It can be appreciated that the server side can determine the text to be searched based on the virtual character names, for example, if the text to be searched is a novel a, all the virtual character names in the novel a and the occurrence times of each virtual character name in the novel a are obtained. Alternatively, the virtual character names in the novel a and the occurrence times of the virtual character names may be counted through keyword extraction and part-of-speech tagging in natural semantic processing, and specific statistical algorithms may refer to related technologies, which are not described in detail in this embodiment.
Further, a multi-role search option corresponding to novel a including at least one virtual role name is determined according to the virtual role name and the number of occurrences of each virtual role name. For example, the multi-role search option may include one virtual role name, which is a combination of any two virtual role names, or may be a combination of any three or more virtual role names, which is not specifically limited in the present application. Therefore, the server side can determine a plurality of multi-role search options and feed back the multi-role search options to the client side so as to provide more choices for text information search of the user, and the user can search the text information more flexibly.
The determining a multi-role search option including at least one virtual role name according to the all virtual role names and the occurrence times of each virtual role name comprises the following steps:
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
For example, assuming that the total number of chapters of the novel A total is chapter C, the total number of virtual character names in the novel A total is R, and the number of virtual character names appearing in the novel A chapters is C r (1 < = R), e.g. c 1 Indicating the number of chapters in which role 1 appears in novel A, i.e. c in novel A 1 Role 1 appears in each chapter. The number of virtual character names appearing in the corresponding chapter is set as r c (1 < = C), e.g. r 2 Representing the total number of virtual character names appearing in chapter 2, i.e. the 2 nd chapter in novel A shares r 2 The virtual character names. The number of names of specific virtual characters appearing in the corresponding chapter is set to x rc (1 < = R,1 < = C), e.g. x 12 Indicating the number of occurrences of character 1 in chapter 2, i.e. chapter 2 has x in novel A 12 And role 1. Based on the parameters, the target parameter value corresponding to the name of the r-th virtual role can be calculated by combining the weights, and the calculation formula is as follows:
wherein s is r The method comprises the steps of setting a target parameter value corresponding to the name of the r-th virtual role in the novel A;
α c weight, alpha, representing the number of occurrences of virtual character names in a particular section r The weight for representing the occurrence probability of the r-th virtual character name in the chapter can be preset and can be regulated by a model training result of natural semantic processing;
x rc (1 < = R,1 < = C) is the number of occurrences of the first avatar name in the target chapter,such as x 12 Indicating the number of occurrences of character 1 in chapter 2, i.e. x in section 2 of novel A 12 A personal role 1;
c r (1 < = R) is the total number of chapters in novel A where the first avatar name appears, e.g. c 1 Indicating the number of chapters in which role 1 appears in novel A, i.e. c in novel A 1 Each chapter has role 1;
r c (1 < = C) is the total number of virtual character names appearing in the target chapter, e.g. r 2 Representing the total number of roles that appear in chapter 2, i.e., the 2 nd chapter in novel A shares r 2 The roles.
Based on the above formula, the target parameter value corresponding to the first virtual character name (i.e., character 1) can be calculated. Any one of the virtual character names in the first character name novel A can obtain the target parameter values corresponding to the virtual character names based on the same calculation mode of the target parameter values, and the multi-role search option comprising at least one virtual character name can be determined according to the target parameter values corresponding to the virtual character names. For example, the virtual character names corresponding to the first three target parameter values with larger values and the virtual character names of each other may be combined to obtain the multi-role search option.
Optionally, the determining, according to the target parameter value corresponding to each virtual role name, a multi-role search option including at least one virtual role name includes:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
the N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
In this embodiment, after the target parameter values corresponding to the virtual character names are obtained based on the above calculation method, the target parameter values may be prioritized in order from the large to the small, and at least two virtual character names with the priority being ranked in front may be ranked and combined, so as to obtain the multiple character search option. For example, the three virtual character names with the top priority order are "Zhang Sanli", "Liqu" and "Wang Wu", respectively, and the multi-role search option obtained by permutation and combination of these three virtual character names includes "Zhang SanLiqu", "Zhang Sanwang five" and "Liqu Wu".
It will be appreciated that the prioritized virtual character names, i.e., the virtual character names that appear more frequently in novel a, may be considered the more dominant virtual characters in novel a. The multiple role search options are obtained by arranging and combining the virtual role names with the priority arranged in front, and the obtained multiple role search options are the options with larger search probability, so that more effective search options can be recommended for the client, and better search and reading experience is brought for the user.
It should be noted that, based on the multi-role search option obtained in the above manner, the relationship between the main roles may not be well reflected, and thus some combinations of the important roles, such as a main role for a man and a woman, etc., may be determined. In the embodiment of the application, the multi-role search option can be determined according to the gender of the virtual role.
Before determining the multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name, the method further comprises:
determining the gender of the corresponding virtual character based on the virtual character name;
the determining a multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name includes:
sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
And arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
That is, the sex corresponding to each virtual character name is determined based on the name of each virtual character. Specifically, the determining the gender of the corresponding virtual character based on the virtual character name includes:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
In the embodiment of the present application, the first gender may refer to a male or female, and the second gender may refer to a female or male. In the following embodiments, the first sex will be male and the second sex will be female.
It will be appreciated that, taking the example of a third target avatar name, the third target avatar name may be any one of the avatar names in novel a. In the embodiment of the application, the preset balance parameter is added to regulate the influence of the probability that each character in the virtual character name appears in the male name or the female name. For example, for a avatar name, the magnitude of the probability of appearing in a male or female name may be compared by calculating a weighted average of the probabilities of each character appearing in the male or female name, and if the probability of appearing in a male name is greater than the probability of appearing in a female name, the avatar is primarily determined to be male and vice versa. Specifically, the probability that the avatar name appears in the male name and the female name can be calculated by the following formula:
Wherein p is M For probability of appearing in male name, p F Probability of appearing in a female name; alpha and beta respectively represent balance parameters of probabilities of last name and first name in male and female sexual names; n is n x And n m The numbers of words respectively representing the last name and the first name; j and K respectively represent the j-th word in surname, and K represents the n-th word in first name x +k words;represents the probability of the jth last name appearing in men,/->Represents the nth x Probability of +k word occurrence in men; n is the number of words of the avatar name, e.g. "Zhang San", then n is 2.
Comparison p M And p F If p M Greater than p F Preliminarily judging that the virtual character is male; if p M Less than p F The virtual character is primarily determined to be female. Based on the above manner, the sex of the virtual character corresponding to each virtual character can be determined.
In the embodiment of the application, after determining the gender of the virtual character corresponding to each virtual character, the server can respectively prioritize the target parameter values corresponding to each virtual character according to the gender of the virtual character, thereby obtaining a male character priority sequence and a female character priority sequence, respectively obtaining the first M male character names in the male character priority sequence and the first L female character names in the female character priority sequence, and arranging and combining the M male character names and the L female character names to obtain a multi-role search option, wherein the obtained multi-role search option comprises both the male character and the female character, so that the obtained multi-role search option can better represent the task relationship of the text to be searched, and provides a more targeted search result for the client.
For example, for a male character and a female character, the first parameter values are respectively arranged in the first characters such as a male owner and a female owner, a male second and a female second, and the like, and the other characters are sequentially arranged, so that after the male sex and the female sex are separated, the first characters of the male character and the first characters of the female character can be combined into a multi-role search option of the male and female owner.
In addition, when the multi-role combination of the main roles is determined, an angle selection strategy can be set according to the types of the texts to be searched, so that multi-role search options are recommended for the texts to be searched of different types, the search expectations of users are met, and the user experience is improved. For example, if a novel of the large girl master type, the recommended multi-persona search options may be mainly: first female and first male, first female and second male (first in female character priority sequence and second in male character priority sequence), etc.; in the case of a large man-made novel, the recommended multi-role combination may be mainly: male and female, male and female (first in the Male role priority sequence and second in the female role priority sequence); if the novice of sibling types, the recommended multi-role combinations may be mainly: male one and Male two (first and second in the Male role priority sequence); etc. It should be noted that, the type of the text to be searched may be preset by the server.
Therefore, the server side can determine multi-role search options containing at least one virtual role name based on at least one of the gender of each virtual role, the occurrence frequency of each virtual role and the total number of chapters of each virtual role, and further provide more flexible search selection for the client side.
Step 203, sending the multi-role search option to the client.
It will be appreciated that the server may also be capable of sending the multi-persona search option to the client after determining the multi-persona search option including at least one avatar name based on the search request. It should be noted that the multiple-role search option may be one or more. For example, if the service receives a search request for "Zhang san", the server may determine multi-role search options including "Zhang san", such as "Zhang san Liu" and "Zhang Sanwang five", based on the above manner, and send the multi-role search options to the client, so that the client may display the three multi-role search options, thereby providing more possibilities for the search selection of the user, and making the search options more flexible for the search of text information by the user without multiple inputs of the user.
In addition, after the multi-role search option is displayed, the user can select any one of the multi-role search options to perform text search. When the client receives a second input for the first search option, the client may send a text search request to the server, the server determines text search results including the name of the target avatar based on the text search request, and sends the text search results to the client.
For example, if the first search option selected by the user is "Zhang san", that is, the target virtual character name, the server performs analysis and calculation on the text to be searched, determines text search results of all text paragraphs including Zhang san in the text to be searched, sends the text search results to the client, and the client can display the text search results, so that the user can conveniently locate a text page to be read based on the text search results, and better text search experience and reading experience are brought to the user.
Optionally, the text search result may be at least one target text including the target avatar name, where the target text includes a first text paragraph in which the target avatar name is located, and at least one of a first T paragraphs and a last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
For example, the target virtual character name is Zhang Sanu, the server side obtains all target texts including Zhang Sanu in the texts to be searched, and can feed at least one target text back to the client side as a text searching result and display the text searching result on the client side, so that a user can quickly jump to a text page including the target text by selecting a specific target text, and the user can conveniently read the text page.
In the embodiment of the application, each target text comprises the first text paragraph with the virtual character name of 'Zhang Sanj', and the first T paragraphs and/or the last R paragraphs of the first text paragraph, so that a more complete scene can be formed through a plurality of paragraphs, the target text displayed to the user is not only a single paragraph text but also a scene text comprising a plurality of paragraphs, the understanding of the user is facilitated, the user can distinguish the plurality of target texts more conveniently, the text pages expected to be read can be positioned more accurately and rapidly, and better reading experience is brought to the user.
According to the scheme provided by the embodiment of the application, after the server receives the search request for the virtual character names sent by the client, the server determines the multi-role search option comprising at least one virtual character name, and sends the multi-role search option to the client, so that the client can display the multi-role search option, more possibilities are provided for the search selection of the user, the user does not need to input for multiple times to determine the search option, and the user can search text information more flexibly.
Referring to fig. 3, fig. 3 is a block diagram of a text information searching apparatus according to an embodiment of the present application, and as shown in fig. 3, the text information searching apparatus 300 includes:
a first receiving module 301, configured to receive a first input for searching for a virtual character name;
a display module 302 for displaying a multi-persona search option containing at least one avatar name in response to the first input.
Optionally, the multi-persona search option containing at least one virtual persona name is determined based on a persona relationship between virtual personas.
Optionally, the text information searching apparatus 300 further includes:
and the determining module is used for determining a multi-role search option containing at least one virtual role name based on at least one of the gender of each virtual role, the occurrence number of each virtual role and the total number of chapters of each virtual role.
Optionally, the first receiving module 301 is further configured to:
receiving a second input for the first search option; the first search option includes a target avatar name;
the display module 302 is further configured to: and displaying text search results containing the target virtual character name in response to the second input.
Optionally, the display module 302 is further configured to:
responsive to the second input, obtaining at least one target text comprising the target avatar name;
displaying text search results containing the at least one target text;
the target text comprises a first text paragraph in which the target virtual character name is located and at least one of the first T paragraphs and the last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
Optionally, the number of the text search results is a plurality, and the display module 302 is further configured to:
displaying a first text page corresponding to a first text search result under the condition that a third input aiming at the first text search result is received; the first text search result is any one of a plurality of text search results;
displaying a second text page corresponding to a second text search result when a fourth input acting on the first text page is received; among the plurality of text search results, the second text search result is arranged before or after the first text search result.
It should be noted that, the text information searching apparatus 300 provided in the embodiment of the present application can implement all the processes of the text information searching method shown in fig. 1, and achieve the same technical effects, and is not repeated here.
In the embodiment of the application, the text information searching device 300 can receive the first input aiming at the virtual character name search, display the multi-role search option containing at least one virtual character name, provide more choices for the search of the user, and determine the search option without multiple inputs of the user, thereby effectively simplifying the user operation, improving the search efficiency and bringing better reading experience for the user.
Referring to fig. 4, fig. 4 is a block diagram of another text information searching apparatus according to an embodiment of the present application, and as shown in fig. 4, the text information searching apparatus 400 includes:
a second receiving module 401, configured to receive a search request for a virtual role name sent by a client;
a determining module 402, configured to determine, in response to the search request, a multi-persona search option including at least one avatar name;
and a sending module 403, configured to send the multi-role search option to the client.
Optionally, the determining module 402 is further configured to:
the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between the virtual personas.
Optionally, the determining module 402 is further configured to:
Determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
and determining a multi-role search option containing at least one virtual role name according to all the virtual role names and the occurrence times of each virtual role name.
Optionally, the determining module 402 is further configured to:
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
Optionally, the determining module 402 is further configured to:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
the N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
Optionally, the determining module 402 is further configured to:
determining the gender of the corresponding virtual character based on the virtual character name;
sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
and arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
Optionally, the determining module 402 is further configured to:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
It should be noted that, the text information searching apparatus 300 provided in the embodiment of the present application can implement all the processes of the text information searching method shown in fig. 1, and achieve the same technical effects, and is not repeated here.
In the embodiment of the present application, after receiving a search request for a virtual character name sent by a client, the text information search device 400 determines a multi-role search option including at least one virtual character name, and sends the multi-role search option to the client, so that the client can display the multi-role search option, thereby providing more possibilities for the search selection of the user, and ensuring the search option without multiple inputs of the user, so that the user can search text information more flexibly.
Referring to fig. 5, fig. 5 is a block diagram of a text information searching apparatus according to an embodiment of the present application, and as shown in fig. 5, the text information searching apparatus includes: a processor 500, a memory 520, and a transceiver 510. The processor 500 is used for reading the program in the memory 520.
A transceiver 510 for receiving and transmitting data under the control of the processor 500.
Wherein in fig. 5, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by processor 500 and various circuits of memory represented by memory 520, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 510 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 may store data used by the processor 500 in performing operations.
In one implementation of the embodiment of the present application, the processor 500, configured to read the program in the memory 520, performs the following steps:
displaying a target search option in case of receiving a first input for a virtual character name search; the number of the target search options is at least one, and the target search options comprise at least one virtual role name;
receiving a first input for a virtual character name search;
in response to the first input, a multi-persona search option is displayed that includes at least one avatar name.
Optionally, the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between virtual personas.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
a multi-persona search option including at least one virtual character name is determined based on at least one of a gender of each virtual character, a number of occurrences of each virtual character, and a total number of chapters in which each virtual character occurs.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
receiving a second input for the first search option; the first search option includes a target avatar name;
And displaying text search results containing the target virtual character name in response to the second input.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
responsive to the second input, obtaining at least one target text comprising the target avatar name;
displaying text search results containing the at least one target text;
the target text comprises a first text paragraph in which the target virtual character name is located and at least one of the first T paragraphs and the last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
displaying a first text page corresponding to a first text search result under the condition that a third input aiming at the first text search result is received; the first text search result is any one of a plurality of text search results;
displaying a second text page corresponding to a second text search result when a fourth input acting on the first text page is received; among the plurality of text search results, the second text search result is arranged before or after the first text search result.
In this embodiment, the text information searching apparatus 500 can execute all the technical features of the text information searching method embodiment described in fig. 1, and its implementation principle and technical effects are similar, and this embodiment will not be repeated here.
In another implementation of the embodiment of the present application, the processor 500, configured to read the program in the memory 520, performs the following steps:
receiving a search request for the virtual character name sent by a client;
determining, in response to the search request, a multi-persona search option containing at least one virtual persona name;
and sending the multi-role search option to the client.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between the virtual personas.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
and determining a multi-role search option containing at least one virtual role name according to all the virtual role names and the occurrence times of each virtual role name.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
the N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
determining the gender of the corresponding virtual character based on the virtual character name;
Sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
and arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
Optionally, the processor 500 is configured to read the program in the memory 520, and perform the following steps:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
In this embodiment, the text information searching apparatus 500 can execute all the technical features of the text information searching method embodiment described in fig. 2, and its implementation principle and technical effects are similar, and this embodiment will not be repeated here.
The embodiment of the invention also provides a readable storage medium, and the readable storage medium is stored with a computer program.
In one embodiment, the computer program when executed by a processor performs the steps of:
receiving a first input for a virtual character name search;
in response to the first input, a multi-persona search option is displayed that includes at least one avatar name.
Optionally, the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between virtual personas.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
a multi-persona search option including at least one virtual character name is determined based on at least one of a gender of each virtual character, a number of occurrences of each virtual character, and a total number of chapters in which each virtual character occurs.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
receiving a second input for the first search option; the first search option includes a target avatar name;
and displaying text search results containing the target virtual character name in response to the second input.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
responsive to the second input, obtaining at least one target text comprising the target avatar name;
displaying text search results containing the at least one target text;
the target text comprises a first text paragraph in which the target virtual character name is located and at least one of the first T paragraphs and the last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
displaying a first text page corresponding to a first text search result under the condition that a third input aiming at the first text search result is received; the first text search result is any one of a plurality of text search results;
displaying a second text page corresponding to a second text search result when a fourth input acting on the first text page is received; among the plurality of text search results, the second text search result is arranged before or after the first text search result.
In this embodiment, the readable storage medium can execute all the technical features of the embodiment of the text information searching method described in fig. 1, and its implementation principle and technical effects are similar, which is not described herein again.
In another embodiment, the computer program when executed by a processor is further capable of implementing the steps of:
receiving a search request for the virtual character name sent by a client;
determining, in response to the search request, a multi-persona search option containing at least one virtual persona name;
and sending the multi-role search option to the client.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
the multi-persona search option including at least one virtual persona name is determined based on a persona relationship between the virtual personas.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
and determining a multi-role search option containing at least one virtual role name according to all the virtual role names and the occurrence times of each virtual role name.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
the N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
determining the gender of the corresponding virtual character based on the virtual character name;
The determining a multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name includes:
sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
and arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
Optionally, the computer program when executed by the processor is further capable of implementing the steps of:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
In this embodiment, the readable storage medium can execute all the technical features of the embodiment of the text information searching method described in fig. 2, and its implementation principle and technical effects are similar, which is not described herein.
Wherein the readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A text information search method applied to a client, comprising:
receiving a first input for a virtual character name search;
in response to the first input, displaying a multi-persona search option including at least one virtual persona name, the multi-persona search option including at least one virtual persona name determined based on a persona relationship between virtual personas;
the multi-persona search option including at least one virtual persona name determining based on a persona relationship between virtual personas includes:
determining a multi-role search option including at least one virtual role name based on at least one of sex of each virtual role, number of occurrences of each virtual role, total number of chapters of each virtual role;
the determining a multi-role search option including at least one virtual role name based on at least one of the sex of each virtual role, the number of occurrences of each virtual role, and the total number of chapters in which each virtual role occurs, includes:
Determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
2. The method of claim 1, wherein, in response to the first input, after displaying a multi-persona search option containing at least one avatar name, the method further comprises:
receiving a second input for the first search option; the first search option includes a target avatar name;
and displaying text search results containing the target virtual character name in response to the second input.
3. The method of claim 2, wherein the displaying text search results containing the target avatar name in response to the second input comprises:
responsive to the second input, obtaining at least one target text comprising the target avatar name;
displaying text search results containing the at least one target text;
the target text comprises a first text paragraph in which the target virtual character name is located and at least one of the first T paragraphs and the last R paragraphs of the first text paragraph, T is a positive integer, and R is a positive integer.
4. The method of claim 2, wherein the number of text search results is a plurality, and wherein after displaying the text search results including the target avatar name in response to the second input, the method further comprises:
displaying a first text page corresponding to a first text search result under the condition that a third input aiming at the first text search result is received; the first text search result is any one of a plurality of text search results;
displaying a second text page corresponding to a second text search result when a fourth input acting on the first text page is received; among the plurality of text search results, the second text search result is arranged before or after the first text search result.
5. The text information searching method is applied to a server and is characterized by comprising the following steps:
receiving a search request for the virtual character name sent by a client;
determining, in response to the search request, a multi-persona search option containing at least one virtual persona name;
sending the multi-role search option to the client;
the determining a multi-persona search option containing at least one avatar name includes:
determining a text to be searched according to the virtual character name;
acquiring all virtual character names included in the text to be searched and the occurrence times of the virtual character names;
acquiring the total number of chapters of a first virtual role name in the text to be searched, the first occurrence number of the first virtual role name in a target chapter and the total number of virtual role names in the target chapter;
acquiring a target parameter value corresponding to the first virtual character name based on the total number of chapters, the first occurrence number and the total number of virtual character names;
and determining a multi-role search option containing at least one virtual role name according to the target parameter value corresponding to each virtual role name.
6. The method of claim 5, wherein determining a multi-persona search option including at least one avatar name based on the target parameter value corresponding to each avatar name, comprises:
the target parameter values corresponding to the virtual character names are subjected to priority ranking;
the N virtual character names with the priority arranged in front are arranged and combined to obtain a multi-role search option containing at least one virtual character name; wherein N is an integer and N is not less than 2.
7. The method of claim 5, wherein before determining the multi-persona search option including at least one avatar name according to the target parameter value corresponding to each avatar name, further comprising:
determining the gender of the corresponding virtual character based on the virtual character name;
the determining a multi-role search option including at least one virtual role name according to the target parameter value corresponding to each virtual role name includes:
sorting the target parameter values corresponding to the virtual character names according to the sexes of the virtual characters respectively to obtain a first gender character priority sequence and a second gender character priority sequence;
acquiring M first gender names which are ranked top in the first gender role priority sequence and L second gender names which are ranked top in the second gender role priority sequence; wherein M is a positive integer, L is a positive integer;
And arranging and combining the M first gender role names and the L second gender role names to obtain a multi-role search option, wherein the multi-role search option comprises at least one first gender role name and at least one second gender role name.
8. The method of claim 7, wherein the determining the gender of the corresponding avatar based on the avatar name comprises:
acquiring each character in the virtual character name;
and determining the sex of the virtual character based on a preset balance parameter and the probability of each character in the first sex name or the second sex name.
9. A text information searching apparatus comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the text information searching method according to any one of claims 1 to 4 or the steps of the text information searching method according to any one of claims 5 to 8 when executed by the processor.
10. A readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the text information search method according to any one of claims 1 to 4 or the steps of the text information search method according to any one of claims 5 to 8.
CN202011209229.8A 2020-11-03 2020-11-03 Text information searching method, apparatus and readable storage medium Active CN112434127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011209229.8A CN112434127B (en) 2020-11-03 2020-11-03 Text information searching method, apparatus and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011209229.8A CN112434127B (en) 2020-11-03 2020-11-03 Text information searching method, apparatus and readable storage medium

Publications (2)

Publication Number Publication Date
CN112434127A CN112434127A (en) 2021-03-02
CN112434127B true CN112434127B (en) 2023-10-17

Family

ID=74695236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011209229.8A Active CN112434127B (en) 2020-11-03 2020-11-03 Text information searching method, apparatus and readable storage medium

Country Status (1)

Country Link
CN (1) CN112434127B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101796510A (en) * 2007-08-31 2010-08-04 微软公司 Indexing role hierarchies for words in a search index
CN105589863A (en) * 2014-10-22 2016-05-18 腾讯科技(深圳)有限公司 Search method, data processing method and apparatus, and system
CN105930488A (en) * 2016-05-03 2016-09-07 乐视控股(北京)有限公司 Information search processing method and apparatus
CN108038172A (en) * 2017-12-07 2018-05-15 北京百度网讯科技有限公司 Searching method and device based on artificial intelligence
CN109325178A (en) * 2018-09-14 2019-02-12 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN110215706A (en) * 2019-06-20 2019-09-10 腾讯科技(深圳)有限公司 Location determining method, device, terminal and the storage medium of virtual objects
CN110716991A (en) * 2019-10-11 2020-01-21 掌阅科技股份有限公司 Method for displaying entity associated information based on electronic book and electronic equipment
CN110799963A (en) * 2017-09-22 2020-02-14 深圳市欢太科技有限公司 Method for recommending associative words, mobile terminal and computer-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018095366A1 (en) * 2016-11-24 2018-05-31 腾讯科技(深圳)有限公司 Frame-synchronisation-based data processing method for video recommendation determination and information display

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101796510A (en) * 2007-08-31 2010-08-04 微软公司 Indexing role hierarchies for words in a search index
CN105589863A (en) * 2014-10-22 2016-05-18 腾讯科技(深圳)有限公司 Search method, data processing method and apparatus, and system
CN105930488A (en) * 2016-05-03 2016-09-07 乐视控股(北京)有限公司 Information search processing method and apparatus
CN110799963A (en) * 2017-09-22 2020-02-14 深圳市欢太科技有限公司 Method for recommending associative words, mobile terminal and computer-readable storage medium
CN108038172A (en) * 2017-12-07 2018-05-15 北京百度网讯科技有限公司 Searching method and device based on artificial intelligence
CN109325178A (en) * 2018-09-14 2019-02-12 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN110215706A (en) * 2019-06-20 2019-09-10 腾讯科技(深圳)有限公司 Location determining method, device, terminal and the storage medium of virtual objects
CN110716991A (en) * 2019-10-11 2020-01-21 掌阅科技股份有限公司 Method for displaying entity associated information based on electronic book and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
文学作品虚拟角色形象的固定及版权保护;牛强;;中国出版(第19期);全文 *

Also Published As

Publication number Publication date
CN112434127A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
US11194965B2 (en) Keyword extraction method and apparatus, storage medium, and electronic apparatus
US11782915B2 (en) Searchable index
CN108829822B (en) Media content recommendation method and device, storage medium and electronic device
EP3345104B1 (en) Media unit retrieval and related processes
CN108345702A (en) Entity recommends method and apparatus
CN109062994A (en) Recommended method, device, computer equipment and storage medium
CN110909145B (en) Training method and device for multi-task model
CN109063108B (en) Search ranking method and device, computer equipment and storage medium
CN109933708A (en) Information retrieval method, device, storage medium and computer equipment
JP6124489B1 (en) Query providing apparatus, query providing method, and query providing program
CN110427453B (en) Data similarity calculation method, device, computer equipment and storage medium
EP3961426A2 (en) Method and apparatus for recommending document, electronic device and medium
EP3608798A1 (en) Group search method based on social network, device, server and storage medium
WO2011111038A2 (en) Method and system of providing completion suggestion to a partial linguistic element
CN112307190A (en) Medical literature sorting method and device, electronic equipment and storage medium
US20220164524A1 (en) Modifying a document content section of a document object of a graphical user interface (gui)
CN112434127B (en) Text information searching method, apparatus and readable storage medium
CN112347365A (en) Target search information determination method and device
CN116186198A (en) Information retrieval method, information retrieval device, computer equipment and storage medium
CN116070028A (en) Page-based content information pushing method, device, equipment and storage medium
CN115827841A (en) Searching method and device
CN113468441A (en) Search sorting method, device, equipment and storage medium based on weight adjustment
CN113515701A (en) Information recommendation method and device
JP2012104051A (en) Document index creating device
JP2011123530A (en) Device and method for recommending subject, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant