WO2022228294A1 - Method and apparatus for carrying out searching, electronic device, and readable storage medium - Google Patents

Method and apparatus for carrying out searching, electronic device, and readable storage medium Download PDF

Info

Publication number
WO2022228294A1
WO2022228294A1 PCT/CN2022/088392 CN2022088392W WO2022228294A1 WO 2022228294 A1 WO2022228294 A1 WO 2022228294A1 CN 2022088392 W CN2022088392 W CN 2022088392W WO 2022228294 A1 WO2022228294 A1 WO 2022228294A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
sub
texts
target
length
Prior art date
Application number
PCT/CN2022/088392
Other languages
French (fr)
Chinese (zh)
Inventor
乐永
王建辉
Original Assignee
维沃移动通信(杭州)有限公司
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 维沃移动通信(杭州)有限公司 filed Critical 维沃移动通信(杭州)有限公司
Publication of WO2022228294A1 publication Critical patent/WO2022228294A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • 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

Definitions

  • the present application belongs to the technical field of search, and in particular relates to a search method, apparatus, electronic device and readable storage medium.
  • the length of the text entered in the search box cannot exceed the text length limited by the search box, otherwise the first part of the text that does not exceed the limit of the search box will be intercepted Search in the search box, and the second part of the text that exceeds the limit of the search box will be truncated, so that the second part cannot be retained in the search box for searching.
  • the purpose of the embodiments of the present application is to provide a search method, device, electronic device, and readable storage medium, which can solve the problem that in the related art, after the text input into the search box is intercepted according to the limited text length limited by the search box, due to the intercepted text
  • the technical problem of low accuracy of search results due to less valid information contained in the text is to provide a search method, device, electronic device, and readable storage medium, which can solve the problem that in the related art, after the text input into the search box is intercepted according to the limited text length limited by the search box, due to the intercepted text.
  • an embodiment of the present application provides a search method, including: receiving a user's selected input for a first text; responding to the selected input, in the case that the text length of the first text is greater than a preset text length, The first text is split into multiple candidate sub-texts; the target sub-text in the multiple candidate sub-texts is determined; the second text is generated according to the target sub-text, and the second text is searched, wherein the text length of the second text is less than or equal to the preset text length.
  • an embodiment of the present application provides a search device, including: a first receiving module, configured to receive a user's selected input of the first text; a splitting module, configured to respond to the selected input, in the first text When the length of the text is greater than the preset text length, the first text is divided into multiple candidate sub-texts; the determination module is used to determine the target sub-text in the multiple candidate sub-texts; the generation module is used to determine the target sub-text according to the target sub-text.
  • the sub-text generates second text; the search module is configured to search the second text generated by the generation module, wherein the text length of the second text is less than or equal to the preset text length.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, the program or instruction being executed by the processor When executed, the steps of the method of the first aspect are implemented.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
  • an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a program or an instruction to implement the method of the first aspect.
  • the first text after receiving the user's selected input of the first text, in response to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text can be split into multiple candidate sub-texts, then determine a target sub-text in the multiple candidate sub-texts, generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the preset text length.
  • the above-mentioned first text is used as the text input into the search box
  • the above-mentioned preset text length is used as the limit text length limited by the search box
  • the target sub-text is used as the sub-text containing valid information in the first text.
  • the application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
  • FIG. 2 is a schematic diagram of multiple text options in a first interface provided by some embodiments of the present application.
  • FIG. 3 is a method flowchart of another search method provided by some embodiments of the present application.
  • 4A is a schematic diagram of a process of adjusting the position of at least one sub-text to be adjusted in a first interface provided by some embodiments of the present application;
  • 4B is a schematic diagram of another process of adjusting the position of at least one sub-text to be adjusted in the first interface provided by some embodiments of the present application;
  • FIG. 5 is a method flowchart of still another search method provided by some embodiments of the present application.
  • FIG. 6 is a schematic diagram of adding target subtext in the first interface provided by some embodiments of the present application.
  • FIG. 7 is a method flowchart of another search method provided by some embodiments of the present application.
  • FIG. 8 is a functional structural block diagram of a search apparatus provided by some embodiments of the present application.
  • FIG. 9 is a block diagram of a homework structure of an electronic device provided by some embodiments of the present application.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • the first part of the text that does not exceed the limit of the search box and the second part of the text length that exceeds the limit may contain valid information of the text to be searched.
  • the effective information in the text may be missing, resulting in low accuracy of the search results.
  • the embodiments of the present application provide a search method. As shown in FIG. 1 , the search method includes the following steps S110-S140.
  • Step S110 Receive a user's selected input of the first text.
  • the first text is the text that the user intends to input into the search box.
  • the first text is, for example, the whole text or part of the text in the information text such as web page text, document text in electronic document materials, and the like.
  • the selected input is the input in which the user selects the first text in the above-mentioned information text.
  • the first text is all the text in the information text
  • the user selects all the text in the information text as the first text by performing a selection input on the information text.
  • the selected input can be a long-press operation or a double-click operation, etc.
  • the first text is part of the text in the information text
  • the user selects part of the text in the information text as the first text by performing a selection input on the information text.
  • the user can long-press the information text, so that the starting position cursor and the ending position cursor appear in the current interface, and the starting position cursor and the ending position cursor can be dragged to re-determine the starting position.
  • the position of the position cursor and the end position cursor in the information text, the text between the start position cursor and the end position cursor is selected as the first text.
  • the selected input includes the long press and drag operations described above.
  • Step S120 In response to the selected input, when the text length of the first text is greater than the preset text length, split the first text into multiple candidate sub-texts;
  • the text length can be the number of characters contained in the string within the text.
  • the preset text length is the text length limited by the search box.
  • the number of characters contained in the first in-text string is N
  • the number of characters contained in the in-text string limited by the search box is M
  • N>M the text length of the first text is greater than the preset text length, otherwise the text length of the first text is less than or equal to the preset text length.
  • the multiple candidate sub-texts are multiple terms.
  • dividing the first text into multiple candidate sub-texts may be to perform word segmentation processing on the first text, and use multiple words obtained in the word segmentation processing results as multiple candidate sub-texts.
  • the method of word segmentation processing can be set by those skilled in the art according to the actual situation, which is not limited in this embodiment of the present application.
  • the multiple candidate sub-texts include at least one word and at least one phrase; or the multiple candidate sub-texts include multiple phrases.
  • the manner of splitting multiple candidate sub-texts into at least one word and at least one phrase, or splitting multiple candidate sub-texts into multiple phrases can be set by those skilled in the art according to the actual situation. This is not limited.
  • Step S130 Determine a target sub-text among the multiple candidate sub-texts.
  • candidate sub-texts containing valid information in the plurality of first texts may be used as target sub-texts.
  • the number of target subtexts can be one or more.
  • a first interface including the above-mentioned multiple candidate sub-texts may be displayed on the display screen, so as to show the user multiple candidate sub-texts obtained by splitting the first text.
  • the first candidate sub-text among the multiple candidate sub-texts may be determined as the target sub-text, wherein the first candidate sub-text is obtained after the user selects from the multiple candidate sub-texts.
  • the first interface 20 is provided with multiple text options 21 , the multiple text options 21 are in one-to-one correspondence with the above-mentioned multiple candidate sub-texts, and each text option 21 displays the Candidate sub-texts corresponding to text options (for example, candidate sub-text A, candidate sub-text B, candidate sub-text C, candidate sub-text D, candidate sub-text E, candidate sub-text F, candidate sub-text displayed on multiple text options G and candidate subtext H, etc.).
  • the user can perform a selection input on at least one text option 21 among the above-mentioned multiple text options 21, and the selection input is, for example, a click operation or a double-click operation.
  • the first interface further includes an "OK” button or a "Reset” button. After performing the above selection input, the "OK” button can be clicked to determine the selected candidate sub-text in the multiple candidate sub-texts text; or, operate the Reset button to reset the selection results of multiple candidate subtexts.
  • the second candidate sub-text associated with the target keyword among the candidate sub-texts may be determined as the target sub-text.
  • the above target keywords are one or more words entered by the user in the search box.
  • the second candidate sub-text associated with the target keyword may be: a word whose semantic similarity with the target keyword in the one or more words is higher than a preset similarity threshold.
  • the acquisition method and the preset similarity threshold of the one or more words and the target keyword may be set by those skilled in the art according to the actual situation, which is not limited in this embodiment of the present disclosure.
  • Step S140 Generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the preset text length.
  • all target subtexts are combined, the combined result is used as the second text, and the second text is searched.
  • the arrangement order of the multiple target sub-texts defaults to the first arrangement order of the multiple target sub-texts in the first text.
  • a plurality of target sub-texts in the first arrangement order may be directly combined to obtain the second text.
  • the arrangement order of the plurality of target sub-texts may be modified from the first arrangement order to the second arrangement order, and the second text is obtained by combining the plurality of target sub-texts in the second arrangement order.
  • the text length of the second text is less than or equal to the preset text length, thereby achieving the purpose of shortening the text length of the first text while retaining the valid information in the first text, effectively improving the search box text input.
  • the accuracy of the search results obtained when the text length is greater than the text length limited by the search box.
  • step S140 in order to modify the arrangement order of the multiple target subtexts from the first arrangement order to the second arrangement order, before step S140 is performed, as shown in FIG. 3 , the following steps S310 to S320 may be included.
  • Step S310 Receive a first input from the user for at least one sub-text to be adjusted among the multiple target sub-texts.
  • the first input is an input of specifying the position of at least one sub-text to be adjusted as the target position corresponding to each sub-text to be adjusted.
  • the first input may include a drag operation of dragging at least one sub-text to be adjusted to a target position corresponding to each sub-text to be adjusted.
  • the plurality of target sub-texts include candidate sub-text A, candidate sub-text C, candidate sub-text E, candidate sub-text F, and candidate sub-text G in FIG. 2 , at least one of which is to be
  • the adjustment sub-text includes one of the above-mentioned multiple target sub-texts, for example, the candidate sub-text C, and the first input may be, for example, a first drag operation of dragging the candidate sub-text C to the target position Z1.
  • the plurality of target sub-texts include candidate sub-text A, candidate sub-text C, candidate sub-text E, candidate sub-text F, and candidate sub-text G in FIG. 2 , at least one of which is to be
  • the adjustment sub-text includes a plurality of the above-mentioned multiple target sub-texts, such as candidate sub-text C and candidate sub-text F, and the first input may include: dragging the candidate sub-text C to the first drag at the target position Z1 operation, and a second drag operation of dragging the candidate subtext F to the target position Z2.
  • the first input listed above is only exemplary, as long as the position of at least one sub-text to be adjusted can be specified to be moved to the corresponding target position, the embodiment of the present application does not limit the input method of the first input. .
  • Step S320 In response to the first input, adjust the position of at least one sub-text to be adjusted.
  • the position of each sub-text to be adjusted is adjusted to the target position corresponding to the adjusted sub-text, so as to modify the arrangement order of the plurality of target sub-texts from the first arrangement order to the second arrangement order. Purpose.
  • the target sub-text in step S140 in addition to the one or more target sub-texts determined from the plurality of candidate sub-texts in step S130, the target sub-text in step S140 also includes one or more targets newly added by the user through text input subtext.
  • this embodiment of the present application may further include the following steps S510 to S520.
  • Step S510 Receive new input from the user.
  • the first interface further includes at least one text addition option 23 .
  • the above-mentioned newly added input may include: an operation of specifying a target text addition option in at least one text addition option 23 (eg, a click operation on the target text addition option 23 ).
  • Step S520 In response to the newly added input, the content corresponding to the newly added input is added as the target subtext.
  • a text input box 60 is displayed in the first interface, and the content entered by the user into the text input box 60 is obtained as the above-mentioned newly added input. Enter the corresponding content, and add the text corresponding to the content as the target subtext. Implements the purpose of enabling the user to add one or more target subtexts through text input.
  • the obtained search results may deviate from the search results desired by the user.
  • the user may want to quickly return to the above-mentioned first interface, so as to re-determine the multiple candidate sub-texts according to their own needs in the first interface. needs of the target subtext.
  • step S140 is performed, as shown in FIG. 7 , the embodiment of the present disclosure may further include the following steps S710 to S720.
  • Step S710 Receive a second input from the user.
  • a search result is obtained.
  • the second input may be a long-press operation, a double-click operation, etc. on the search box after the above-mentioned search result is obtained.
  • Step S720 In response to the second input, display a second interface; wherein, multiple candidate sub-texts are displayed in the second interface, and the target sub-text in the multiple candidate sub-texts is displayed in the first manner, and the multiple candidate sub-texts are displayed in the first manner. Subtexts other than the target subtext are displayed in the second manner.
  • the second interface displays a plurality of candidate sub-texts in the first interface.
  • the target sub-text in the plurality of candidate sub-texts determined in the first interface the target sub-text in the plurality of candidate sub-texts is displayed in the first manner, and the other sub-texts in the plurality of candidate sub-texts except the target sub-text are displayed in the first manner.
  • the text is displayed in a second manner, so that the target sub-text in the plurality of candidate sub-texts determined in the first interface and other sub-texts other than the target sub-text can be displayed differently, so that the user can re-display the target sub-text in the plurality of candidate sub-texts. Identify the target subtext for reference.
  • the first mode is a highlighted mode
  • the second mode is a non-highlighted mode
  • the first mode is to display the text after being bolded
  • the second mode is to not add text to the text.
  • Bold display as long as the target sub-text in the plurality of candidate sub-texts determined in the first interface and other sub-texts other than the target sub-text can be displayed differently, the embodiments of the present disclosure will provide the first manner and the second manner. The specific method is not limited.
  • a user's selection input of at least one third candidate sub-text in the second interface may be received, the third candidate sub-text is determined as the target sub-text, and the above step S140 is performed again.
  • the first text after receiving the user's selected input of the first text, in response to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text can be split into multiple candidate sub-texts, then determine a target sub-text in the multiple candidate sub-texts, generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the preset text length.
  • the above-mentioned first text is used as the text input into the search box
  • the above-mentioned preset text length is used as the limit text length limited by the search box
  • the target sub-text is used as the sub-text containing valid information in the first text.
  • the application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text.
  • to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
  • a second interface can also be displayed according to the user's second input, so that the user can quickly re-determine the multiple candidate sub-texts through the second interface. The target subtext can better meet the user's search needs.
  • the execution body may be a search device, or a control module in the search device for executing the search method.
  • the search device provided by the embodiment of the present application is described by taking the search device executing the search method in the above embodiment as an example.
  • FIG. 8 shows a functional structural block diagram of a search apparatus provided by an embodiment of the present application.
  • the search device 80 includes:
  • the first receiving module 81 is used to receive the user's selected input of the first text
  • the splitting module 82 is configured to, in response to the selected input, split the first text into multiple candidate sub-texts when the text length of the first text is greater than the preset text length.
  • the determining module 83 is configured to determine a target sub-text in the plurality of candidate sub-texts.
  • the generating module 84 is configured to generate the second text according to the target sub-text.
  • the searching module 85 is configured to search the second text generated by the generating module, wherein the text length of the second text is less than or equal to the preset text length.
  • the search device can respond to the selected input, and in the case that the text length of the first text is greater than the preset text length, the first text Splitting into multiple candidate subtexts, then determining a target subtext in the multiple candidate subtexts, generating a second text according to the target subtext, and searching the second text, where the text length of the second text is less than or equal to Default text length.
  • the above-mentioned first text is used as the text input into the search box
  • the above-mentioned preset text length is used as the limit text length limited by the search box
  • the target sub-text is used as the sub-text containing valid information in the first text.
  • the application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
  • the determining module includes: a first determining sub-module, configured to determine the first candidate sub-text in the multiple candidate sub-texts as the target when a first interface including multiple candidate sub-texts is displayed sub-text, wherein the first candidate sub-text is obtained after the user selects from multiple candidate sub-texts; or, the second determination sub-module is used to select the second target candidate associated with the target keyword in the multiple candidate sub-texts The subtext is determined as the target subtext.
  • the search device further includes: a second receiving module for receiving a first input from a user to at least one sub-text to be adjusted among the multiple target sub-texts; an adjustment module for In response to the first input, adjust the position of at least one sub-text to be adjusted; the generating module is specifically configured to: generate the second text according to the adjusted positional relationship of the multiple target sub-texts.
  • the search apparatus further includes: a third receiving module, configured to receive a user's newly added input; and an adding module, used to respond to the newly added input and add the content corresponding to the newly added input as the target subtext.
  • a third receiving module configured to receive a user's newly added input
  • an adding module used to respond to the newly added input and add the content corresponding to the newly added input as the target subtext.
  • the search device further includes: a fourth receiving module, configured to receive a second input from the user; a display module, configured to respond to the second input and display a second interface; wherein, a plurality of candidate sub-interfaces are displayed in the second interface text, and the target sub-text among the multiple candidate sub-texts is displayed in the first manner, and the other sub-texts except the target sub-text among the multiple candidate sub-texts are displayed in the second manner.
  • the search device can respond to the selected input, and in the case that the text length of the first text is greater than the preset text length, split the first text into Divide into multiple candidate sub-texts, then determine a target sub-text in the multiple candidate sub-texts, generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the predetermined text. Set the text length.
  • the above-mentioned first text is used as the text input into the search box
  • the above-mentioned preset text length is used as the limit text length limited by the search box
  • the target sub-text is used as the sub-text containing valid information in the first text.
  • a second interface can also be displayed according to the user's second input, so that the user can quickly re-determine the multiple candidate sub-texts through the second interface.
  • the target subtext can better meet the user's search needs.
  • the search apparatus in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • the search device in this embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the search apparatus provided in this embodiment of the present application can implement each process implemented by the method embodiments of FIG. 1 , FIG. 3 , FIG. 5 , and FIG. 7 , and to avoid repetition, details are not repeated here.
  • an embodiment of the present application further provides an electronic device 900, including a processor 901, a memory 902, a program or instruction stored in the memory 902 and executable on the processor 901, the program Or, when the instruction is executed by the processor 901, each process of the foregoing search method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc. part.
  • the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power functions. consumption management and other functions.
  • a power source such as a battery
  • the power management system can manage charging, discharging, and power functions. consumption management and other functions.
  • the structure of the electronic device shown in FIG. 10 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the processor 1010 is configured to receive a user's selected input of the first text; in response to the selected input, in the case where the text length of the first text is greater than the preset text length, split the first text into multiple candidates sub-text; determining a target sub-text among the multiple candidate sub-texts; generating a second text according to the target sub-text, and searching the second text, wherein the text length of the second text is less than or equal to the preset text length.
  • the processor 1010 can respond to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text Splitting into multiple candidate subtexts, then determining a target subtext in the multiple candidate subtexts, generating a second text according to the target subtext, and searching the second text, where the text length of the second text is less than or equal to Default text length.
  • the above-mentioned first text is used as the text input into the search box
  • the above-mentioned preset text length is used as the limit text length limited by the search box
  • the target sub-text is used as the sub-text containing valid information in the first text.
  • the application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
  • the processor 1010 determines the target sub-text in the multiple candidate sub-texts, and is specifically configured to: in the case where the first interface including the multiple candidate sub-texts is displayed, select the first candidate sub-text in the multiple candidate sub-texts. It is determined as the target sub-text, wherein the first candidate sub-text is obtained after the user selects from multiple candidate sub-texts; or, the second candidate sub-text associated with the target keyword in the multiple candidate sub-texts is determined as the target sub-text. text.
  • the number of target sub-texts includes a plurality, and before generating the second text according to the target sub-text, the processor 1010 is further configured to: receive a first input from the user on at least one sub-text to be adjusted in the plurality of target sub-texts; Once input, adjust the position of at least one sub-text to be adjusted; the processor 1010 generates the second text according to the target sub-text, and is specifically configured to: generate the second text according to the adjusted positional relationship of the multiple target sub-texts.
  • the processor 1010 is further configured to: receive a user's newly added input; and in response to the newly added input, add content corresponding to the newly added input as the target sub-text.
  • the processor 1010 is further configured to: receive a second input from the user; in response to the second input, display a second interface; wherein, a plurality of candidate sub-texts are displayed in the second interface, and a plurality of candidate sub-texts are displayed in the second interface.
  • the target sub-text among the candidate sub-texts is displayed in the first manner, and the other sub-texts except the target sub-text among the plurality of candidate sub-texts are displayed in the second manner.
  • the processor 1010 can respond to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text Splitting into multiple candidate subtexts, then determining a target subtext in the multiple candidate subtexts, generating a second text according to the target subtext, and searching the second text, where the text length of the second text is less than or equal to Default text length.
  • the above-mentioned first text is used as the text input into the search box
  • the above-mentioned preset text length is used as the limit text length limited by the search box
  • the target sub-text is used as the sub-text containing valid information in the first text.
  • the application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text.
  • to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
  • a second interface can also be displayed according to the user's second input, so that the user can quickly re-determine the multiple candidate sub-texts through the second interface. The target subtext can better meet the user's search needs.
  • the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1007 includes a touch panel 10071 and other input devices 10072 .
  • the touch panel 10071 is also called a touch screen.
  • the touch panel 10071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • Memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1010.
  • the embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the processor is the processor in the electronic device in the above embodiment.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used for running a program or an instruction, implementing each process of the foregoing search method embodiment, and can achieve the same technology The effect, in order to avoid repetition, is not repeated here.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Abstract

