Information processing method, device, server and storage medium
By segmenting the search instruction text and matching thesaurus parameters, an inverted text index is established, which solves the accuracy problem of the word segmentation model in different language processing, achieves consistency of thesaurus versions, and improves the quality of search results. Quality and user experience.
Patent Information
- Application Number
- CN201910700866.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-31
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-06-25
AI Technical Summary
Existing word segmentation models have low accuracy when dealing with different languages, resulting in poor user experience, and may lead to a decrease in the quality of search results due to inconsistent thesaurus versions.
By obtaining the user's search instruction text, perform word segmentation processing to form a word-level feature vector set, determine the matching thesaurus parameters, establish a text inverted index, obtain matching text information, and ensure that the search instructions and text information in network resources are used uniformly. Segment thesaurus to achieve consistency of thesaurus versions.
It effectively improves the quality of search results and user experience, ensures the matching of search instructions and text information, and avoids the decline of search results due to inconsistent thesaurus versions.
Smart Images

Figure CN110413738B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to information processing technology, and in particular to an information processing method, device, server and storage medium. Background Art
[0002] With the continuous development of computer technology, word segmentation technology has been widely used in search systems, machine translation, speech synthesis, automatic summarization and other fields. Among them, word segmentation technology refers to the technology of dividing a sentence or a paragraph into words.
[0003] In the related art, a statistical-based word segmentation model or a word dictionary-based word segmentation model is usually used to segment the sentence to be segmented. However, the current word segmentation model is often obtained after training on the corpus of a specific language, so when performing word segmentation on other languages, the accuracy is low and the user experience is poor. At the same time, due to the inconsistency of the word segmentation library versions used by the user's search instructions and different text information in Internet resources, the quality of search results may be reduced, affecting the user's experience. Summary of the invention
[0004] In view of this, the embodiments of the present invention provide an information processing method, device, server and storage medium, which can achieve consistency in word segmentation library versions, effectively improve the quality of search results, and enhance the user experience.
[0005] The technical solution of the embodiment of the present invention is achieved as follows:
[0006] The present invention provides an information processing method, the method comprising:
[0007] Obtaining a search instruction text corresponding to a user's search instruction;
[0008] Performing word segmentation processing on the search instruction text to form a word-level feature vector set corresponding to the search instruction text, wherein the word-level feature vector set includes at least one word-level feature vector;
[0009] Determining parameters of a word segmentation library that matches a word-level feature vector corresponding to the search instruction text;
[0010] Determine the corresponding text inverted index according to the word segmentation library parameters;
[0011] Obtaining text information matching each word-level feature vector in the word-level feature vector set through the text inverted index;
[0012] The text information matching the search instruction is determined based on the text information matching each word-level feature vector.
[0013] The present invention also provides an information processing device, the device comprising:
[0014] An information transmission module, used to obtain a search instruction text corresponding to a user's search instruction;
[0015] An information processing module, configured to perform word segmentation processing on the search instruction text to form a word-level feature vector set corresponding to the search instruction text, wherein the word-level feature vector set includes at least one word-level feature vector;
[0016] The information processing module is used to determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text;
[0017] The information processing module is used to determine the corresponding text inverted index according to the word segmentation library parameters;
[0018] The information processing module is used to obtain text information matching each word-level feature vector in the word-level feature vector set through the text inverted index;
[0019] The information processing module is used to determine the text information matching the search instruction based on the text information matching each word-level feature vector.
[0020] In the above scheme,
[0021] The information processing module is used to trigger the corresponding word segmentation library according to the search instruction parameter information carried by the search instruction text;
[0022] The information processing module is used to perform word segmentation processing on the search instruction text through the word dictionary of the triggered word segmentation library to form different word-level feature vectors;
[0023] The information processing module is used to perform denoising on the different word-level feature vectors to form a word-level feature vector set corresponding to the search instruction text.
[0024] In the above scheme,
[0025] The information processing module is used to determine the name of the word segmentation library used when performing word segmentation processing on the search instruction text;
[0026] The information processing module is used to determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text according to the name of the word segmentation library, wherein the parameters of the word segmentation library include:
[0027] The type of the word segmentation library, the name of the word segmentation library and the version of the word segmentation library.
[0028] In the above scheme,
[0029] The information processing module is further used to collect different text information in network resources and determine the target word segmentation library corresponding to the different text information;
[0030] The different text information is segmented by using the word dictionary of the target segmentation library to form an inverted index corresponding to the different text information, wherein the inverted index includes a correspondence between index keywords and the content of the different text information.
[0031] In the above scheme,
[0032] The information processing module is used to perform word segmentation processing on the text information of the different text information through the word dictionary of the target word segmentation library to form corresponding candidate words;
[0033] The information processing module is used to perform clustering processing on the candidate words to obtain corresponding subject words from the candidate words;
[0034] The information processing module is used to obtain index keywords matching the different text information from the subject words according to the frequency of occurrence of the subject words in the text information of the different text information;
[0035] The information processing module is used to form an inverted index corresponding to the different text information according to the corresponding relationship between the index keyword and the text information of the different text information.
[0036] In the above scheme,
[0037] The information transmission module is used to obtain information of a new word segmentation library when the word segmentation library is adjusted;
[0038] The information processing module is used to perform word segmentation processing on the search instruction text through the new word segmentation library;
[0039] The information processing module is used to perform word segmentation processing on different text information in the network resources through the new word segmentation library to form an inverted index corresponding to the different text information;
[0040] The information processing module is used to obtain text information matching the search instruction through the text inverted index;
[0041] The information processing module is used to configure a corresponding number of search instructions for the new word library to implement corresponding information processing when it is determined through the inverted index that the matching degree between the search instruction and the different text information reaches a matching degree threshold.
[0042] An embodiment of the present invention further provides a server, comprising:
[0043] A memory for storing executable instructions;
[0044] The processor is used to implement the preceding information processing method when running the executable instructions stored in the memory.
[0045] An embodiment of the present invention further provides a computer-readable storage medium storing executable instructions, which implement the preceding information processing method when executed by a processor.
[0046] The embodiments of the present invention have the following beneficial effects:
[0047] The method is implemented by obtaining a search instruction text corresponding to a user's search instruction; performing word segmentation processing on the search instruction text to form a word-level feature vector set corresponding to the search instruction text, and determining parameters of a word segmentation library that matches the word-level feature vector corresponding to the search instruction text; determining a corresponding text inverted index according to the word segmentation library parameters; obtaining text information that matches each word-level feature vector in the word-level feature vector set through the text inverted index; and determining text information that matches the search instruction according to the text information that matches each word-level feature vector. Thus, the user's search instruction and word segmentation libraries of different text information are unified, ensuring that the user can obtain text information that matches the search instruction, and effectively improving the user's usage experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of a usage scenario of the information processing method provided by an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present invention;
[0050] Figure 3 An optional flowchart of the information processing method provided by the embodiment of the present invention;
[0051] Figure 4 An optional flowchart of the information processing method provided by the embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of a search display interface of a terminal in an embodiment of the present invention;
[0053] Figure 6 A schematic diagram of the search system processing process provided by an embodiment of the present invention;
[0054] Figure 7An optional flowchart of the information processing method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0056] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0057] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0058] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0059] 2) Word segmentation: also known as word segmentation, it is used to segment the text information of a complete sentence into multiple words, for example: Liu xx is a Chinese singer. The result after word segmentation is: Liu xx, China, singer.
[0060] 3) Word segmentation library: also known as word segmentation library, refers to a specific word segmentation method. Different word segmentation libraries have corresponding word dictionaries, and can perform word segmentation on the corresponding text information according to their corresponding word dictionaries.
[0061] 4) Consistency: This means that the data accessed from different servers is always unique.
[0062] 5) Mirror: The segmentation results obtained using different segmentation methods are stored in different locations on the server.
[0063] 6) Text information: including different documents and articles in Internet resources, such as the text information included in word documents and html web pages included in network resources, and of course, text information in pictures.
[0064] 7) Words: Words are the characters that are determined by splitting the text information or the content of the search command input by the user to form a complete expression logically.
[0065] 8) Word dictionary: stores all words, each record consists of a word and a pointer to the inverted list.
[0066] Figure 1 A schematic diagram of a usage scenario of the information processing method provided by an embodiment of the present invention, see Figure 1 , the terminal (including the terminal 10-1 and the terminal 10-2) is provided with a corresponding client capable of executing different functions, wherein the corresponding client is the terminal (including the terminal 10-1 and the terminal 10-2) obtaining different text information from the corresponding server 200 through the network 300 for browsing, the terminal is connected to the server 200 through the network 300, the network 300 can be a wide area network or a local area network, or a combination of the two, using a wireless link to achieve data transmission, wherein the types of text information obtained by the terminal (including the terminal 10-1 and the terminal 10-2) from the corresponding server 200 through the network 300 are not the same, for example: the terminal (including the terminal 10-1 and the terminal 10-2) can obtain text information matching the search instruction A from the corresponding server 200 through the network 300, and can also obtain text information matching only the search instruction A from the corresponding server 200 through the network 300 for browsing. The server 200 can store text information or corresponding inverted indexes that have been segmented through different word segmentation libraries. In some embodiments of the present invention, different types of text information stored in the server 200 may be written in software code environments of different programming languages, and code objects may be different types of code entities. For example, in a software code in C language, a code object may be a function. In a software code in JAVA language, a code object may be a class, and in an IOS-side OC language, it may be a section of target code. In a software code in C++ language, a code object may be a class or a function to execute search instructions from different terminals. The source of the retrieval instruction is no longer distinguished in this application.
[0067] In the process of server 200 sending different types of web pages to terminals (terminal 10-1 and / or terminal 10-2) through network 300, server 400 needs to detect different types of web pages. Therefore. As an example, server 400 is used to obtain a search instruction text corresponding to a user's search instruction; perform word segmentation processing on the search instruction text to form a word-level feature vector set corresponding to the search instruction text, wherein the word-level feature vector set includes at least one word-level feature vector; determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text; determine the corresponding text inverted index according to the word segmentation library parameters; obtain text information matching each word-level feature vector in the word-level feature vector set through the text inverted index; determine the text information matching the search instruction according to the text information matching each word-level feature vector.
[0068] The structure of the server of the embodiment of the present invention is described in detail below. The server can be implemented in various forms, such as a dedicated terminal with information processing function, or a server with information processing function, such as the aforementioned Figure 1 Server 400 in. Figure 2 The schematic diagram of the composition structure of the server provided in the embodiment of the present invention can be understood as follows: Figure 2 Only an exemplary structure of the server is shown, not all structures, and can be implemented as needed. Figure 2 Partial or complete structure shown.
[0069] The server provided in the embodiment of the present invention includes: at least one processor 201, a memory 202, a user interface 203 and at least one network interface 204. The various components in the server 20 are coupled together through a bus system 205. It can be understood that the bus system 205 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 205 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 205 .
[0070] The user interface 203 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0071] It is understood that the memory 202 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The memory 202 in the embodiment of the present invention can store data to support the operation of the terminal (such as 10-1). Examples of these data include: any computer program for operating on the terminal (such as 10-1), such as an operating system and an application. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application can include various applications.
[0072] In some embodiments, the information processing device provided by the embodiment of the present invention may be implemented in a combination of software and hardware. As an example, the information processing device provided by the embodiment of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the information processing method provided by the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor may be one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0073] As an example of an information processing device provided by an embodiment of the present invention being implemented by a combination of software and hardware, the information processing device provided by an embodiment of the present invention can be directly embodied as a combination of software modules executed by a processor 201. The software module can be located in a storage medium, and the storage medium is located in the memory 202. The processor 201 reads the executable instructions included in the software module in the memory 202, and completes the information processing method provided by an embodiment of the present invention in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
[0074] As an example, the processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0075] As an example of the information processing device provided by the embodiment of the present invention being implemented by hardware, the device provided by the embodiment of the present invention can be directly executed by a processor 201 in the form of a hardware decoding processor, for example, one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the information processing method provided by the embodiment of the present invention.
[0076] The memory 202 in the embodiment of the present invention is used to store various types of data to support the operation of the server 20. Examples of such data include: any executable instructions for operating on the server 20, such as executable instructions, and the program implementing the information processing method of the embodiment of the present invention can be included in the executable instructions.
[0077] In other embodiments, the information processing device provided by the embodiments of the present invention may be implemented in software. Figure 2 An information processing device 2020 stored in the memory 202 is shown, which may be software in the form of a program and a plug-in, and includes a series of modules. As an example of a program stored in the memory 202, an information processing device 2020 may be included, and the information processing device 2020 includes the following software modules: an information transmission module 2081, and an information processing module 2082. When the software modules in the information processing device 2020 are read into the RAM by the processor 201 and executed, the information processing method provided by the embodiment of the present invention will be implemented. The functions of each software module in the information processing device 2020 are introduced below:
[0078] The information transmission module 2081 is used to obtain the search instruction text corresponding to the user's search instruction;
[0079] An information processing module 2082 is used to perform word segmentation processing on the search instruction text to form a word-level feature vector set corresponding to the search instruction text, wherein the word-level feature vector set includes at least one word-level feature vector;
[0080] The information processing module 2082 is used to determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text;
[0081] The information processing module 2082 is used to determine the corresponding text inverted index according to the word segmentation library parameters;
[0082] The information processing module 2082 is used to obtain text information matching each word-level feature vector in the word-level feature vector set through the text inverted index;
[0083] The information processing module 2082 is used to determine the text information matching the search instruction based on the text information matching each word-level feature vector.
[0084] Combination Figure 2 The server 20 shown illustrates the information processing method provided by the embodiment of the present invention, see Figure 3 , Figure 3 An optional flow chart of the information processing method provided by the embodiment of the present invention is provided. It can be understood that: Figure 3 The steps shown can be executed by various servers running the information processing device, such as a dedicated terminal, server or server cluster with a retrieval instruction processing function. Figure 3 The steps shown are explained.
[0085] Step 301: Obtain the search instruction text corresponding to the user's search instruction.
[0086] Step 302: Perform word segmentation processing on the search instruction text to form a set of word-level feature vectors corresponding to the search instruction text.
[0087] The word-level feature vector set includes at least one word-level feature vector.
[0088] In some embodiments of the present invention, the search instruction text is segmented to form a word-level feature vector set corresponding to the search instruction text, which can be achieved in the following manner:
[0089] According to the search instruction parameter information carried by the search instruction text, the corresponding word segmentation library is triggered; the search instruction text is segmented by the word dictionary of the triggered word segmentation library to form different word-level feature vectors; the different word-level feature vectors are denoised to form a word-level feature vector set corresponding to the search instruction text. Figure 1The terminal 10-1 and / or terminal 10-2 shown can provide a search bar for inputting keywords to be searched and a search button for data searching of the keywords to be searched on their respective corresponding search interfaces (such as web pages, information search APPs, and search mini-programs on WeChat). When the user inputs a keyword in the search bar and the terminal device detects a click operation on the search button, the server is triggered to start a corresponding word segmentation instruction, and the word segmentation instruction carries the keyword in the search bar. The server receives the word segmentation instruction. Alternatively, the terminal device displays popular search keywords on the search interface. When a click operation on a popular search keyword is detected, the terminal device sends the word segmentation instruction to the server, and the word segmentation instruction carries the popular search keyword. The server receives the word segmentation instruction. It should be noted that the present invention embodiment does not limit the triggering manner of the word segmentation instruction.
[0090] In some embodiments of the present invention, the search instruction text corresponding to the search instruction may be described in natural language, and there is a gap between its expression and the query requirements of the search system. The basis for the search system to retrieve text content is to obtain documents including keywords through an inverted index, while the query requirements described in natural language cannot directly determine the keywords. Especially for Chinese, Chinese characters are used as the basic ideographic units, and the smallest semantic unit with real meaning is the word. Since there is no space like between English words to separate words from each other, in a sentence of text, it is not certain which characters form words. Therefore, word segmentation of Chinese text is an important task. Moreover, for the search instruction text, it contains some things that are only valuable for natural language understanding. For the search system, to query relevant content, it must determine which are the truly valuable retrieval bases. Therefore, by performing denoising processing on different word-level feature vectors shown in step 302, a set of word-level feature vectors corresponding to the search instruction text can be formed, avoiding the appearance of meaningless word-level feature vectors in the set of word-level feature vectors, such as "de", "di", and "dé".
[0091] Step 303: Determine the parameters of the word segmentation library that match the word-level feature vectors corresponding to the search instruction text.
[0092] In some embodiments of the present invention, determining the parameters of the word segmentation library that match the word-level feature vectors corresponding to the search instruction text can be achieved through the following methods:
[0093] Determine the name of the word segmentation library used when performing word segmentation processing on the search instruction text; determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text based on the name of the word segmentation library, wherein the parameters of the word segmentation library include: the type of the word segmentation library, the name of the word segmentation library and the version of the word segmentation library. Among them, since the word-level feature vectors formed when different word segmentation libraries are used to process the same text information are not exactly the same, the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text are determined according to the name of the word segmentation library, so as to determine the parameters of the word segmentation library used for word segmentation of the search instruction text. For example: when the search instruction text is "xx love song knife x's mp3", after being processed by word segmentation library A, a word-level feature vector set A (xx love song; knife x's mp3) corresponding to the search instruction text is formed; after being processed by word segmentation library B, a word-level feature vector set B (xx love song; knife x; mp3) corresponding to the search instruction text is formed; after being processed by word segmentation library A1, a word-level feature vector set A1 (xx; love song; knife x; mp3) corresponding to the search instruction text is formed.
[0094] Step 304: determining a corresponding text inverted index according to the word segmentation library parameters;
[0095] Step 305: obtaining text information matching each word-level feature vector in the word-level feature vector set through the text inverted index;
[0096] Step 306: Determine text information that matches the search instruction based on the text information that matches each word-level feature vector.
[0097] Among them, since all the word segmentation libraries (including different word segmentation libraries and all versions of the same word segmentation library) are used when establishing the inverted index of text information, a corresponding text information inverted index (text information inverted index mirror) is established for each of them. When the user starts a search, a certain version of a certain word segmentation library is selected to obtain the corresponding word segmentation result, and then the corresponding text information inverted index is selected according to a certain version of the same word segmentation library to obtain the text information corresponding to the user's search instruction, thereby improving the quality of the search results and avoiding the defect that the quality of the search results may be reduced and the user's use may be affected due to inconsistent word segmentation library versions.
[0098] In some embodiments of the present invention, before determining the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text, determining the inverted index of different text information in the network resource can be achieved in the following manner:
[0099] Collect different text information from network resources and determine target word segmentation libraries corresponding to the different text information;
[0100] The different text information is segmented by using the word dictionary of the target segmentation library to form an inverted index corresponding to the different text information, wherein the inverted index includes a correspondence between index keywords and the content of the different text information.
[0101] The following first explains the inverted index involved in the present invention, and introduces other related concepts.
[0102] Among them, an index is a structure that sorts the values of one or more columns in a database table. Using an index, you can quickly access specific information in a database table; the file that records index information is an index file. For search systems, since the search space is huge, index files are very important to them. Generally, search systems will create indexes for documents obtained by searching. Because indexes are recorded in files, and files are mostly in the form of tables, indexes, index files, and index tables often have the same meaning in actual use.
[0103] The index files used in the search system include forward index and inverted index.
[0104] The forward index, that is, the words in the document from the perspective of the document, is used to indicate which words each document (identified by the document identifier) contains, as well as how many times each word appears and its position (offset). The forward index uses the document identifier as the basis for sorting.
[0105] The inverted index (or inverted files) is the opposite of the forward index described above. It looks at documents from the perspective of words; that is, it records in which documents each word (keyword) appears (using document ID records), as well as how many times each word appears in each document (i.e. TF) and its position (i.e. offset). For the search system (system), it is necessary to receive search instructions as retrieval conditions. The search instructions are preprocessed to form several terms and the logical relationship between the terms. The index table is used to perform retrieval based on this information.
[0106] The so-called segmentation has both verbal and noun meanings; each segmentation is a word or phrase, that is, the smallest semantic unit with a definite meaning; for the received search instruction, it is necessary to divide the smallest semantic unit contained therein, and this action process is called segmentation, that is, segmentation can refer to the above-mentioned process of dividing the smallest semantic unit; on the other hand, the smallest semantic unit obtained after the division is often also called segmentation, that is, the word obtained after the segmentation operation is performed; sometimes in order to distinguish the two meanings from each other, the smallest semantic unit referred to by the latter meaning is called a segmentation object (Term); the term segmentation object is used in this application; the segmentation object corresponds to the keyword in the inverted list as the index basis. For Chinese, since the word as the smallest semantic unit is often composed of different numbers of characters, there is no natural distinguishing mark in phonetic characters such as blank partitions between words. Therefore, for Chinese, accurate segmentation to obtain a reasonable segmentation object is an important step.
[0107] When using the search system, documents are actually queried from the word segmentation objects. In this usage scenario, the inverted index can be used for better retrieval; therefore, for a search system that needs to deal with massive documents, establishing an inverted index is an important task.
[0108] In this step, the posting list generation process is limited in method, that is, no matter how the posting list is generated, it is required to determine the sorting relationship of each record according to the fractional document identity in each record, and then determine the position of each record in the posting list.
[0109] In some embodiments of the present invention, the word segmentation processing is performed on the different text information through the word dictionary of the target word segmentation library to form an inverted index corresponding to the different text information, which can be achieved in the following way:
[0110] The text information of the different text information is segmented through the word dictionary of the target word segmentation library to form corresponding candidate words; the candidate words are clustered to obtain corresponding subject words from the candidate words; according to the frequency of occurrence of the subject words in the text information of the different text information, index keywords matching the different text information are obtained from the subject words; according to the correspondence between the index keywords and the text information of the different text information, an inverted index corresponding to the different text information is formed.
[0111] Refer to Table 1, where Table 1 shows different text information (including different documents) in network resources;
[0112] The different text information in Table 1 is segmented to form a corresponding inverted index.
[0113]
[0114]
[0115] After being processed using the word segmentation library A, Table 1 forms an inverted index table 2 corresponding to different text information.
[0116] Word ID Word content Inverted List 1 xx (1,2,3,4,5) 2 map (1,2,3,4,5) 3 Father (1,2,4,5) 4 Job hopping (1,4) 5 xxbook (1,2,3,4,5) 6 Join (2,3,5) 7 Founder (3) 8 Lu x (3,5) 9 leave (3) 10 and (4) 11 AI (4) 12 project (4) 13 Cancel (4) 14 related (4) 15 social contact (5) 16 website (5)
[0117] After being processed using the word segmentation library A1, Table 2 forms an inverted index table 3 corresponding to different text information.
[0118] Word ID Word content Inverted List 1 xx (1,2,3,4,5) 2 map (1,2,3,4,5) 3 Father (1,2,4,5) 4 Job hopping (1,4) 5 xxbook (1,2,3,4,5) 6 Join (2,3,5) 7 Founder (3) 8 Lu x (3,5) 9 leave (3) 10 AI (4) 11 Project Cancellation (4) 12 related (4) 13 Social Networking Sites (5)
[0119] Table 3
[0120] Thus, all the word segmentation libraries (including different word segmentation libraries and all versions of the same word segmentation library) are used when establishing the corresponding text information inverted index for different text information in network resources. When the user starts a search, a certain version of a word segmentation library is selected to obtain the corresponding word segmentation result, and then the corresponding text information inverted index is selected according to a certain version of the same word segmentation library to obtain the text information corresponding to the user's search instruction, thereby improving the quality of search results and avoiding the defect that the quality of search results may be reduced and the user's use may be affected due to inconsistent word segmentation library versions. The user can obtain the text information corresponding to the search instruction.
[0121] Combination Figure 2 The server 20 shown illustrates the information processing method provided by the embodiment of the present invention, see Figure 4 , Figure 4 An optional flow chart of the information processing method provided by the embodiment of the present invention is provided. It can be understood that: Figure 4 The steps shown can be executed by various servers running the information processing device, such as a dedicated terminal, server or server cluster with a retrieval instruction processing function. Figure 4 The steps shown are explained.
[0122] Step 401: when the word segmentation library is adjusted, the server obtains information of the new word segmentation library;
[0123] Step 402: performing word segmentation processing on the search instruction text through the new word segmentation library;
[0124] Step 403: performing word segmentation processing on different text information in the network resources through the new word segmentation library to form an inverted index corresponding to the different text information;
[0125] Step 404: Acquire text information matching the search instruction through the text inverted index.
[0126] In some embodiments of the present invention, determining the text information matching the search instruction according to the text information matching each word-level feature vector can be achieved in the following manner:
[0127] Obtaining recommended parameters of the text information that matches each of the word-level feature vectors; and performing combined sorting processing on the text information that matches each of the word-level feature vectors according to the recommended parameters to form text information that matches the search instruction, wherein the recommended parameters of the text information include at least one of the following:
[0128] The reprint volume parameter of the text information, the source credibility parameter of the text information and the payment information of the text information. When the text information matching each word-level feature vector is obtained, the recommendation parameters of the text information matching each word-level feature vector can be parsed, and according to the parsing result of the recommendation parameters, the text information matching each word-level feature vector is combined and sorted to form text information matching the search instruction, so as to recommend it to the user. The recommendation parameters of the text information include at least one of the following: the reprint volume parameter of the text information, the source credibility parameter of the text information and the payment information parameter of the text information.
[0129] In some embodiments of the present invention, the text information matching each word-level feature vector can be sorted according to the reprint volume parameter of the text information, and the text information with the highest reprint volume is used as the first text information in the text information matching the search instruction.
[0130] In some embodiments of the present invention, the text information can be sorted according to the source credibility parameters of the text information, according to the source credibility parameters of each word-level feature vector, and the text information with the highest source credibility parameter is taken as the first text information in the text information matching the search instruction.
[0131] In some embodiments of the present invention, the text information can be sorted according to the payment information parameters of the text information that matches each word-level feature vector, and the payment information or the text information with the highest payment to the retrieval system operator can be used as the first text information in the text information that matches the search instruction.
[0132] Step 405: Determine whether the matching degree between the search instruction and the different text information determined by the inverted index reaches a matching degree threshold; if so, execute step 406; otherwise, execute step 407.
[0133] Step 406: configuring a corresponding number of search instructions for the new word segmentation library.
[0134] Step 407: No new word segmentation library is started.
[0135] Therefore, when it is determined through the inverted index that the matching degree between the search instruction and the different text information reaches the matching degree threshold, a corresponding number of search instructions are configured for the new word library to implement corresponding information processing.
[0136] The information processing process provided by the embodiment of the present invention is described below using the search application function (applet) in the WeChat application, wherein reference Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a search display interface of a terminal in an embodiment of the present invention; Figure 5 As shown, the search instruction received by the terminal can come from circle of friends search, text information search, public account search, mini program search, and the specific usage scenario is not limited by the present invention. The word segmentation library includes but is not limited to: Jieba word segmentation library, HanLP word segmentation library and Jcseg word segmentation library.
[0137] The search system provided by the embodiment of the present invention includes:
[0138] 1) Word segmentation module; 2) Inverted index module; 3) Resource management module; 4) Experimental module and 5) Routing module. Figure 6 , Figure 6 The search system processing process provided by the embodiment of the present invention specifically includes the following steps:
[0139] Step 601: The received search instruction is segmented by a word segmentation module according to a specified word segmentation library and version.
[0140] Step 602: Create a corresponding inverted index through an inverted index module;
[0141] Specifically, it includes: establishing an inverted index of text information, that is, segmenting and arranging the contents of all text information that need to be searched, so that each word corresponds to multiple pieces of text information, that is, an inverted index of text information.
[0142] Step 603: Allocate corresponding resources to the inverted index module according to the traffic through the resource management module.
[0143] Step 604: through the experimental module, the word segmentation library and its version number for the experiment are allocated according to the experimental results, and the word segmentation system performs word segmentation according to the word segmentation library name and version number.
[0144] In order to improve the search quality, the search system in the experimental stage often uses multiple word segmentation libraries for experiments, and each word segmentation library uses different versions for experiments. When the inverted index determines that the matching degree between the search instruction and different text information reaches the matching degree threshold, the corresponding number of search instructions can be configured for the new word segmentation library to achieve corresponding information processing to ensure the user experience.
[0145] Step 605: Routing to a designated inverted index module according to the corresponding word library name and version through a routing module.
[0146] In some embodiments of the present invention, when the word segmentation library of the search system is adjusted (including adding a word segmentation library or upgrading the word segmentation library version), combined with Figure 6 The search system processing process shown in Figure 7 , Figure 7 An optional flow chart of the information processing method provided by the embodiment of the present invention, the processing process includes the following steps:
[0147] Step 701: The word segmentation module adds a word segmentation library or adds a version of the word segmentation library;
[0148] Step 702: deploy the word segmentation library to the online environment, start the experiment, and mobilize some search requests to use the word segmentation library.
[0149] It should be noted that this process only estimates the traffic flow, and there is no actual traffic flow;
[0150] Step 703: The resource management module allocates resources according to the estimated traffic, deploys the inverted index module, and establishes the inverted index;
[0151] Step 704: The experimental module releases the actual traffic to the estimated traffic value, and mobilizes a certain proportion of search requests to use the word library;
[0152] Step 705: adjusting the resources of the inverted index module according to the experimental results;
[0153] Specifically, if the experimental effect is good, the resources of the inverted index module are increased, and the resources of the inverted index with poor effect are reduced, and finally most requests use the inverted index with good effect. For example, 100 search instructions received by the server can be configured to different inverted index modules.
[0154] Step 706: When the experimental result reaches the threshold (the accuracy of the retrieved text information reaches 80%), all search requests are adjusted to use the word segmentation library.
[0155] The present invention has the following beneficial technical effects:
[0156] The method comprises the following steps: obtaining a search instruction text corresponding to a user's search instruction; performing word segmentation processing on the search instruction text to form a word-level feature vector set corresponding to the search instruction text, and determining parameters of a word segmentation library that matches the word-level feature vector corresponding to the search instruction text; determining a corresponding text inverted index according to the word segmentation library parameters; obtaining text information that matches each word-level feature vector in the word-level feature vector set through the text inverted index; and determining text information that matches the search instruction according to the text information that matches each word-level feature vector. Thus, the user's search instruction and the word segmentation library of different text information in network resources are unified, ensuring that the user can obtain text information that matches the search instruction, and effectively improving the user's usage experience.
[0157] The above descriptions are merely embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An information processing method, characterized in that: The method comprises: Collect different text information from network resources and determine target word segmentation libraries corresponding to the different text information; The different text information is segmented by using a word dictionary of a target word segmentation library to form an inverted index corresponding to the different text information, wherein the inverted index includes a correspondence between index keywords and contents of the different text information; Acquire a search instruction text corresponding to the user's search instruction, wherein the search instruction text carries search instruction parameter information; According to the search instruction parameter information, trigger the corresponding word segmentation library; The search instruction text is segmented by a word dictionary of the triggered segmentation library to form different word-level feature vectors, wherein when the search instruction text is segmented by different segmentation libraries, the word-level feature vectors formed are at least partially different; Performing denoising processing on the different word-level feature vectors to obtain a word-level feature vector set corresponding to the search instruction text, wherein the word-level feature vector set includes at least one word-level feature vector; Determine the name of the word segmentation library used when performing word segmentation processing on the search instruction text; According to the name of the word segmentation library, determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text, wherein the parameters of the word segmentation library include: the type of the word segmentation library, the name of the word segmentation library and the version of the word segmentation library; Determine a corresponding text inverted index according to the parameters of the word segmentation library, wherein different word segmentation libraries respectively establish a corresponding text inverted index; Obtaining text information matching each word-level feature vector in the word-level feature vector set through the text inverted index; Obtaining recommended parameters of the text information matched with each of the word-level feature vectors, wherein the recommended parameters of the text information include at least one of the following: a reprint volume parameter of the text information, a source credibility parameter of the text information, and a payment information parameter of the text information; According to the recommendation parameters, the text information matching each word-level feature vector is combined and sorted to form text information matching the search instruction.
2. The method according to claim 1, characterized in that: The word segmentation process is performed on the different text information through the word dictionary of the target word segmentation library to form an inverted index corresponding to the different text information, including: Through the word dictionary of the target word segmentation library, the text information of different text information is segmented to form corresponding candidate words; Performing clustering processing on the candidate words to obtain corresponding subject words from the candidate words; According to the occurrence frequency of the subject word in the text information of the different text information, obtaining the index keyword matching the different text information from the subject word; According to the correspondence between the index keyword and the text information of the different text information, an inverted index corresponding to the different text information is formed.
3. The method according to claim 1, characterized in that The method further comprises: When the word segmentation library is adjusted, obtaining information of a new word segmentation library; Performing word segmentation processing on the search instruction text through the new word segmentation library; Perform word segmentation processing on different text information in the network resources through the new word segmentation library to form an inverted index corresponding to the different text information; Acquire text information matching the search instruction through the inverted index; When it is determined through the inverted index that the matching degree between the search instruction and the different text information reaches a matching degree threshold, a corresponding number of search instructions are configured for the new word segmentation library to implement corresponding information processing.
4. An information processing device, characterized in that: The device comprises: An information processing module is used to collect different text information in network resources and determine a target word segmentation library corresponding to the different text information; perform word segmentation processing on the different text information through a word dictionary of the target word segmentation library to form an inverted index corresponding to the different text information, wherein the inverted index includes a correspondence between index keywords and contents of different text information; An information transmission module, used to obtain a search instruction text corresponding to a user's search instruction, wherein the search instruction text carries search instruction parameter information; The information processing module is further used to trigger a corresponding word segmentation library according to the search instruction parameter information; The search instruction text is segmented by a word dictionary of the triggered segmentation library to form different word-level feature vectors, wherein when the search instruction text is segmented by different segmentation libraries, the word-level feature vectors formed are at least partially different; the different word-level feature vectors are denoised to obtain a word-level feature vector set corresponding to the search instruction text, wherein the word-level feature vector set includes at least one word-level feature vector; The information processing module is used to determine the name of the word segmentation library used when performing word segmentation processing on the search instruction text; according to the name of the word segmentation library, determine the parameters of the word segmentation library that matches the word-level feature vector corresponding to the search instruction text, wherein the parameters of the word segmentation library include: the type of the word segmentation library, the name of the word segmentation library and the version of the word segmentation library; The information processing module is used to determine the corresponding text inverted index according to the parameters of the word segmentation library, wherein different word segmentation libraries respectively establish a corresponding text inverted index; The information processing module is used to obtain text information matching each word-level feature vector in the word-level feature vector set through the text inverted index; The information processing module is used to obtain recommended parameters of the text information that matches each word-level feature vector, wherein the recommended parameters of the text information include at least one of the following: a reprint volume parameter of the text information, a source credibility parameter of the text information, and a payment information parameter of the text information; based on the recommended parameters, the text information that matches each word-level feature vector is combined and sorted to form text information that matches the search instruction.
5. A server, characterized in that: The server comprises: A memory for storing executable instructions; A processor, configured to implement the information processing method according to any one of claims 1 to 3 when running the executable instructions stored in the memory.
6. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by a processor, the information processing method according to any one of claims 1 to 3 is implemented.
