WO2020052059A1 - Method and apparatus for generating information - Google Patents
Method and apparatus for generating information Download PDFInfo
- Publication number
- WO2020052059A1 WO2020052059A1 PCT/CN2018/115951 CN2018115951W WO2020052059A1 WO 2020052059 A1 WO2020052059 A1 WO 2020052059A1 CN 2018115951 W CN2018115951 W CN 2018115951W WO 2020052059 A1 WO2020052059 A1 WO 2020052059A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- word
- target
- search
- search term
- term
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
Definitions
- an embodiment of the present application provides a method for generating information.
- the method includes: obtaining a target search term set; and for a target search term in the target search term set, determining whether a preset word set includes the same term as the A corresponding term having a pre-established correspondence relationship for the target search term; in response to determining that at least one corresponding term is included, determining the similarity between the corresponding term in the at least one corresponding term and the target search term; A target number of corresponding words are extracted from the corresponding words as a corresponding word set corresponding to the target search word; based on the obtained corresponding word set, at least one search word set is generated.
- At least one sub-set included in the preset word set is obtained according to the following steps in advance: obtaining a target text set; performing word segmentation on the target text in the target text set to obtain a word set; The words in the word set are clustered with synonyms to obtain at least one sub-set. For the sub-set in the at least one sub-set, the similarity between the words included in the sub-set is greater than or equal to a preset similarity threshold.
- FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for generating information according to an embodiment of the present application
- the above-mentioned execution subject may extract a target number of corresponding words from at least one corresponding word in the order of similarity from large to small as a corresponding word set corresponding to the target search word.
- the target number may be a preset number or a number determined according to a number of corresponding words included in at least one corresponding word corresponding to the target search term. For example, when the number of corresponding words included in the at least one corresponding word is greater than or equal to the preset number, the target number is the preset number; otherwise, the target number is the number of corresponding words included in the at least one corresponding word.
- Step 402 For a target search term in the target search term set, determine whether a preset word set includes a corresponding term having a pre-established correspondence relationship with the target search term; and in response to determining that it includes at least one corresponding term, determine at least one corresponding term.
- step 402 is substantially the same as step 202 in the embodiment corresponding to FIG. 2, and details are not described herein again.
- the process 400 of the method for generating information in this embodiment highlights the steps of searching and outputting search results using the generated at least one search term set. . Therefore, the solution described in this embodiment can use the generated search word set to obtain more comprehensive and targeted search results.
- this application provides an embodiment of an apparatus for generating information.
- the apparatus embodiment corresponds to the method embodiment shown in FIG. 2.
- the device can be specifically applied to various electronic devices.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本专利申请要求于2018年9月14日提交的、申请号为201811075006.X、申请人为北京字节跳动网络技术有限公司、发明名称为“用于生成信息的方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。This patent application requires a Chinese patent application filed on September 14, 2018, with application number 201811075006.X, the applicant being Beijing BYTE Network Technology Co., Ltd., and the invention name is "Method and Device for Generating Information" Priority is hereby incorporated by reference in its entirety.
本申请实施例涉及计算机技术领域,具体涉及用于生成信息的方法和装置。Embodiments of the present application relate to the field of computer technology, and in particular, to a method and an apparatus for generating information.
目前,当用户在网络中搜索信息时,通常利用用户输入的搜索词进行搜索,搜索结果中包含与搜索词相同或相近的词语。搜索结果的准确性依赖于将用户输入的搜索词与网络中的信息进行匹配时的匹配规则。At present, when a user searches for information on the Internet, the search term input by the user is usually used for the search, and the search results include words that are the same as or similar to the search term. The accuracy of the search results depends on the matching rules when matching the search words entered by the user with the information in the network.
发明内容Summary of the Invention
本申请实施例提出了用于生成信息的方法和装置。The embodiments of the present application provide a method and device for generating information.
第一方面,本申请实施例提供了一种用于生成信息的方法,该方法包括:获取目标搜索词集合;对于目标搜索词集合中的目标搜索词,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语;响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度;按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合;基于所得到的对应词语集合,生成至少一个搜索词集合。In a first aspect, an embodiment of the present application provides a method for generating information. The method includes: obtaining a target search term set; and for a target search term in the target search term set, determining whether a preset word set includes the same term as the A corresponding term having a pre-established correspondence relationship for the target search term; in response to determining that at least one corresponding term is included, determining the similarity between the corresponding term in the at least one corresponding term and the target search term; A target number of corresponding words are extracted from the corresponding words as a corresponding word set corresponding to the target search word; based on the obtained corresponding word set, at least one search word set is generated.
在一些实施例中,基于所得到的对应词语集合,生成至少一个搜 索词集合之后,该方法还包括:对于至少一个搜索词集合中的搜索词集合,利用该搜索词集合包括的搜索词进行信息搜索,得到搜索结果及输出。In some embodiments, after generating at least one search term set based on the obtained corresponding word set, the method further includes: for the search term set in the at least one search term set, using the search terms included in the search term set for information Search, get search results and output.
在一些实施例中,目标搜索词集合是对用户输入的搜索语句进行切词后得到的词语的集合。In some embodiments, the target search term set is a set of words obtained by segmenting a search sentence entered by a user.
在一些实施例中,预设的词语集合包括至少一个子集合;以及确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语,包括:确定至少一个子集合中是否存在包括该目标搜索词的子集合;响应于确定存在,确定包括该目标搜索词的子集合中的、除该目标搜索词以外的其他词语为与该目标搜索词对应的对应词语。In some embodiments, the preset word set includes at least one sub-set; and determining whether the preset word set includes a corresponding word having a pre-established correspondence relationship with the target search term includes determining whether the at least one sub-set is There is a subset including the target search term; in response to determining existence, it is determined that other words in the subset including the target search term other than the target search term are corresponding words corresponding to the target search term.
在一些实施例中,预设的词语集合包括的至少一个子集合预先按照如下步骤得到:获取目标文本集合;对目标文本集合中的目标文本进行切词,得到词语集合;对切词后得到的词语集合中的词语进行近义词聚类,得到至少一个子集合,其中,对于至少一个子集合中的子集合,该子集合包括的词语两两之间的相似度大于等于预设的相似度阈值。In some embodiments, at least one sub-set included in the preset word set is obtained according to the following steps in advance: obtaining a target text set; performing word segmentation on the target text in the target text set to obtain a word set; The words in the word set are clustered with synonyms to obtain at least one sub-set. For the sub-set in the at least one sub-set, the similarity between the two words included in the sub-set is greater than or equal to a preset similarity threshold.
在一些实施例中,预设的词语集合包括的至少一个子集合预先按照如下步骤得到:获取原始搜索词集合;对于原始搜索词集合中的原始搜索词,将该原始搜索词输入预设的搜索引擎,得到至少一条搜索结果;从至少一条搜索结果中,提取具有设定特征的词语作为目标词语;基于所提取的目标词语和该原始搜索词,生成词语集合包括的子集合。In some embodiments, at least one subset of the preset word set is obtained in advance according to the following steps: obtaining the original search term set; and for the original search term in the original search term set, inputting the original search term into the preset search The engine obtains at least one search result; from the at least one search result, extracts a word with a set characteristic as a target word; and based on the extracted target word and the original search word, generates a sub-set included in the word set.
第二方面,本申请实施例提供了一种用于生成信息的装置,该装置包括:获取单元,被配置成获取目标搜索词集合;提取单元,被配置成对于目标搜索词集合中的目标搜索词,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语;响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度;按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合;生成单元,被配置成基于所得到的对应词语集合,生成至少一个搜索 词集合。In a second aspect, an embodiment of the present application provides an apparatus for generating information. The apparatus includes: an obtaining unit configured to obtain a target search term set; and an extracting unit configured to perform a target search on the target search term set. Words, determine whether the preset word set includes corresponding words that have a pre-established correspondence relationship with the target search word; and in response to determining that it includes at least one corresponding word, determine that the corresponding word in the at least one corresponding word is similar to the target search word Degree; in accordance with the order of the degree of similarity, extract a target number of corresponding words from at least one corresponding word as a corresponding word set corresponding to the target search term; a generating unit configured to generate at least one based on the obtained corresponding word set Search term collection.
在一些实施例中,该装置还包括:搜索单元,被配置成对于至少一个搜索词集合中的搜索词集合,利用该搜索词集合包括的搜索词进行信息搜索,得到搜索结果及输出。In some embodiments, the apparatus further includes: a search unit configured to perform a search of information on the search term set in the at least one search term set using the search terms included in the search term set to obtain a search result and an output.
在一些实施例中,目标搜索词集合是对用户输入的搜索语句进行切词后得到的词语的集合。In some embodiments, the target search term set is a set of words obtained by segmenting a search sentence entered by a user.
在一些实施例中,预设的词语集合包括至少一个子集合;以及提取单元包括:第一确定模块,被配置成确定至少一个子集合中是否存在包括该目标搜索词的子集合;第二确定模块,被配置成响应于确定存在,确定包括该目标搜索词的子集合中的、除该目标搜索词以外的其他词语为与该目标搜索词对应的对应词语。In some embodiments, the preset word set includes at least one sub-set; and the extraction unit includes: a first determination module configured to determine whether a sub-set including the target search word exists in the at least one sub-set; a second determination A module configured to, in response to determining existence, determine that other words in the subset including the target search term other than the target search term are corresponding words corresponding to the target search term.
在一些实施例中,预设的词语集合包括的至少一个子集合预先按照如下步骤得到:获取目标文本集合;对目标文本集合中的目标文本进行切词,得到词语集合;对切词后得到的词语集合中的词语进行近义词聚类,得到至少一个子集合,其中,对于至少一个子集合中的子集合,该子集合包括的词语两两之间的相似度大于等于预设的相似度阈值。In some embodiments, at least one sub-set included in the preset word set is obtained according to the following steps in advance: obtaining a target text set; performing word segmentation on the target text in the target text set to obtain a word set; The words in the word set are clustered with synonyms to obtain at least one sub-set. For the sub-set in the at least one sub-set, the similarity between the words included in the sub-set is greater than or equal to a preset similarity threshold.
在一些实施例中,预设的词语集合包括的至少一个子集合预先按照如下步骤得到:获取原始搜索词集合;对于原始搜索词集合中的原始搜索词,将该原始搜索词输入预设的搜索引擎,得到至少一条搜索结果;从至少一条搜索结果中,提取具有设定特征的词语作为目标词语;基于所提取的目标词语和该原始搜索词,生成词语集合包括的子集合。In some embodiments, at least one subset of the preset word set is obtained in advance according to the following steps: obtaining the original search term set; and for the original search term in the original search term set, inputting the original search term into the preset search The engine obtains at least one search result; from the at least one search result, extracts a word with a set characteristic as a target word; and based on the extracted target word and the original search word, generates a sub-set included in the word set.
第三方面,本申请实施例提供了一种服务器,该服务器包括:一个或多个处理器;存储装置,其上存储有一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。According to a third aspect, an embodiment of the present application provides a server. The server includes: one or more processors; a storage device on which one or more programs are stored; and when one or more programs are processed by one or more The processor executes such that one or more processors implement the method as described in any implementation of the first aspect.
第四方面,本申请实施例提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如第一方面中任一实现方式描述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable medium having stored thereon a computer program that, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
本申请实施例提供的用于生成信息的方法和装置,通过获取目标搜索词集合,然后对于目标搜索词集合中的目标搜索词,从预设的词语集合中确定与该目标搜索词对应的至少一个对应词语,并且按照对应词语与该目标搜索词的相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合,最后基于所得到的各个对应词语集合,生成至少一个搜索词集合,从而可以根据目标搜索词集合,生成更多的搜索词集合,有助于提高信息搜索的全面性和针对性。The method and device for generating information provided in the embodiments of the present application obtain a target search term set, and then, for a target search term in the target search term set, determine at least a preset word set corresponding to the target search term from the preset word set. A corresponding word, and according to the order of the similarity between the corresponding word and the target search word, a target number of corresponding words are extracted from at least one corresponding word as a corresponding word set corresponding to the target search word, and finally based on the obtained each Corresponding to the word set, at least one search word set is generated, so that more search word sets can be generated according to the target search word set, which helps to improve the comprehensiveness and pertinence of the information search.
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects, and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:
图1是本申请的一个实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present application can be applied; FIG.
图2是根据本申请实施例的用于生成信息的方法的一个实施例的流程图;2 is a flowchart of an embodiment of a method for generating information according to an embodiment of the present application;
图3是根据本申请实施例的用于生成信息的方法的一个应用场景的示意图;3 is a schematic diagram of an application scenario of a method for generating information according to an embodiment of the present application;
图4是根据本申请实施例的用于生成信息的方法的又一个实施例的流程图;4 is a flowchart of still another embodiment of a method for generating information according to an embodiment of the present application;
图5是根据本申请实施例的用于生成信息的装置的一个实施例的结构示意图;5 is a schematic structural diagram of an embodiment of an apparatus for generating information according to an embodiment of the present application;
图6是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。FIG. 6 is a schematic structural diagram of a computer system suitable for implementing a server according to an embodiment of the present application.
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The following describes the present application in detail with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention, rather than limiting the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例 中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The application will be described in detail below with reference to the drawings and embodiments.
图1示出了可以应用本申请实施例的用于生成信息的方法或用于生成信息的装置的示例性系统架构100。FIG. 1 illustrates an
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1, the
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如搜索类应用、网页浏览器应用、购物类应用等。The user can use the
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。The
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103发送的目标搜索词集合进行处理的后台信息处理服务器。后台信息处理服务器可以对获取的目标搜索词集合进行处理,并生成处理结果(例如至少一个搜索词集合)。The
需要说明的是,本申请实施例所提供的用于生成信息的方法一般由服务器105执行,相应地,用于生成信息的装置一般设置于服务器105中。It should be noted that the method for generating information provided by the embodiments of the present application is generally executed by the
需要说明的是,服务器可以是硬件,也可以是软件。当服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实 现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server may be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers or as a single server. When the server is software, it can be implemented as multiple software or software modules (such as software or software modules used to provide distributed services), or it can be implemented as a single software or software module. It is not specifically limited here.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are merely exemplary. According to implementation needs, there can be any number of terminal devices, networks, and servers.
继续参考图2,示出了根据本申请的用于生成信息的方法的一个实施例的流程200。该用于生成信息的方法,包括以下步骤:With continued reference to FIG. 2, a
步骤201,获取目标搜索词集合。Step 201: Obtain a target search term set.
在本实施例中,用于生成信息的方法的执行主体(例如图1所示的服务器)可以通过有线连接方式或者无线连接方式从远程或从本地获取目标搜索词集合。其中,目标搜索词集合可以是待利用其进行信息搜索的词语的集合。例如,目标搜索词集合可以是用户使用终端设备(例如图1所示的终端设备)输入的、发送给上述执行主体的用于搜索信息的词语的集合。In this embodiment, an execution subject of the method for generating information (for example, a server shown in FIG. 1) may obtain a target search word set from a remote or local source through a wired connection method or a wireless connection method. The target search word set may be a set of words to be used for information search. For example, the target search word set may be a set of words for searching information input by a user using a terminal device (such as the terminal device shown in FIG. 1) and sent to the execution subject.
在本实施例的一些可选的实现方式中,目标搜索词集合可以是对用户输入的搜索语句进行切词后得到的词语的集合。具体地,用户可以使用如图1所示的终端设备输入搜索语句,并将搜索语句发送到上述执行主体,上述执行主体可以按照现有的对语句进行切词的方法(例如最大正向匹配法、N-gram模型方法、隐马尔科夫模型方法等),对搜索语句进行切词,得到目标搜索词集合。In some optional implementation manners of this embodiment, the target search term set may be a set of words obtained by segmenting a search sentence input by a user. Specifically, the user may use a terminal device as shown in FIG. 1 to input a search sentence and send the search sentence to the above-mentioned execution subject, and the above-mentioned execution subject may perform word cutting on the sentence according to an existing method (for example, the maximum forward matching method) , N-gram model method, Hidden Markov model method, etc.), perform word segmentation on the search sentence to obtain the target search word set.
步骤202,对于目标搜索词集合中的目标搜索词,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语;响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度;按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合。Step 202: For a target search term in the target search term set, determine whether a preset word set includes a corresponding term having a pre-established correspondence relationship with the target search term; and in response to determining that it includes at least one corresponding term, determine at least one corresponding term. The similarity between the corresponding words in the words and the target search word; according to the order of the similarity, a target number of corresponding words are extracted from at least one corresponding word as the corresponding word set corresponding to the target search word.
在本实施例中,对于目标搜索词集合中的目标搜索词,上述执行主体可以执行如下步骤:In this embodiment, for the target search term in the target search term set, the execution body may perform the following steps:
步骤2021,确定预设的词语集合是否包括与该目标搜索词具有预 先建立的对应关系的对应词语。In step 2021, it is determined whether the preset word set includes a corresponding word that has a pre-established correspondence relationship with the target search word.
具体地,上述词语集合可以预先设置在上述执行主体中,也可以预先设置在与上述执行主体通信连接的其他电子设备中。目标搜索词和对应词语的对应关系可以预先通过各种方式建立。例如,可以通过预先建立的二维表格的方式来表征目标搜索词和对应词语的对应关系,还可以通过键(key)值(value)对、链表等形式预先建立目标搜索词和对应词语的对应关系。Specifically, the word set may be set in the execution subject in advance, or may be set in other electronic devices in communication with the execution subject in advance. The correspondence between the target search word and the corresponding word can be established in various ways in advance. For example, the correspondence between the target search word and the corresponding word can be characterized by a pre-established two-dimensional table, and the correspondence between the target search word and the corresponding word can be established in advance through key (value) value pairs, linked lists, and other forms. relationship.
在本实施例的一些可选的实现方式中,上述预设的词语集合包括至少一个子集合。上述执行主体可以按照如下步骤确定词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语:In some optional implementation manners of this embodiment, the preset word set includes at least one sub-set. The above-mentioned execution subject may determine whether the word set includes a corresponding word that has a pre-established correspondence relationship with the target search term according to the following steps:
首先,确定预设的词语集合包括的至少一个子集合中是否存在包括该目标搜索词的子集合。然后,响应于确定存在,确定包括该目标搜索词的子集合中的、除该目标搜索词以外的其他词语为与该目标搜索词对应的对应词语。First, it is determined whether a sub-set including the target search word exists in at least one sub-set included in the preset word set. Then, in response to determining the existence, it is determined that the other words in the subset including the target search term other than the target search term are corresponding words corresponding to the target search term.
通常,子集合中的词语两两之间的相似度可以大于等于预设的相似度阈值,即子集合中的词语是同义词或近义词。作为示例,假设目标搜索词为“小孩”,某子集合包括如下词语:儿童,小孩,少年,孩子。则该子集合中的词语“儿童”、“少年”、“孩子”为与目标搜索词“小孩”的对应词语。需要说明的是,子集合中的词语两两之间的相似度可以是上述执行主体或其他电子设备预先利用现有的各种计算词语之间的相似度的算法计算得到的。Generally, the similarity between the words in the subset can be greater than or equal to a preset similarity threshold, that is, the words in the subset are synonyms or synonyms. As an example, assume that the target search term is "kids", and a certain subset includes the following words: children, kids, teenagers, children. The words "child", "juvenile", and "child" in the sub-collection are corresponding words to the target search term "kid". It should be noted that the similarity between the words in the sub-set may be calculated by the above-mentioned execution subject or other electronic devices in advance by using various existing algorithms for calculating the similarity between the words.
在本实施例的一些可选的实现方式中,上述预设的词语集合包括的至少一个子集合可以由上述执行主体或其他电子设备预先按照如下步骤得到:In some optional implementations of this embodiment, at least a subset of the preset word set may be obtained in advance by the execution subject or other electronic device according to the following steps:
首先,获取目标文本集合。其中,目标文本可以是待对其进行切词的文本。目标文本集合可以存储在上述执行主体中,也可以存储在与上述执行主体通信连接的其他电子设备中。需要说明的是,目标文本集合中的目标文本可以单独存储在一台电子设备中,目标文本集合中的目标文本也可以存储在由多台电子设备组成的电子设备集群中。First, get the target text collection. The target text may be the text to be segmented. The target text set may be stored in the above-mentioned execution body, or may be stored in other electronic devices that are communicatively connected with the above-mentioned execution body. It should be noted that the target text in the target text set can be stored separately in an electronic device, and the target text in the target text set can also be stored in an electronic device cluster composed of multiple electronic devices.
然后,对目标文本集合中的目标文本进行切词,得到词语集合。 具体地,上述执行主体或其他电子设备可以按照现有的各种对语句进行切词的方法,对目标文本包括的各条语句进行切词,得到词语集合。Then, the target text in the target text set is cut to obtain a word set. Specifically, the foregoing execution subject or other electronic device may perform word segmentation according to various existing methods for word segmentation, and perform word segmentation on each sentence included in the target text to obtain a word set.
最后,对切词后得到的词语集合中的词语进行近义词聚类,得到至少一个子集合。其中,对于至少一个子集合中的子集合,该子集合包括的词语两两之间的相似度大于等于预设的相似度阈值。具体地,上述执行主体或其他电子设备可以利用现有的近义词聚类算法,对词语集合中的词语进行近义词聚类,得到至少一个子集合。作为示例,上述执行主体或其他电子设备可以利用现有的词向量模型(例如word2vec、sense2vec等),得到词语集合中的每个词语的词向量。再利用对词向量进行聚类的算法,对各个词向量进行聚类(例如k-means算法、决策树算法等),其中的每个聚类中包括的词向量两两之间的相似度(例如相似度可以为向量之间的欧氏距离、余弦距离等)大于等于预设的相似度阈值。从而将得到的每个聚类中包括的词向量表征的词语的集合确定为词语集合包括的子集合。Finally, the words in the word set obtained after the word segmentation are clustered in a synonym to obtain at least one subset. For a sub-set in at least one sub-set, the similarity between the words included in the sub-set is greater than or equal to a preset similarity threshold. Specifically, the execution subject or other electronic device may use the existing synonym clustering algorithm to perform clustering of the synonyms in the words in the word set to obtain at least one subset. As an example, the above-mentioned execution subject or other electronic device may use an existing word vector model (for example, word2vec, sense2vec, etc.) to obtain the word vector of each word in the word set. Then use the algorithm to cluster the word vectors to cluster each word vector (such as k-means algorithm, decision tree algorithm, etc.), and the similarity between the pair of word vectors included in each cluster ( For example, the similarity may be Euclidean distance between vectors, cosine distance, etc.) is greater than or equal to a preset similarity threshold. Thus, the obtained set of words represented by the word vectors included in each cluster is determined as a subset included in the word set.
在本实施例的一些可选的实现方式中,预设的词语集合包括的至少一个子集合还可以由上述执行主体或其他电子设备预先按照如下步骤得到:In some optional implementations of this embodiment, at least a subset of the preset word set may also be obtained in advance by the foregoing execution subject or other electronic device according to the following steps:
首先,获取原始搜索词集合。其中,原始搜索词可以技术人员预先输入的搜索词。First, get the original set of search terms. The original search term may be a search term previously input by a technician.
然后,对于原始搜索词集合中的原始搜索词,执行如下各子步骤:Then, for the original search terms in the original search term set, perform the following sub-steps:
子步骤一,将该原始搜索词输入预设的搜索引擎,得到至少一条搜索结果。其中,上述搜索引擎(Search Engine)是指根据一定的策略、运用特定的计算机程序从互联网上搜集信息,在对信息进行组织和处理后,为用户提供检索服务,将用户检索相关的信息展示给用户的系统。上述预设的搜索引擎可以是现有的各种搜索引擎。上述至少一条搜索结果中的搜索结果可以包括文本,文本可以包括题目、正文等内容。Sub-step 1. Enter the original search term into a preset search engine to obtain at least one search result. The search engine mentioned above refers to collecting information from the Internet according to a certain strategy and using a specific computer program. After the information is organized and processed, it provides a search service for users and displays the information related to the user's search to The user's system. The preset search engine may be various existing search engines. The search result in the at least one search result may include text, and the text may include a title, a body text, and the like.
子步骤二,从至少一条搜索结果中,提取具有设定特征的词语作为目标词语。具体地,上述设定特征可以是词语具有的各种特征,包括但不限于以下至少一种:字体颜色为预设颜色、文字突出显示的背 景颜色为预设颜色等。作为示例,搜索结果中的文字可以包括红色字体的文字,红色字体的文字通常是与搜索词的词义相同或相近的词语。上述执行主体或其他电子设备可以识别搜索结果中的文字颜色等特征,从而提取出设定特征的词语作为目标词语。Sub-step 2: extract at least one search word as a target word from at least one search result. Specifically, the set feature may be various features of a word, including, but not limited to, at least one of the following: a font color is a preset color, a background color of highlighted text is a preset color, and the like. As an example, the text in the search results may include text in red font, and the text in red font is usually a word with the same meaning or similar meaning to the search word. The execution subject or other electronic device can identify features such as the color of the text in the search results, thereby extracting words with set features as target words.
子步骤三,基于所提取的目标词语和该原始搜索词,生成词语集合包括的子集合。作为示例,提取的目标词语的数量可以是至少一个,上述执行主体或其他电子设备可以将该原始搜索词和所提取的目标词语组成子集合。作为另一示例,上述执行主体或其他电子设备可以计算该原始搜索词与各个目标词语的相似度,将大于等于预设的相似度阈值的相似度对应的目标词语与该原始搜索词组合成子集合。Sub-step three: Based on the extracted target word and the original search word, a sub-set included in the word set is generated. As an example, the number of the extracted target words may be at least one, and the execution subject or other electronic device may form the original search word and the extracted target words into a subset. As another example, the execution subject or other electronic device may calculate the similarity between the original search word and each target word, and combine the target word corresponding to the similarity greater than or equal to a preset similarity threshold with the original search word into a subset. .
步骤2022,响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度。In step 2022, in response to determining that it includes at least one corresponding word, a similarity between the corresponding word in the at least one corresponding word and the target search word is determined.
具体地,上述执行主体可以按照现有的各种计算词语之间的相似度的算法(例如编辑距离(Levenshtein Distance)算法、基于向量空间模型(Vector Space Model,VSM)的余弦距离算法等),确定至少一个对应词语中的对应词语与该目标搜索词的相似度。Specifically, the above-mentioned execution body may use various existing algorithms for calculating the similarity between words (such as the Levenshtein Distance algorithm, the cosine distance algorithm based on the Vector Space Model (VSM), etc.), Determine the similarity between the corresponding word in the at least one corresponding word and the target search word.
步骤2023,按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合。Step 2023: According to the order of the similarity, a target number of corresponding words are extracted from the at least one corresponding word as a corresponding word set corresponding to the target search word.
具体地,上述执行主体可以按照相似度由大到小的顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合。其中,目标数量可以是预先设置的数量,也可以是根据该目标搜索词对应的至少一个对应词语中包括的对应词语的数量确定的数量。例如,当至少一个对应词语中包括的对应词语的数量大于等于预设数量时,目标数量即为预设数量;否则,目标数量为至少一个对应词语中包括的对应词语的数量。Specifically, the above-mentioned execution subject may extract a target number of corresponding words from at least one corresponding word in the order of similarity from large to small as a corresponding word set corresponding to the target search word. The target number may be a preset number or a number determined according to a number of corresponding words included in at least one corresponding word corresponding to the target search term. For example, when the number of corresponding words included in the at least one corresponding word is greater than or equal to the preset number, the target number is the preset number; otherwise, the target number is the number of corresponding words included in the at least one corresponding word.
实践中,与目标搜索词对应的对应词语可以是目标搜索词的同义词或近义词。按照相似度大小顺序提取出的对应词语集合可以有助于针对性地生成最终的搜索词集合。In practice, the corresponding words corresponding to the target search term may be synonyms or synonyms of the target search term. The corresponding word sets extracted according to the order of similarity can help to generate the final search word set in a targeted manner.
步骤203,基于所得到的对应词语集合,生成至少一个搜索词集合。Step 203: Generate at least one search word set based on the obtained corresponding word set.
在本实施例中,上述执行主体可以基于所得到的对应词语集合,生成至少一个搜索词集合。作为示例,上述执行主体可以将所得到的各个对应词语集合与目标搜索词集合组合为搜索词集合。In this embodiment, the above-mentioned execution subject may generate at least one search word set based on the obtained corresponding word set. As an example, the foregoing execution subject may combine each of the obtained corresponding word sets and the target search term set into a search term set.
作为另一示例,上述执行主体可以从所得到的各个对应词语集合中,按照对应词语与对应的目标搜索词的相似度的大小顺序分别提取一个对应词语,或者随机地分别提取一个对应词语,将所提取的各个对应词语与目标搜索词集合中的、不具有对应的对应词语的目标搜索词组合为搜索词集合。As another example, the execution body may extract a corresponding word from each of the obtained corresponding word sets according to the order of the similarity between the corresponding word and the corresponding target search word, or randomly extract a corresponding word, respectively. The extracted corresponding words and target search words in the target search word set that do not have corresponding corresponding words are combined into a search word set.
继续参见图3,图3是根据本实施例的用于生成信息的方法的应用场景的一个示意图。在图3的应用场景中,服务器301首先获取到用户利用终端设备302输入的目标搜索词集合303(例如包括目标搜索词“男孩”、“尿不湿”)。然后,服务器301从预设的词语集合304中,确定目标搜索词“男孩”对应的至少一个对应词语3041包括:“儿童”、“宝宝”、“少年”;确定目标搜索词“尿不湿”对应的至少一个对应词语3042包括:“纸尿裤”、“尿芥子”。再然后,服务器301从每个目标搜索词对应的至少一个对应词语中,按照对应词语与对应的目标搜索词的相似度由大到小的顺序,提取两个对应词语作为搜索词对应的对应词语集合。其中,目标搜索词“男孩”对应的对应词语集合305包括:“儿童”、“宝宝”,目标搜索词“尿不湿”对应的对应词语集合306包括:“纸尿裤”、“尿芥子”。接着,服务器301基于所得到的对应词语集合305和306,生成两个搜索词集合307(例如包括“儿童”、“纸尿裤”)、308(例如“宝宝”、“尿芥子”)。With continued reference to FIG. 3, FIG. 3 is a schematic diagram of an application scenario of the method for generating information according to this embodiment. In the application scenario of FIG. 3, the
本申请的上述实施例提供的方法,通过获取目标搜索词集合,然后对于目标搜索词集合中的目标搜索词,从预设的词语集合中确定与该目标搜索词对应的至少一个对应词语,并且按照对应词语与该目标搜索词的相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合,最后基于所得到的各个对应词语集合,生成至少一个搜索词集合,从而可以根据目标搜索词集合,生成更多的搜索词集合,有助于提高信息搜索的全面性和针对性。The method provided by the above embodiments of the present application, by obtaining a target search term set, and for the target search term in the target search term set, determining at least one corresponding word corresponding to the target search term from a preset word set, and According to the order of the similarity between the corresponding word and the target search word, a target number of corresponding words are extracted from at least one corresponding word as the corresponding word set corresponding to the target search word, and finally based on the obtained corresponding word set, generate At least one search term set, so that more search term sets can be generated according to the target search term set, which helps to improve the comprehensiveness and pertinence of the information search.
进一步参考图4,其示出了用于生成信息的方法的又一个实施例的流程400。该用于生成信息的方法的流程400,包括以下步骤:With further reference to FIG. 4, a
步骤401,获取目标搜索词集合。Step 401: Obtain a target search term set.
在本实施例中,步骤401与图2对应实施例中的步骤201基本一致,这里不再赘述。In this embodiment,
步骤402,对于目标搜索词集合中的目标搜索词,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语;响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度;按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合。Step 402: For a target search term in the target search term set, determine whether a preset word set includes a corresponding term having a pre-established correspondence relationship with the target search term; and in response to determining that it includes at least one corresponding term, determine at least one corresponding term. The similarity between the corresponding words in the words and the target search word; according to the order of the similarity, a target number of corresponding words are extracted from at least one corresponding word as the corresponding word set corresponding to the target search word.
在本实施例中,步骤402与图2对应实施例中的步骤202基本一致,这里不再赘述。In this embodiment,
步骤403,基于所得到的对应词语集合,生成至少一个搜索词集合。Step 403: Generate at least one search word set based on the obtained corresponding word set.
在本实施例中,步骤403与图2对应实施例中的步骤203基本一致,这里不再赘述。In this embodiment,
步骤404,对于至少一个搜索词集合中的搜索词集合,利用该搜索词集合包括的搜索词进行信息搜索,得到搜索结果及输出。Step 404: For at least one search term set in the search term set, use the search terms included in the search term set to perform an information search to obtain a search result and an output.
在本实施例中,对于步骤403中得到的至少一个搜索词集合中的搜索词集合,用于生成信息的方法的执行主体(例如图1所示的服务器)可以利用该搜索词集合包括的搜索词进行信息搜索,得到搜索结果及输出。In this embodiment, for the search term set in the at least one search term set obtained in
具体地,上述执行主体可以将搜索词集合中的搜索词输入预设的搜索引擎中,得到搜索结果。或者,上述执行主体可以利用搜索词集合中的搜索词,在预设的信息集合(例如某网站包括的信息的集合)中进行信息搜索,得到搜索结果。其中,搜索结果可以包括但不限于以下至少一种:图片、文字、链接等。搜索结果可以以各种方式输出,例如可以将搜索结果显示在与上述执行主体连接的显示器上,或者可 以将搜索结果发送到与上述执行主体通信连接的终端设备上。Specifically, the execution body may input search terms in a search term set into a preset search engine to obtain search results. Alternatively, the execution body may use the search words in the search word set to perform information search in a preset information set (for example, a set of information included in a website) to obtain a search result. The search results may include, but are not limited to, at least one of the following: pictures, text, links, and the like. The search results can be output in various ways, for example, the search results can be displayed on a display connected to the execution subject, or the search results can be sent to a terminal device communicatively connected to the execution subject.
需要说明的是,搜索词集合对应的搜索结果的数量可以是技术人员预先设置的数量,这样可以使搜索结果更加具有针对性。It should be noted that the number of search results corresponding to the search term set may be a number preset by a technician, so that the search results can be more targeted.
从图4中可以看出,与图2对应的实施例相比,本实施例中的用于生成信息的方法的流程400突出了利用生成的至少一个搜索词集合进行搜索及输出搜索结果的步骤。由此,本实施例描述的方案可以利用生成的搜索词集合,得到更全面以及更有针对性的搜索结果。As can be seen from FIG. 4, compared with the embodiment corresponding to FIG. 2, the
进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种用于生成信息的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。With further reference to FIG. 5, as an implementation of the methods shown in the foregoing figures, this application provides an embodiment of an apparatus for generating information. The apparatus embodiment corresponds to the method embodiment shown in FIG. 2. The device can be specifically applied to various electronic devices.
如图5所示,本实施例的用于生成信息的装置500包括:获取单元501,被配置成获取目标搜索词集合;提取单元502,被配置成对于目标搜索词集合中的目标搜索词,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语;响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度;按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合;生成单元503,被配置成基于所得到的对应词语集合,生成至少一个搜索词集合。As shown in FIG. 5, the
在本实施例中,获取单元501可以通过有线连接方式或者无线连接方式从远程或从本地获取目标搜索词集合。其中,目标搜索词集合可以是待利用其进行信息搜索的词语的集合。例如,目标搜索词集合可以是用户使用终端设备(例如图1所示的终端设备)输入的、发送给上述装置500的用于搜索信息的词语的集合。In this embodiment, the obtaining
在本实施例中,对于目标搜索词集合中的目标搜索词,上述提取单元502可以执行如下步骤:In this embodiment, for the target search term in the target search term set, the above-mentioned
步骤5021,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语。Step 5021: Determine whether the preset word set includes a corresponding word that has a pre-established correspondence relationship with the target search word.
具体地,上述词语集合可以预先设置在上述装置500中,也可以 预先设置在与上述装置500通信连接的其他电子设备中。目标搜索词和对应词语的对应关系可以预先通过各种方式建立。例如,可以通过预先建立的二维表格的方式来表征目标搜索词和对应词语的对应关系,还可以通过键(key)值(value)对、链表等形式预先建立目标搜索词和对应词语的对应关系的对应关系。Specifically, the word set may be set in the
步骤5022,响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度。Step 5022: In response to determining that the at least one corresponding word is included, determine the similarity between the corresponding word in the at least one corresponding word and the target search word.
具体地,上述提取单元502可以按照现有的各种计算词语之间的相似度的算法(例如编辑距离(Levenshtein Distance)算法、基于向量空间模型(Vector Space Model,VSM)的余弦距离算法等),确定至少一个对应词语中的对应词语与该目标搜索词的相似度。Specifically, the above-mentioned
步骤5023,按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合。Step 5023: According to the order of the degree of similarity, a target number of corresponding words are extracted from at least one corresponding word as a corresponding word set corresponding to the target search word.
具体地,上述执行主体可以按照相似度由大到小的顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合。其中,目标数量可以是预先设置的数量,也可以是根据该目标搜索词对应的至少一个对应词语中包括的对应词语的数量确定的数量。例如,当至少一个对应词语中包括的对应词语的数量大于等于预设数量时,目标数量即为预设数量;否则,目标数量为至少一个对应词语中包括的对应词语的数量。Specifically, the above-mentioned execution subject may extract a target number of corresponding words from at least one corresponding word in the order of similarity from large to small as a corresponding word set corresponding to the target search word. The target number may be a preset number or a number determined according to a number of corresponding words included in at least one corresponding word corresponding to the target search term. For example, when the number of corresponding words included in the at least one corresponding word is greater than or equal to the preset number, the target number is the preset number; otherwise, the target number is the number of corresponding words included in the at least one corresponding word.
实践中,与目标搜索词对应的对应词语可以是目标搜索词的同义词或近义词。按照相似度大小顺序提取出的对应词语集合可以有助于针对性地生成最终的搜索词集合。In practice, the corresponding words corresponding to the target search term may be synonyms or synonyms of the target search term. The corresponding word sets extracted according to the order of similarity can help to generate the final search word set in a targeted manner.
在本实施例中,生成单元503可以基于所得到的对应词语集合,生成至少一个搜索词集合。作为示例,上述生成单元503可以将所得到的各个对应词语集合与目标搜索词集合组合为搜索词集合。In this embodiment, the generating
作为另一示例,上述生成单元503可以从所得到的各个对应词语集合中,按照对应词语与对应的目标搜索词的相似度的大小顺序,或者随机地分别提取一个对应词语,将所提取的各个对应词语与目标搜索词集合中的、不具有对应的对应词语的目标搜索词组合为搜索词集 合。As another example, the generating
在本实施例的一些可选的实现方式中,该装置500还可以包括:搜索单元(图中未示出),被配置成对于至少一个搜索词集合中的搜索词集合,利用该搜索词集合包括的搜索词进行信息搜索,得到搜索结果及输出。In some optional implementations of this embodiment, the
在本实施例的一些可选的实现方式中,目标搜索词集合是对用户输入的搜索语句进行切词后得到的词语的集合。In some optional implementation manners of this embodiment, the target search term set is a set of words obtained by segmenting a search sentence input by a user.
在本实施例的一些可选的实现方式中,预设的词语集合包括至少一个子集合;以及提取单元502可以包括:第一确定模块(图中未示出),被配置成确定至少一个子集合中是否存在包括该目标搜索词的子集合;第二确定模块(图中未示出),被配置成响应于确定存在,确定包括该目标搜索词的子集合中的、除该目标搜索词以外的其他词语为与该目标搜索词对应的对应词语。In some optional implementations of this embodiment, the preset word set includes at least one sub-set; and the
在本实施例的一些可选的实现方式中,预设的词语集合包括的至少一个子集合可以预先按照如下步骤得到:获取目标文本集合;对目标文本集合中的目标文本进行切词,得到词语集合;对切词后得到的词语集合中的词语进行近义词聚类,得到至少一个子集合,其中,对于至少一个子集合中的子集合,该子集合包括的词语两两之间的相似度大于等于预设的相似度阈值。In some optional implementations of this embodiment, at least one sub-set included in the preset word set may be obtained in advance according to the following steps: obtaining a target text set; cutting the target text in the target text set to obtain a word Set; synonym clustering of the words in the word set obtained after cutting the words to obtain at least one subset, wherein, for the subset in the at least one subset, the similarity between the two words included in the subset is greater than Equal to a preset similarity threshold.
在本实施例的一些可选的实现方式中,预设的词语集合包括的至少一个子集合可以预先按照如下步骤得到:获取原始搜索词集合;对于原始搜索词集合中的原始搜索词,将该原始搜索词输入预设的搜索引擎,得到至少一条搜索结果;从至少一条搜索结果中,提取具有设定特征的词语作为目标词语;基于所提取的目标词语和该原始搜索词,生成词语集合包括的子集合。In some optional implementations of this embodiment, at least one sub-set included in the preset word set may be obtained in advance according to the following steps: obtaining the original search term set; for the original search term in the original search term set, The original search term is input into a preset search engine to obtain at least one search result. From the at least one search result, a word having a set feature is extracted as a target word. Based on the extracted target word and the original search word, generating a word set includes Child collection.
本申请的上述实施例提供的装置,通过获取目标搜索词集合,然后对于目标搜索词集合中的目标搜索词,从预设的词语集合中确定与该目标搜索词对应的至少一个对应词语,并且按照对应词语与该目标搜索词的相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合,最后基于所得到 的各个对应词语集合,生成至少一个搜索词集合,从而可以根据目标搜索词集合,生成更多的搜索词集合,有助于提高信息搜索的全面性和针对性。The apparatus provided by the foregoing embodiment of the present application obtains a target search term set, and then, for a target search term in the target search term set, determines at least one corresponding word corresponding to the target search term from a preset word set, and According to the order of the similarity between the corresponding word and the target search word, a target number of corresponding words are extracted from at least one corresponding word as the corresponding word set corresponding to the target search word, and finally based on the obtained corresponding word set, generate At least one search term set, so that more search term sets can be generated according to the target search term set, which helps to improve the comprehensiveness and pertinence of the information search.
下面参考图6,其示出了适于用来实现本申请实施例的服务器的计算机系统600的结构示意图。图6示出的服务器仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Reference is now made to FIG. 6, which shows a schematic structural diagram of a
如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, the
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I / O interface 605: an
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本申请的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing a method shown in a flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the
需要说明的是,本申请所述的计算机可读介质可以是计算机可读信号介质或者计算机可读介质或者是上述两者的任意组合。计算机可 读介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable medium or any combination of the foregoing. The computer-readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing. In this application, a computer-readable medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal that is included in baseband or propagated as part of a carrier wave, and which carries computer-readable program code. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages, or combinations thereof, including programming languages such as Java, Smalltalk, C ++, and also conventional Procedural programming language—such as "C" or a similar programming language. The program code can be executed entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer, partly on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider) Internet connection).
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码 的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions. It should also be noted that in some alternative implementations, the functions noted in the blocks may also occur in a different order than those marked in the drawings. For example, two successively represented boxes may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented with a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括获取单元、提取单元、生成单元503。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“获取目标搜索词集合的单元”。The units described in the embodiments of the present application may be implemented by software or hardware. The described unit may also be provided in a processor, for example, it may be described as: a processor includes an obtaining unit, an extracting unit, and a
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的服务器中所包含的;也可以是单独存在,而未装配入该服务器中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该服务器执行时,使得该服务器:获取目标搜索词集合;对于目标搜索词集合中的目标搜索词,确定预设的词语集合是否包括与该目标搜索词具有预先建立的对应关系的对应词语;响应于确定包括至少一个对应词语,确定至少一个对应词语中的对应词语与该目标搜索词的相似度;按照相似度的大小顺序,从至少一个对应词语中提取目标数量个对应词语作为与该目标搜索词对应的对应词语集合;基于所得到的对应词语集合,生成至少一个搜索词集合。As another aspect, the present application also provides a computer-readable medium, which may be included in the server described in the above embodiments; or may exist alone without being assembled into the server. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the server, the server is caused to: obtain a target search term set; determine a preset for the target search term in the target search term set Whether the set of words includes corresponding words that have a pre-established correspondence relationship with the target search term; in response to determining to include at least one corresponding word, determine the similarity between the corresponding word in the at least one corresponding word and the target search term; according to the similarity In order of size, extract a target number of corresponding words from at least one corresponding word as a corresponding word set corresponding to the target search term; and generate at least one search word set based on the obtained corresponding word set.
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution of the specific combination of the above technical features, but it should also cover the above technical features or Other technical solutions formed by arbitrarily combining their equivalent features. For example, a technical solution formed by replacing the above features with technical features disclosed in the present application (but not limited to) with similar functions.
Claims (14)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811075006.XA CN109213916A (en) | 2018-09-14 | 2018-09-14 | Method and apparatus for generating information |
| CN201811075006.X | 2018-09-14 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020052059A1 true WO2020052059A1 (en) | 2020-03-19 |
Family
ID=64984182
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/115951 Ceased WO2020052059A1 (en) | 2018-09-14 | 2018-11-16 | Method and apparatus for generating information |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109213916A (en) |
| WO (1) | WO2020052059A1 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112307281B (en) * | 2019-07-25 | 2024-10-29 | 北京搜狗科技发展有限公司 | Entity recommendation method and device |
| CN110688837B (en) * | 2019-09-27 | 2023-10-31 | 北京百度网讯科技有限公司 | Data processing method and device |
| CN111078849B (en) * | 2019-12-02 | 2023-07-25 | 百度在线网络技术(北京)有限公司 | Method and device for outputting information |
| CN112347365B (en) * | 2020-11-25 | 2025-02-07 | 腾讯科技(深圳)有限公司 | A method and device for determining target search information |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102855252A (en) * | 2011-06-30 | 2013-01-02 | 北京百度网讯科技有限公司 | Method and device for data retrieval based on demands |
| US20140358879A1 (en) * | 2012-05-31 | 2014-12-04 | International Business Machines Corporation | Search engine suggestion |
| CN107544982A (en) * | 2016-06-24 | 2018-01-05 | 中兴通讯股份有限公司 | Text message processing method, device and terminal |
| CN108491387A (en) * | 2018-03-20 | 2018-09-04 | 百度在线网络技术(北京)有限公司 | Method and apparatus for output information |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180101606A1 (en) * | 2016-10-07 | 2018-04-12 | Abel Torres Montoya | Method and system for searching for relevant items in a collection of documents given user defined documents |
| CN106547732A (en) * | 2016-10-14 | 2017-03-29 | 深圳中兴网信科技有限公司 | Near synonym recognition methodss and near synonym identifying system |
| CN107451126B (en) * | 2017-08-21 | 2020-07-28 | 广州多益网络股份有限公司 | Method and system for screening similar meaning words |
| CN108509474B (en) * | 2017-09-15 | 2022-01-07 | 腾讯科技(深圳)有限公司 | Synonym expansion method and device for search information |
| CN107766498B (en) * | 2017-10-19 | 2022-01-07 | 北京百度网讯科技有限公司 | Method and apparatus for generating information |
-
2018
- 2018-09-14 CN CN201811075006.XA patent/CN109213916A/en active Pending
- 2018-11-16 WO PCT/CN2018/115951 patent/WO2020052059A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102855252A (en) * | 2011-06-30 | 2013-01-02 | 北京百度网讯科技有限公司 | Method and device for data retrieval based on demands |
| US20140358879A1 (en) * | 2012-05-31 | 2014-12-04 | International Business Machines Corporation | Search engine suggestion |
| CN107544982A (en) * | 2016-06-24 | 2018-01-05 | 中兴通讯股份有限公司 | Text message processing method, device and terminal |
| CN108491387A (en) * | 2018-03-20 | 2018-09-04 | 百度在线网络技术(北京)有限公司 | Method and apparatus for output information |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109213916A (en) | 2019-01-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106383875B (en) | Human-computer interaction method and device based on artificial intelligence | |
| CN111522927B (en) | Entity query method and device based on knowledge graph | |
| CN107679039A (en) | The method and apparatus being intended to for determining sentence | |
| CN107944025A (en) | Information-pushing method and device | |
| US10108602B2 (en) | Dynamic portmanteau word semantic identification | |
| US20180329985A1 (en) | Method and Apparatus for Compressing Topic Model | |
| WO2020103899A1 (en) | Method for generating inforgraphic information and method for generating image database | |
| CN107526718B (en) | Method and apparatus for generating text | |
| CN110263142A (en) | Method and apparatus for output information | |
| US10572601B2 (en) | Unsupervised template extraction | |
| WO2020042377A1 (en) | Method and apparatus for outputting information | |
| US9830316B2 (en) | Content availability for natural language processing tasks | |
| CN117312641A (en) | Method, device, equipment and storage medium for intelligently acquiring information | |
| WO2020052069A1 (en) | Method and apparatus for word segmentation | |
| WO2020052059A1 (en) | Method and apparatus for generating information | |
| WO2020052061A1 (en) | Method and device for processing information | |
| US20150169539A1 (en) | Adjusting Time Dependent Terminology in a Question and Answer System | |
| CN112182255A (en) | Method and apparatus for storing and retrieving media files | |
| CN114579703A (en) | Text search intention identification method and device, electronic equipment and storage medium | |
| CN114298007A (en) | A text similarity determination method, device, equipment and medium | |
| CN110275962A (en) | Method and device for outputting information | |
| JP2023002690A (en) | Semantics recognition method, apparatus, electronic device, and storage medium | |
| CN108038172A (en) | Searching method and device based on artificial intelligence | |
| CN113343664B (en) | Method and device for determining matching degree between image and text | |
| WO2020052060A1 (en) | Method and apparatus for generating correction statement |
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: 18933655 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 24/06/2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18933655 Country of ref document: EP Kind code of ref document: A1 |