The present application discloses a method and apparatus for carrying out searching, an electronic device, and a readable storage medium, and belongs to the technical field of searching. The method comprises: receiving a selection input by a user on a first text; in response to the selection input and in the situation that the text length of the first text is greater than a preset text length, splitting the first text into a plurality of candidate sub-texts; determining a target sub-text among the plurality of candidate sub-texts; and generating a second text according to the target sub-text, and searching in the second text, the text length of the second text being less than or equal to the preset text length.

Description

搜索方法、装置、电子设备及可读存储介质Search method, apparatus, electronic device, and readable storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2021年04月27日提交的申请号为2021104632369,发明名称为“搜索方法、装置、电子设备及可读存储介质”的中国专利申请的优先权,其通过引用方式全部并入本申请。This application claims the priority of the Chinese patent application with the application number 2021104632369 filed on April 27, 2021 and the invention title is "Search Method, Device, Electronic Device and Readable Storage Medium", which is fully incorporated herein by reference Application.
技术领域technical field
本申请属于搜索技术领域,具体涉及一种搜索方法、装置、电子设备及可读存储介质。The present application belongs to the technical field of search, and in particular relates to a search method, apparatus, electronic device and readable storage medium.
背景技术Background technique
目前,在将文本输入搜索框进行搜索时,对于输入搜索框中的文本,其文本长度不能超过搜索框限制的文本长度,否则该文本中未超过搜索框限制的文本长度的第一部分会被截取在搜索框中进行搜索,而该文本中超过搜索框限制的文本长度的第二部分会被截掉,导致第二部分无法被保留在搜索框中进行搜索。At present, when entering text into the search box for searching, the length of the text entered in the search box cannot exceed the text length limited by the search box, otherwise the first part of the text that does not exceed the limit of the search box will be intercepted Search in the search box, and the second part of the text that exceeds the limit of the search box will be truncated, so that the second part cannot be retained in the search box for searching.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种搜索方法、装置、电子设备及可读存储介质,能够解决相关技术中在根据搜索框限制的限制文本长度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题。The purpose of the embodiments of the present application is to provide a search method, device, electronic device, and readable storage medium, which can solve the problem that in the related art, after the text input into the search box is intercepted according to the limited text length limited by the search box, due to the intercepted text The technical problem of low accuracy of search results due to less valid information contained in the text.
第一方面,本申请实施例提供了一种搜索方法,包括:接收用户对第一文本的选定输入;响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本;确定多个候选 子文本中的目标子文本;根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。In a first aspect, an embodiment of the present application provides a search method, including: receiving a user's selected input for a first text; responding to the selected input, in the case that the text length of the first text is greater than a preset text length, The first text is split into multiple candidate sub-texts; the target sub-text in the multiple candidate sub-texts is determined; the second text is generated according to the target sub-text, and the second text is searched, wherein the text length of the second text is less than or equal to the preset text length.
第二方面,本申请实施例提供了一种搜索装置,包括:第一接收模块,用于接收用户对第一文本的选定输入;拆分模块,用于响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本;确定模块,用于确定多个候选子文本中的目标子文本;生成模块,用于根据所目标子文本生成第二文本;搜索模块,用于对生成模块生成的第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。In a second aspect, an embodiment of the present application provides a search device, including: a first receiving module, configured to receive a user's selected input of the first text; a splitting module, configured to respond to the selected input, in the first text When the length of the text is greater than the preset text length, the first text is divided into multiple candidate sub-texts; the determination module is used to determine the target sub-text in the multiple candidate sub-texts; the generation module is used to determine the target sub-text according to the target sub-text. The sub-text generates second text; the search module is configured to search the second text generated by the generation module, wherein the text length of the second text is less than or equal to the preset text length.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在该存储器上并可在该处理器上运行的程序或指令,该程序或指令被该处理器执行时实现如第一方面的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, the program or instruction being executed by the processor When executed, the steps of the method of the first aspect are implemented.
第四方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储程序或指令,该程序或指令被处理器执行时实现如第一方面的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,该芯片包括处理器和通信接口,该通信接口和处理器耦合,该处理器用于运行程序或指令,实现如第一方面的方法。In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a program or an instruction to implement the method of the first aspect.
在本申请实施例中,能够在接收到用户对第一文本的选定输入后,响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本,然后确定多个候选子文本中的目标子文本,根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。在此情况下,将上述第一文本作为输入搜索框的文本,将上述预设文本长度作为搜索框限制的限制文本长度,将目标子文本作为包含第一文本中的有效信息的子文本,本申请实施例能够有效解决现有技术中在根据搜索框限制的文本长 度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题,实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。In this embodiment of the present application, after receiving the user's selected input of the first text, in response to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text can be split into multiple candidate sub-texts, then determine a target sub-text in the multiple candidate sub-texts, generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the preset text length. In this case, the above-mentioned first text is used as the text input into the search box, the above-mentioned preset text length is used as the limit text length limited by the search box, and the target sub-text is used as the sub-text containing valid information in the first text. The application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
附图说明Description of drawings
图1是本申请一些实施例提供的一种搜索方法的方法流程图;1 is a method flowchart of a search method provided by some embodiments of the present application;
图2是本申请一些实施例提供的第一界面中多个文本选项的示意图;2 is a schematic diagram of multiple text options in a first interface provided by some embodiments of the present application;
图3是本申请一些实施例提供的另一种搜索方法的方法流程图;3 is a method flowchart of another search method provided by some embodiments of the present application;
图4A是本申请一些实施例提供的第一界面中一种调整至少一个待调整子文本的位置的过程示意图;4A is a schematic diagram of a process of adjusting the position of at least one sub-text to be adjusted in a first interface provided by some embodiments of the present application;
图4B是本申请一些实施例提供的第一界面中另一种调整至少一个待调整子文本的位置的过程示意图;4B is a schematic diagram of another process of adjusting the position of at least one sub-text to be adjusted in the first interface provided by some embodiments of the present application;
图5是本申请一些实施例提供的再一种搜索方法的方法流程图;FIG. 5 is a method flowchart of still another search method provided by some embodiments of the present application;
图6是本申请一些实施例提供的在第一界面中新增目标子文本的示意图;6 is a schematic diagram of adding target subtext in the first interface provided by some embodiments of the present application;
图7是本申请一些实施例提供的又一种搜索方法的方法流程图;FIG. 7 is a method flowchart of another search method provided by some embodiments of the present application;
图8是本申请一些实施例提供的一种搜索装置的功能结构框图;8 is a functional structural block diagram of a search apparatus provided by some embodiments of the present application;
图9是本申请一些实施例提供的一种电子设备的功课结构框图;9 is a block diagram of a homework structure of an electronic device provided by some embodiments of the present application;
图10为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不 是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
目前,在将文本输入搜索框进行搜索时,对于输入搜索框中的文本,在其文本长度超过搜索框限制的限制文本长度的情况下,该文本中未超过上述限制文本长度的第一部分会被截取在搜索框中进行搜索,而该文本中超过上述限制文本长度的第二部分会被截掉,导致第二部分无法被保留在搜索框中进行搜索。Currently, when entering text into the search box for search, if the text entered in the search box exceeds the limit text length limited by the search box, the first part of the text that does not exceed the above limit text length will be deleted. Truncate to search in the search box, and the second part of the text that exceeds the above limit text length will be truncated, so that the second part cannot be retained in the search box for search.
实际情况中,对于输入搜索框中的文本而言,该文本中未超过搜索框限制的文本长度的第一部分和超过上述限制的文本长度的第二部分均可能包含待搜索文本的有效信息。在此情况下,如果仅在搜索框中保留该文本的第一部分而截掉第二部分,可能造成文本中有效信息的缺失,导致搜索结果的准确性偏低。In practice, for the text input in the search box, the first part of the text that does not exceed the limit of the search box and the second part of the text length that exceeds the limit may contain valid information of the text to be searched. In this case, if only the first part of the text is retained in the search box and the second part is truncated, the effective information in the text may be missing, resulting in low accuracy of the search results.
基于上述存在的问题,本申请实施例提供一种搜索方法。如图1所示,该搜索方法包括如下步骤S110~S140。Based on the above problems, the embodiments of the present application provide a search method. As shown in FIG. 1 , the search method includes the following steps S110-S140.
步骤S110:接收用户对第一文本的选定输入。Step S110: Receive a user's selected input of the first text.
第一文本即用户意图输入搜索框的文本。第一文本例如是位于如网页文本、电子文件资料中的文件文本等信息文本中的全部文本或部分文本。The first text is the text that the user intends to input into the search box. The first text is, for example, the whole text or part of the text in the information text such as web page text, document text in electronic document materials, and the like.
选定输入即用户在上述信息文本中选定第一文本的输入。The selected input is the input in which the user selects the first text in the above-mentioned information text.
例如,第一文本是信息文本中的全部文本,用户通过对该信息文本进行选定输入来选定该信息文本中的全部文本作为第一文本。在此过程中,选定输入可以为长按操作或者双击操作等等。For example, the first text is all the text in the information text, and the user selects all the text in the information text as the first text by performing a selection input on the information text. During this process, the selected input can be a long-press operation or a double-click operation, etc.
又如,第一文本是信息文本中的部分文本,用户通过对该信息文本进行选定输入来选定该信息文本中的部分文本作为第一文本。在此过程中,用户可以是对该信息文本进行长按操作,使得当前界面中出现起始位置光标和终止位置光标,通过对起始位置光标和终止位置光标进行拖动操作来重新确定起始位置光标和终止位置光标在信息文本中的位置,以选定位于起始位置光标和终止位置光标之间的文本作为第一文本。在此过程中,选定输入包括上述长按操作和拖动操作。For another example, the first text is part of the text in the information text, and the user selects part of the text in the information text as the first text by performing a selection input on the information text. During this process, the user can long-press the information text, so that the starting position cursor and the ending position cursor appear in the current interface, and the starting position cursor and the ending position cursor can be dragged to re-determine the starting position. The position of the position cursor and the end position cursor in the information text, the text between the start position cursor and the end position cursor is selected as the first text. During this process, the selected input includes the long press and drag operations described above.
可以理解的是,上述所列举的选定输入仅仅是示例性的,实际情况中,只要能够在信息文本中选定第一文本,本公开实施例对选定输入的输入方式不做限定。It can be understood that the selected input listed above is only exemplary, and in actual situations, as long as the first text can be selected in the information text, the embodiment of the present disclosure does not limit the input manner of the selected input.
步骤S120:响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本;Step S120: In response to the selected input, when the text length of the first text is greater than the preset text length, split the first text into multiple candidate sub-texts;
文本长度可以是文本内字符串所包含的字符个数。预设文本长度即搜索框限制的文本长度。The text length can be the number of characters contained in the string within the text. The preset text length is the text length limited by the search box.
示例地,第一文本内字符串所包含的字符个数为N,搜索框限制的文本内字符串所包含的字符个数为M。在N>M的情况下,第一文本的文本长度大于预设文本长度,否则第一文本的文本长度小于或等于预设文本长度。For example, the number of characters contained in the first in-text string is N, and the number of characters contained in the in-text string limited by the search box is M. In the case of N>M, the text length of the first text is greater than the preset text length, otherwise the text length of the first text is less than or equal to the preset text length.
在一些示例中,多个候选子文本为多个词语。在此情况下,将第一文本拆分为多个候选子文本,可以是对第一文本进行分词处理,将分词处理结果中得到的多个词语作为多个候选子文本。其中,分词处理的方式可以由本领域技术人员根据实际情况进行设置,本申请实施例对此不 作限定。In some examples, the multiple candidate sub-texts are multiple terms. In this case, dividing the first text into multiple candidate sub-texts may be to perform word segmentation processing on the first text, and use multiple words obtained in the word segmentation processing results as multiple candidate sub-texts. Wherein, the method of word segmentation processing can be set by those skilled in the art according to the actual situation, which is not limited in this embodiment of the present application.
在另一些示例中,多个候选子文本包括至少一个词语和至少一个短语;或者多个候选子文本包括多个短语。其中,将多个候选子文本拆分为至少一个词语和至少一个短语、或者将多个候选子文本拆分为多个短语的方式可以由本领域技术人员根据实际情况进行设置,本申请实施例对此不作限定。In other examples, the multiple candidate sub-texts include at least one word and at least one phrase; or the multiple candidate sub-texts include multiple phrases. The manner of splitting multiple candidate sub-texts into at least one word and at least one phrase, or splitting multiple candidate sub-texts into multiple phrases can be set by those skilled in the art according to the actual situation. This is not limited.
步骤S130:确定多个候选子文本中的目标子文本。Step S130: Determine a target sub-text among the multiple candidate sub-texts.
在多个候选子文本中,可以将包含多个第一文本中的有效信息的候选子文本作为目标子文本。目标子文本的数量可以为一个或多个。Among the plurality of candidate sub-texts, candidate sub-texts containing valid information in the plurality of first texts may be used as target sub-texts. The number of target subtexts can be one or more.
在一些实施例中,在步骤S120后,可以在显示屏中显示包括上述多个候选子文本的第一界面,以便于向用户展示将第一文本拆分后得到的多个候选子文本。在此情况下,可以将多个候选子文本中的第一候选子文本确定为目标子文本,其中,第一候选子文本为用户从多个候选子文本选择后得到。In some embodiments, after step S120, a first interface including the above-mentioned multiple candidate sub-texts may be displayed on the display screen, so as to show the user multiple candidate sub-texts obtained by splitting the first text. In this case, the first candidate sub-text among the multiple candidate sub-texts may be determined as the target sub-text, wherein the first candidate sub-text is obtained after the user selects from the multiple candidate sub-texts.
在一些示例中,如图2所示,第一界面20中设置有多个文本选项21,多个文本选项21与上述多个候选子文本一一对应,且每个文本选项21中显示有该文本选项对应的候选子文本(例如多个文本选项上对应显示的候选子文本A、候选子文本B、候选子文本C、候选子文本D、候选子文本E、候选子文本F、候选子文本G以及候选子文本H等)。在此情况下,用户可以对上述多个文本选项21中的至少一个文本选项21执行选择输入,该选择输入例如点击操作、双击操作,本申请实施例中,上述选择输入可以是直接对至少一个文本选项21的选择输入,在此情况下,将上述至少一个文本选项21对应的候选子文本确定为目标子文本;或者,每个文本选项21还设置有一个删除选项22,上述选择输入可以是对至少一个文本选项21对应的删除选项22的选择输入,在此情况下,将上述至少一个文本选项21对应的候选子文本以外的其他候选子文本确 定为目标子文本。In some examples, as shown in FIG. 2 , the first interface 20 is provided with multiple text options 21 , the multiple text options 21 are in one-to-one correspondence with the above-mentioned multiple candidate sub-texts, and each text option 21 displays the Candidate sub-texts corresponding to text options (for example, candidate sub-text A, candidate sub-text B, candidate sub-text C, candidate sub-text D, candidate sub-text E, candidate sub-text F, candidate sub-text displayed on multiple text options G and candidate subtext H, etc.). In this case, the user can perform a selection input on at least one text option 21 among the above-mentioned multiple text options 21, and the selection input is, for example, a click operation or a double-click operation. The selection input of the text option 21, in this case, the candidate sub-text corresponding to the above at least one text option 21 is determined as the target sub-text; or, each text option 21 is also provided with a deletion option 22, and the above-mentioned selection input can be For selection input of the deletion option 22 corresponding to at least one text option 21, in this case, other candidate sub-texts other than the candidate sub-text corresponding to the at least one text option 21 are determined as target sub-texts.
在一些示例中,第一界面还包括“确定”按钮或者“重置”按钮,在执行上述选择输入后,可以对“确定”按钮进行点击操作,以确定多个候选子文本中选中的候选子文本;或者,对“重置”按钮进行操作,以对多个候选子文本的选择结果进行重置。In some examples, the first interface further includes an "OK" button or a "Reset" button. After performing the above selection input, the "OK" button can be clicked to determine the selected candidate sub-text in the multiple candidate sub-texts text; or, operate the Reset button to reset the selection results of multiple candidate subtexts.
在另一些实施例中,可以将候选子文本中与目标关键词相关联的第二候选子文本确定为目标子文本。In other embodiments, the second candidate sub-text associated with the target keyword among the candidate sub-texts may be determined as the target sub-text.
在一些示例中,上述目标关键词为用户在搜索框中输入的一个或多个词语。与目标关键词相关联的第二候选子文本可以是:该一个或多个词语中与目标关键词的词义相似度高于预设相似度阈值的词语。In some examples, the above target keywords are one or more words entered by the user in the search box. The second candidate sub-text associated with the target keyword may be: a word whose semantic similarity with the target keyword in the one or more words is higher than a preset similarity threshold.
该一个或多个词语中与目标关键词的词义相似度的获取方式、预设相似度阈值可以由本领域技术人员根据实际情况进行设置,本公开实施例对此不作限定。The acquisition method and the preset similarity threshold of the one or more words and the target keyword may be set by those skilled in the art according to the actual situation, which is not limited in this embodiment of the present disclosure.
步骤S140:根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。Step S140: Generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the preset text length.
在一些实施例中,对所有目标子文本进行组合,将组合的结果作为第二文本,并对第二文本进行搜索。In some embodiments, all target subtexts are combined, the combined result is used as the second text, and the second text is searched.
在目标子文本的数量为多个的情况下,多个目标子文本的排列顺序默认为多个目标子文本在第一文本中的第一排列顺序。When the number of target sub-texts is multiple, the arrangement order of the multiple target sub-texts defaults to the first arrangement order of the multiple target sub-texts in the first text.
在一些实施例中,对所有目标子文本进行组合,可以直接对以第一排列顺序的多个目标子文本进行组合,得到第二文本。In some embodiments, to combine all target sub-texts, a plurality of target sub-texts in the first arrangement order may be directly combined to obtain the second text.
在另一些实施例中,可以将多个目标子文本排列顺序由第一排列顺序修改为第二排列顺序,对以第二排列顺序的多个目标子文本进行组合,得到第二文本。In other embodiments, the arrangement order of the plurality of target sub-texts may be modified from the first arrangement order to the second arrangement order, and the second text is obtained by combining the plurality of target sub-texts in the second arrangement order.
要说明的是,第二文本的文本长度小于或等于预设文本长度,从而实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目 的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。It should be noted that the text length of the second text is less than or equal to the preset text length, thereby achieving the purpose of shortening the text length of the first text while retaining the valid information in the first text, effectively improving the search box text input. The accuracy of the search results obtained when the text length is greater than the text length limited by the search box.
在一些示例中,为了将多个目标子文本排列顺序由第一排列顺序修改为第二排列顺序,在执行步骤S140之前,如图3所示,可以包括如下步骤S310~S320。In some examples, in order to modify the arrangement order of the multiple target subtexts from the first arrangement order to the second arrangement order, before step S140 is performed, as shown in FIG. 3 , the following steps S310 to S320 may be included.
步骤S310:接收用户对多个目标子文本中至少一个待调整子文本的第一输入。Step S310: Receive a first input from the user for at least one sub-text to be adjusted among the multiple target sub-texts.
第一输入为将至少一个待调整子文本的位置指定为每个待调整子文本对应的目标位置的输入。The first input is an input of specifying the position of at least one sub-text to be adjusted as the target position corresponding to each sub-text to be adjusted.
具体地,第一输入可以包括将至少一个待调整子文本拖动至与每个待调整子文本对应的目标位置的拖动操作。Specifically, the first input may include a drag operation of dragging at least one sub-text to be adjusted to a target position corresponding to each sub-text to be adjusted.
在一些示例中,如图4A所示,多个目标子文本包括图2中的候选子文本A、候选子文本C、候选子文本E、候选子文本F、以及候选子文本G,至少一个待调整子文本包括上述多个目标子文本中的一个,例如包括候选子文本C,第一输入例如可以是将候选子文本C拖动至目标位置Z1处的第一拖动操作。In some examples, as shown in FIG. 4A , the plurality of target sub-texts include candidate sub-text A, candidate sub-text C, candidate sub-text E, candidate sub-text F, and candidate sub-text G in FIG. 2 , at least one of which is to be The adjustment sub-text includes one of the above-mentioned multiple target sub-texts, for example, the candidate sub-text C, and the first input may be, for example, a first drag operation of dragging the candidate sub-text C to the target position Z1.
在一些示例中,如图4B所示,多个目标子文本包括图2中的候选子文本A、候选子文本C、候选子文本E、候选子文本F、以及候选子文本G,至少一个待调整子文本包括上述多个目标子文本中的多个,例如包括候选子文本C和候选子文本F,第一输入可以包括:将候选子文本C拖动至目标位置Z1处的第一拖动操作、以及将候选子文本F拖动至目标位置Z2处的第二拖动操作。In some examples, as shown in FIG. 4B , the plurality of target sub-texts include candidate sub-text A, candidate sub-text C, candidate sub-text E, candidate sub-text F, and candidate sub-text G in FIG. 2 , at least one of which is to be The adjustment sub-text includes a plurality of the above-mentioned multiple target sub-texts, such as candidate sub-text C and candidate sub-text F, and the first input may include: dragging the candidate sub-text C to the first drag at the target position Z1 operation, and a second drag operation of dragging the candidate subtext F to the target position Z2.
可以理解的是,上述所列举的第一输入仅仅是示例性的,只要能够指定将至少一个待调整子文本的位置移动至对应的目标位置,本申请实施例对第一输入的输入方式不作限定。It can be understood that the first input listed above is only exemplary, as long as the position of at least one sub-text to be adjusted can be specified to be moved to the corresponding target position, the embodiment of the present application does not limit the input method of the first input. .
步骤S320:响应第一输入,调整至少一个待调整子文本的位置。Step S320: In response to the first input, adjust the position of at least one sub-text to be adjusted.
具体地,响应第一输入,将每个待调整子文本的位置调整为与该调整子文本对应的目标位置,实现将多个目标子文本排列顺序由第一排列顺序修改为第二排列顺序的目的。Specifically, in response to the first input, the position of each sub-text to be adjusted is adjusted to the target position corresponding to the adjusted sub-text, so as to modify the arrangement order of the plurality of target sub-texts from the first arrangement order to the second arrangement order. Purpose.
在一些实施例中,步骤S140中的目标子文本除步骤S130中从多个候选子文本中确定的一个或多个目标子文本之外,还包括用户通过文本输入新增的一个或多个目标子文本。在显示有第一界面的情况下,在执行步骤S140之前,如图5所示,本申请实施例还可以包括如下步骤S510~S520。In some embodiments, in addition to the one or more target sub-texts determined from the plurality of candidate sub-texts in step S130, the target sub-text in step S140 also includes one or more targets newly added by the user through text input subtext. In the case where the first interface is displayed, before step S140 is performed, as shown in FIG. 5 , this embodiment of the present application may further include the following steps S510 to S520.
步骤S510:接收用户的新增输入。Step S510: Receive new input from the user.
示例地,如图6所示,第一界面中还包括至少一个文本新增选项23。上述新增输入可以包括:指定至少一个文本新增选项23中的目标文本新增选项的操作(例如对目标文本新增选项23的点击操作)。For example, as shown in FIG. 6 , the first interface further includes at least one text addition option 23 . The above-mentioned newly added input may include: an operation of specifying a target text addition option in at least one text addition option 23 (eg, a click operation on the target text addition option 23 ).
步骤S520:响应于新增输入,将新增输入对应内容添加为目标子文本。Step S520: In response to the newly added input, the content corresponding to the newly added input is added as the target subtext.
示例地,在显示第一界面的情况下,如图6所示,响应于上述新增输入,在第一界面中显示文本输入框60,获取用户输入该文本输入框60的内容作为上述新增输入对应内容,将该内容对应的文本添加为目标子文本。实现使得用户能够通过文本输入新增的一个或多个目标子文本目的。For example, when the first interface is displayed, as shown in FIG. 6 , in response to the above-mentioned newly added input, a text input box 60 is displayed in the first interface, and the content entered by the user into the text input box 60 is obtained as the above-mentioned newly added input. Enter the corresponding content, and add the text corresponding to the content as the target subtext. Implements the purpose of enabling the user to add one or more target subtexts through text input.
在一些实施例中,在对第二文本进行搜索后,得到的搜索结果可能与用户想要的搜索结果有偏差,在此情况下,若第一候选子文本为用户对第一界面中的多个候选子文本选择后得到的,为了能够得到用户自己想要的搜索结果,用户可能具有想要快速返回上述第一界面,以便在第一界面中根据自己的需求重新确定多个候选子文本中的目标子文本的需求。为了满足用户的上述需要,在执行步骤S140之后,如图7所示,本公开实施例还可以包括如下步骤S710~S720。In some embodiments, after the second text is searched, the obtained search results may deviate from the search results desired by the user. After selecting the candidate sub-texts, in order to obtain the search results that the user wants, the user may want to quickly return to the above-mentioned first interface, so as to re-determine the multiple candidate sub-texts according to their own needs in the first interface. needs of the target subtext. In order to meet the above needs of the user, after step S140 is performed, as shown in FIG. 7 , the embodiment of the present disclosure may further include the following steps S710 to S720.
步骤S710:接收用户的第二输入。Step S710: Receive a second input from the user.
对于步骤S140中得到的第二文本进行搜索后,得到搜索结果。第二输入可以是在得到上述搜索结果后对搜索框的长按操作、双击操作等。After searching the second text obtained in step S140, a search result is obtained. The second input may be a long-press operation, a double-click operation, etc. on the search box after the above-mentioned search result is obtained.
步骤S720:响应第二输入,显示第二界面;其中,第二界面中显示有多个候选子文本,且多个候选子文本中的目标子文本以第一方式显示,多个候选子文本中除目标子文本以外的其他子文本以第二方式显示。Step S720: In response to the second input, display a second interface; wherein, multiple candidate sub-texts are displayed in the second interface, and the target sub-text in the multiple candidate sub-texts is displayed in the first manner, and the multiple candidate sub-texts are displayed in the first manner. Subtexts other than the target subtext are displayed in the second manner.
具体地,第二界面中显示有上述第一界面中的多个候选子文本。对于在第一界面中确定多个候选子文本中的目标子文本,该多个候选子文本中的目标子文本以第一方式显示,该多个候选子文本中除目标子文本以外的其他子文本以第二方式显示,以便将第一界面中确定多个候选子文本中的目标子文本和除目标子文本以外的其他子文本进行区别显示,以供用户对重新在多个候选子文本中确定目标子文本提供参考。Specifically, the second interface displays a plurality of candidate sub-texts in the first interface. For the target sub-text in the plurality of candidate sub-texts determined in the first interface, the target sub-text in the plurality of candidate sub-texts is displayed in the first manner, and the other sub-texts in the plurality of candidate sub-texts except the target sub-text are displayed in the first manner. The text is displayed in a second manner, so that the target sub-text in the plurality of candidate sub-texts determined in the first interface and other sub-texts other than the target sub-text can be displayed differently, so that the user can re-display the target sub-text in the plurality of candidate sub-texts. Identify the target subtext for reference.
示例地,第一方式为高亮显示的方式,第二方式为非高亮显示的方式;又示例地,第一方式为对文本进行加粗后进行显示,第二方式为没有对文本进行加粗的显示。具体实施中,只要能够将第一界面中确定多个候选子文本中的目标子文本和除目标子文本以外的其他子文本进行区别显示,本公开实施例对此第一方式和第二方式的具体方式不作限定。For example, the first mode is a highlighted mode, and the second mode is a non-highlighted mode; another example, the first mode is to display the text after being bolded, and the second mode is to not add text to the text. Bold display. In a specific implementation, as long as the target sub-text in the plurality of candidate sub-texts determined in the first interface and other sub-texts other than the target sub-text can be displayed differently, the embodiments of the present disclosure will provide the first manner and the second manner. The specific method is not limited.
在显示第二界面的情况下,可以接收用户对第二界面中至少一个第三候选子文本的选择输入,将第三候选子文本确定为目标子文本,并再次执行上述步骤S140。When the second interface is displayed, a user's selection input of at least one third candidate sub-text in the second interface may be received, the third candidate sub-text is determined as the target sub-text, and the above step S140 is performed again.
在本申请实施例中,能够在接收到用户对第一文本的选定输入后,响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本,然后确定多个候选子文本中的目标子文本,根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。在此情况下,将上述第 一文本作为输入搜索框的文本,将上述预设文本长度作为搜索框限制的限制文本长度,将目标子文本作为包含第一文本中的有效信息的子文本,本申请实施例能够有效解决现有技术中在根据搜索框限制的文本长度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题,实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。并且,在得到的搜索结果可能与用户想要的搜索结果有偏差的情况下,还能够根据用户的第二输入显示第二界面,以便用户能够通过第二界面快速重新确定多个候选子文本中的目标子文本,更好地满足用户的搜索需求。In this embodiment of the present application, after receiving the user's selected input of the first text, in response to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text can be split into multiple candidate sub-texts, then determine a target sub-text in the multiple candidate sub-texts, generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the preset text length. In this case, the above-mentioned first text is used as the text input into the search box, the above-mentioned preset text length is used as the limit text length limited by the search box, and the target sub-text is used as the sub-text containing valid information in the first text. The application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex. In addition, in the case that the obtained search results may deviate from the search results desired by the user, a second interface can also be displayed according to the user's second input, so that the user can quickly re-determine the multiple candidate sub-texts through the second interface. The target subtext can better meet the user's search needs.
需要说明的是,本申请实施例提供的搜索方法,执行主体可以为搜索装置,或者该搜索装置中的用于执行该搜索方法的控制模块。本申请实施例中以搜索装置执行上述实施例中的搜索方法为例,说明本申请实施例提供的搜索装置。It should be noted that, in the search method provided by the embodiment of the present application, the execution body may be a search device, or a control module in the search device for executing the search method. In the embodiment of the present application, the search device provided by the embodiment of the present application is described by taking the search device executing the search method in the above embodiment as an example.
图8示出了本申请实施例提供的一种搜索装置的功能结构框图。如图8所示,搜索装置80包括:FIG. 8 shows a functional structural block diagram of a search apparatus provided by an embodiment of the present application. As shown in FIG. 8 , the search device 80 includes:
第一接收模块81,用于接收用户对第一文本的选定输入;The first receiving module 81 is used to receive the user's selected input of the first text;
拆分模块82,用于响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本。The splitting module 82 is configured to, in response to the selected input, split the first text into multiple candidate sub-texts when the text length of the first text is greater than the preset text length.
确定模块83,用于确定多个候选子文本中的目标子文本。The determining module 83 is configured to determine a target sub-text in the plurality of candidate sub-texts.
生成模块84,用于根据所目标子文本生成第二文本。The generating module 84 is configured to generate the second text according to the target sub-text.
搜索模块85,用于对生成模块生成的第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。The searching module 85 is configured to search the second text generated by the generating module, wherein the text length of the second text is less than or equal to the preset text length.
在本申请实施例提供中,搜索装置能够在接收到用户对第一文本的选定输入后,响应选定输入,在第一文本的文本长度大于预设文本长度 的情况下,将第一文本拆分为多个候选子文本,然后确定多个候选子文本中的目标子文本,根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。在此情况下,将上述第一文本作为输入搜索框的文本,将上述预设文本长度作为搜索框限制的限制文本长度,将目标子文本作为包含第一文本中的有效信息的子文本,本申请实施例能够有效解决现有技术中在根据搜索框限制的文本长度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题,实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。In the embodiment of the present application, after receiving the user's selected input for the first text, the search device can respond to the selected input, and in the case that the text length of the first text is greater than the preset text length, the first text Splitting into multiple candidate subtexts, then determining a target subtext in the multiple candidate subtexts, generating a second text according to the target subtext, and searching the second text, where the text length of the second text is less than or equal to Default text length. In this case, the above-mentioned first text is used as the text input into the search box, the above-mentioned preset text length is used as the limit text length limited by the search box, and the target sub-text is used as the sub-text containing valid information in the first text. The application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
可选地,确定模块,包括:第一确定子模块,用于在显示有包括多个候选子文本的第一界面的情况下,将多个候选子文本中的第一候选子文本确定为目标子文本,其中,第一候选子文本为用户从多个候选子文本选择后得到;或者,第二确定子模块,用于将多个候选子文本中与目标关键词相关联的第二目标候选子文本确定为目标子文本。Optionally, the determining module includes: a first determining sub-module, configured to determine the first candidate sub-text in the multiple candidate sub-texts as the target when a first interface including multiple candidate sub-texts is displayed sub-text, wherein the first candidate sub-text is obtained after the user selects from multiple candidate sub-texts; or, the second determination sub-module is used to select the second target candidate associated with the target keyword in the multiple candidate sub-texts The subtext is determined as the target subtext.
可选地,目标子文本的数量为多个;搜索装置还包括:第二接收模块,用于接收用户对多个目标子文本中至少一个待调整子文本的第一输入;调整模块,用于响应第一输入,调整至少一个待调整子文本的位置;生成模块,具体用于:根据调整后的多个目标子文本的位置关系,生成第二文本。Optionally, the number of target sub-texts is multiple; the search device further includes: a second receiving module for receiving a first input from a user to at least one sub-text to be adjusted among the multiple target sub-texts; an adjustment module for In response to the first input, adjust the position of at least one sub-text to be adjusted; the generating module is specifically configured to: generate the second text according to the adjusted positional relationship of the multiple target sub-texts.
可选地,搜索装置还包括:第三接收模块,用于接收用户的新增输入;添加模块,用于响应新增输入,将新增输入对应内容添加为目标子文本。Optionally, the search apparatus further includes: a third receiving module, configured to receive a user's newly added input; and an adding module, used to respond to the newly added input and add the content corresponding to the newly added input as the target subtext.
可选地,搜索装置还包括:第四接收模块,用于接收用户的第二输入;显示模块,用于响应第二输入,显示第二界面;其中,第二界面中 显示有多个候选子文本,且多个候选子文本中的目标子文本以第一方式显示,多个候选子文本中除目标子文本以外的其他子文本以第二方式显示。Optionally, the search device further includes: a fourth receiving module, configured to receive a second input from the user; a display module, configured to respond to the second input and display a second interface; wherein, a plurality of candidate sub-interfaces are displayed in the second interface text, and the target sub-text among the multiple candidate sub-texts is displayed in the first manner, and the other sub-texts except the target sub-text among the multiple candidate sub-texts are displayed in the second manner.
在本申请实施例中,搜索装置能够在接收到用户对第一文本的选定输入后,响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本,然后确定多个候选子文本中的目标子文本,根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。在此情况下,将上述第一文本作为输入搜索框的文本,将上述预设文本长度作为搜索框限制的限制文本长度,将目标子文本作为包含第一文本中的有效信息的子文本,本申请实施例能够有效解决现有技术中在根据搜索框限制的文本长度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题,实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。并且,在得到的搜索结果可能与用户想要的搜索结果有偏差的情况下,还能够根据用户的第二输入显示第二界面,以便用户能够通过第二界面快速重新确定多个候选子文本中的目标子文本,更好地满足用户的搜索需求。In the embodiment of the present application, after receiving the user's selected input for the first text, the search device can respond to the selected input, and in the case that the text length of the first text is greater than the preset text length, split the first text into Divide into multiple candidate sub-texts, then determine a target sub-text in the multiple candidate sub-texts, generate a second text according to the target sub-text, and search the second text, wherein the text length of the second text is less than or equal to the predetermined text. Set the text length. In this case, the above-mentioned first text is used as the text input into the search box, the above-mentioned preset text length is used as the limit text length limited by the search box, and the target sub-text is used as the sub-text containing valid information in the first text. The application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex. In addition, in the case that the obtained search results may deviate from the search results desired by the user, a second interface can also be displayed according to the user's second input, so that the user can quickly re-determine the multiple candidate sub-texts through the second interface. The target subtext can better meet the user's search needs.
本申请实施例中的搜索装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal  computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The search apparatus in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的搜索装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The search device in this embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的搜索装置能够实现图1、图3、图5和图7的方法实施例实现的各个过程,为避免重复,这里不再赘述。The search apparatus provided in this embodiment of the present application can implement each process implemented by the method embodiments of FIG. 1 , FIG. 3 , FIG. 5 , and FIG. 7 , and to avoid repetition, details are not repeated here.
可选地,如图9所示,本申请实施例还提供一种电子设备900,包括处理器901,存储器902,存储在存储器902上并可在处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述搜索方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 9 , an embodiment of the present application further provides an electronic device 900, including a processor 901, a memory 902, a program or instruction stored in the memory 902 and executable on the processor 901, the program Or, when the instruction is executed by the processor 901, each process of the foregoing search method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
需要说明的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图10为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc. part.
本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图10中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power functions. consumption management and other functions. The structure of the electronic device shown in FIG. 10 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
其中,处理器1010,用于接收用户对第一文本的选定输入;响应选 定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本;确定多个候选子文本中的目标子文本;根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。The processor 1010 is configured to receive a user's selected input of the first text; in response to the selected input, in the case where the text length of the first text is greater than the preset text length, split the first text into multiple candidates sub-text; determining a target sub-text among the multiple candidate sub-texts; generating a second text according to the target sub-text, and searching the second text, wherein the text length of the second text is less than or equal to the preset text length.
在本申请实施例中,处理器1010能够在接收到用户对第一文本的选定输入后,响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本,然后确定多个候选子文本中的目标子文本,根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。在此情况下,将上述第一文本作为输入搜索框的文本,将上述预设文本长度作为搜索框限制的限制文本长度,将目标子文本作为包含第一文本中的有效信息的子文本,本申请实施例能够有效解决现有技术中在根据搜索框限制的文本长度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题,实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。In this embodiment of the present application, after receiving the user's selected input for the first text, the processor 1010 can respond to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text Splitting into multiple candidate subtexts, then determining a target subtext in the multiple candidate subtexts, generating a second text according to the target subtext, and searching the second text, where the text length of the second text is less than or equal to Default text length. In this case, the above-mentioned first text is used as the text input into the search box, the above-mentioned preset text length is used as the limit text length limited by the search box, and the target sub-text is used as the sub-text containing valid information in the first text. The application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex.
处理器1010在确定多个候选子文本中的目标子文本,具体用于:在显示有包括多个候选子文本的第一界面的情况下,将多个候选子文本中的第一候选子文本确定为目标子文本,其中,第一候选子文本为用户从多个候选子文本选择后得到;或者,将多个候选子文本中与目标关键词相关联的第二候选子文本确定为目标子文本。The processor 1010 determines the target sub-text in the multiple candidate sub-texts, and is specifically configured to: in the case where the first interface including the multiple candidate sub-texts is displayed, select the first candidate sub-text in the multiple candidate sub-texts. It is determined as the target sub-text, wherein the first candidate sub-text is obtained after the user selects from multiple candidate sub-texts; or, the second candidate sub-text associated with the target keyword in the multiple candidate sub-texts is determined as the target sub-text. text.
目标子文本的数量为包括多个,处理器1010在根据目标子文本生成第二文本之前,还用于:接收用户对多个目标子文本中至少一个待调整子文本的第一输入;响应第一输入,调整至少一个待调整子文本的位置;处理器1010根据目标子文本生成第二文本,具体用于:根据调整后 的多个目标子文本的位置关系,生成第二文本。The number of target sub-texts includes a plurality, and before generating the second text according to the target sub-text, the processor 1010 is further configured to: receive a first input from the user on at least one sub-text to be adjusted in the plurality of target sub-texts; Once input, adjust the position of at least one sub-text to be adjusted; the processor 1010 generates the second text according to the target sub-text, and is specifically configured to: generate the second text according to the adjusted positional relationship of the multiple target sub-texts.
处理器1010在根据目标子文本生成第二文本之前,还用于:接收用户的新增输入;响应于新增输入,将新增输入对应内容添加为目标子文本。Before generating the second text according to the target sub-text, the processor 1010 is further configured to: receive a user's newly added input; and in response to the newly added input, add content corresponding to the newly added input as the target sub-text.
处理器1010在对第二文本进行搜索之后,还用于:接收用户的第二输入;响应第二输入,显示第二界面;其中,第二界面中显示有多个候选子文本,且多个候选子文本中的目标子文本以第一方式显示,多个候选子文本中除目标子文本以外的其他子文本以第二方式显示。After the second text is searched, the processor 1010 is further configured to: receive a second input from the user; in response to the second input, display a second interface; wherein, a plurality of candidate sub-texts are displayed in the second interface, and a plurality of candidate sub-texts are displayed in the second interface. The target sub-text among the candidate sub-texts is displayed in the first manner, and the other sub-texts except the target sub-text among the plurality of candidate sub-texts are displayed in the second manner.
在本申请实施例中,处理器1010能够在接收到用户对第一文本的选定输入后,响应选定输入,在第一文本的文本长度大于预设文本长度的情况下,将第一文本拆分为多个候选子文本,然后确定多个候选子文本中的目标子文本,根据目标子文本生成第二文本,并对第二文本进行搜索,其中,第二文本的文本长度小于或等于预设文本长度。在此情况下,将上述第一文本作为输入搜索框的文本,将上述预设文本长度作为搜索框限制的限制文本长度,将目标子文本作为包含第一文本中的有效信息的子文本,本申请实施例能够有效解决现有技术中在根据搜索框限制的文本长度对输入搜索框的文本进行截取后,由于截取的文本中包含的有效信息较少导致搜索结果的准确性偏低的技术问题,实现在缩短第一文本的文本长度的同时,保留第一文本中有效信息的目的,有效提高了在输入搜索框文本的文本长度大于搜索框限制的文本长度的情况下得到的搜索结果的准确性。并且,在得到的搜索结果可能与用户想要的搜索结果有偏差的情况下,还能够根据用户的第二输入显示第二界面,以便用户能够通过第二界面快速重新确定多个候选子文本中的目标子文本,更好地满足用户的搜索需求。In this embodiment of the present application, after receiving the user's selected input for the first text, the processor 1010 can respond to the selected input, in the case that the text length of the first text is greater than the preset text length, the first text Splitting into multiple candidate subtexts, then determining a target subtext in the multiple candidate subtexts, generating a second text according to the target subtext, and searching the second text, where the text length of the second text is less than or equal to Default text length. In this case, the above-mentioned first text is used as the text input into the search box, the above-mentioned preset text length is used as the limit text length limited by the search box, and the target sub-text is used as the sub-text containing valid information in the first text. The application embodiments can effectively solve the technical problem in the prior art that after the text input into the search box is intercepted according to the text length limited by the search box, the accuracy of the search results is low due to less effective information contained in the intercepted text. , to achieve the purpose of retaining valid information in the first text while shortening the text length of the first text, effectively improving the accuracy of the search results obtained when the text length of the input search box text is greater than the text length limited by the search box sex. In addition, in the case that the obtained search results may deviate from the search results desired by the user, a second interface can also be displayed according to the user's second input, so that the user can quickly re-determine the multiple candidate sub-texts through the second interface. The target subtext can better meet the user's search needs.
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)10041和麦克风10042,图形处理器 10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。It should be understood that, in this embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. Such as camera) to obtain still pictures or video image data for processing. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and other input devices 10072 . The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1010.
本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述搜素方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the foregoing search method embodiment can be implemented, and the same technology can be achieved. The effect, in order to avoid repetition, is not repeated here.
其中,处理器为上述实施例中的电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述搜索方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used for running a program or an instruction, implementing each process of the foregoing search method embodiment, and can achieve the same technology The effect, in order to avoid repetition, is not repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其 他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of computer software products that are essentially or contribute to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk , CD-ROM), including several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (18)

  1. 一种搜索方法,包括:A search method that includes:
    接收用户对第一文本的选定输入;receiving user selected input for the first text;
    响应所述选定输入,在所述第一文本的文本长度大于预设文本长度的情况下,将所述第一文本拆分为多个候选子文本;In response to the selected input, when the text length of the first text is greater than a preset text length, splitting the first text into multiple candidate sub-texts;
    确定所述多个候选子文本中的目标子文本;determining a target subtext in the plurality of candidate subtexts;
    根据所述目标子文本生成第二文本,并对所述第二文本进行搜索,其中,所述第二文本的文本长度小于或等于所述预设文本长度。A second text is generated according to the target sub-text, and the second text is searched, wherein the text length of the second text is less than or equal to the preset text length.
  2. 根据权利要求1所述的方法,其中,所述预设文本长度为所述搜索框限制的文本长度,所述第一文本的文本长度大于所述预设文本长度,包括:The method according to claim 1, wherein the preset text length is a text length limited by the search box, and the text length of the first text is greater than the preset text length, comprising:
    在第一文本内字符串所包含的字符个数为N,搜索框限制的文本内字符串所包含的字符个数为M的情况下,若N>M,则第一文本的文本长度大于预设文本长度,M和N均为正整数。In the case where the number of characters contained in the character string in the first text is N, and the number of characters contained in the character string in the text limited by the search box is M, if N>M, the text length of the first text is greater than the predetermined length. Set the text length, M and N are positive integers.
  3. 根据权利要求1所述方法,其中,所述确定所述多个候选子文本中的目标子文本,包括:The method according to claim 1, wherein the determining the target sub-text in the plurality of candidate sub-texts comprises:
    在显示有包括所述多个候选子文本的第一界面的情况下,将所述多个候选子文本中的第一候选子文本确定为目标子文本,其中,所述第一候选子文本为用户从所述多个候选子文本选择后得到;In the case where the first interface including the multiple candidate sub-texts is displayed, the first candidate sub-text in the multiple candidate sub-texts is determined as the target sub-text, wherein the first candidate sub-text is obtained by the user after selecting from the plurality of candidate sub-texts;
    或者,将所述多个候选子文本中与目标关键词相关联的第二候选子文本确定为目标子文本。Alternatively, a second candidate sub-text associated with the target keyword among the plurality of candidate sub-texts is determined as the target sub-text.
  4. 根据权利要求1所述的方法,其中,所述目标子文本的数量为多个;The method according to claim 1, wherein the number of the target subtext is multiple;
    所述根据所述目标子文本生成第二文本之前,所述方法还包括:Before generating the second text according to the target sub-text, the method further includes:
    接收用户对所述多个目标子文本中至少一个待调整子文本的第一输入;receiving a user's first input of at least one sub-text to be adjusted in the plurality of target sub-texts;
    响应所述第一输入,调整所述至少一个待调整子文本的位置;In response to the first input, adjusting the position of the at least one sub-text to be adjusted;
    所述根据所述目标子文本生成第二文本,包括:The generating the second text according to the target sub-text includes:
    根据调整后的所述多个目标子文本的位置关系,生成所述第二文本。The second text is generated according to the adjusted positional relationship of the plurality of target sub-texts.
  5. 根据权利要求1所述的方法,其中,所述根据所述目标子文本生成第二文本,包括:The method according to claim 1, wherein the generating the second text according to the target sub-text comprises:
    对所述目标子文本进行组合,得到第二文本,其中,所述第二文本中所述目标子文本的排列顺序为第一排列顺序或者第二排列顺序,所述第一排列顺序与所述第二排列顺序不同,所述第一排列顺序为所述目标子文本在所述第一文本中的排列顺序。Combining the target sub-texts to obtain a second text, wherein the arrangement order of the target sub-texts in the second text is a first arrangement order or a second arrangement order, and the first arrangement order is the same as the The second arrangement order is different, and the first arrangement order is the arrangement order of the target subtext in the first text.
  6. 根据权利要求1所述的方法,其中,所述根据所述目标子文本生成第二文本之前,所述方法还包括:The method according to claim 1, wherein before generating the second text according to the target sub-text, the method further comprises:
    接收用户的新增输入;Receive new input from the user;
    响应于所述新增输入,将所述新增输入对应内容添加为目标子文本。In response to the newly added input, the content corresponding to the newly added input is added as target subtext.
  7. 根据权利要求1所述的方法,其中,所述对所述第二文本进行搜索之后,所述方法还包括:The method of claim 1, wherein after the searching the second text, the method further comprises:
    接收用户的第二输入;receiving a second input from the user;
    响应所述第二输入,显示第二界面;其中,所述第二界面中显示有所述多个候选子文本,且所述多个候选子文本中的所述目标子文本以第一方式显示,所述多个候选子文本中除所述目标子文本以外的其他子文本以第二方式显示。In response to the second input, a second interface is displayed; wherein the plurality of candidate sub-texts are displayed in the second interface, and the target sub-text in the plurality of candidate sub-texts is displayed in a first manner , and other sub-texts except the target sub-text among the plurality of candidate sub-texts are displayed in a second manner.
  8. 一种搜索装置,包括:A search device, comprising:
    第一接收模块,用于接收用户对第一文本的选定输入;a first receiving module for receiving a user's selected input of the first text;
    拆分模块,用于响应所述选定输入,在所述第一文本的文本长度大于预设文本长度的情况下,将所述第一文本拆分为多个候选子文本;A splitting module, configured to, in response to the selected input, split the first text into multiple candidate sub-texts when the text length of the first text is greater than a preset text length;
    确定模块,用于确定所述多个候选子文本中的目标子文本;a determining module for determining a target subtext in the plurality of candidate subtexts;
    生成模块,用于根据所所述目标子文本生成第二文本;a generating module for generating a second text according to the target subtext;
    搜索模块,用于对所述生成模块生成的所述第二文本进行搜索,其中,所述第二文本的文本长度小于或等于所述预设文本长度;A search module, configured to search the second text generated by the generation module, wherein the text length of the second text is less than or equal to the preset text length;
  9. 根据权利要求8所述的装置,其中,所述预设文本长度为所述搜索框限制的文本长度,所述第一文本的文本长度大于所述预设文本长度,包括:The device according to claim 8, wherein the preset text length is a text length limited by the search box, and the text length of the first text is greater than the preset text length, comprising:
    在第一文本内字符串所包含的字符个数为N,搜索框限制的文本内字符串所包含的字符个数为M的情况下,若N>M,则第一文本的文本长度大于预设文本长度,M和N均为正整数。In the case where the number of characters contained in the character string in the first text is N, and the number of characters contained in the character string in the text limited by the search box is M, if N>M, the text length of the first text is greater than the predetermined length. Set the text length, M and N are positive integers.
  10. 根据权利要求8所述的装置,其中,所述确定模块,包括:The apparatus according to claim 8, wherein the determining module comprises:
    第一确定子模块,用于在显示有包括所述多个候选子文本的第一界面的情况下,将所述多个候选子文本中的第一候选子文本确定为目标子文本,其中,所述第一候选子文本为用户从所述多个候选子文本选择后得到;a first determination sub-module, configured to determine the first candidate sub-text in the plurality of candidate sub-texts as the target sub-text when the first interface including the plurality of candidate sub-texts is displayed, wherein, The first candidate sub-text is obtained by the user after selecting from the plurality of candidate sub-texts;
    或者,第二确定子模块,用于将所述多个候选子文本中与目标关键词相关联的第二目标候选子文本确定为目标子文本。Or, the second determination sub-module is configured to determine the second target candidate sub-text associated with the target keyword among the plurality of candidate sub-texts as the target sub-text.
  11. 根据权利要求8所述的装置,其中,所述目标子文本的数量为多个;The device according to claim 8, wherein the number of the target subtext is multiple;
    所述装置还包括:The device also includes:
    第二接收模块,用于接收用户对所述多个目标子文本中至少一个待调整子文本的第一输入;a second receiving module, configured to receive a first input from the user to at least one sub-text to be adjusted in the plurality of target sub-texts;
    调整模块,用于响应所述第一输入,调整所述至少一个待调整子文本的位置;an adjustment module, configured to adjust the position of the at least one sub-text to be adjusted in response to the first input;
    所述生成模块,具体用于:The generating module is specifically used for:
    根据调整后的所述多个目标子文本的位置关系,生成所述第二文本。The second text is generated according to the adjusted positional relationship of the plurality of target sub-texts.
  12. 根据权利要求8所述的装置,其中,所述生成模块,具体用于:The apparatus according to claim 8, wherein the generating module is specifically configured to:
    对所述目标子文本进行组合,得到第二文本,其中,所述第二文本中所述目标子文本的排列顺序为第一排列顺序或者第二排列顺序,所述第一排列顺序与所述第二排列顺序不同,所述第一排列顺序为所述目标子文本在所述第一文本中的排列顺序。Combining the target sub-texts to obtain a second text, wherein the arrangement order of the target sub-texts in the second text is a first arrangement order or a second arrangement order, and the first arrangement order is the same as the The second arrangement order is different, and the first arrangement order is the arrangement order of the target subtext in the first text.
  13. 根据权利要求8所述的装置,其中,所述装置还包括:The apparatus of claim 8, wherein the apparatus further comprises:
    第三接收模块,用于接收用户的新增输入;The third receiving module is used to receive new input from the user;
    添加模块,用于响应于所述新增输入,将所述新增输入对应内容添加为目标子文本。The adding module is configured to, in response to the newly added input, add the content corresponding to the newly added input as the target subtext.
  14. 根据权利要求8所述的装置,其中,所述装置还包括:The apparatus of claim 8, wherein the apparatus further comprises:
    第四接收模块,用于接收用户的第二输入;a fourth receiving module, configured to receive the second input of the user;
    显示模块,用于响应所述第二输入,显示第二界面;其中,所述第二界面中显示有所述多个候选子文本,且所述多个候选子文本中的所述目标子文本以第一方式显示,所述多个候选子文本中除所述目标子文本以外的其他子文本以第二方式显示。A display module, configured to display a second interface in response to the second input; wherein, the plurality of candidate sub-texts are displayed in the second interface, and the target sub-text in the plurality of candidate sub-texts Displayed in a first manner, and other sub-texts except the target sub-text among the plurality of candidate sub-texts are displayed in a second manner.
  15. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-7任一项所述的搜索方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being executed by the processor to achieve as claimed in claims 1-7 The steps of any one of the search methods.
  16. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-7任一项所述的搜索方法的步骤。A readable storage medium on which programs or instructions are stored, and when the programs or instructions are executed by a processor, implement the steps of the search method according to any one of claims 1-7.
  17. 一种芯片,该芯片包括处理器和通信接口,该通信接口和处理器耦合,该处理器用于运行程序或指令,实现如权利要求1-7任一项的方法。A chip comprising a processor and a communication interface, the communication interface being coupled to the processor, and the processor being used for running a program or an instruction to implement the method according to any one of claims 1-7.
  18. 一种搜索装置,其特征在于,包括所述装置用于执行如权利要求1-7任一项所述的搜索方法。A search apparatus, characterized in that it includes the apparatus for executing the search method according to any one of claims 1-7.
