WO2019174132A1 - 数据处理方法、服务器及计算机存储介质 - Google Patents

数据处理方法、服务器及计算机存储介质 Download PDF

Info

Publication number
WO2019174132A1
WO2019174132A1 PCT/CN2018/089335 CN2018089335W WO2019174132A1 WO 2019174132 A1 WO2019174132 A1 WO 2019174132A1 CN 2018089335 W CN2018089335 W CN 2018089335W WO 2019174132 A1 WO2019174132 A1 WO 2019174132A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
score
search
index
types
Prior art date
Application number
PCT/CN2018/089335
Other languages
English (en)
French (fr)
Inventor
张师琲
侯丽
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019174132A1 publication Critical patent/WO2019174132A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/313Selection or weighting of terms for indexing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation

Definitions

  • the present application relates to the field of data analysis technologies, and in particular, to a data processing method, a server, and a computer storage medium.
  • the present application proposes a data processing method, a server, and a computer storage medium to solve the problem.
  • the present application provides a data processing method, which includes:
  • Receiving query information input by the user processing the query information to generate a query object, searching an index file in the index library according to the query object, and pre-determining a search evaluation model to score the search result;
  • the preset manner is that a bar graph is generated by the score result, and the score result is output and displayed in a percentage form, and the preset threshold is 40%.
  • the present application further provides a server including a memory, a processor, and a data processing system stored on the memory and operable on the processor, the data processing system being processed
  • a server including a memory, a processor, and a data processing system stored on the memory and operable on the processor, the data processing system being processed
  • the present application further provides a computer readable storage medium storing a data processing system, the data processing system being executable by at least one processor to enable the At least one processor performs the steps of the data processing method as described above.
  • the data processing method, the server and the computer readable storage medium proposed by the present application first acquire text data or other types of data in a database, and process text data or other types of data in the database. Indexing the text data or other types of data based on the lucene search engine and generating an index file.
  • the index is written with a weight, and the index file is stored in the index library; secondly, receiving The query information input by the user processes the query information to generate a query object, searches the index file in the index library according to the query object, and scores the search result according to the search evaluation method; finally, according to the score result
  • the search results are sorted according to a preset manner, and the search results whose scores are higher than a preset threshold are output and displayed according to a preset manner.
  • the data processing method, the server and the computer readable storage medium proposed by the application can quickly realize the fuzzy matching for the search with the fuzzy text, which is more convenient, faster and more accurate than the prior art, and greatly improves the retrieval. s efficiency.
  • 1 is a schematic diagram of an optional hardware architecture of the server of the present application.
  • FIG. 2 is a schematic diagram of a program module of a first embodiment of a data processing system of the present application
  • FIG. 3 is a schematic flow chart of a first embodiment of a data processing method of the present application.
  • FIG. 4 is a schematic flow chart of a second embodiment of a data processing method according to the present application.
  • FIG. 5 is a schematic flowchart of a third embodiment of a data processing method according to the present application.
  • FIG. 6 is a schematic flowchart of a fourth embodiment of a data processing method according to the present application.
  • FIG. 7 is a schematic flow chart of a fifth embodiment of a data processing method according to the present application.
  • FIG. 1 it is a schematic diagram of an optional hardware architecture of the server 1 of the present application.
  • the server 1 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is pointed out that Figure 2 only shows the server 1 with the components 11-13, but it should be understood that not all of the illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the server 1 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the server 1 may be an independent server or a server cluster composed of multiple servers.
  • the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the server 1, such as a hard disk or memory of the server 1.
  • the memory 11 may also be an external storage device of the server 1, such as a plug-in hard disk equipped on the server 1, a smart memory card (SMC), and a secure digital (Secure) Digital, SD) cards, flash cards, etc.
  • the memory 11 can also include both the internal storage unit of the server 1 and its external storage device.
  • the memory 11 is generally used to store an operating system installed in the server 1 and various types of application software, such as program codes of the data processing system 2. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the server 1.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running the data processing system 2 and the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the server 1 and other electronic devices.
  • the present application proposes a data processing system 2.
  • FIG. 2 it is a program block diagram of the first embodiment of the data processing system 2 of the present application.
  • the data processing system 2 includes a series of computer program instructions stored on the memory 11, and when the computer program instructions are executed by the processor 12, the data processing operations of the embodiments of the present application can be implemented.
  • data processing system 2 may be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 2, the data processing system 2 can be divided into an indexing module 21, a search scoring module 22, and a sorting output module 23. among them:
  • the index establishing module 21 is configured to acquire text data or other types of data in a database, process text data or other types of data in the database, and establish the text data or other types of data based on the Lucene search engine. Indexing and generating an index file, in the process of establishing the index, writing weights to the index, and storing the index file to the index library.
  • Lucene is an open source library for full-text search and search, supported and provided by the Apache Software Foundation. It provides a simple yet powerful application interface for full-text indexing and searching. Lucene is a high performance, scalable information search library.
  • the main database type is Oracle
  • the weight is written into the index, and is read out during the query, and some retrieval results are added by multiplication.
  • text data or other types of processing methods in the database include various types.
  • document types of non-text data can be transposed such that documents of non-text data can be indexed more smoothly.
  • establishing an index includes the steps of constructing an index library, constructing an index creator, and indexing with the index creator.
  • the index library directory is constructed for storing the index, and setting the location of the index library, that is, the location where the index is stored.
  • the index creator IndexWriter is constructed.
  • the index of the file created by the index creator is stored in the index library. If there is no index in the index library, the index is created in the new mode; otherwise, it is set to append mode.
  • the obtained text data or other types of data are indexed, and a corresponding document description document is created according to different file types, and the content of the corresponding attribute domain Filed, such as a file name, a file path, and a file content, is set.
  • the search scoring module 22 is configured to receive query information input by a user, process the query information to generate a query object, search an index file in the index library according to the query object, and preset a search evaluation model. Rate the search results.
  • the query information input by the user may be a string, a number, a sentence, or even a paragraph, and may perform some processing on the query information that is not uniform in the format, so that the processed query information conforms to the search scoring module.
  • the format requirement of 22 may be, for example, performing segmentation, filtering, synonym conversion, synonym conversion, and the like on the query information, so that the query information is converted into the query object that meets the requirements.
  • scoring the searched content is the focus of the present application, and the search evaluation model scores the search results in two ways, which are respectively based on the scoring formula of the Lucecne engine and the minimum edit distance, The search content is scored separately, and then the scores of the two are processed by determining different weight factors to obtain the final score.
  • the scoring formula based on the Lucecne engine is:
  • q is the query statement
  • t is each item after the q participle
  • d is the document to be matched.
  • Tf(t in q) this function represents the frequency at which the term t appears in this field in the document; corresponding to the example above: the frequency at which the term after the segmentation appears in this record.
  • the value of tf is set to 1, because: for example, search for "China Ping An", assuming that the matching results are 1. Ping An Group, 2. China Ping An, 3. China Ping An Nanjing Ping An Branch, If you follow the original score, then the highest match is the third, because "Peace" appears twice.
  • Idf(t) this function appears twice, and it just corresponds to idf(t) ⁇ 2 in the formula.
  • This function is called the inverse frequency and indicates the frequency at which the term t appears in all documents. The more times it appears in all documents, the less important the term t is.
  • Boost(t.field in d) is the excitation factor, which is recorded when the index is created, and the value of lengthNorm(t.field in d) is calculated during the query; boost(t.field in d)*lengthNorm( The value of t.field in d) indicates the total number of terms in a given field in the search result; if the value is larger, the lower the score, for example, if the A document contains 1000 terms, the key The frequency of occurrence of words is 10; while the B document contains 20 terms, the frequency of occurrence of the same keyword is 8; it is obvious that the score of B documents should be higher.
  • a search may include multiple search terms, and a single document may also include multiple search terms.
  • the item indicates that the more search terms are included in a document, the higher the score of the word document .
  • QueryNorm(q) which calculates the variance of each query entry. This value does not affect the sorting, but only makes the scores between different query objects comparable.
  • the Edit Distance also known as the Levenshtein distance
  • Levenshtein distance refers to the minimum number of edit operations required between two strings, one from one to the other. Licensed editing operations include replacing one character with another, inserting one character, and deleting one character. In general, the smaller the edit distance, the greater the similarity between the two strings.
  • the sorting output module 23 is configured to sort the search results according to a score result according to a preset manner, and output the search result whose score is higher than a preset threshold according to a preset manner.
  • the preset manner may be a percentage method, and the final score is outputted in a percentage form from large to small, which is beneficial to the user's understanding of the matching degree, and can also generate a bar graph, which is more intuitive.
  • the purpose of the preset threshold setting is to filter out the most valuable group of search results, and the preset threshold may be set to 40% in terms of distance.
  • the present application also proposes a data processing method.
  • FIG. 3 it is a schematic flowchart of the first embodiment of the data processing method of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 3 may be changed according to different requirements, and some steps may be omitted.
  • Step S110 acquiring text data or other types of data in the database, processing text data or other types of data in the database, and indexing the text data or other types of data based on the Lucene search engine and generating an index file,
  • the index is written with a weight, and the index file is stored in the index library.
  • Lucene is an open source library for full-text search and search, supported and provided by the Apache Software Foundation. It provides a simple yet powerful application interface for full-text indexing and searching. Lucene is a high performance, scalable information search library.
  • the main database type is Oracle
  • Step S120 Receive query information input by the user, process the query information to generate a query object, search an index file in the index library according to the query object, and score the search result according to the search evaluation method.
  • the query information input by the user may be a string, a number, a sentence, or even a paragraph.
  • the query information that is not uniform in the format may be processed to make the search scoring module 22 perform the search, for example, for example.
  • the query information may be processed by word segmentation, filtering, synonym conversion, synonym conversion, etc., so that the query information is converted into the query object that meets the requirements.
  • Step S130 Sort the search results according to the score result according to a preset manner, and output the search result whose score is higher than the preset threshold value according to a preset manner.
  • the preset manner may be a percentage method, and the final score is outputted in a percentage form from large to small, which is beneficial to the user's understanding of the matching degree, and can also generate a bar graph, which is more intuitive.
  • the purpose of the preset threshold setting is to filter out the most valuable group of search results, and the preset threshold may be set to 40% in terms of distance.
  • step S110 of the data processing method of the present application includes the following steps:
  • Step S210 converting other types of data into the text data.
  • ⁇ data is stored in the server in the form of a pdf, an office document, etc.
  • the text is extracted from the office document and the pdf document by some tools, for example, the tool may be apache. POI and apache PDFbox, etc.
  • step S220 the text data is subjected to word segmentation according to the steps of word segmentation, part-of-speech tagging, and word filtering.
  • the text data obtained in the first step is subjected to word segmentation, and the steps of the word segmentation process include: word segmentation, part-of-speech tagging, and word filtering, wherein the word segmentation
  • word segmentation The main use of context to segment the statement to avoid the occurrence of false segmentation, because the different ways of segmentation in a sentence often have different meanings, for example, shoes and clothing, should be divided into shoes / and / clothing, when When it is divided into "shoes/kidswear/packages", it is obviously meaning to the south.
  • the segmented words can be tagged by the rule-based and statistical methods.
  • the rule-based and statistical-based methods can be hidden Markov models. For example, part-of-speech tagging can return shoes and clothing. Classes are nouns, and "and" are classified as conjunctions. After word-of-speech tagging, word filtering is used. Word filtering is used to clear unimportant words. This can streamline the index library and improve the efficiency of retrieval. For example, the nouns "shoes” and “clothing” are retained, and the conjunctions "and” are filtered.
  • Step S230 generating a word segmentation result, and using the filtered word as a final word segmentation result.
  • the filtered words include text data in the database and word segmentation of other types of data, synonymous words of synonyms, synonyms, etc., and these words will be used as the processing result for the next step, so that the system can search more efficiently.
  • step S110 of the data processing method of the present application includes the following steps:
  • Step S310 constructing an index library, and setting a location of the index library for storing the index.
  • the index library directory is constructed for storing the index, and setting the location of the index library, that is, the location where the index is stored.
  • Step S320 constructing an index creator for creating an index.
  • the index creator IndexWriter is constructed.
  • the index of the file created by the index creator is stored in the index library. If there is no index in the index library, the index is created in the new mode; otherwise, it is set to append mode.
  • Step S330 indexing the acquired text data or other types of data, creating a corresponding document description according to different file types, and setting content of the corresponding attribute domain.
  • the obtained text data or other types of data are indexed, and a corresponding document description document is created according to different file types, and the content of the corresponding attribute domain Filed, such as a file name, a file path, and a file content, is set.
  • FIG. 6 is a schematic flowchart diagram of a fourth embodiment of the data processing method of the present application.
  • the method for processing the query information in the data processing method step S210 of the present application to generate a query object includes the following steps:
  • Step S410 performing word segmentation processing on the query information.
  • the query information is subjected to word segmentation processing, and the steps of the word segmentation process include: word segmentation, part-of-speech tagging, and word filtering, wherein the word segmentation mainly uses the context relationship to segment the statement to avoid the occurrence of false segmentation.
  • word segmentation mainly uses the context relationship to segment the statement to avoid the occurrence of false segmentation.
  • the segmented words can be tagged by the rule-based and statistical methods.
  • the rule-based and statistical-based methods can be hidden Markov models. For example, part-of-speech tagging can return shoes and clothing.
  • Classes are nouns, and "and" are classified as conjunctions. After word-of-speech tagging, word filtering is used. Word filtering is used to clear unimportant words. This can streamline the index library and improve the efficiency of retrieval. For example, the nouns “shoes” and “clothing” are retained, and the conjunctions "and” are filtered. Words filtered by words form a set of word breakers.
  • Step S420 performing synonym and synonym conversion on the words in the word segmentation group, and obtaining the synonym and synonym word set of the word segment set.
  • synonym and synonym conversion are performed on the words in the word segmentation, and the synonym and synonym set of the word segment are obtained, and the words in the word segment, the synonym, and the synonym group are used as the query object.
  • the words in the word segmentation are conceptually extended to corresponding synonyms, synonyms or upper and lower words, the partial expansion words are extracted according to the similarity priority algorithm or the extended words selected by the user are received, and finally the words in the word segmentation are combined with the defined extended words.
  • the query condition is passed to the retrieval module as the query object. For example, if the user enters "How is the economic form of China this year?" The system obtains two query words "China” and “Economy”, then the search information processing module can obtain the extension words of "China", such as "venue”. "Inland”, “domestic”, etc.; according to “economic”, the extension words “GDP”, "trade”, “commercial”, “financial”, “financial”, etc. are available.
  • Step S430 using the words in the word segment, synonym, and synonym set as the query object
  • the query information input by the user is divided into words to obtain synonym and synonym of the word segmentation, and the use of the word segmentation result and its synonyms and synonyms to query the content in the index library is more comprehensive, accurate and rapid, and is more in line with the fuzzy search. Definition.
  • FIG. 7 is a schematic flowchart diagram of a fourth embodiment of the data processing method of the present application.
  • the method for evaluating the search result according to the search evaluation method in step S210 of the data processing method of the present application includes the following steps:
  • Step S510 obtaining a first score of the current search according to the first scoring formula.
  • the preset search evaluation method is to score the search result by using a search scoring model based on a first scoring formula and a minimum edit distance method, wherein the first scoring formula is:
  • q is the query statement
  • t is each item after the q participle
  • d is the document to be matched.
  • the functions of the functions in the first scoring formula are:
  • Tf(t in q) this function represents the frequency at which the term t appears in this field in the document; corresponding to the example above: the frequency at which the term after the segmentation appears in this record.
  • the value of tf is set to 1, because: for example, search for "China Ping An", assuming that the matching results are 1. Ping An Group, 2. China Ping An, 3. China Ping An Nanjing Ping An Branch, If you follow the original score, then the highest match is the third, because "Peace" appears twice.
  • Idf(t) this function appears twice, and it just corresponds to idf(t) ⁇ 2 in the formula.
  • This function is called the inverse frequency and indicates the frequency at which the term t appears in all documents. The more times it appears in all documents, the less important the term t is.
  • Boost(t.field in d) is the excitation factor, which is recorded when the index is created, and the value of lengthNorm(t.field in d) is calculated during the query; boost(t.field in d)*lengthNorm( The value of t.field in d) indicates the total number of terms in a given field in the search result; if the value is larger, the lower the score, for example, if the A document contains 1000 terms, the key The frequency of occurrence of words is 10; while the B document contains 20 terms, the frequency of occurrence of the same keyword is 8; it is obvious that the score of B documents should be higher.
  • a search may include multiple search terms, and a single document may also include multiple search terms.
  • the item indicates that the more search terms are included in a document, the higher the score of the word document .
  • QueryNorm(q) which calculates the variance of each query entry. This value does not affect the sorting, but only makes the scores between different query objects comparable.
  • Step S520 obtaining a second score of the current search according to the minimum edit distance method.
  • the Edit Distance also known as the Levenshtein distance
  • Levenshtein distance refers to the minimum number of edit operations required between two strings to be converted from one to another. Licensed editing operations include replacing one character with another, inserting one character, and deleting one character. In general, the smaller the edit distance, the greater the similarity between the two strings.
  • the step of the step of obtaining the second score of the current search according to the minimum edit distance method includes:
  • the value of the minimum edit distance is taken as the second score.
  • An average of the first score and the second score is obtained, the average being the final score of the current search.
  • weight factors may be set for the first score and the second score, and the respective weight factors are multiplied by the first score and the second score respectively, and then added to obtain an evaluation result of the search result.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

