CN117056495B - Automatic question-answering method and system for government affair consultation - Google Patents

Automatic question-answering method and system for government affair consultation Download PDF

Info

Publication number
CN117056495B
CN117056495B CN202311288051.4A CN202311288051A CN117056495B CN 117056495 B CN117056495 B CN 117056495B CN 202311288051 A CN202311288051 A CN 202311288051A CN 117056495 B CN117056495 B CN 117056495B
Authority
CN
China
Prior art keywords
region
directory
transaction
government
information
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.)
Active
Application number
CN202311288051.4A
Other languages
Chinese (zh)
Other versions
CN117056495A (en
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.)
Geospace Information Technology Co ltd
Original Assignee
Geospace Information Technology 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 Geospace Information Technology Co ltd filed Critical Geospace Information Technology Co ltd
Priority to CN202311288051.4A priority Critical patent/CN117056495B/en
Publication of CN117056495A publication Critical patent/CN117056495A/en
Application granted granted Critical
Publication of CN117056495B publication Critical patent/CN117056495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/335Filtering based on additional data, e.g. user or group profiles
    • 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/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • 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 Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Tourism & Hospitality (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a method and a system for automatically asking and answering government affair consultation, wherein the method comprises the following steps: constructing a government service authority directory vector set C and a government service knowledge graph G; inputting a case description s, and extracting address information l and case description key information k; obtaining the right directory q with highest similarity with k from C; s4, obtaining area information according to the I, and obtaining a department d and a transaction item t from the G by using the area information and q, and obtaining a transaction guide information set I according to the t; splicing the I and the s into an instruction prompt according to a preset template; inputting the prompt into a large language model of the generation type pre-training to obtain an answer; the system corresponds to the method; the invention is more fit with the actual effect and can better answer the government questions.

Description

Automatic question-answering method and system for government affair consultation
Technical Field
The invention relates to the field of government affair consultation systems, in particular to an automatic questioning and answering method and system for government affair consultation.
Background
Government consultation refers to the provision of a case description by citizens, followed by consultation comments by government workers with reference to the office guidelines. The authority catalog of the government service refers to the authority catalog of each government service department and the names of matters of the authorities of the authority catalog, such as ' basic medical insurance participants refer to medical records (direct settlement of medical records in different places) ' basic medical insurance participant registration and change registration ', ' medical rescue object treatment approval payment ', and the like. The authority list only lists the names of the matters, and does not specify specific implementation rules, for example, the A-city B area medical care bureau, the A-city D area medical care bureau and the like can all have the same authority list. The transaction is a specific transaction criterion of a certain authority list under a certain government department, and the transaction flow and the acceptance window of the transaction of the same authority list among different government departments may be different and have territory.
The existing government affair consultation service is mainly manual, and has strong professional government affair knowledge and policy regional difference, so that the current government affair consultation service generally needs to be transferred for many times until relevant specialists can be effectively processed, the office work efficiency is greatly reduced, and the phenomenon that the seat is busy and is difficult to be connected often occurs. Some places market have come out of online robot question-answering service to relieve the seat pressure, but these robots are generally less flexible and difficult to deal with complex question-answering situations.
The prior knowledge question-answering technical schemes can be roughly divided into three types:
knowledge-graph-based question-answering method, knowledge-base-based question-answering method, and generative pre-training large language model-based question-answering method.
The question-answer method based on the knowledge graph has relatively longer development process and higher technical maturity, and forms a method based on a traditional template, a method based on semantic analysis, a method based on information extraction and a subdivision method based on a semantic model. Although the question-answering method based on the knowledge graph can make good feedback on questions with stronger directivity along with the development of technology and has advantages in multi-hop reasoning, the question-answering method is difficult to deal with questions which need to combine multiple pieces of knowledge to make comprehensive answers.
Firstly, a question-answer database is constructed, then the semantic similarity of the input question sentence and the question in the database is compared, and the answer corresponding to the question with higher similarity is output. The method requires that the input question has stronger standardability, otherwise, the accuracy of matching answers is lower. And the method is also difficult to deal with questions which need to be combined with multiple knowledge to make comprehensive answers.
The question answering method based on the generative pre-training large language model is to directly input the questions into the generative pre-training Large Language Model (LLM) and output the reasoning results of the model. The large language model is easy to obtain the invalid wrong answer, and in the field with stronger professionals, the accuracy is lower by directly using the large language model.
For the technical shortboards described above, methods have emerged that combine large language models with knowledge base questions or knowledge maps.
The method comprises the steps of firstly obtaining candidate subgraphs or triples from a knowledge graph according to question sentences and converting the candidate subgraphs or triples into candidate answer texts, or obtaining the candidate answer texts from a knowledge base,
these candidate texts are then input into a generative pre-trained large language model, which ultimately yields the answers.
The method supplements the fact knowledge with stronger specialty for the large language model through the additional knowledge graph or knowledge base, thereby improving the accuracy of the question and answer of the large language model.
Because the government affair consultation cases are different in description expression modes and formats, are irregular in terms, have strong territory of each policy, and are difficult to obtain reliable candidate answer texts directly from a knowledge graph or a knowledge base, the accuracy of question and answer cannot be guaranteed.
Disclosure of Invention
Aiming at the technical problem that a government affair consultation case system answers inaccurately in the prior art, the invention provides an automatic question answering method and system for government affair consultation, and the method comprises the following steps:
s1, constructing a government service authority directory vector set C and a government service knowledge graph G;
s2, inputting a case description S, and extracting address information l and case description key information k;
s3, obtaining the right directory q with highest similarity with the case description key information k from the right directory vector set C of the administrative service;
s4, obtaining regional information region according to the address information l, obtaining a department d and a transaction item t from the administrative service knowledge graph G by using the regional information region and the authority directory q, and obtaining a transaction guide information set I according to the department d and the transaction item t;
s5, splicing the office guide information set I and the case description S into an instruction prompt according to a preset template; the answers are obtained by inputting the prompt into a large language model LLM of the generative pre-training, and the answers are output.
Further, the step S1 is specifically as follows:
s11, acquiring a government service data set D;
s12, performing text embedding on the authority directory entity in the government service data set to obtain an authority directory vector, and constructing a government service authority directory vector set C according to the authority directory vector;
s13, constructing a government service knowledge graph G by using the government service data set D.
Further, step S2 extracts the address information l and the case description key information k of the case description S through the pre-trained large language model LLM.
Further, the step S3 is specifically as follows:
s31, obtaining the characteristic vector V of the case description key information k k
S32, searching and characteristic vector V in government service authority directory vector set C k The nearest vector to the euclidean distance and its corresponding directory q.
Further, the step S4 is specifically as follows:
s41, obtaining a region name region and a region level according to the address information l;
s42, searching in the government service diagram knowledge graph G according to the regional name region and the authority directory q to obtain a department d;
s43, retrieving and obtaining a transaction item t according to the department d and the authority directory q in the government service diagram knowledge graph G;
s44, the search and transaction t has a transaction relationship R to which the transaction belongs <Task,Transact> Is provided.
An automatic questioning and answering system for government affairs consultation, comprising:
vector set and knowledge graph construction module: constructing a government service authority directory vector set C and a government service knowledge graph G;
and a retrieval module: inputting a case description s, and extracting address information l and case description key information k;
the rights directory acquisition module: acquiring a right directory q with highest similarity with the case description key information k from a government service right directory vector set C;
the office manual information acquisition module: obtaining a regional information region according to the address information l, obtaining a department d and a transaction item t from a administrative service knowledge graph G by using the regional information region and the authority directory q, and obtaining a transaction guide information set I according to the department d and the transaction item t;
and a result output module: splicing the office guide information set I and the case description s into an instruction promt according to a preset template; the answers are obtained by inputting the prompt into a large language model LLM of the generative pre-training, and the answers are output.
Further, the vector set and knowledge graph construction module includes: the system comprises a government service data acquisition unit, a vector set construction unit and a knowledge graph construction unit;
government service data acquisition unit: acquiring a government service data set D;
vector set construction unit: performing text embedding on the authority directory entity in the government service data set to obtain an authority directory vector, and constructing a government service authority directory vector set C according to the authority directory vector;
knowledge graph construction unit: and constructing a government service knowledge graph G by using the government service data set D.
Further, the retrieval module extracts address information l and case description key information k of the case description s through a pre-trained large language model LLM.
Further, the rights directory acquisition module includes: a feature vector acquisition unit and a rights directory acquisition unit;
feature vector acquisition unit: acquiring characteristic vector V of case description key information k k
A rights directory acquisition unit: retrieving feature vector V in government service rights directory vector set C k The nearest vector to the euclidean distance and its corresponding directory q.
The office guide information acquisition module includes: a region information acquisition unit, a department acquisition unit, a transaction item acquisition unit, and a transaction guidance information acquisition unit;
area information acquisition unit: obtaining a region name region and a region level according to the address information l;
department acquisition unit: searching in the government service diagram knowledge graph G according to the regional name region and the authority directory q to obtain a department d;
a transaction item acquisition unit: retrieving and obtaining a transaction item t according to a department d and a rights directory q in a government service diagram knowledge graph G;
a transaction guidance information acquisition unit: the search and transaction t has a transaction guide information set I of a transaction relationship R < Task, transaction > to which the transaction belongs.
The beneficial effects of the invention are as follows:
(1) The invention constructs a special government service knowledge graph which comprises entities such as areas, departments, rights directories, offices and the like and relations thereof, so that the questions and answers are more suitable for the government consultation field. The complex relationship among the entities can be better expressed by adopting a mode of storing data in the graph database, so that the query and the update are convenient;
(2) The invention fully utilizes the address information in the case description, considers the regional difference of policies, reduces errors caused by regional difference, and can enhance the correctness of answering the cross-regional questions.
(3) Firstly extracting the region information and the key information, and then carrying out subsequent operation instead of directly searching from a knowledge base, thereby improving the matching accuracy of the nonstandard question;
(4) And integrating the knowledge graph query result into a user-friendly answer, and improving the accuracy of the large language model in professional questions and answers.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention;
FIG. 2 is a government service entity relationship diagram;
FIG. 3 is a schematic diagram of a government service knowledge graph structure;
FIG. 4 is a schematic diagram of relationships between regional entities;
FIG. 5 is a schematic diagram of a search path for departments and offices;
fig. 6 is a schematic diagram of a government service knowledge graph portion data display.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be further described with reference to the accompanying drawings.
Referring to fig. 1, the invention provides an automatic questioning and answering method for government affair consultation, which comprises the following steps:
s1, constructing a government service authority directory vector set C and a government service knowledge graph G;
the step S1 is specifically as follows:
s11, acquiring a government service data set D;
note that, the government service data includes: an entity such as "area", "department", "rights directory", "transaction", "business", etc.
Wherein the "region" entity contains attributes such as "region code", "region name", "region hierarchy", etc.
The entity of "department" includes attributes such as "department name", "department code", etc.;
the "rights directory" entity contains the attributes of "rights directory name", "rights directory number", "rights directory unique identification", etc.;
the "transaction" entity includes attributes such as "transaction name", "transaction number", "transaction unique identifier", etc.;
the "transacting item" entity includes attributes such as "transacting item unique identifier", "transacting item name", "transacting flow", "acceptance condition", "transacting window", and the like.
And relationship attributes such as "department area", "rights directory department", "business rights directory", "business item" and the like.
Referring to fig. 2, fig. 2 is a relationship diagram of government service entities.
Wherein the relationship of the region and the region to which the department belongs is one-to-many relationship. The "department to which the rights directory belongs" between the department and the rights directory is a many-to-many relationship. The "department to which a transaction belongs" between a department and a transaction is a one-to-many relationship. The "office affiliated rights directory" between the rights directory and the offices is a one-to-many relationship. The "business" between business and business is one-to-many relationship.
S12, performing text embedding on the authority directory entity in the government service data set to obtain an authority directory vector, and constructing a government service authority directory vector set C according to the authority directory vector;
as an example, text embedding is accomplished using the BERT model in embodiments of the invention, and other text embedding models may be used.
The invention uses a milvus v2.2.8 vector database to store and retrieve the vector set C of the government service rights directory, and other vector databases can also be used to achieve the same effect.
The other needs to be noted that the names of the rights directories have uniqueness, and the names of the offices of the same rights directory between different government departments are basically the same, that is, the repeatability of the names of the offices is higher. Therefore, the vector knowledge base is constructed by using the rights directory names, which is helpful for improving the retrieval efficiency.
S13, constructing a government service knowledge graph G by using the government service data set D.
As an embodiment, the present invention constructs a government service graph knowledge graph G using the government service data set D, please refer to fig. 3, and fig. 3 is a diagram of a government service graph knowledge graph result.
G={Reg,Dept,Cat,Task,Transact,R <Reg,Dept> ,R <Dept,Task> ,R <Dept,Cat> ,R <Cat,Task> ,R <Task,Transact> };
Wherein Reg represents a regional entity, dept represents a department entity, cat represents an rights directory entity, task represents a transaction entity, transaction represents a transaction entity, R <Reg,Dept> Representing the relationship of the areas of departments, R <Dept,Task> Representing the department of transaction, R <Dept,Cat> Representing the relationship of departments to which the rights directory belongs, R <Cat,Task> Representing the relationship of the rights directory to which the transaction belongs, R <Task,Transact> Representing the relationship of the business to which the business belongs.
In addition, a schematic diagram of the relationship between the regional entities is shown in fig. 4. FIG. 4 is a schematic diagram of relationships between regional entities; the regional entities include provinces, cities, regions, streets, communities and other geographic level entities, and the corresponding regional level entities are provinces respectively: 2, city: 3, zone: 4, street: 5, community: 6.
s2, inputting a case description S, and extracting address information l and case description key information k;
it should be noted that, in step S2, the address information l and the case description key information k of the case description S are extracted specifically through the pretrained large language model LLM.
As one or more embodiments, the generated pre-trained large language model includes ChatGPT, chatGLM, discourse, and the like, and is not intended to be limiting in this disclosure. But the context refers to the context that the generative pre-trained large language model should remain consistent.
As an example, case description s: the social security relationship of the old people of my home (name: zhang San, identity information: 123456789X) is in district B of city A, currently settles in city F, ask if its medical insurance can be reimbursed in city F in a different place?
Inputting a prompt of a generated pre-trained large language model: please extract address information and counseling content in the following text. Text: the social security relationship of the old people of my home (name: zhang San, identity information: 123456789X) is in district B of city A, currently settles in city F, ask if its medical insurance can be reimbursed in city F in a different place?
Outputting a result: the address information in the text is: region B of market a.
The consultation content in the text is: medical insurance reimburses from different places.
Address information l= "a city B region" is then extracted using a regular expression. Case description key information k= "medical insurance forensic reimbursement;
it should be noted that the sample herein only provides one reference pattern, and may be other forms. Multiple rounds of campt may also be designed to cope with more complex case descriptions.
For example:
first round:
prompt: please answer the question according to the following text. Problem 1: please overview text of the content to be consulted.
Problem 2: please extract the address in the text.
Text: basic case of appeal: my forefront (Lifour) is a resident of the building 2, G street 98-5 in the D area, has a constant right eye disambiguation, now wants to apply for disability, how apply for where, what information is needed?
And (3) outputting: problem 1: the counseling presented herein is about how to apply for disabilities and what materials need to be provided.
Problem 2: the address mentioned herein is "zone D G street 98-5 building 3, chamber 2.
A second wheel:
prompt: please extract keywords: how does it apply for disability and what information needs to be provided?
And (3) outputting: keyword: applying for disabilities and required data;
address information l= "D-zone G street 98-5 No. 3 building 2 room" is then extracted using the regular expression. Case description key information k= "apply for disability, required material".
S3, obtaining the right directory q with highest similarity with the case description key information k from the right directory vector set C of the administrative service;
the step S3 is specifically as follows:
s31, obtaining the characteristic vector V of the case description key information k k
Here, the feature vector V of the case description key information k is obtained using the same model as the text embedding model used when S13 constructs the government service authority directory vector set C k
S32, searching and characteristic vector V in government service authority directory vector set C k The nearest vector to the euclidean distance and its corresponding directory q.
As one example, the text embedding model used herein is BERT, which obtains 768-dimensional text case description key information feature vectors. Other text embedding models may be used to achieve similar effects, without being mandatory.
For the case description key information k= "medical insurance forepart medical reimbursement", the right catalog q with the highest similarity is obtained, the right catalog name is "basic medical insurance participant forepart medical reimbursement record (forepart medical reimbursement direct settlement)", and the unique identifier is "6155".
S4, obtaining regional information region according to the address information l, obtaining a department d and a transaction item t from the administrative service knowledge graph G by using the regional information region and the authority directory q, and obtaining a transaction guide information set I according to the department d and the transaction item t;
the step S4 is specifically as follows:
s41, obtaining a region name region and a region level according to the address information l;
specifically, step S41 is specifically as follows:
s411, performing word segmentation on the address information l to obtain a word segmentation set A, and marking the ith word in the A as A (i); setting a region name region=a preset initial region (0), and setting a region level=a level0 corresponding to the preset initial region (0);
s412, for A (i), obtaining the area name with highest text similarity in the area entity set in the government service data set D as A (i) region ,A(i) region The corresponding regional hierarchy is denoted as A (i) level A (i) and A (i) region Is noted as A (i) sim
S413, traversing the address set A, if A (i) sim Greater than a preset threshold and A (i) level Greater than level, then assign region=a (i) region ,level=A(i) level
S414, outputting the region name region and the region level.
As an embodiment, since the government service data set D used in the present invention is E-province government service data, when the present invention is implemented, region (0) =e-province E-province, and leve0=2. For l= "a city B region", region= "B region" is obtained through the step of S41, level=4; for l= "D area G street 98-No. 3 building 2 room", the step of S41 is performed to obtain region= "G street office", level=5; for l= "a city C region H primary", the region= "C region" is obtained through the step of S41, level=4.
S42, searching in the government service diagram knowledge graph G according to the regional name region and the authority directory q to obtain a department d; fig. 5 is a schematic diagram of a search path for departments and offices.
As one example, the invention uses Neo4J to store government service knowledge maps during its implementation. Fig. 6 is a diagram of a government service knowledge graph portion data display.
The Cypher statement of the search department d according to the zone name region and the rights directory q is schematically as follows:
match (r: reg) - - > (d: dept) - - > (c: cat) where c. rights directory unique identification= '6155' and r. Area name= "area B" return d output: "area B medical care office of city a".
S43, retrieving and obtaining a transaction item t according to the department d and the authority directory q in the government service diagram knowledge graph G;
as an example, the Cypher statement retrieving the get transaction t from department d and rights directory q is exemplified as follows:
match (c:Cat)-->(t:Task)<--(d:Dept) where c.CatlogId='6155' and d.department="380" return t;
output t= { "task_code": "11420115MB162278414422036021W00", "task_id": "122", "task_name": "basic medical insurance participant's foreplace medical record (foreplace medical direct settlement)" }.
S44, the search and transaction t has a transaction relationship R to which the transaction belongs <Task,Transact> Is provided.
It should be noted that, the office manual related information set I includes the following information: the transaction name, the transaction acceptance condition, the office hall name, the transaction time, the transaction place, the transaction window, the office telephone, and the like.
S5, splicing the office guide information set I and the case description S into an instruction prompt according to a preset template; the answers are obtained by inputting the prompt into a large language model LLM of the generative pre-training, and the answers are output.
As an example, the template for campt is as follows:
please play a government affair staff, give advice for the user according to the prompt message. Prompting: includes the following business, please select business according to business conditions.
[ handling conditions ]: [ office hall name ]: [ handling time ]: [ office ]: [ handling window ]: [ office telephone ]: problems.
Where { { { … … } } is placeholder, populated according to the office guideline-related information set I.
According to the template of the above-mentioned template, a specific example of the end is as follows:
please play a government affair staff, give advice for the user according to the prompt message.
Prompting: the basic medical insurance participant takes a medical record in different places (direct settlement of medical records in different places) and performs the following treatment, and the treatment is selected according to the treatment conditions.
1. Record by remotely placing retirees
[ handling conditions ]: 1. before medical treatment in different places; 2. participate in basic medical insurance; 3. a transfer certification material provided by a fixed point medical facility having transfer qualification; or after emergency treatment first-aid admission, the application is proved to be filed in an emergency treatment place in 2 working days to check in and record in a medical place.
2. Long-term resident record in different places
[ handling conditions ]: 1. before medical treatment in different places; 2. basic medical insurance participants living in different places (information verification is carried out by various places through network verification, information sharing and other ways).
3. Resident remote staff record
[ handling conditions ]: 1. before medical treatment in different places; 2. the unit normally participating in the insurance payment; 3. the unit is used for dispatching the work at different places (the work is centrally conducted from the unit to the participating medical security agency).
4. Other temporary personnel for medical treatment
[ handling conditions ]: 1. before medical treatment in different places; 2. the system has participated in basic medical insurance, and can normally enjoy basic medical insurance treatment, and paramedics with different medical requirements are located outside the overall region; 3. before the attendees seek medical attention in different places, medical insurance expense information which is not settled does not exist in other medical institutions; 4. for emergency treatment, abnormal consultation and other reasons, the medical application in different places should be applied for the filing, and the information such as the time of admission, diagnosis of admission and the like should be provided and filed according to the rules of the participating places.
5. Record by retirement personnel in different places
[ handling conditions ]: 1. before medical treatment in different places; 2. retired staff basic medical insurance participants; 3. in the following steps: the home is located in different places and the household is migrated into the location place (information verification is carried out by each place through network verification, information sharing and other ways).
The office information of the basic medical insurance participant on the medical records of the medical visits in different places (direct settlement of medical visits in different places) is as follows:
[ office hall name ]: a city B district government affairs service center (B citizen's home).
[ handling time ]: every monday to friday 8 am: 00-12: 00 pm 14:00-17:00. (except legal holidays).
[ office ]: city A, district B, street I, street J, street east 10, citizen B.
[ handling window ]: and a second floor A area A20 comprehensive window.
[ office telephone ]: 027-1234567.
Problems: the social security relationship of the old people of my home (name: zhang San, identity information: 123456789X) is in district B of city A, currently settles in city F, ask if its medical insurance can be reimbursed in city F in a different place?
The output results obtained are as follows:
"according to the information you provide, zhang Sanlao people currently live in city F, but his social security is in city a, region B. According to medical insurance policies, retirees can visit places in other places, but need to record and deal with the places to visit and settle accounts directly.
Therefore, the Zhang Santa Claus needs to transact medical insurance administrative organ in the B area of the A market to visit the medical insurance administrative organ in different places and to reimburse medical insurance administrative organ in the F market in different places. The specific handling flow is as follows:
1. zhang Santa Claus and its family should handle the medical insurance administrative organ in area B of A market to visit the place and record the medical records, and submit the related data, including transfer of the materials for transfer of hospital or emergency evidence, etc.
2. After the record is finished, the Zhang Santa Claus and families thereof can seek medical attention in different places in the medical institution of F market, and can enjoy medical insurance reimbursement treatment.
It is desirable that the above information can help the old and their families. If other problems exist, the question can be asked to me at any time. "
In addition, the sample mode is only used for reference, and other templates can be adopted to achieve the same purpose, so that the invention is not limited.
An automatic questioning and answering system for government affairs consultation, comprising:
vector set and knowledge graph construction module: constructing a government service authority directory vector set C and a government service knowledge graph G;
and a retrieval module: inputting a case description s, and extracting address information l and case description key information k;
the rights directory acquisition module: acquiring a right directory q with highest similarity with the case description key information k from a government service right directory vector set C;
the office manual information acquisition module: obtaining a regional information region according to the address information l, obtaining a department d and a transaction item t from a administrative service knowledge graph G by using the regional information region and the authority directory q, and obtaining a transaction guide information set I according to the department d and the transaction item t;
and a result output module: splicing the office guide information set I and the case description s into an instruction promt according to a preset template; the answers are obtained by inputting the prompt into a large language model LLM of the generative pre-training, and the answers are output.
The vector set and knowledge graph construction module comprises: the system comprises a government service data acquisition unit, a vector set construction unit and a knowledge graph construction unit;
government service data acquisition unit: acquiring a government service data set D;
vector set construction unit: performing text embedding on the authority directory entity in the government service data set to obtain an authority directory vector, and constructing a government service authority directory vector set C according to the authority directory vector;
knowledge graph construction unit: and constructing a government service knowledge graph G by using the government service data set D.
The retrieval module extracts address information l and case description key information k of the case description s through a pre-trained large language model LLM.
The rights directory acquisition module comprises: a feature vector acquisition unit and a rights directory acquisition unit;
feature vector acquisition unit: acquiring characteristic vector V of case description key information k k
A rights directory acquisition unit: retrieving feature vector V in government service rights directory vector set C k The nearest vector to the euclidean distance and its corresponding directory q.
The office guide information acquisition module includes: a region information acquisition unit, a department acquisition unit, a transaction item acquisition unit, and a transaction guidance information acquisition unit;
area information acquisition unit: obtaining a region name region and a region level according to the address information l;
the area information acquisition unit further includes:
word segmentation set acquisition unit: performing word segmentation processing on the address information to obtain a word segmentation set A, and marking the ith word in the A as A (i); setting a region name region=a preset initial region (0), and setting a region level=a level0 corresponding to the preset initial region (0);
semantic similarity calculation unit: for A (i), the area name with highest text similarity in the area entity set in the government service data set D is obtained and is recorded as A (i) region ,A(i) region The corresponding regional hierarchy is denoted as A (i) level A (i) and A (i) region Is noted as A (i) sim
Assignment unit: traversing address set A, if A (i) sim Greater than a preset threshold and A (i) level Greater than level, then assign region=a (i) region ,level=A(i) level
An output unit: outputting a region name region and a region level;
department acquisition unit: searching in the government service diagram knowledge graph G according to the regional name region and the authority directory q to obtain a department d;
a transaction item acquisition unit: retrieving and obtaining a transaction item t according to a department d and a rights directory q in a government service diagram knowledge graph G;
a transaction guidance information acquisition unit: the search and transaction t has a transaction guide information set I of a transaction relationship R < Task, transaction > to which the transaction belongs.
The key points of the invention are as follows:
(1) The government service knowledge graph structure and its construction process, and the retrieval steps using knowledge graphs in S42 and S43, which are referred to in step S13, as described above.
(2) The method of mining the region information in the case description in steps S2 and S41 is as described above.
(3) The steps S1 to S4 are as described above.
(4) Step S5 as described above.
The beneficial effects of the invention are as follows:
(1) The invention constructs a special government service knowledge graph which comprises entities such as areas, departments, rights directories, offices and the like and relations thereof, so that the questions and answers are more suitable for the government consultation field. And by adopting a mode of storing data in the graph database, complex relations among entities can be better expressed, and the query and the update are convenient.
(2) The method combines the regional information and the authority directory, retrieves and obtains the related information of departments and office guides from the government service diagram knowledge graph, fully utilizes the address information in the case description, considers the regional difference of the policy, reduces errors caused by the regional difference, and can enhance the correctness of answering the cross-regional questions.
(3) Compared with the prior knowledge question-answering technology, the method and the device have the advantages that the regional information and the key information are firstly extracted, then the subsequent operation is carried out, and the search is not directly carried out from the knowledge base, so that the matching accuracy of the non-standard question sentences can be improved.
(4) And a question-answer template aiming at a government affair consultation scene is designed, the knowledge graph query result is integrated into a user-friendly answer, and the accuracy of the large language model in professional question-answer is improved.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (7)

1. An automatic questioning and answering method for government affair consultation is characterized in that: the method comprises the following steps:
s1, constructing a government service authority directory vector set C and a government service knowledge graph G;
s2, inputting a case description S, and extracting address information l and case description key information k;
s3, obtaining the right directory q with highest similarity with the case description key information k from the right directory vector set C of the administrative service;
s4, obtaining regional information region according to the address information l, obtaining a department d and a transaction item t from the administrative service knowledge graph G by using the regional information region and the authority directory q, and obtaining a transaction guide information set I according to the department d and the transaction item t;
s5, splicing the office guide information set I and the case description S into an instruction prompt according to a preset template; inputting the prompt into a large language model LLM for generating pre-training to obtain an answer, and outputting the answer;
the preset template is a template of promt; the template for promt includes: handling conditions, hall names, places, windows, phones and questions;
the step S4 is specifically as follows:
s41, obtaining a region name region and a region level according to the address information l;
the step S41 is specifically as follows:
s411, performing word segmentation on the address information l to obtain a word segmentation set A, and marking the ith word in the A as A (i); setting a region name region=a preset initial region (0), and setting a region level=a level0 corresponding to the preset initial region (0);
s412, for A (i), obtain government serviceThe area name with highest text similarity in the 'area' entity set in the business data set D is marked as A (i) region ,A(i) region The corresponding regional hierarchy is denoted as A (i) level A (i) and A (i) region Is noted as A (i) sim
S413 traversing the address set A, if A (i) sim Greater than a preset threshold and A (i) level Greater than level, then assign region=a (i) region ,level=A(i) level
S414, outputting a region name region and a region level;
s42, searching in the government service diagram knowledge graph G according to the regional name region and the authority directory q to obtain a department d;
s43, retrieving and obtaining a transaction item t according to the department d and the authority directory q in the government service diagram knowledge graph G;
s44, the search and transaction t has a transaction relationship R to which the transaction belongs <Task,Transact> Is provided.
2. The automatic questioning and answering method for government affairs consultation as claimed in claim 1, wherein: the step S1 is specifically as follows:
s11, acquiring a government service data set D;
s12, performing text embedding on the authority directory entity in the government service data set to obtain an authority directory vector, and constructing a government service authority directory vector set C according to the authority directory vector;
s13, constructing a government service knowledge graph G by using the government service data set D;
the government service knowledge graph G= { Reg, dept, cat, task, transact, R <Reg,Dept> ,R <Dept,Task> ,R <Dept,Cat> ,R <Cat,Task> ,R <Task,Transact> };
Wherein Reg represents a regional entity, which includes province, city, district, street, community geographic hierarchy entities; the Dept represents a department entity, the Cat represents an rights directory entity, the Task represents a transaction entity,transact represents a transaction entity, R <Reg,Dept> Representing the relationship of the areas of departments, R <Dept,Task> Representing the department of transaction, R <Dept,Cat> Representing the relationship of departments to which the rights directory belongs, R <Cat,Task> Representing the relationship of the rights directory to which the transaction belongs, R <Task,Transact> Representing the relationship of the business to which the business belongs.
3. The automatic questioning and answering method for government affairs consultation as claimed in claim 1, wherein: step S2, extracting address information l and case description key information k of the case description S through a pre-trained large language model LLM.
4. The automatic questioning and answering method for government affairs consultation as claimed in claim 1, wherein: the step S3 is specifically as follows:
s31, obtaining the characteristic vector V of the case description key information k k
S32, searching and characteristic vector V in government service authority directory vector set C k The nearest vector to the euclidean distance and its corresponding directory q.
5. An automatic questioning and answering system for government affair consultation is characterized in that: comprising the following steps:
vector set and knowledge graph construction module: constructing a government service authority directory vector set C and a government service knowledge graph G;
and a retrieval module: inputting a case description s, and extracting address information l and case description key information k;
the rights directory acquisition module: acquiring a right directory q with highest similarity with the case description key information k from a government service right directory vector set C;
the office manual information acquisition module: obtaining a regional information region according to the address information l, obtaining a department d and a transaction item t from a administrative service knowledge graph G by using the regional information region and the authority directory q, and obtaining a transaction guide information set I according to the department d and the transaction item t;
and a result output module: splicing the office guide information set I and the case description s into an instruction promt according to a preset template; inputting the prompt into a large language model LLM for generating pre-training to obtain an answer, and outputting the answer;
the retrieval module extracts address information l and case description key information k of the case description s through a pre-trained large language model LLM;
the office guide information acquisition module includes: a region information acquisition unit, a department acquisition unit, a transaction item acquisition unit, and a transaction guidance information acquisition unit;
area information acquisition unit: obtaining a region name region and a region level according to the address information l; the area information acquisition unit further includes:
word segmentation set acquisition unit: performing word segmentation processing on the address information to obtain a word segmentation set A, and marking the ith word in the A as A (i); setting a region name region=a preset initial region (0), and setting a region level=a level0 corresponding to the preset initial region (0);
semantic similarity calculation unit: for A (i), the area name with highest text similarity in the area entity set in the government service data set D is obtained and is recorded as A (i) region ,A(i) region The corresponding regional hierarchy is denoted as A (i) level A (i) and A (i) region Is noted as A (i) sim
Assignment unit: traversing address set A, if A (i) sim Greater than a preset threshold and A (i) level Greater than level, then assign region=a (i) region ,level=A(i) level
An output unit: outputting a region name region and a region level;
department acquisition unit: searching in the government service diagram knowledge graph G according to the regional name region and the authority directory q to obtain a department d;
a transaction item acquisition unit: retrieving and obtaining a transaction item t according to a department d and a rights directory q in a government service diagram knowledge graph G;
a transaction guidance information acquisition unit: the search and transaction t has a transaction guide information set I of a transaction relationship R < Task, transaction > to which the transaction belongs.
6. The automatic questioning and answering system for government affairs consultation as claimed in claim 5, wherein: the rights directory acquisition module comprises: a feature vector acquisition unit and a rights directory acquisition unit;
feature vector acquisition unit: acquiring characteristic vector V of case description key information k k
A rights directory acquisition unit: retrieving feature vector V in government service rights directory vector set C k The nearest vector to the euclidean distance and its corresponding directory q.
7. The automatic questioning and answering system for government affairs consultation as claimed in claim 5, wherein: the vector set and knowledge graph construction module comprises: the system comprises a government service data acquisition unit, a vector set construction unit and a knowledge graph construction unit;
government service data acquisition unit: acquiring a government service data set D;
vector set construction unit: performing text embedding on the authority directory entity in the government service data set to obtain an authority directory vector, and constructing a government service authority directory vector set C according to the authority directory vector;
knowledge graph construction unit: constructing a government service knowledge graph G by using the government service data set D; the government service knowledge graph G= { Reg, dept, cat, task, transact, R <Reg,Dept> ,R <Dept,Task> ,R <Dept,Cat> ,R <Cat,Task> ,R <Task,Transact> };
Wherein Reg represents a regional entity, which includes province, city, district, street, community geographic hierarchy entities; dept represents a department entity, cat represents an rights directory entity, task represents a transaction entity, transact represents a transaction entity, R <Reg,Dept> Representing the relationship of the areas of departments, R <Dept,Task> Representing the department of transaction, R <Dept,Cat> Representing rights directoryDepartment relationship, R <Cat,Task> Representing the relationship of the rights directory to which the transaction belongs, R <Task,Transact> Representing the relationship of the business to which the business belongs.
CN202311288051.4A 2023-10-08 2023-10-08 Automatic question-answering method and system for government affair consultation Active CN117056495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311288051.4A CN117056495B (en) 2023-10-08 2023-10-08 Automatic question-answering method and system for government affair consultation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311288051.4A CN117056495B (en) 2023-10-08 2023-10-08 Automatic question-answering method and system for government affair consultation

Publications (2)

Publication Number Publication Date
CN117056495A CN117056495A (en) 2023-11-14
CN117056495B true CN117056495B (en) 2024-01-12

Family

ID=88664720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311288051.4A Active CN117056495B (en) 2023-10-08 2023-10-08 Automatic question-answering method and system for government affair consultation

Country Status (1)

Country Link
CN (1) CN117056495B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117421415A (en) * 2023-12-18 2024-01-19 北京海纳数聚科技有限公司 Data processing method, device, electronic equipment and storage medium
CN117573852B (en) * 2024-01-17 2024-03-22 深圳市伊登软件有限公司 Task processing method, device, equipment and medium for intelligent office
CN117851577B (en) * 2024-03-06 2024-05-14 海乂知信息科技(南京)有限公司 Government service question-answering method based on knowledge graph enhanced large language model

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034727A (en) * 2018-06-28 2018-12-18 上海卓繁信息技术股份有限公司 Self-service electronic government affairs processing method
CN110992002A (en) * 2019-12-05 2020-04-10 腾讯云计算(北京)有限责任公司 Item processing method, item processing device, item processing equipment and storage medium
CN111179139A (en) * 2019-11-27 2020-05-19 腾讯云计算(北京)有限责任公司 Internet + supervision data processing method and device
CN111400474A (en) * 2020-03-20 2020-07-10 腾讯云计算(北京)有限责任公司 Intelligent customer service question and answer method and device for government affair service
CN113449114A (en) * 2020-12-31 2021-09-28 中国科学技术大学智慧城市研究院(芜湖) Method for constructing natural human life cycle holographic image based on knowledge graph
CN113779180A (en) * 2021-09-29 2021-12-10 北京雅丁信息技术有限公司 Regional DRG grouping simulation method
CN115238945A (en) * 2022-04-11 2022-10-25 平安国际智慧城市科技股份有限公司 Travel guide generation method, device and equipment and storage medium
CN116307757A (en) * 2023-01-18 2023-06-23 辽宁荣科智维云科技有限公司 Intelligent data interaction method, interaction system, computer equipment and application
CN116303935A (en) * 2023-02-07 2023-06-23 浪潮软件股份有限公司 Intelligent question-answering method based on government affair service matters
CN116628172A (en) * 2023-07-24 2023-08-22 北京酷维在线科技有限公司 Dialogue method for multi-strategy fusion in government service field based on knowledge graph

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034727A (en) * 2018-06-28 2018-12-18 上海卓繁信息技术股份有限公司 Self-service electronic government affairs processing method
CN111179139A (en) * 2019-11-27 2020-05-19 腾讯云计算(北京)有限责任公司 Internet + supervision data processing method and device
CN110992002A (en) * 2019-12-05 2020-04-10 腾讯云计算(北京)有限责任公司 Item processing method, item processing device, item processing equipment and storage medium
CN111400474A (en) * 2020-03-20 2020-07-10 腾讯云计算(北京)有限责任公司 Intelligent customer service question and answer method and device for government affair service
CN113449114A (en) * 2020-12-31 2021-09-28 中国科学技术大学智慧城市研究院(芜湖) Method for constructing natural human life cycle holographic image based on knowledge graph
CN113779180A (en) * 2021-09-29 2021-12-10 北京雅丁信息技术有限公司 Regional DRG grouping simulation method
CN115238945A (en) * 2022-04-11 2022-10-25 平安国际智慧城市科技股份有限公司 Travel guide generation method, device and equipment and storage medium
CN116307757A (en) * 2023-01-18 2023-06-23 辽宁荣科智维云科技有限公司 Intelligent data interaction method, interaction system, computer equipment and application
CN116303935A (en) * 2023-02-07 2023-06-23 浪潮软件股份有限公司 Intelligent question-answering method based on government affair service matters
CN116628172A (en) * 2023-07-24 2023-08-22 北京酷维在线科技有限公司 Dialogue method for multi-strategy fusion in government service field based on knowledge graph

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一套基于人工智能技术的政务服务平台设计;龚炜;;中国科技信息(第12期);全文 *
对我国税务系统网站向服务导向型网站转型的研究;张向宏;柳盛鹏;;电子政务(第12期);全文 *

Also Published As

Publication number Publication date
CN117056495A (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN117056495B (en) Automatic question-answering method and system for government affair consultation
US9547637B2 (en) Segmenting forms for multiple user completion
Hook Partnering with patients–a concept ready for action
CN110264330B (en) Credit index calculation method, apparatus, and computer-readable storage medium
US20220366127A1 (en) Legal Document Generation
JP2023121837A (en) Question answering system, question reception answering system, primary answer system, and question answering method using the same
Schwarz et al. Enabling patient safety awareness using the green cross method: a qualitative description of users’ experience
Sikora A Profile of Participation in Distance Education: 1999-2000. Postsecondary Education Descriptive Analysis Reports.
MacNaughton et al. The challenge of interdisciplinarity in operationalizing the right to health
Hart-Johnson Symbolic imprisonment, grief, and coping theory: African American Women with Incarcerated Mates
Clevenger Constructing spiritual motherhood in the Democratic Republic of Congo
JP5922164B2 (en) Academic integration support system and support method
Seo et al. School Nurses’ Experiences and Needs in COVID-19 Pandemic Response: A Qualitative Study
Nowotny The limits of post-genocide justice in Rwanda: assessing gacaca from the perspective of survivors
Broski et al. Parent mental models of transition related to their child’s developmental diagnosis
Hartworth et al. Entitlements, capabilities, and crisis in the United Kingdom
Rukanuddin Introduction and development of NCP using ICNP® in Pakistan
Adatara et al. New Graduate Nurses’ Experiences and Challenges during a One‐Year Clinical Rotation Programme in the Volta Region of Ghana: Implications for Nursing Management and Nursing Workforce Retention
Strub Kabitz Engaging in Equity-Centered Policymaking: State-Level Racial Equity Impact Assessment Trends, Lessons Learned, and Future Directions
Carnemolla et al. Disability activism and institutional heritage
Durr et al. Setting up statistical registers of individuals and dwellings in France: Approach and first steps
Missah et al. Implementation of electronic medical records—a case study of an eye hospital
Hughes et al. Care home staff perceptions of implementing a quality of life instrument into routine care practice: A qualitative study
Repková Social construction of social work in domiciliary care service
Meloche Repatriation as Knowledge and Process: An Engaged Approach

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
GR01 Patent grant
GR01 Patent grant