PCT/CN2022/088392 2021-04-27 2022-04-22 Method and apparatus for carrying out searching, electronic device, and readable storage medium WO2022228294A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110463236.9 2021-04-27
CN202110463236.9A CN113010072A (en) 2021-04-27 2021-04-27 Searching method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
WO2022228294A1 true WO2022228294A1 (en) 2022-11-03

Family

ID=76380847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/088392 WO2022228294A1 (en) 2021-04-27 2022-04-22 Method and apparatus for carrying out searching, electronic device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN113010072A (en)
WO (1) WO2022228294A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010072A (en) * 2021-04-27 2021-06-22 维沃移动通信(杭州)有限公司 Searching method and device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070150513A1 (en) * 2005-12-14 2007-06-28 Research In Motion Limited Method and apparatus for generating a new event directly from a document
CN102609208A (en) * 2012-02-13 2012-07-25 广州市动景计算机科技有限公司 Method and system for word capture on screen of touch screen equipment, and touch screen equipment
CN102929924A (en) * 2012-09-20 2013-02-13 百度在线网络技术(北京)有限公司 Method and device for generating word selecting searching result based on browsing content
CN102929925A (en) * 2012-09-20 2013-02-13 百度在线网络技术(北京)有限公司 Search method and device based on browsing content
CN102945243A (en) * 2012-09-20 2013-02-27 百度在线网络技术(北京)有限公司 Contact information identification method based on browsing contents
CN113010072A (en) * 2021-04-27 2021-06-22 维沃移动通信(杭州)有限公司 Searching method and device, electronic equipment and readable storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2865831B2 (en) * 1990-08-31 1999-03-08 株式会社日立製作所 Parallel string search device
US5745745A (en) * 1994-06-29 1998-04-28 Hitachi, Ltd. Text search method and apparatus for structured documents
US8495062B2 (en) * 2009-07-24 2013-07-23 Avaya Inc. System and method for generating search terms
CN106933959A (en) * 2013-11-15 2017-07-07 北京奇虎科技有限公司 Browser side carries out the method and browser of web search
CN107291772B (en) * 2016-04-11 2021-05-04 北京搜狗科技发展有限公司 Search access method and device and electronic equipment
CN110134760A (en) * 2019-05-17 2019-08-16 北京思维造物信息科技股份有限公司 A kind of searching method, device, equipment and medium
CN110232110A (en) * 2019-05-29 2019-09-13 深圳市霏凡网络科技有限公司 A kind of patent retrieval analysis method, system and storage medium
CN111124709A (en) * 2019-12-13 2020-05-08 维沃移动通信有限公司 Text processing method and electronic equipment
CN111061838B (en) * 2019-12-18 2023-04-07 广东智媒云图科技股份有限公司 Text feature keyword determination method and device and storage medium
CN111159359B (en) * 2019-12-31 2023-04-21 达闼机器人股份有限公司 Document retrieval method, device and computer readable storage medium
CN111949765A (en) * 2020-08-20 2020-11-17 深圳市卡牛科技有限公司 Similar text searching method, system, equipment and storage medium based on semantics
CN112380244B (en) * 2020-12-02 2022-06-14 杭州筑龙信息技术股份有限公司 Word segmentation searching method and device, electronic equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070150513A1 (en) * 2005-12-14 2007-06-28 Research In Motion Limited Method and apparatus for generating a new event directly from a document
CN102609208A (en) * 2012-02-13 2012-07-25 广州市动景计算机科技有限公司 Method and system for word capture on screen of touch screen equipment, and touch screen equipment
CN102929924A (en) * 2012-09-20 2013-02-13 百度在线网络技术(北京)有限公司 Method and device for generating word selecting searching result based on browsing content
CN102929925A (en) * 2012-09-20 2013-02-13 百度在线网络技术(北京)有限公司 Search method and device based on browsing content
CN102945243A (en) * 2012-09-20 2013-02-27 百度在线网络技术(北京)有限公司 Contact information identification method based on browsing contents
CN113010072A (en) * 2021-04-27 2021-06-22 维沃移动通信(杭州)有限公司 Searching method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN113010072A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US11625435B2 (en) Registration for system level search user interface
US9037565B2 (en) System level search user interface
WO2022143524A1 (en) Information display method and apparatus, and electronic device
CN112988006A (en) Display method, display device, electronic equipment and storage medium
WO2022233276A1 (en) Display method and apparatus, and electronic device
WO2022156668A1 (en) Information processing method and electronic device
WO2022228294A1 (en) Method and apparatus for carrying out searching, electronic device, and readable storage medium
CN114116098B (en) Application icon management method and device, electronic equipment and storage medium
CN113114845B (en) Notification message display method and device
CN113849092A (en) Content sharing method and device and electronic equipment
WO2024012508A1 (en) Functional interface display method and apparatus
WO2022257883A1 (en) Presentation method and presentation apparatus
WO2022228433A1 (en) Information processing method and apparatus, and electronic device
WO2022222821A1 (en) Information display method and apparatus
WO2022237877A1 (en) Information processing method and apparatus, and electronic device
WO2022161243A1 (en) Information display method and apparatus, and electronic device
WO2022156674A1 (en) Chat content processing method and apparatus, and electronic device
US8694509B2 (en) Method and apparatus for managing for handwritten memo data
CN113807831A (en) Payment method and device
CN113342241A (en) Target character selection method and device, electronic equipment and storage medium
CN112307273A (en) Information query method and device and electronic equipment
CN112612400B (en) Text content processing method and electronic equipment
CN115080170A (en) Information processing method, information processing apparatus, and electronic device
CN115904095A (en) Information input method and device, electronic equipment and readable storage medium
CN112711674A (en) Method and device for generating song list

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22794765

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE