CN116450916A - Information query method and device based on fixed-segment classification, electronic equipment and medium - Google Patents

Information query method and device based on fixed-segment classification, electronic equipment and medium Download PDF

Info

Publication number
CN116450916A
CN116450916A CN202310430929.7A CN202310430929A CN116450916A CN 116450916 A CN116450916 A CN 116450916A CN 202310430929 A CN202310430929 A CN 202310430929A CN 116450916 A CN116450916 A CN 116450916A
Authority
CN
China
Prior art keywords
scene
vocabulary
answer text
text
preset
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.)
Pending
Application number
CN202310430929.7A
Other languages
Chinese (zh)
Inventor
陈涛
赵晓辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202310430929.7A priority Critical patent/CN116450916A/en
Publication of CN116450916A publication Critical patent/CN116450916A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to artificial intelligence, and discloses an information query method based on segmentation and classification, which comprises the following steps: constructing and generating a word library to be referred based on the searched scene keywords and vocabulary relation in the plurality of scene vocabularies, and expanding an information search engine by utilizing the word library to be referred to obtain a standard search engine; searching in an answer content library by using a standard search engine to obtain an answer text corresponding to the user query text, and calculating a relevance score between the answer text and the user query text; and performing primary screening on the multiple answer text sets according to the relevance scores to obtain an initial answer text set, and performing secondary screening on the initial answer text set according to a grading rule constructed by the word library to be referred to obtain a standard answer text set. In addition, the invention also relates to a blockchain technology, and scene keywords can be stored in nodes of the blockchain. The invention further provides an information query device based on the segmentation and grading, electronic equipment and a storage medium. The invention can improve the accuracy of information inquiry.

Description

Information query method and device based on fixed-segment classification, electronic equipment and medium
Technical Field
The present invention relates to the field of artificial intelligence, and in particular, to a method and apparatus for querying information based on segment classification, an electronic device, and a storage medium.
Background
With the popularity of the internet, search engines are increasingly being presented in internet products and have become a popular tool for searching for scenes, with search engines being utilized to recall and rank search results, typically based on relevance of text matches, when information searches and queries are being conducted. Although the search engine may provide a flexible scoring method for information query, the scoring is determined based on the word frequency of the vocabulary in the content library, and for some specific fields, such as insurance fields or finance fields, the word frequency of the professional vocabulary is close to the word frequency of the ordinary vocabulary, so that the finally queried information is not accurate enough. There is a need to propose a more accurate information query method.
Disclosure of Invention
The invention provides an information query method, device, electronic equipment and storage medium based on fixed-segment classification, and the main purpose of the invention is to improve the accuracy of information query.
In order to achieve the above object, the present invention provides an information query method based on segment classification, including:
Acquiring a plurality of scene words in a target application scene, searching scene keywords in the plurality of scene words, and carrying out relationship analysis on the plurality of scene words to obtain word relationships;
constructing and generating a word library to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by utilizing the word library to be referred to obtain a standard search engine;
searching in a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
and performing primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by using the word stock to be referred, and performing secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
Optionally, the searching for the scene keywords in the plurality of scene vocabularies includes:
extracting a plurality of scene words in preset historical scene data, and summarizing the scene words into a scene training set;
Training a preset convolutional network model by using the scene training set to obtain a keyword extraction model;
and extracting keywords from the scene vocabulary according to the keyword extraction model to obtain scene keywords.
Optionally, the performing relationship analysis on the plurality of scene vocabularies to obtain vocabulary relationships includes:
identifying the vocabulary types corresponding to the scene vocabularies, and constructing hierarchical relations or synonymous relations among the scene vocabularies corresponding to the same vocabulary types;
constructing corresponding relations for scene vocabularies corresponding to different vocabulary types according to preset corresponding rules;
and summarizing the hierarchical relationship, the synonymous relationship and the corresponding relationship into a vocabulary relationship.
Optionally, the constructing a grading rule by using the word stock to be referred includes:
analyzing the vocabulary in the word bank to be referred, taking the scene keywords in the analyzed vocabulary as primary vocabulary, and setting the matching rule with the primary vocabulary successfully;
carrying out vocabulary statistics on the vocabulary conforming to the initial rule to obtain the number of the vocabulary, and constructing an initial grading rule according to the interval where the number of the vocabulary is located;
and summarizing the matching rule and the initial grading rule to obtain the grading rule.
Optionally, the rescreening the initial answer text set according to the grading rule to obtain a standard answer text set includes:
extracting an initial answer text with consistent relevance scores in the initial answer text set as a target text set;
and grading the target texts in the target text set based on the grading rule to obtain a standard answer text set.
Optionally, the calculating the relevance score between the answer text and the user query text according to a preset relevance scoring formula includes:
the preset relevance scoring formula is as follows:
wherein score (D, Q) is the relevance score, Q is the user query text, D is the answer text, Q i For the ith keyword in the answer text, IDF (q i ) Query the user for the inverse text frequency, k, of the keywords in the text 1 And b is a preset adjustment parameter, avgdl is a preset document average value, D is a corresponding module of the answer text, f (q) i (ii) represents the ith keyword q i The frequency of occurrence in answer text D.
Optionally, the expanding the preset information search engine by using the word stock to be referred to obtain a standard search engine includes:
Carrying out information identification on the word stock to be referred by using a preset information search engine to obtain words to be added;
and adding the word to be added into an extended word stock of a word segmentation device in the information search engine to obtain a standard search engine.
In order to solve the above problems, the present invention further provides an information query apparatus based on segment grading, the apparatus comprising:
the relation analysis module is used for acquiring a plurality of scene words in a target application scene, searching scene keywords in the scene words, and carrying out relation analysis on the scene words to obtain word relations;
the engine expansion module is used for constructing and generating a word stock to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by utilizing the word stock to be referred to obtain a standard search engine;
the score calculating module is used for searching one or more answer texts corresponding to the user query text in a preset answer content library by utilizing the standard search engine, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
and the dual screening module is used for carrying out primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by utilizing the word stock to be referred, and carrying out secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the segment-based hierarchical information query method described above.
In order to solve the above-mentioned problems, the present invention also provides a storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned information query method based on segment classification.
In the embodiment of the invention, a word stock to be referred is constructed and generated through a plurality of scene keywords and vocabulary relations, a preset information search engine is expanded by utilizing the word stock to be referred to obtain a standard search engine, the accuracy of searching can be increased by expanding the information search engine, one or more answer texts corresponding to a user query text are obtained by searching in a preset answer content library by utilizing the standard search engine, a plurality of answer text sets are subjected to primary screening according to relevance scores, and the initial answer text sets are subjected to secondary screening according to the grading rule, so that the standard answer text sets are obtained. The primary screening and the secondary screening can play a role in double screening, and accuracy of information inquiry is improved. Therefore, the information query method, the device, the electronic equipment and the storage medium based on the fixed-section grading can solve the problem of low accuracy of improving information query.
Drawings
FIG. 1 is a flow chart of an information query method based on segment classification according to an embodiment of the present invention;
FIG. 2 is a detailed flow chart of one of the steps shown in FIG. 1;
FIG. 3 is a functional block diagram of an information query device based on segment classification according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device for implementing the information query method based on segment classification according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides an information query method based on segmentation and classification. The execution subject of the information query method based on the segmentation and classification includes, but is not limited to, at least one of a server, a terminal and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the information query method based on the segment classification may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of an information query method based on segment classification according to an embodiment of the present invention is shown. In this embodiment, the information query method based on the segmentation and classification includes the following steps S1 to S4:
s1, acquiring a plurality of scene words in a target application scene, searching scene keywords in the scene words, and carrying out relationship analysis on the scene words to obtain word relationships.
In the embodiment of the present invention, the target application scenario may refer to a service scenario in a different domain, for example, a service scenario in an insurance domain or a service scenario in a financial domain. The scene vocabulary refers to professional vocabulary or different types of operation vocabulary which appear in specific operation of the service scene.
For example, with an insurance scenario as a target application scenario, there are two important words in the insurance scenario, one is an insurance product, one is a disease, and what disease can apply what product is limited. Specialized words in insurance scenarios, such as insurance applications, claims, reimbursements, etc., also exist.
Specifically, referring to fig. 2, the searching for the scene keywords in the plurality of scene vocabularies includes:
S11, extracting a plurality of scene words in preset historical scene data, and summarizing the scene words into a scene training set;
s12, training a preset convolutional network model by using the scene training set to obtain a keyword extraction model;
and S13, extracting keywords from the scene vocabulary according to the keyword extraction model to obtain scene keywords.
In detail, the preset convolution network model includes a plurality of different network structures.
Further, the performing relationship analysis on the plurality of scene vocabularies to obtain vocabulary relationships includes:
identifying the vocabulary types corresponding to the scene vocabularies, and constructing hierarchical relations or synonymous relations among the scene vocabularies corresponding to the same vocabulary types;
constructing corresponding relations for scene vocabularies corresponding to different vocabulary types according to preset corresponding rules;
and summarizing the hierarchical relationship, the synonymous relationship and the corresponding relationship into a vocabulary relationship.
In detail, the vocabulary types may be product types or symptom types, and under the insurance scene, different products have different versions, or different levels, for example, the same insurance is divided into different versions of adults, children, people and the like, and different diseases may also have a hierarchical relationship or a synonymous relationship, so that the hierarchical relationship or the synonymous relationship between scene vocabularies corresponding to the same vocabulary types can be constructed. And because the corresponding relation exists between different diseases and different products, the corresponding relation is constructed for the scene vocabulary corresponding to different vocabulary types according to the preset corresponding rule.
S2, constructing and generating a word stock to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by using the word stock to be referred to obtain a standard search engine.
In the embodiment of the present invention, the creating and generating the word library to be referred based on the plurality of scene keywords and the vocabulary relation includes:
performing region division on the pre-acquired word stock template to obtain a keyword region and a relation region;
and storing a plurality of scene keywords into the keyword area, and storing the vocabulary relation into the relation area to obtain a word stock to be referred.
In detail, the word stock to be referred to is a perfect word stock suitable for a specific application scenario.
Further, the expanding the preset information search engine by using the word stock to be referred to obtain a standard search engine includes:
carrying out information identification on the word stock to be referred by using a preset information search engine to obtain words to be added;
and adding the word to be added into an extended word stock of a word segmentation device in the information search engine to obtain a standard search engine.
In detail, the word library to be referred includes words of different categories, and there may be hierarchical, synonymous, mutually exclusive, etc. relationships between words in the same category. And carrying out information identification on the word stock to be referred by using a preset information search engine to obtain words to be added, wherein the words to be added are words which can be identified by the information search engine and are added into an extended word stock of a word segmentation device in the information search engine, and the words in all maintained word stocks are not added into the extended word stock of the word segmentation device of the information search engine.
Wherein the question-answer search engine is a general tool for which ES (distributed search engine) has now become a search scenario, and search results may be ranked based on relevance of a scoring algorithm and text matching.
And S3, searching in a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula.
In the embodiment of the invention, the standard search engine is utilized to search and obtain one or more answer texts corresponding to the user query text in a preset answer content library, and the preset answer content library contains a plurality of answers to the conventional questions, so that a plurality of different answers exist, and one or more answer texts corresponding to the user query text are searched and obtained.
Specifically, the calculating the relevance score between the answer text and the user query text according to a preset relevance scoring formula includes:
the preset relevance scoring formula is as follows:
wherein score (D, Q) is the relevance score, Q is the user query text, D is the answer text, Q i For the ith keyword in the answer text, IDF (q i ) Query the user for the inverse text frequency, k, of the keywords in the text 1 And b is a preset adjustment parameter, avgdl is a preset document average value, D is a corresponding module of the answer text, f (q) i (ii) represents the ith keyword q i The frequency of occurrence in answer text D.
And S4, performing primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by using the word stock to be referred, and performing secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
In the embodiment of the present invention, the first filtering of the answer text sets according to the relevance scores to obtain an initial answer text set includes:
ranking the answer texts in the answer text sets according to the sequence from the high relevance score to the low relevance score to obtain a text ranking list;
and selecting a plurality of answer texts which are ranked in the text ranking list and are in the preset number in front as an initial answer text set.
In detail, a plurality of answer text sets are initially screened to screen out a batch of answer texts meeting requirements.
Specifically, the constructing a grading rule by using the word stock to be referred includes:
analyzing the vocabulary in the word bank to be referred, taking the scene keywords in the analyzed vocabulary as primary vocabulary, and setting the matching rule with the primary vocabulary successfully;
carrying out vocabulary statistics on the vocabulary conforming to the initial rule to obtain the number of the vocabulary, and constructing an initial grading rule according to the interval where the number of the vocabulary is located;
and summarizing the matching rule and the initial grading rule to obtain the grading rule.
In detail, an insurance scenario is exemplified. And grading the recall result according to the conditions of various vocabularies in the query sentences of the user and the matching conditions of the special vocabularies. Such as the most important product words and disease words, are divided into primary words, and if there is a primary word in the user query sentence, at least one needs to be matched. Different levels of recall results can also be determined according to the number of primary words in the matched user query statement. And at the same time, the secondary vocabulary can be considered as the secondary vocabulary for other professional vocabularies in the field. The recall result can be ranked again by combining the matching conditions of the primary vocabulary and the secondary vocabulary.
Further, the re-screening the initial answer text set according to the grading rule to obtain a standard answer text set, including:
extracting an initial answer text with consistent relevance scores in the initial answer text set as a target text set;
and grading the target texts in the target text set based on the grading rule to obtain a standard answer text set.
In detail, the ranking is performed according to various vocabularies in the word stock and the relations among the various vocabularies. When the matching results of the special words cannot be well ranked, the text set of the same level can be segmented by combining the relevance scores under the conditions that the number of the special words in the text of the user query is very small compared with the number of recall results in the same level.
In the embodiment of the invention, a word stock to be referred is constructed and generated through a plurality of scene keywords and vocabulary relations, a preset information search engine is expanded by utilizing the word stock to be referred to obtain a standard search engine, the accuracy of searching can be increased by expanding the information search engine, one or more answer texts corresponding to a user query text are obtained by searching in a preset answer content library by utilizing the standard search engine, a plurality of answer text sets are subjected to primary screening according to relevance scores, and the initial answer text sets are subjected to secondary screening according to the grading rule, so that the standard answer text sets are obtained. The primary screening and the secondary screening can play a role in double screening, and accuracy of information inquiry is improved. Therefore, the information query method based on the fixed-section grading can solve the problem of low accuracy of improving information query.
Fig. 3 is a functional block diagram of an information query apparatus based on segment classification according to an embodiment of the present invention.
The information query device 100 based on the segmentation and classification can be installed in electronic equipment. Depending on the implementation, the information query apparatus 100 based on the grading of grading may include a relationship analysis module 101, an engine expansion module 102, a score calculation module 103, and a dual screening module 104. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the relationship analysis module 101 is configured to obtain a plurality of scene words in a target application scene, search scene keywords in the plurality of scene words, and perform relationship analysis on the plurality of scene words to obtain vocabulary relationships;
the engine expansion module 102 is configured to construct and generate a word stock to be referred based on a plurality of scene keywords and the vocabulary relation, and expand a preset information search engine by using the word stock to be referred to obtain a standard search engine;
The score calculating module 103 is configured to search a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculate a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
the dual filtering module 104 is configured to perform primary filtering on the answer text sets according to the relevance scores to obtain an initial answer text set, construct a grading rule by using the word stock to be referred, and perform secondary filtering on the initial answer text set according to the grading rule to obtain a standard answer text set.
In detail, the specific implementation modes of the modules of the information query device 100 based on the segmentation and classification are as follows:
step one, acquiring a plurality of scene words in a target application scene, searching scene keywords in the scene words, and carrying out relationship analysis on the scene words to obtain word relationships.
In the embodiment of the present invention, the target application scenario may refer to a service scenario in a different domain, for example, a service scenario in an insurance domain or a service scenario in a financial domain. The scene vocabulary refers to professional vocabulary or different types of operation vocabulary which appear in specific operation of the service scene.
For example, with an insurance scenario as a target application scenario, there are two important words in the insurance scenario, one is an insurance product, one is a disease, and what disease can apply what product is limited. Specialized words in insurance scenarios, such as insurance applications, claims, reimbursements, etc., also exist.
Specifically, the searching for the scene keywords in the plurality of scene vocabularies includes:
extracting a plurality of scene words in preset historical scene data, and summarizing the scene words into a scene training set;
training a preset convolutional network model by using the scene training set to obtain a keyword extraction model;
and extracting keywords from the scene vocabulary according to the keyword extraction model to obtain scene keywords.
In detail, the preset convolution network model includes a plurality of different network structures.
Further, the performing relationship analysis on the plurality of scene vocabularies to obtain vocabulary relationships includes:
identifying the vocabulary types corresponding to the scene vocabularies, and constructing hierarchical relations or synonymous relations among the scene vocabularies corresponding to the same vocabulary types;
constructing corresponding relations for scene vocabularies corresponding to different vocabulary types according to preset corresponding rules;
And summarizing the hierarchical relationship, the synonymous relationship and the corresponding relationship into a vocabulary relationship.
In detail, the vocabulary types may be product types or symptom types, and under the insurance scene, different products have different versions, or different levels, for example, the same insurance is divided into different versions of adults, children, people and the like, and different diseases may also have a hierarchical relationship or a synonymous relationship, so that the hierarchical relationship or the synonymous relationship between scene vocabularies corresponding to the same vocabulary types can be constructed. And because the corresponding relation exists between different diseases and different products, the corresponding relation is constructed for the scene vocabulary corresponding to different vocabulary types according to the preset corresponding rule.
And secondly, constructing and generating a word library to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by using the word library to be referred to obtain a standard search engine.
In the embodiment of the present invention, the creating and generating the word library to be referred based on the plurality of scene keywords and the vocabulary relation includes:
performing region division on the pre-acquired word stock template to obtain a keyword region and a relation region;
And storing a plurality of scene keywords into the keyword area, and storing the vocabulary relation into the relation area to obtain a word stock to be referred.
In detail, the word stock to be referred to is a perfect word stock suitable for a specific application scenario.
Further, the expanding the preset information search engine by using the word stock to be referred to obtain a standard search engine includes:
carrying out information identification on the word stock to be referred by using a preset information search engine to obtain words to be added;
and adding the word to be added into an extended word stock of a word segmentation device in the information search engine to obtain a standard search engine.
In detail, the word library to be referred includes words of different categories, and there may be hierarchical, synonymous, mutually exclusive, etc. relationships between words in the same category. And carrying out information identification on the word stock to be referred by using a preset information search engine to obtain words to be added, wherein the words to be added are words which can be identified by the information search engine and are added into an extended word stock of a word segmentation device in the information search engine, and the words in all maintained word stocks are not added into the extended word stock of the word segmentation device of the information search engine.
Wherein the question-answer search engine is a general tool for which ES (distributed search engine) has now become a search scenario, and search results may be ranked based on relevance of a scoring algorithm and text matching.
Searching in a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula.
In the embodiment of the invention, the standard search engine is utilized to search and obtain one or more answer texts corresponding to the user query text in a preset answer content library, and the preset answer content library contains a plurality of answers to the conventional questions, so that a plurality of different answers exist, and one or more answer texts corresponding to the user query text are searched and obtained.
Specifically, the calculating the relevance score between the answer text and the user query text according to a preset relevance scoring formula includes:
the preset relevance scoring formula is as follows:
wherein score (D, Q) is the relevance score, Q is the user query text, D is the answer text, Q i For the ith keyword in the answer text, IDF (q i ) Query the user for the inverse text frequency, k, of the keywords in the text 1 And b is a preset adjustment parameter, avgdl is a preset document average value, D is a corresponding module of the answer text, f (q) i (ii) represents the ith keyword q i The frequency of occurrence in answer text D.
And fourthly, performing primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by using the word stock to be referred, and performing secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
In the embodiment of the present invention, the first filtering of the answer text sets according to the relevance scores to obtain an initial answer text set includes:
ranking the answer texts in the answer text sets according to the sequence from the high relevance score to the low relevance score to obtain a text ranking list;
and selecting a plurality of answer texts which are ranked in the text ranking list and are in the preset number in front as an initial answer text set.
In detail, a plurality of answer text sets are initially screened to screen out a batch of answer texts meeting requirements.
Specifically, the constructing a grading rule by using the word stock to be referred includes:
analyzing the vocabulary in the word bank to be referred, taking the scene keywords in the analyzed vocabulary as primary vocabulary, and setting the matching rule with the primary vocabulary successfully;
carrying out vocabulary statistics on the vocabulary conforming to the initial rule to obtain the number of the vocabulary, and constructing an initial grading rule according to the interval where the number of the vocabulary is located;
and summarizing the matching rule and the initial grading rule to obtain the grading rule.
In detail, an insurance scenario is exemplified. And grading the recall result according to the conditions of various vocabularies in the query sentences of the user and the matching conditions of the special vocabularies. Such as the most important product words and disease words, are divided into primary words, and if there is a primary word in the user query sentence, at least one needs to be matched. Different levels of recall results can also be determined according to the number of primary words in the matched user query statement. And at the same time, the secondary vocabulary can be considered as the secondary vocabulary for other professional vocabularies in the field. The recall result can be ranked again by combining the matching conditions of the primary vocabulary and the secondary vocabulary.
Further, the re-screening the initial answer text set according to the grading rule to obtain a standard answer text set, including:
extracting an initial answer text with consistent relevance scores in the initial answer text set as a target text set;
and grading the target texts in the target text set based on the grading rule to obtain a standard answer text set.
In detail, the ranking is performed according to various vocabularies in the word stock and the relations among the various vocabularies. When the matching results of the special words cannot be well ranked, the text set of the same level can be segmented by combining the relevance scores under the conditions that the number of the special words in the text of the user query is very small compared with the number of recall results in the same level.
In the embodiment of the invention, a word stock to be referred is constructed and generated through a plurality of scene keywords and vocabulary relations, a preset information search engine is expanded by utilizing the word stock to be referred to obtain a standard search engine, the accuracy of searching can be increased by expanding the information search engine, one or more answer texts corresponding to a user query text are obtained by searching in a preset answer content library by utilizing the standard search engine, a plurality of answer text sets are subjected to primary screening according to relevance scores, and the initial answer text sets are subjected to secondary screening according to the grading rule, so that the standard answer text sets are obtained. The primary screening and the secondary screening can play a role in double screening, and accuracy of information inquiry is improved. Therefore, the information query device based on the fixed-section grading can solve the problem of low accuracy of improving information query.
Fig. 4 is a schematic structural diagram of an electronic device for implementing a method for querying information based on segment classification according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a query program based on a piecewise hierarchical basis.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing Unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory 11 (for example, executing a program for inquiring information based on a grading of segments, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various types of data, such as code of a query program based on a segmentation hierarchy, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 4 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The information query program based on the piecewise grading stored in the memory 11 in the electronic device 1 is a combination of instructions, which when run in the processor 10, can implement:
acquiring a plurality of scene words in a target application scene, searching scene keywords in the plurality of scene words, and carrying out relationship analysis on the plurality of scene words to obtain word relationships;
Constructing and generating a word library to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by utilizing the word library to be referred to obtain a standard search engine;
searching in a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
and performing primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by using the word stock to be referred, and performing secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a storage medium if implemented in the form of software functional units and sold or used as separate products. The storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
acquiring a plurality of scene words in a target application scene, searching scene keywords in the plurality of scene words, and carrying out relationship analysis on the plurality of scene words to obtain word relationships;
constructing and generating a word library to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by utilizing the word library to be referred to obtain a standard search engine;
searching in a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
and performing primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by using the word stock to be referred, and performing secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. An information query method based on segment grading, which is characterized by comprising the following steps:
acquiring a plurality of scene words in a target application scene, searching scene keywords in the plurality of scene words, and carrying out relationship analysis on the plurality of scene words to obtain word relationships;
constructing and generating a word library to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by utilizing the word library to be referred to obtain a standard search engine;
Searching in a preset answer content library by using the standard search engine to obtain one or more answer texts corresponding to the user query text, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
and performing primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by using the word stock to be referred, and performing secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
2. The method for querying information based on segment classification according to claim 1, wherein said searching out scene keywords in a plurality of scene vocabularies comprises:
extracting a plurality of scene words in preset historical scene data, and summarizing the scene words into a scene training set;
training a preset convolutional network model by using the scene training set to obtain a keyword extraction model;
and extracting keywords from the scene vocabulary according to the keyword extraction model to obtain scene keywords.
3. The method for querying information based on segment classification according to claim 1, wherein the performing a relationship analysis on the plurality of scene vocabularies to obtain vocabulary relationships comprises:
Identifying the vocabulary types corresponding to the scene vocabularies, and constructing hierarchical relations or synonymous relations among the scene vocabularies corresponding to the same vocabulary types;
constructing corresponding relations for scene vocabularies corresponding to different vocabulary types according to preset corresponding rules;
and summarizing the hierarchical relationship, the synonymous relationship and the corresponding relationship into a vocabulary relationship.
4. The method for querying information based on segment classification according to claim 1, wherein said constructing a classification rule using the word stock to be referred to comprises:
analyzing the vocabulary in the word bank to be referred, taking the scene keywords in the analyzed vocabulary as primary vocabulary, and setting the matching rule with the primary vocabulary successfully;
carrying out vocabulary statistics on the vocabulary conforming to the initial rule to obtain the number of the vocabulary, and constructing an initial grading rule according to the interval where the number of the vocabulary is located;
and summarizing the matching rule and the initial grading rule to obtain the grading rule.
5. The method for querying information based on the grading according to claim 1, wherein the rescreening the initial answer text set according to the grading rule to obtain a standard answer text set comprises:
Extracting an initial answer text with consistent relevance scores in the initial answer text set as a target text set;
and grading the target texts in the target text set based on the grading rule to obtain a standard answer text set.
6. The method for querying information based on segment classification as claimed in claim 1, wherein calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula comprises:
the preset relevance scoring formula is as follows:
wherein score (D, Q) is the relevance score, Q is the user query text, D is the answer text, Q i For the ith keyword in the answer text, IDF (q i ) Query the user for the inverse text frequency, k, of the keywords in the text 1 And b is a preset adjustment parameter, avgdl is a preset document average value, D is a corresponding module of the answer text, f (q) i (ii) represents the ith keyword q i The frequency of occurrence in answer text D.
7. The method for querying information based on segment classification according to claim 1, wherein the expanding the preset information search engine by using the word stock to be referred to obtain a standard search engine comprises:
Carrying out information identification on the word stock to be referred by using a preset information search engine to obtain words to be added;
and adding the word to be added into an extended word stock of a word segmentation device in the information search engine to obtain a standard search engine.
8. An information query apparatus based on segment grading, the apparatus comprising:
the relation analysis module is used for acquiring a plurality of scene words in a target application scene, searching scene keywords in the scene words, and carrying out relation analysis on the scene words to obtain word relations;
the engine expansion module is used for constructing and generating a word stock to be referred based on a plurality of scene keywords and the vocabulary relation, and expanding a preset information search engine by utilizing the word stock to be referred to obtain a standard search engine;
the score calculating module is used for searching one or more answer texts corresponding to the user query text in a preset answer content library by utilizing the standard search engine, and calculating a relevance score between the answer text and the user query text according to a preset relevance scoring formula;
and the dual screening module is used for carrying out primary screening on a plurality of answer text sets according to the relevance scores to obtain an initial answer text set, constructing a grading rule by utilizing the word stock to be referred, and carrying out secondary screening on the initial answer text set according to the grading rule to obtain a standard answer text set.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the segment-based hierarchical information query method of any one of claims 1 to 7.
10. A storage medium storing a computer program, wherein the computer program when executed by a processor implements the information query method based on the piecewise grading according to any one of claims 1 to 7.
CN202310430929.7A 2023-04-11 2023-04-11 Information query method and device based on fixed-segment classification, electronic equipment and medium Pending CN116450916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310430929.7A CN116450916A (en) 2023-04-11 2023-04-11 Information query method and device based on fixed-segment classification, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310430929.7A CN116450916A (en) 2023-04-11 2023-04-11 Information query method and device based on fixed-segment classification, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116450916A true CN116450916A (en) 2023-07-18

Family

ID=87133398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310430929.7A Pending CN116450916A (en) 2023-04-11 2023-04-11 Information query method and device based on fixed-segment classification, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116450916A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271755A (en) * 2023-11-21 2023-12-22 青岛海尔乐信云科技有限公司 Custom closed-loop rule engine management control method based on artificial intelligence

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271755A (en) * 2023-11-21 2023-12-22 青岛海尔乐信云科技有限公司 Custom closed-loop rule engine management control method based on artificial intelligence
CN117271755B (en) * 2023-11-21 2024-03-08 青岛海尔乐信云科技有限公司 Custom closed-loop rule engine management control method based on artificial intelligence

Similar Documents

Publication Publication Date Title
US10896212B2 (en) System and methods for automating trademark and service mark searches
US11100124B2 (en) Systems and methods for similarity and context measures for trademark and service mark analysis and repository searches
US10565533B2 (en) Systems and methods for similarity and context measures for trademark and service mark analysis and repository searches
CN110929125B (en) Search recall method, device, equipment and storage medium thereof
CN113312461A (en) Intelligent question-answering method, device, equipment and medium based on natural language processing
CN111813905B (en) Corpus generation method, corpus generation device, computer equipment and storage medium
CN112508609B (en) Crowd expansion prediction method, device, equipment and storage medium
CN111797245B (en) Knowledge graph model-based information matching method and related device
CN111078837A (en) Intelligent question and answer information processing method, electronic equipment and computer readable storage medium
EP2529318A1 (en) Method and system for conducting legal research using clustering analytics
WO2022222942A1 (en) Method and apparatus for generating question and answer record, electronic device, and storage medium
CN116821373A (en) Map-based prompt recommendation method, device, equipment and medium
CN115374781A (en) Text data information mining method, device and equipment
CN116450916A (en) Information query method and device based on fixed-segment classification, electronic equipment and medium
CN113468421A (en) Product recommendation method, device, equipment and medium based on vector matching technology
CN116628162A (en) Semantic question-answering method, device, equipment and storage medium
CN112632264A (en) Intelligent question and answer method and device, electronic equipment and storage medium
CN116484829A (en) Method and apparatus for information processing
CN112529743B (en) Contract element extraction method, device, electronic equipment and medium
CN114676307A (en) Ranking model training method, device, equipment and medium based on user retrieval
CN113486169B (en) Synonymous statement generation method, device, equipment and storage medium based on BERT model
Liu et al. Dynamic updating of the knowledge base for a large-scale question answering system
CN115098534A (en) Data query method, device, equipment and medium based on index weight lifting
CN113590792A (en) User problem processing method and device and server
CN116303973A (en) Information searching method, device, electronic equipment and storage medium

Legal Events

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