本申请公开了一种数据处理方法,该方法包括:对所述文本数据或者其他类型的数据建立索引并生成索引文件,将所述索引文件存储到索引库,根据查询对象对所述索引库中的索引文件进行搜索,对搜索结果按照搜索评价方法进行评价打分,根据得分结果将所述搜索结果进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示。本申请还提供一种服务器及计算机可读存储介质。本申请提供的数据处理方法、服务器及计算机可读存储介质能够快速针对与模糊文字的搜索,快速实现模糊匹配。

Description

数据处理方法、服务器及计算机存储介质
本申请基于巴黎公约申明享有2018年3月12日递交的申请号为CN201810198710.8、名称为“数据处理方法、服务器及计算机存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及数据分析技术领域,尤其涉及一种数据处理方法、服务器及计算机存储介质。
背景技术
在当今信息爆炸的时代,每个单位或个人都在为信息的快速增长做出了各种贡献。信息的种类也在不断的扩展,越来越多的非结构化信息不断出现,包括企业的各种报表、帐单、电子文档等等。这些非结构化信息存入数据库中,很多时候,我们需要在数据库中检索,而针对与模糊文字的搜索,直接查询数据库的效率是非常慢的。因此,针对模糊文字的搜索,如何提高检索信息的效率是当下一大亟需解决的问题。
发明内容
有鉴于此,本申请提出一种数据处理方法、服务器及计算机存储介质,以解决如何的问题。
首先,为实现上述目的,本申请提出一种数据处理方法,该方法包括:
获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理;
基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件将所述索引文件存储到索引库;
接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,预设的搜索评价模型对搜索结果进行评价打分;及
根据得分结果将所述搜索结果按照分数从高到低的顺序进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示;
其中,所述预设方式为将所述得分结果生成条形图,并将所述得分结果按照百分比形式输出显示,所述预设阈值为40%。
此外,为实现上述目的,本申请还提供一种服务器,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据处理系统,所述数据处理系统被所述处理器执行时实现如上述的数据处理方法的步骤。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有数据处理系统,所述数据处理系统可被至少一个处理器执行,以使所述至少一个处理器执行如上述的数据处理方法的步骤。
相较于现有技术,本申请所提出的数据处理方法、服务器及计算机可读存储介质,首先获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理,基于lucene搜索引擎对所述文本数据或者其他类型的数据建立索引并生成索引文件,在建立所述索引的过程中,对索引写入权重,将所述索引文件存储到索引库;其次,接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,对搜索结果按照搜索评价方法进行评价打分;最后,根据得分结果将所述搜索结果按照预设方式进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示。采用本申请所提出的数据处理方法、服务器及计算机可读存储介质可以快速针对与模糊文字的搜索,快速实现模糊匹配,相较于现有技术,更加方便、快捷、准确,极大地提高了检索的效率。
附图说明
图1是本申请服务器一可选的硬件架构的示意图;
图2是本申请数据处理系统第一实施例的程序模块示意图;
图3是本申请数据处理方法第一实施例的流程示意图;
图4是本申请数据处理方法第二实施例的流程示意图;
图5是本申请数据处理方法第三实施例的流程示意图。
图6是本申请数据处理方法第四实施例的流程示意图。
图7是本申请数据处理方法第五实施例的流程示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及 实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请服务器1一可选的硬件架构的示意图。
本实施例中,所述服务器1可包括,但不仅限于,可通过系统总线相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图2仅示出了具有组件11-13的服务器1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,所述服务器1可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该服务器1可以是独立的服务器,也可以是多个服务器所组成的服务器集群。
所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述服务器1的内部存储单元,例如该服务器1的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述服务器1的外部存储设备,例如该服务器1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述服务器1的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述服务器1的操作系统和各类应用软件,例如数据处理系统2的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述服务器1的总体操作。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述的数据处理系统2等。
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述服务器1与其他电子设备之间建立通信连接。
至此,己经详细介绍了本申请相关设备的硬件结构和功能。下面,将基于上述介绍提出本申请的各个实施例。
首先,本申请提出一种数据处理系统2。
参阅图2所示,是本申请数据处理系统2第一实施例的程序模块图。
本实施例中,所述数据处理系统2包括一系列的存储于存储器11上的计算机程序指令,当该计算机程序指令被处理器12执行时,可以实现本申请各实施例的数据处理操作。在一些实施例中,基于该计算机程序指令各部分所实现的特定的操作,数据处理系统2可以被划分为一个或多个模块。例如,在图2中,所述数据处理系统2可以被分割成索引建立模块21,搜索打分模块22,排序输出模块23。其中:
所述索引建立模块21,用于获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理,基于lucene搜索引擎对所述文本数据或者其他类型的数据建立索引并生成索引文件,在建立所述索引的过程中,对索引写入权重,将所述索引文件存储到索引库。
具体地,Lucene是一套用于全文检索和搜寻的开源程式库,由Apache软件基金会支持和提供。它提供了一个简单却强大的应用程式接口,能够做全文索引和搜寻。Lucene是一个高性能、可伸缩的信息搜索库。
具体地,对于所述数据库,各专业公司的实现方式不同,主要的数据库类型为Oracle,也会存在PostgreSQL、MySQL等类型的各种数据库。
具体地,建索引的时候将权重写入索引,在查询时读取出来,用乘的方式来对一些检索结果加分。
具体地,对数据库中的文本数据或者其他类型的处理方式包括多种,例如,可以对非文本数据的文档类型进行转类型,使得非文本数据的文档可以更加顺利地被建立索引。
具体地,建立索引包括构造索引库、构造索引创建器及利用所述索引创 建器建立索引的步骤。
具体地,构造索引库directory,用于存入索引,设置索引库的位置,也即索引存入的位置。
具体地,构造索引创建器IndexWriter。索引创建器所创建的文件索引存放到索引库的位置,如果索引库中没有索引,则索引创建的方式为新建方式;否则设置为追加方式。
具体地,为获取的对所述文本数据或者其他类型的数据建立索引,根据不同的文件类型创建相应的文档描述Document,并设置相应属性域Filed的内容,如文件名、文件路径、文件内容。
所述搜索打分模块22,用于接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,预设的搜索评价模型对搜索结果进行评价打分。
具体地,用户输入的所述查询信息可以字符串、数字、一句话,甚至是一段话,对这些格式并不统一的查询信息可以进行一些处理,使得处理后的查询信息符合所述搜索打分模块22的格式要求,例如,可以对所述查询信息进行分词、过滤、同义词转换、近义词转换等等处理,从而使得所述查询信息转换为符合要求的所述查询对象。
具体地,对搜索到的内容进行评分是本申请的重点,所述搜索评价模型采用两种方式对所述搜索结果进行评价打分,它们分别是基于Lucecne引擎的打分公式以及最小编辑距离,二者分别对搜索内容进行打分评价,然后通过确定不同的权重因子对二者的得分进行处理以获得最终的得分。
其中,所述基于Lucecne引擎的打分公式为:
Figure PCTCN2018089335-appb-000001
其中,q为查询语句,t是q分词后的每一项,d为去匹配的文档。
具体地,所述基于Lucecne引擎的打分公式中各函数的作用为:
tf(t in q),此函数表示词项t在该文档中的该字段里出现的频率;对应到上图的例子中:既是分词后的词项在此条记录中出现的频率。当然出现的次数越多,它返回的值越大,也正好反映了此文档的重要性。为保证搜索结果的精确性,将tf的值设置为1,原因是:比如搜索“中国平安”,假设匹配的结果有1.平安集团,2.中国平安,3.中国平安南京平安分公司,如果按照原有的得分依据,那么结果匹配度最高的是第三个,因为“平安”出现了两次。但是按照我们正常的逻辑,匹配度最高的当然是完全匹配的那个,也就是“中国平安”。 所以在这里为了避免此类先现象,将tf的值改为1,同一个词的多次出现将不影响得分的依据。因为我们要模糊匹配的是客户信息,往往是很短的一个词,词频重复不应作为得分高低的依据。这样对于短语的匹配度更高一些。
idf(t),此函数出现了两次,也刚好对应公式中的idf(t)^2,这个函数被称作倒频率,表示词项t在所有文档中出现的频率。若它在所有文档中出现的次数越多,表明这个词项t越不重要。
boost(t.field in d)为激励因子,在创建索引时就被记录下来,而lengthNorm(t.field in d)的值会在查询过程中计算;boost(t.field in d)*lengthNorm(t.field in d)的值表示此条搜索结果中,给定字段中包含词项的总数;若值越大,得分越低,举例而言,若A文档有包含了1000个词项,关键词出现的频率为10;而B文档包20个词项,相同关键词出现的频率为8;很明显B文档的打分应该要高一些。
coord(q,d),一次搜索可能包括多个搜索词,而一片文档中也可能包括多个搜索词,该项表示,当一篇文档中包含的搜索词越多,则词文档打分越高。
QueryNorm(q),该项计算每个查询条目的方差和,这个值不影响排序,而仅仅使得不同的查询对象之间的分数可以比较。
具体地,编辑距离(Edit Distance),又称Levenshtein距离,是指两个字串之间,由一个转成另一个所需的最少编辑操作次数。许可的编辑操作包括将一个字符替换成另一个字符,插入一个字符,删除一个字符。一般来说,编辑距离越小,两个串的相似度越大。通过计算搜索结果与查询对象的编辑距离,可以得到搜索结果的第二得分。而获得的最小编辑距离就代表搜索结果与查询对象最相似。
所述排序输出模块23,用于根据得分结果将所述搜索结果按照预设方式进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示。
具体地,所述预设方式可以是百分比的方式,将最终得分以百分比的形式进行从大到小输出,有利于用户对匹配度高低的理解,还可以生成条形图,这样更加直观。
具体地,所述预设阈值设置的目的是筛选出搜索结果中最有价值的一组,距离而言,可将预设阈值设置为40%。
此外,本申请还提出一种数据处理方法。
参阅图3所示,是本申请数据处理方法第一实施例的流程示意图。在本实施例中,根据不同的需求,图3所示的流程图中的步骤的执行顺序可以改变, 某些步骤可以省略。
步骤S110,获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理,基于lucene搜索引擎对所述文本数据或者其他类型的数据建立索引并生成索引文件,在建立所述索引的过程中,对索引写入权重,将所述索引文件存储到索引库
具体地,Lucene是一套用于全文检索和搜寻的开源程式库,由Apache软件基金会支持和提供。它提供了一个简单却强大的应用程式接口,能够做全文索引和搜寻。Lucene是一个高性能、可伸缩的信息搜索库。
具体地,对于所述数据库,各专业公司的实现方式不同,主要的数据库类型为Oracle,也会存在PostgreSQL、MySQL等类型的各种数据库。
步骤S120,接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,对搜索结果按照搜索评价方法进行评价打分。
具体地,用户输入的所述查询信息可以字符串、数字、一句话,甚至是一段话,对这些格式并不统一的查询信息可以进行一些处理,使得符合所述搜索打分模块22进行搜索,例如,可以对所述查询信息进行分词、过滤、同义词转换、近义词转换等等处理,从而使得所述查询信息转换为符合要求的所述查询对象。
步骤S130,根据得分结果将所述搜索结果按照预设方式进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示。
具体地,所述预设方式可以是百分比的方式,将最终得分以百分比的形式进行从大到小输出,有利于用户对匹配度高低的理解,还可以生成条形图,这样更加直观。
具体地,所述预设阈值设置的目的是筛选出搜索结果中最有价值的一组,距离而言,可将预设阈值设置为40%。
如图4所示,是本申请数据处理方法的第二实施例的流程示意图。本实施例中,本申请数据处理方法步骤S110中对数据库中的文本数据及其他类型的数据进行处理的方法包括以下步骤:
步骤S210,将其他类型的数据转换为所述文本数据。
具体地,将其他类型的数据转换为文本数据,例如有些数据以pdf形式、office文档形式等存储于服务器中,通过一些工具从office文档、pdf文档中抽出文本,例如,所述工具可以为apache POI和apache PDFbox等。
步骤S220,将所述文本数据按照词语切分、词性标注及词语过滤的步骤进行分词处理。
具体地,将第一步中得到的文本数据(包括数据库中的文本数据及转换后的文本数据)进行分词处理,分词处理的步骤包括:词语切分、词性标注及词语过滤,其中,词语切分主要利用上下文关系对语句进行切分,避免出现错误切分的情况,因为一句话在的不同切分方式往往具有不同意义,比如,鞋子和服装,应该切分为鞋子/和/服装,当切分为“鞋子/和服/装”时,明显意思南辕北辙。在词语切分之后,通过基于规则和统计的方法可以对切分后的词语进行词性标注,所述基于规则和统计的方法可为隐马尔可夫模型,例如,词性标注可以将鞋子和服装归类为名词,而将“和”归类为连词。词性标注后就是词语过滤,词语过滤的作用是将不重要的词语清除,这样可以精简索引库,提高检索的效率,例如,将名词“鞋子”、“服装”保留,将连词“和”过滤。
步骤S230,生成分词结果,将过滤后的词语作为最终分词结果。
具体地,过滤后的词语包括数据库中的文本数据及其他类型数据的分词,分词的同义词、近义词等,这些词将作为处理结果供下一步骤使用,使得系统更加有效的检索。
图4所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。
如图5所示,是本申请数据处理方法的第三实施例的流程示意图。本实施例中,本申请数据处理方法步骤S110中基于lucene搜索引擎对所述文本数据或者其他类型的数据建立索引的方法包括以下步骤:
步骤S310,构造索引库,设置索引库的位置,用于存入索引。
具体地,构造索引库directory,用于存入索引,设置索引库的位置,也即索引存入的位置。
步骤S320,构造索引创建器,用于创建索引。
具体地,构造索引创建器IndexWriter。索引创建器所创建的文件索引存放到索引库的位置,如果索引库中没有索引,则索引创建的方式为新建方式;否则设置为追加方式。
步骤S330,为获取的所述文本数据或者其他类型的数据建立索引,根据不同的文件类型创建相应的文档描述,并设置相应属性域的内容。
具体地,为获取的对所述文本数据或者其他类型的数据建立索引,根据不同的文件类型创建相应的文档描述Document,并设置相应属性域Filed的内容,如文件名、文件路径、文件内容。
图5所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。
如图6所示,是本申请数据处理方法的第四实施例的流程示意图。本实施例中,本申请数据处理方法步骤S210中对所述查询信息进行处理生成查询对象的方法包括以下步骤:
步骤S410,对所述查询信息进行分词处理。
具体地,对所述查询信息进行分词处理,分词处理的步骤包括:词语切分、词性标注及词语过滤,其中,词语切分主要利用上下文关系对语句进行切分,避免出现错误切分的情况,因为一句话在的不同切分方式往往具有不同意义,比如,鞋子和服装,应该切分为鞋子/和/服装,当切分为“鞋子/和服/装”时,明显意思南辕北辙。在词语切分之后,通过基于规则和统计的方法可以对切分后的词语进行词性标注,所述基于规则和统计的方法可为隐马尔可夫模型,例如,词性标注可以将鞋子和服装归类为名词,而将“和”归类为连词。词性标注后就是词语过滤,词语过滤的作用是将不重要的词语清除,这样可以精简索引库,提高检索的效率,例如,将名词“鞋子”、“服装”保留,将连词“和”过滤。词语过滤后的词语形成分词集。
步骤S420,对分词集中的词语进行同义词、近义词转换,获得分词集的同义词、近义词集。
具体地,对分词集中的词语进行同义词、近义词转换,获得分词集的同义词、近义词集,将分词集、同义词、近义词集中的词语作为查询对象。将分词集中的词语在概念上扩展成对应的同义词、近义词或者上下位词,依据相似度优先算法抽取部分扩展词或接收用户选择的扩展词,最后把分词集中的词语和限定的扩展词一起作为查询条件传给检索模块作为查询对象。举例而言,若用户输入“今年中国的经济形式怎么样?”系统获得了“中国”,“经济”两个查询词,那么检索信息处理模块可获得“中国”的扩展词,比如“大陆”,“内地”,“国内”等;根据“经济”可获得扩展词“GDP”、“贸易”、“商业”、“财经”、“金融”等。
步骤S430,将所述分词集,同义词、近义词集中的词语作为查询对象
具体地,将用户输入的查询信息分词后进行转换以获得分词的同义词、近义词,利用分词结果及其同义词、近义词对索引库中的内容进行查询会更加全面、准确及迅速,也更符合模糊检索的定义。
图6所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。
如图7所示,是本申请数据处理方法的第四实施例的流程示意图。本实施例中,本申请数据处理方法步骤S210中对搜索结果按照搜索评价方法进行评价打分的方法包括以下步骤:
步骤S510,根据第一评分公式获得本次搜索的第一得分。
具体地,所述预设搜索评价方法为利用包括基于第一评分公式及最小编辑距离法的搜索评分模型对所述搜索结果进行评分,其中,所述第一评分公式为:
Figure PCTCN2018089335-appb-000002
其中,q为查询语句,t是q分词后的每一项,d为去匹配的文档。
具体地,所述第一评分公式中各函数的作用为:
tf(t in q),此函数表示词项t在该文档中的该字段里出现的频率;对应到上图的例子中:既是分词后的词项在此条记录中出现的频率。当然出现的次数越多,它返回的值越大,也正好反映了此文档的重要性。为保证搜索结果的精确性,将tf的值设置为1,原因是:比如搜索“中国平安”,假设匹配的结果有1.平安集团,2.中国平安,3.中国平安南京平安分公司,如果按照原有的得分依据,那么结果匹配度最高的是第三个,因为“平安”出现了两次。但是按照我们正常的逻辑,匹配度最高的当然是完全匹配的那个,也就是“中国平安”。所以在这里为了避免此类先现象,将tf的值改为1,同一个词的多次出现将不影响得分的依据。因为我们要模糊匹配的是客户信息,往往是很短的一个词,词频重复不应作为得分高低的依据。这样对于短语的匹配度更高一些。
idf(t),此函数出现了两次,也刚好对应公式中的idf(t)^2,这个函数被称作倒频率,表示词项t在所有文档中出现的频率。若它在所有文档中出现的次数越多,表明这个词项t越不重要。
boost(t.field in d)为激励因子,在创建索引时就被记录下来,而lengthNorm(t.field in d)的值会在查询过程中计算;boost(t.field in d)*lengthNorm(t.field in d)的值表示此条搜索结果中,给定字段中包含词项的总数;若值越大,得分越低,举例而言,若A文档有包含了1000个词项,关键词出现的频率为10;而B文档包20个词项,相同关键词出现的频率为8;很明显B文档的打分应该要高一些。
coord(q,d),一次搜索可能包括多个搜索词,而一片文档中也可能包括多个搜索词,该项表示,当一篇文档中包含的搜索词越多,则词文档打分越高。
QueryNorm(q),该项计算每个查询条目的方差和,这个值不影响排序, 而仅仅使得不同的查询对象之间的分数可以比较。
步骤S520,根据最小编辑距离法获得本次搜索的第二得分。
具体地,其中,编辑距离(Edit Distance),又称Levenshtein距离,是指两个字串之间,由一个转成另一个所需的最少编辑操作次数。许可的编辑操作包括将一个字符替换成另一个字符,插入一个字符,删除一个字符。一般来说,编辑距离越小,两个串的相似度越大。通过计算搜索结果与查询对象的编辑距离,可以得到搜索结果的第二得分。而获得的最小编辑距离就代表搜索结果与查询对象最相似。
具体地,所述步骤“根据最小编辑距离法获得本次搜索的第二得分”的步骤包括:
计算所述查询对象及所述搜索结果的编辑距离;
获取最小编辑距离;及
将所述最小编辑距离的值作为所述第二得分。
获取所述第一得分及第二得分的平均值,所述平均值作为本次搜索的最终得分。
具体地,对所述第一得分及第二得分可以设置不同的权重因子,将各自的权重因子与所述第一得分及第二得分分别相乘后进行加法运算获得搜索结果的评价打分结果,例如其公式可为:评分=权重因子A*第一得分+权重因子B*第二得分,所述权重因子A及权重因子B的值按照需求进行设定,举例而言,若需要二者的均值,可将权重因子A及权重因子B设置为0.5。
图7所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种数据处理方法,应用于服务器,其特征在于,所述方法包括步骤:
    获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理;
    基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件,将所述索引文件存储到索引库;
    接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,预设的搜索评价模型对搜索结果进行评价打分;及
    根据得分结果将所述搜索结果按照分数从高到低的顺序进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示;
    其中,所述预设方式为将所述得分结果生成条形图,并将所述得分结果按照百分比形式输出显示,所述预设阈值为40%。
  2. 如权利要求1所述的数据处理方法,其特征在于,所述其他类型的数据包括pdf文件数据、office文件数据,所述对数据库中的文本数据或者其他类型的数据进行处理的步骤包括:
    将其他类型的数据转换为文本数据;
    将数据库中的文本数据和所述文本数据按照词语切分、词性标注及词语过滤的步骤进行分词处理;及
    生成分词结果,将过滤后的词语作为最终分词结果,将所述最终分词结果作为处理后的所述文本数据或者其他类型的数据。
  3. 如权利要求2所述的数据处理方法,其特征在于,所述“基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件”的步骤包括:
    构造索引库,设置索引库的位置,用于存入索引;
    构造索引创建器,用于创建索引;及
    为分词后的所述文本数据或者其他类型的数据建立索引,根据不同的文件类型创建相应的文档描述,并设置相应属性域的内容。
  4. 如权利要求3所述的数据处理方法,其特征在于,对所述查询信息进行处理生成查询对象的步骤包括:
    对所述查询信息进行分词处理,分词处理的步骤包括:词语切分、词性标注及词语过滤;
    对分词集中的词语进行同义词、近义词转换,获得分词集的同义词、近义词集;及
    将所述分词集,同义词、近义词集中的词语作为查询对象。
  5. 如权利要求4所述的数据处理方法,其特征在于,所述搜索评价模型对所述搜索结果进行打分包括如下步骤:
    根据第一评分公式获得本次搜索的第一得分;
    根据最小编辑距离法获得本次搜索的第二得分;及
    获取所述第一得分及第二得分的平均值,所述平均值作为本次搜索的最终得分。
  6. 如权利要求5所述的数据处理方法,其特征在于,所述第一评分公式为:
    Figure PCTCN2018089335-appb-100001
    ,其中,所述Score为所述第一得分,q为所述查询信息,t为所述查询信息分词后的每一项,d为去匹配的文档,函数tf(t in d)表示词项t在该文档中出现的频率,函数idf(t) 2表示词项t在所有文档中出现的频率,boost(t.field in d)为激励因子,boost(t.field in d)*lengthNorm(t.field in d)的值表示此条搜索结果中,给定字段中包含词项的总数,coord(q,d)表示当一篇文档中包含的搜索词越多,则词文档打分越高,QueryNorm(q)计算每个查询条目的方差和。
  7. 如权利要求6所述的数据处理方法,其特征在于,将所述函数tf(t in d)的值设置为1,去除重复出现的词对所述第一得分的影响。
  8. 如权利要求7所述的数据处理方法,其特征在于,所述“根据最小编辑距离法获得本次搜索的第二得分”的步骤包括:
    计算所述查询对象及所述搜索结果的编辑距离;
    获取最小编辑距离;及
    将所述最小编辑距离的值作为所述第二得分。
  9. 一种服务器,其特征在于,所述服务器包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据处理系统,所述数据处理系统被所述处理器执行时实现如下步骤:
    获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理;
    基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件,将所述索引文件存储到索引库;
    接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,预设的搜索评价模型对搜索结果进行评价打分;及
    根据得分结果将所述搜索结果按照分数从高到低的顺序进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示;
    其中,所述预设方式为将所述得分结果生成条形图,并将所述得分结果按照百分比形式输出显示,所述预设阈值为40%。
  10. 如权利要求9所述的服务器,其特征在于,所述其他类型的数据包括pdf文件数据、office文件数据,所述对数据库中的文本数据或者其他类型的数据进行处理的步骤包括:
    将其他类型的数据转换为文本数据;
    将数据库中的文本数据和所述文本数据按照词语切分、词性标注及词语过滤的步骤进行分词处理;及
    生成分词结果,将过滤后的词语作为最终分词结果,将所述最终分词结果作为处理后的所述文本数据或者其他类型的数据。
  11. 如权利要求10所述的服务器,其特征在于,所述“基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件”的步骤包括:
    构造索引库,设置索引库的位置,用于存入索引;
    构造索引创建器,用于创建索引;及
    为分词后的所述文本数据或者其他类型的数据建立索引,根据不同的文件类型创建相应的文档描述,并设置相应属性域的内容。
  12. 如权利要求11所述的服务器,其特征在于,对所述查询信息进行处理生成查询对象的步骤包括:
    对所述查询信息进行分词处理,分词处理的步骤包括:词语切分、词性标注及词语过滤;
    对分词集中的词语进行同义词、近义词转换,获得分词集的同义词、近义词集;及
    将所述分词集,同义词、近义词集中的词语作为查询对象。
  13. 如权利要求12所述的服务器,其特征在于,所述搜索评价模型对所述搜索结果进行打分包括如下步骤:
    根据第一评分公式获得本次搜索的第一得分;
    根据最小编辑距离法获得本次搜索的第二得分;及
    获取所述第一得分及第二得分的平均值,所述平均值作为本次搜索的最终得分。
  14. 如权利要求13所述的服务器,其特征在于,所述第一评分公式为:
    Figure PCTCN2018089335-appb-100002
    ,其中,所述Score为所述第一得分,q为所述查询信息,t为所述查询信息分词后的每一项,d为去匹配的文档,函数tf(t in d)表示词项t在该文档中出现的频率,函数idf(t) 2表示词项t在所有文档中出现的频率,boost(t.field in d)为激励因子,boost(t.field in d)*lengthNorm(t.field in d)的值表示此条搜索结果中,给定字段中包含词项的总数,coord(q,d)表示当一篇文档中包含的搜索词越多,则词文档打分越高,QueryNorm(q)计算每个查询条目的方差和。
  15. 如权利要求14所述的服务器,其特征在于,将所述函数tf(t in d)的值设置为1,去除重复出现的词对所述第一得分的影响。
  16. 如权利要求15所述的服务器,其特征在于,所述“根据最小编辑距离法获得本次搜索的第二得分”的步骤包括:
    计算所述查询对象及所述搜索结果的编辑距离;
    获取最小编辑距离;及
    将所述最小编辑距离的值作为所述第二得分。
  17. 一种计算机可读存储介质,所述计算机可读存储介质存储有数据处理系统,所述数据处理系统可被至少一个处理器执行,所述数据处理系统被所述处理器执行时实现如下步骤:
    获取数据库中的文本数据或者其他类型的数据,对数据库中的文本数据或者其他类型的数据进行处理;
    基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件,将所述索引文件存储到索引库;
    接收用户输入的查询信息,对所述查询信息进行处理生成查询对象,根据所述查询对象对所述索引库中的索引文件进行搜索,预设的搜索评价模型对搜索结果进行评价打分;及
    根据得分结果将所述搜索结果按照分数从高到低的顺序进行排序,将所述得分高于预设阈值的搜索结果按照预设方式进行输出显示;
    其中,所述预设方式为将所述得分结果生成条形图,并将所述得分结果按照百分比形式输出显示,所述预设阈值为40%。
  18. 如权利要求17所述的计算机可读存储介质,其特征在于,所述其他 类型的数据包括pdf文件数据、office文件数据,所述对数据库中的文本数据或者其他类型的数据进行处理的步骤包括:
    将其他类型的数据转换为文本数据;
    将数据库中的文本数据和所述文本数据按照词语切分、词性标注及词语过滤的步骤进行分词处理;及
    生成分词结果,将过滤后的词语作为最终分词结果,将所述最终分词结果作为处理后的所述文本数据或者其他类型的数据。
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述“基于lucene搜索引擎对处理后的所述文本数据或者其他类型的数据建立索引并生成索引文件”的步骤包括:
    构造索引库,设置索引库的位置,用于存入索引;
    构造索引创建器,用于创建索引;及
    为分词后的所述文本数据或者其他类型的数据建立索引,根据不同的文件类型创建相应的文档描述,并设置相应属性域的内容。
  20. 如权利要求19所述的计算机可读存储介质,其特征在于,对所述查询信息进行处理生成查询对象的步骤包括:
    对所述查询信息进行分词处理,分词处理的步骤包括:词语切分、词性标注及词语过滤;
    对分词集中的词语进行同义词、近义词转换,获得分词集的同义词、近义词集;及
    将所述分词集,同义词、近义词集中的词语作为查询对象。
PCT/CN2018/089335 2018-03-12 2018-05-31 数据处理方法、服务器及计算机存储介质 WO2019174132A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810198710.8A CN108520002A (zh) 2018-03-12 2018-03-12 数据处理方法、服务器及计算机存储介质
CN201810198710.8 2018-03-12

Publications (1)

Publication Number Publication Date
WO2019174132A1 true WO2019174132A1 (zh) 2019-09-19

Family

ID=63433123

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089335 WO2019174132A1 (zh) 2018-03-12 2018-05-31 数据处理方法、服务器及计算机存储介质

Country Status (2)

Country Link
CN (1) CN108520002A (zh)
WO (1) WO2019174132A1 (zh)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909725A (zh) * 2019-10-18 2020-03-24 平安科技(深圳)有限公司 识别文本的方法、装置、设备及存储介质
CN111062193A (zh) * 2019-12-16 2020-04-24 医渡云(北京)技术有限公司 医疗数据标注方法及装置、存储介质、电子设备
CN111078731A (zh) * 2019-11-25 2020-04-28 国网冀北电力有限公司 基于Hbase的电网运行数据协同查询方法、设备及存储介质
CN111125417A (zh) * 2019-12-30 2020-05-08 深圳云天励飞技术有限公司 一种数据搜索方法、装置、电子设备及存储介质
CN111143666A (zh) * 2019-12-04 2020-05-12 深圳市智微智能软件开发有限公司 钢网库存查询方法及系统
CN111159285A (zh) * 2019-12-05 2020-05-15 北京机电工程研究所 一种基于分布式索引服务部署的企业跨系统检索方法
CN111177532A (zh) * 2019-12-02 2020-05-19 平安资产管理有限责任公司 一种垂直搜索方法、装置、计算机系统及可读存储介质
CN111488736A (zh) * 2020-03-31 2020-08-04 上海七印信息科技有限公司 自学习分词方法、装置、计算机设备和存储介质
CN111737607A (zh) * 2020-06-22 2020-10-02 中国银行股份有限公司 数据处理方法、装置、电子设备以及存储介质
CN111814040A (zh) * 2020-06-15 2020-10-23 深圳市明睿数据科技有限公司 维修案例搜索方法、装置、终端设备及存储介质
CN111881309A (zh) * 2020-07-30 2020-11-03 浪潮云信息技术股份公司 电子证照检索方法、装置和计算机可读介质
CN113065065A (zh) * 2021-03-30 2021-07-02 广联达科技股份有限公司 一种评价搜索性能的方法、装置、设备及可读存储介质
CN113377896A (zh) * 2021-05-19 2021-09-10 朗新科技集团股份有限公司 全文快速检索方法、装置、电子设备及存储介质
CN114443728A (zh) * 2022-01-04 2022-05-06 广州粤建三和软件股份有限公司 一种基于Elasticsearch的检测报告搜索方法及装置
CN114969310A (zh) * 2022-06-07 2022-08-30 南京云问网络技术有限公司 一种面向多维数据的分段式检索排序系统设计方法
CN114996550A (zh) * 2021-05-24 2022-09-02 中移互联网有限公司 信息检索方法及装置
CN115563356A (zh) * 2022-09-30 2023-01-03 上海柯林布瑞信息技术有限公司 基于监控服务的系统交互信息动态收集查询方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110310731A (zh) * 2019-07-08 2019-10-08 苏州阿基米德网络科技有限公司 一种信息匹配查询系统及其查询方法
CN110377620A (zh) * 2019-07-16 2019-10-25 四川康佳智能终端科技有限公司 一种基于bom工具的物料搜索方法、计算机及存储介质
CN110797085B (zh) * 2019-10-25 2022-07-08 浪潮(北京)电子信息产业有限公司 一种基因数据的查询方法、系统、设备及存储介质
CN111209462B (zh) * 2020-01-02 2021-05-18 北京字节跳动网络技术有限公司 数据处理方法、装置及设备
CN111859066B (zh) * 2020-06-03 2023-01-20 广东电网有限责任公司 一种运维工单的查询推荐方法及装置
CN112507133B (zh) * 2020-12-16 2024-02-06 国泰君安证券股份有限公司 基于金融产品知识图谱实现关联搜索的方法、装置、处理器及其存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360367A (zh) * 2011-09-29 2012-02-22 广州中浩控制技术有限公司 一种xbrl数据搜索方法及搜索引擎
CN103838732A (zh) * 2012-11-21 2014-06-04 大连灵动科技发展有限公司 一种生活服务领域垂直搜索引擎
CN103838785A (zh) * 2012-11-27 2014-06-04 大连灵动科技发展有限公司 一种专利领域的垂直搜索引擎
CN105045852A (zh) * 2015-07-06 2015-11-11 华东师范大学 一种教学资源的全文搜索引擎系统
CN105930490A (zh) * 2016-05-03 2016-09-07 北京优宇通教育科技有限公司 一种教学资源智能甄选系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080076585A (ko) * 2007-02-16 2008-08-20 강민수 문서보안용 검색기능을 제공하는 네트워크 검색서버,네트워크 검색서버의 검색방법, 문서보안용 검색기능을제공하는 화상형성장치, 문서보안용 네트워크 검색기능을제공하는 네트워크 보안 시스템 및 기록매체
CN101930438B (zh) * 2009-06-19 2016-08-31 阿里巴巴集团控股有限公司 一种搜索结果生成方法及信息搜索系统
CN106528846B (zh) * 2016-11-21 2019-09-17 广州华多网络科技有限公司 一种检索方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360367A (zh) * 2011-09-29 2012-02-22 广州中浩控制技术有限公司 一种xbrl数据搜索方法及搜索引擎
CN103838732A (zh) * 2012-11-21 2014-06-04 大连灵动科技发展有限公司 一种生活服务领域垂直搜索引擎
CN103838785A (zh) * 2012-11-27 2014-06-04 大连灵动科技发展有限公司 一种专利领域的垂直搜索引擎
CN105045852A (zh) * 2015-07-06 2015-11-11 华东师范大学 一种教学资源的全文搜索引擎系统
CN105930490A (zh) * 2016-05-03 2016-09-07 北京优宇通教育科技有限公司 一种教学资源智能甄选系统

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909725B (zh) * 2019-10-18 2023-09-19 平安科技(深圳)有限公司 识别文本的方法、装置、设备及存储介质
CN110909725A (zh) * 2019-10-18 2020-03-24 平安科技(深圳)有限公司 识别文本的方法、装置、设备及存储介质
CN111078731A (zh) * 2019-11-25 2020-04-28 国网冀北电力有限公司 基于Hbase的电网运行数据协同查询方法、设备及存储介质
CN111177532A (zh) * 2019-12-02 2020-05-19 平安资产管理有限责任公司 一种垂直搜索方法、装置、计算机系统及可读存储介质
CN111143666A (zh) * 2019-12-04 2020-05-12 深圳市智微智能软件开发有限公司 钢网库存查询方法及系统
CN111159285B (zh) * 2019-12-05 2023-04-21 北京机电工程研究所 一种基于分布式索引服务部署的企业跨系统检索方法
CN111159285A (zh) * 2019-12-05 2020-05-15 北京机电工程研究所 一种基于分布式索引服务部署的企业跨系统检索方法
CN111062193A (zh) * 2019-12-16 2020-04-24 医渡云(北京)技术有限公司 医疗数据标注方法及装置、存储介质、电子设备
CN111062193B (zh) * 2019-12-16 2023-04-25 医渡云(北京)技术有限公司 医疗数据标注方法及装置、存储介质、电子设备
CN111125417B (zh) * 2019-12-30 2023-03-31 深圳云天励飞技术有限公司 一种数据搜索方法、装置、电子设备及存储介质
CN111125417A (zh) * 2019-12-30 2020-05-08 深圳云天励飞技术有限公司 一种数据搜索方法、装置、电子设备及存储介质
CN111488736A (zh) * 2020-03-31 2020-08-04 上海七印信息科技有限公司 自学习分词方法、装置、计算机设备和存储介质
CN111814040A (zh) * 2020-06-15 2020-10-23 深圳市明睿数据科技有限公司 维修案例搜索方法、装置、终端设备及存储介质
CN111737607A (zh) * 2020-06-22 2020-10-02 中国银行股份有限公司 数据处理方法、装置、电子设备以及存储介质
CN111737607B (zh) * 2020-06-22 2023-11-10 中国银行股份有限公司 数据处理方法、装置、电子设备以及存储介质
CN111881309A (zh) * 2020-07-30 2020-11-03 浪潮云信息技术股份公司 电子证照检索方法、装置和计算机可读介质
CN111881309B (zh) * 2020-07-30 2023-12-26 浪潮云信息技术股份公司 电子证照检索方法、装置和计算机可读介质
CN113065065A (zh) * 2021-03-30 2021-07-02 广联达科技股份有限公司 一种评价搜索性能的方法、装置、设备及可读存储介质
CN113377896A (zh) * 2021-05-19 2021-09-10 朗新科技集团股份有限公司 全文快速检索方法、装置、电子设备及存储介质
CN114996550A (zh) * 2021-05-24 2022-09-02 中移互联网有限公司 信息检索方法及装置
CN114996550B (zh) * 2021-05-24 2024-03-19 中移互联网有限公司 信息检索方法及装置
CN114443728A (zh) * 2022-01-04 2022-05-06 广州粤建三和软件股份有限公司 一种基于Elasticsearch的检测报告搜索方法及装置
CN114969310A (zh) * 2022-06-07 2022-08-30 南京云问网络技术有限公司 一种面向多维数据的分段式检索排序系统设计方法
CN114969310B (zh) * 2022-06-07 2024-04-05 南京云问网络技术有限公司 一种面向多维数据的分段式检索排序系统设计方法
CN115563356A (zh) * 2022-09-30 2023-01-03 上海柯林布瑞信息技术有限公司 基于监控服务的系统交互信息动态收集查询方法及装置
CN115563356B (zh) * 2022-09-30 2023-07-18 上海柯林布瑞信息技术有限公司 基于监控服务的系统交互信息动态收集查询方法及装置

Also Published As

Publication number Publication date
CN108520002A (zh) 2018-09-11

Similar Documents

Publication Publication Date Title
WO2019174132A1 (zh) 数据处理方法、服务器及计算机存储介质
CN111104794B (zh) 一种基于主题词的文本相似度匹配方法
WO2019091026A1 (zh) 知识库文档快速检索方法、应用服务器及计算机可读存储介质
EP2092419B1 (en) Method and system for high performance data metatagging and data indexing using coprocessors
CN104199965B (zh) 一种语义信息检索方法
WO2022121171A1 (zh) 相似文本匹配方法、装置、电子设备及计算机存储介质
US20080114725A1 (en) Method and System for High Performance Data Metatagging and Data Indexing Using Coprocessors
WO2021175009A1 (zh) 预警事件图谱的构建方法、装置、设备及存储介质
CN110413787B (zh) 文本聚类方法、装置、终端和存储介质
WO2021068683A1 (zh) 正则表达式生成方法、装置、服务器及计算机可读存储介质
US7555428B1 (en) System and method for identifying compounds through iterative analysis
WO2011152925A2 (en) Detection of junk in search result ranking
CN110851598A (zh) 文本分类方法、装置、终端设备及存储介质
CN107844493B (zh) 一种文件关联方法及系统
CN111553556A (zh) 业务数据分析方法、装置、计算机设备及存储介质
CN112183102A (zh) 基于注意力机制与图注意力网络的命名实体识别方法
CN113342923A (zh) 数据查询方法、装置、电子设备及可读存储介质
JPH11102377A (ja) データベースからドキュメントを検索する方法および装置
WO2015084757A1 (en) Systems and methods for processing data stored in a database
CN114692628A (zh) 样本生成方法、模型训练方法、文本抽取方法和装置
CN114202443A (zh) 政策分类方法、装置、设备及存储介质
CN113408660A (zh) 图书聚类方法、装置、设备和存储介质
WO2023246849A1 (zh) 回馈数据图谱生成方法及冰箱
TWI636370B (zh) Establishing chart indexing method and computer program product by text information
JP2013222418A (ja) パッセージ分割方法、装置、及びプログラム

Legal Events

Date Code Title Description
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 1205A DATED 08/12/2020)

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

Ref document number: 18909615

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18909615

Country of ref document: EP

Kind code of ref document: A1