Intelligent community service question and answer method, system and equipment
By using the Bert model and word vector algorithm in the community to build a question-and-answer database, the problem of community information is solved, and social workers' efficient Q&A and community service quality improvement are achieved.
Patent Information
- Application Number
- CN202510365585.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-01-20
- Filing Date
- 2025-03-26
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, community intelligent question-and-answer assistants lack effective solutions when community information is closed and difficult to obtain.
The Bert model is used to classify community problems, and a community service question-and-answer database is built with word vector algorithm and inverted indexing technology. The data on social workers' excellent work case is retrieved in the database. If it is missed, the big model API interface will be called to obtain the answer.
Provide instant Q&A services for social workers have improved work efficiency and problem-solving capabilities, helped social workers make scientific and accurate decisions, and improved community service quality and residents' satisfaction.
Smart Images

Figure CN120448481A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent question-answering technology, and in particular to a smart community service question-answering method, system, and device. Background Art
[0002] Intelligent question-answering assistants, as a key application of artificial intelligence, are widely used in various scenarios, including virtual assistants, online customer service, and information retrieval. Their goal is to mimic the human question-and-answer process, automatically processing and answering user questions through computers. Question-answering systems typically include several key steps: question understanding, information retrieval, and answer generation. Question understanding primarily relies on natural language processing, while information retrieval and answer generation typically rely on technologies such as machine learning, deep learning, and knowledge graphs.
[0003] The application scenarios related to intelligent question-and-answer assistants are mostly in the fields of education, medical care, etc. Since community information is relatively closed and difficult to obtain, there are currently almost no publicly available community intelligent question-and-answer assistants on the market. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a smart community service question-answering method, system and device to overcome the problems existing in the current existing technology.
[0005] To achieve the above objectives, the present invention adopts the following technical solutions:
[0006] In the first aspect, this application provides a smart community service question-answering method, including:
[0007] Obtain data on outstanding social worker work cases and build a community service Q&A database based on community work management regulations;
[0008] Get the community questions entered by the user in the interactive interface;
[0009] Classify and judge the community issues using a pre-trained Bert model to determine the problem category of the community issues;
[0010] According to the question category of the community question, searching the community service question-answering database by using a word vector algorithm and an inverted index algorithm;
[0011] If the corresponding community question can be retrieved in the community service question-answering database, then determining the social worker excellent work case data corresponding to the community question;
[0012] If the corresponding community question cannot be retrieved in the community service question and answer database, the big model API interface is called to obtain the corresponding social worker excellent work case data through the big model;
[0013] According to the corresponding social worker excellent work case data, answer data is determined, and the answer data is displayed to the user through the interactive interface.
[0014] Furthermore, the above method, before classifying and judging the community issues using the pre-trained Bert model to determine the category of the community issues, further includes:
[0015] Create a Bert model;
[0016] Acquire training data; wherein the training data includes: unlabeled text data;
[0017] The Bert model is trained using the training data, and during the training process, the Bert model adopts two unsupervised learning tasks, MLM and NSP;
[0018] Obtain the trained BERT model and fine-tune the BERT model through supervised learning tasks.
[0019] Furthermore, the method described above, wherein the data on outstanding social worker work cases is obtained and a community service question-and-answer database is constructed in accordance with the community work management regulations, includes:
[0020] Obtain data on outstanding social work cases, and identify community issues, legal opinions, work processes, and reference cases for each such data;
[0021] Determine the problem category of each piece of social worker excellent work case data based on the community problems of each piece of social worker excellent work case data;
[0022] The question categories are associated with the social worker's excellent work case data, and a community service question and answer database is constructed according to the community work management regulations.
[0023] Furthermore, the method described above, wherein searching the community service question-answering database using a word vector algorithm and an inverted index algorithm based on the question category of the community question, includes:
[0024] According to the problem category of the community problem, determining social workers' excellent work case data of the same problem category in the community service question and answer database;
[0025] Retrieval is performed among the excellent social work case data of the same problem category using word vector algorithm and inverted index algorithm.
[0026] Furthermore, in the above method, obtaining the community question input by the user in the interactive interface includes:
[0027] Obtain the community question entered by the user in the question input box of the interactive interface, and the answer category entered in the answer category box; wherein the answer categories include: legal opinions, workflows, and reference cases.
[0028] Furthermore, the method described above, wherein determining the answer data based on the corresponding social worker excellent work case data, and presenting the answer data to the user through the interactive interface, includes:
[0029] Determine the answer data in the corresponding social work excellent work case data according to the answer category input by the user;
[0030] The answer data is presented to the user via a question answering box in the interactive interface.
[0031] In a second aspect, this application provides a smart community service question-and-answer system, including:
[0032] The database module is used to obtain data on outstanding social workers' work cases and build a community service question and answer database based on community work management regulations;
[0033] Interaction module, used to obtain community questions input by users;
[0034] A problem classification module is used to classify and judge the community problems using a pre-trained Bert model to determine the problem category of the community problems;
[0035] A question retrieval module is used to search the community service question-answering database based on the question category of the community question using a word vector algorithm and an inverted index algorithm;
[0036] If the corresponding community question can be retrieved in the community service question-answering database, then determining the social worker excellent work case data corresponding to the community question;
[0037] The question expansion module is used to call the big model API interface if the corresponding community question cannot be retrieved in the community service question and answer database, and obtain the corresponding social worker excellent work case data through the big model;
[0038] The interactive module is further used to determine answer data based on the corresponding social worker excellent work case data, and display the answer data to the user through the interactive interface.
[0039] In a third aspect, the present application provides a smart community service question-answering device, including a processor and a memory, wherein the processor is connected to the memory:
[0040] The processor is configured to call and execute the program stored in the memory;
[0041] The memory is used to store the program, and the program is at least used to execute any one of the smart community service question-and-answer methods described above.
[0042] The beneficial effects of the present invention are:
[0043] By integrating natural language processing and machine learning technologies, it provides social workers with a powerful daily work assistance tool. By collecting and analyzing data on the problems and pain points faced by social workers and community complaint handling cases, it provides social workers with instant question-and-answer services, significantly improving their work efficiency and problem-solving capabilities. In addition, through data-driven decision support, it helps social workers and community managers make more scientific and accurate decisions, thereby improving the quality of community services and residents' satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 This is a flowchart provided by an embodiment of a smart community service question-answering method of the present invention;
[0046] Figure 2 This is a structural diagram provided by an embodiment of a smart community service question-and-answer system of the present invention;
[0047] Figure 3 This is a structural diagram of an embodiment of a smart community service question-and-answer device provided by the present invention;
[0048] Figure 4 It is a question-answering interactive interface provided by an embodiment of a smart community service question-answering method of the present invention. DETAILED DESCRIPTION
[0049] To make the objectives, technical solutions, and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other implementations obtained by those of ordinary skill in the art without inventive effort are within the scope of protection of the present invention.
[0050] Figure 1 This is a flowchart provided by an embodiment of a smart community service question-answering method of the present invention. Figure 1 , this embodiment may include the following steps:
[0051] S1. Obtain data on outstanding social worker work cases and build a community service Q&A database based on community work management regulations;
[0052] S2. Obtain the community question entered by the user in the interactive interface;
[0053] S3. Classify and judge community issues using the pre-trained Bert model to determine the problem category of the community issues;
[0054] S4. Based on the question category of the community question, search the community service question-answering database using the word vector algorithm and the inverted index algorithm;
[0055] S5. If the corresponding community problem can be retrieved from the community service question-and-answer database, then the social worker excellent work case data corresponding to the community problem is determined;
[0056] S6. If the corresponding community question cannot be retrieved in the community service question and answer database, the big model API interface is called to obtain the corresponding social worker excellent work case data through the big model;
[0057] S7. Determine the answer data based on the corresponding social worker excellent work case data, and display the answer data to the user through the interactive interface.
[0058] It is understandable that first, based on the results of the previous community survey, a social work database is built, covering more than 600 common community problems and corresponding solutions. Then, answers are given to the questions input by users in a "two-step" manner. The "first step" is to classify and judge the input questions based on the Bert model, and classify them into specific problem categories such as "parking problems" and "decoration problems" in the social work database. The "second step" is to segment and vectorize the classified questions based on word vectors and inverted indexes, match the word vectors in the major problem categories in the database, and then use the inverted index retrieval method to obtain the one with the highest degree of matching. For rare questions that are not covered by the database, the "two-step" processing effect is not good, and the big model method based on the big model API call will be used to generate answers to achieve question and answer expansion.
[0059] Preferably, before step S3, the method further includes:
[0060] Create a Bert model;
[0061] Obtaining training data; wherein the training data includes: unlabeled text data;
[0062] The Bert model is trained using training data, and during the training process, the Bert model uses two unsupervised learning tasks, MLM and NSP;
[0063] Obtain the trained BERT model and fine-tune the BERT model through supervised learning tasks.
[0064] As expected, Bert, a revolutionary pre-trained language model, has achieved remarkable success in the field of natural language processing (NLP). Its design relies on the Transformer architecture, extracting universal language feature representations from massive amounts of text data through unsupervised learning. Bert's core concept is to train deep bidirectional representations through bidirectional context modeling, enabling the model to understand the context of a text.
[0065] This application uses the Bert model to classify the questions entered by the user into specific categories, thereby reducing the computational overhead in the next database search and improving the query targeting and accuracy.
[0066] BERT's implementation consists of two main phases: pre-training and fine-tuning. During the pre-training phase, BERT utilizes a large amount of unlabeled text data for training. Text input is structured into sentence pairs or single sentence sequences and converted into word vectors through an embedding layer. These word vectors are then processed through a multi-layer TRANSFORMER encoder, which has full access to information in the sequence and generates context-sensitive word representations for each position. During this process, BERT employs two key unsupervised learning tasks: Masked Language Model (MLM) and Next Sentence Prediction (NSP). The MLM task requires the model to predict randomly masked words in the text, which not only trains the model's understanding of the semantics of words in sentences but also strengthens its sensitivity to context. The NSP task, on the other hand, aims to train the model to identify whether two sentences constitute consecutive sentences in the original text, thereby deepening the model's understanding of the logical relationships between sentences.
[0067] During the fine-tuning phase, the BERT model is fine-tuned through task-specific supervised learning to perform specific natural language processing tasks such as sentiment analysis and named entity recognition. This process involves adding task-specific layers to the pre-trained model and training these additional layers using labeled data, allowing the model to better adapt to and solve specific problems.
[0068] The mathematical principle of the Bert model can be explained by the self-attention mechanism in the Transformer architecture:
[0069] (1) Input sequence
[0070] [X1,X2,X3,......X n ]
[0071] Each X i is an element of the input sequence
[0072] (2) Self-attention calculation
[0073] Perform self-attention calculation on Q, K, and V of each head to obtain the attention matrix.
[0074]
[0075] (3) Multi-head self-attention calculation
[0076] The input sequence is linearly transformed and split, and then the split subsequences are independently calculated with self-attention. The calculation results are linearly transformed and concatenated to obtain the final output.
[0077] MultiHeadAttention(Q,K,V)=Concat(head_1,head_2,...,head_h)*W_head_i
[0078] =Attention(Q*W_Q_i,K*W_i,V*W_V_i)
[0079] (4) Forward propagation
[0080] Forward propagation is a computational process in a neural network that passes input data through each layer of the network to ultimately produce the output. First, the input vector x is used as the network's input and the output of the first layer. Then, for each neuron in each layer, its input can be expressed as: z = Wx + b. Here, W is the weight matrix of the neurons in that layer, b is the bias vector, and z is the input to the neurons in that layer. Next, the input z of each neuron in each layer is nonlinearly transformed using the activation function f(z) to obtain the maximum output of the neurons in that layer.
[0081] FFN(x)=max(0,x*W_1+b_1)*W_2+b_2
[0082] (5) BERT model structure
[0083] BERT(x)=LayerNorm(x+MultiHeadAttention(x)+FFN(x))
[0084] Among them, Q, K, V represent the vector representation of query, key and value respectively, d_k represents the vector dimension, W_Q, W_K, W_V, W_1, W_2, b_1, b_2 represent the parameters of the model, and LayerNorm represents the layer normalization operation.
[0085] Preferably, step S1 includes:
[0086] Obtain data on outstanding social work cases, and identify community issues, legal opinions, work processes, and reference cases for each case;
[0087] Determine the problem category of each piece of social worker excellent work case data based on the community problems of each piece of social worker excellent work case data;
[0088] Associate question categories with social workers' outstanding work case data, and build a community service question and answer database based on community work management regulations.
[0089] It can be understood that this application is based on the outstanding work cases of social workers in a certain street in Xicheng District and a certain street in Dongcheng District of Beijing, and the relevant community work management regulations at the national and Beijing levels, to build a professional and case-based database covering 21 categories and more than 600 common social work issues, each issue covers the three major elements of "legal opinions", "work processes" and "reference cases", laying the foundation for the construction of the question-and-answer system.
[0090] In Excel, the currently summarized data set is displayed. The actual system uses other specialized databases, so the current interface is for reference only.
[0091] Preferably, step S4 includes:
[0092] According to the problem categories of community problems, identify excellent social workers' work case data of the same problem categories in the community service question and answer database;
[0093] Retrieve excellent social work case data of the same problem category through word vector algorithm and inverted index algorithm.
[0094] As you can understand, word embedding algorithms are a key technology in natural language processing (NLP). They collectively refer to a set of language modeling and feature learning techniques within word-embedded natural language processing (NLP), in which words or phrases from a vocabulary are mapped to real-number vectors. Conceptually, this involves mathematically embedding each word from a one-dimensional space into a lower-dimensional continuous vector space. Specifically, it involves mapping words into vectors and converting natural language into vectors. Traditional word embedding models primarily include the Word2vec model, the Glove model, and the FastText model.
[0095] This application uses the Word2vec model in the word vector algorithm to match the questions input by the user with the existing questions in the database.
[0096] The Word2vec model learns semantic knowledge from large text corpora in an unsupervised manner. It is a classic local contextual word vector model that was early applied in the field of short text classification. It is based on static word vectors and uses a one-to-one vector representation. Its core is to optimize the objective function through a neural network model and adjust the network weights through the backpropagation algorithm to ensure that the predicted results are as close as possible to the actual results. Word2vec includes two classic models: CBOW (Continuous Bag-of-Words) and Skip-gram.
[0097] The core formula of Word2vec is as follows:
[0098]
[0099] Among them, p(t|c) is the probability of the target word t appearing before or after the context word c, e c is the embedding of c, θ is the parameter of the linear calculation of the Softmax layer, and Softmax is a normalized network whose purpose is to map multiple scalars into a probability distribution. Each value of its output ranges from (0, 1), and x is the size of the vocabulary.
[0100] The CBOW model removes hidden layers from a feedforward neural network, transforming the model from a neural network structure to a logarithmic linear structure. This reduces matrix operations and significantly improves training speed. The Skip-GRM model inputs the word vector corresponding to the current word and performs predictions. In the Skip-Gram model, the number of context words considered can be controlled by adjusting the window size.
[0101] An inverted index is a data structure that maps terms to documents and is used to quickly locate occurrences of specific words, terms, or keywords within documents. In an inverted index, each word or term is associated with a list of documents containing it. The basic principle of an inverted index is to segment each document in a collection and then associate each word with the documents in which it appears. When a user enters a query, the system can quickly find a list of documents containing the query term using the inverted index, thereby speeding up searches.
[0102] This application uses an inverted index algorithm to quickly and intuitively match the input question with the most similar and accurate one in the database.
[0103] The storage structure of the inverted index consists of three parts: the posting list, the term dictionary, and the term index.
[0104] (1) The inverted list is an ordered array of int type, which stores the data of all ids matching a certain term and is stored in the .doc file.
[0105] (2) The term dictionary contains all the term data of the index field after being processed by normalization token filters and is finally stored in the .tim file.
[0106] (3) Term index is a data structure used to speed up the retrieval of term dictionaries, and its landing file is .tip.
[0107] The inverted index formula is as follows:
[0108] Inverted index = [term 1: document ID 1, document ID 2, term 2: document ID 2, document ID 5, ...]
[0109] The inverted index contains a list of document IDs corresponding to each term (word or phrase).
[0110] For example, suppose there is the following document content:
[0111] Document 1: "apple orange banana"
[0112] Document 2: "apple peach"
[0113] Document 3: "orange grape"
[0114] For the above document, the inverted index is as follows:
[0115] apple:{1,2}
[0116] orange:{1,3}
[0117] banana:{1}
[0118] peach:{2}
[0119] grape:{3}
[0120] In this way, when a user enters a query term, the system can quickly find documents containing the term through the inverted index and then return relevant results to the user.
[0121] Preferably, step S2 includes:
[0122] Obtain the community question entered by the user in the question input box of the interactive interface, and the answer category entered in the answer category box; the answer categories include: legal opinion, workflow, and reference case.
[0123] Preferably, step S7 includes:
[0124] According to the answer category input by the user, the answer data is determined in the corresponding social work excellent work case data;
[0125] The answer data is displayed to the user through the question answer box in the interactive interface.
[0126] It is understandable that this application uses streamlit for front-end encapsulation, such as Figure 4 As shown, Figure 4 It is a question-asking interactive interface provided by an embodiment of a smart community service question-asking method of the present invention. In the question-asking interactive interface, the user enters the community question in the question input box and the answer category in the answer category box. The answer category can be one or more. Then click Submit Question, and the system will provide the answer data.
[0127] The present invention also provides a smart community service question-answering system for implementing the above method embodiment. Figure 2 This is a structural diagram of an embodiment of a smart community service question-answering system provided by the present invention. Figure 2 As shown, this embodiment includes:
[0128] Database module 1 is used to obtain data on outstanding social worker work cases and build a community service question and answer database based on community work management regulations;
[0129] Interaction module 2, used to obtain community questions input by users;
[0130] Problem classification module 3 is used to classify and judge community problems using a pre-trained Bert model to determine the problem category of the community problems;
[0131] Question retrieval module 4, used to search the community service question and answer database based on the question category of the community question using word vector algorithm and inverted index algorithm;
[0132] If the corresponding community problem can be retrieved from the community service question and answer database, the excellent social worker work case data corresponding to the community problem will be determined;
[0133] Question expansion module 5 is used to call the big model API interface if the corresponding community question cannot be retrieved in the community service question and answer database, and obtain the corresponding social worker excellent work case data through the big model;
[0134] The interactive module 2 is also used to determine the answer data based on the corresponding social worker excellent work case data, and display the answer data to the user through the interactive interface.
[0135] It is understandable that, first, the data source of this embodiment is valuable and fills the gap in market application. Community-related data is difficult to obtain. The team of this invention relies on the platform of Beijing Academy of Science and Technology to obtain accurate community data for the construction of a smart community question-and-answer assistant system. Second, the system design of this embodiment combines tradition and innovation. On the basis of the traditional question-and-answer assistant process construction, it adds pre-trained models and large model API modules. On the basis of accurate matching retrieval answers, it adds a generative answer solution. Third, the system of this embodiment highlights the "Beijing characteristics" and accurately serves the local community. Summarizing community data in the core urban areas of Beijing will help communities learn from each other's excellent cases and learn from each other's strengths and weaknesses. The system also has good scalability. In the future, data from various places can be obtained to expand application promotion.
[0136] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0137] The present invention also provides a smart community service question-and-answer device for implementing the above method embodiment. Figure 3 This is a structural diagram of an embodiment of a smart community service question-answering device provided by the present invention. Figure 3 As shown, the smart community service question-answering device of this embodiment includes a processor 21 and a memory 22, and the processor 21 is connected to the memory 22. The processor 21 is used to call and execute the program stored in the memory 22; the memory 22 is used to store the program, and the program is used to execute at least the smart community service question-answering method in the above embodiment.
[0138] The specific implementation plan of the smart community service question-and-answer device provided in the embodiment of this application can refer to the implementation plan of the smart community service question-and-answer method in any of the above embodiments, and will not be repeated here.
[0139] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0140] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" is at least two.
[0141] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0142] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0143] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0144] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0145] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0146] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0147] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A smart community service question-answering method, characterized in that: include: Obtain data on outstanding social worker work cases and build a community service Q&A database based on community work management regulations; Get the community questions entered by the user in the interactive interface; Classify and judge the community issues using a pre-trained Bert model to determine the problem category of the community issues; According to the question category of the community question, searching the community service question-answering database by using a word vector algorithm and an inverted index algorithm; If the corresponding community question can be retrieved in the community service question-answering database, then determining the social worker excellent work case data corresponding to the community question; If the corresponding community question cannot be retrieved in the community service question and answer database, the big model API interface is called to obtain the corresponding social worker excellent work case data through the big model; According to the corresponding social worker excellent work case data, answer data is determined, and the answer data is displayed to the user through the interactive interface.
2. The method according to claim 1, characterized in that Before classifying and judging the community issues using the pre-trained Bert model to determine the category of the community issues, the method further includes: Create a Bert model; Acquire training data; wherein the training data includes: unlabeled text data; The Bert model is trained using the training data, and during the training process, the Bert model adopts two unsupervised learning tasks, MLM and NSP; Obtain the trained BERT model and fine-tune the BERT model through supervised learning tasks.
3. The method according to claim 2, characterized in that The acquisition of excellent social worker case data and the construction of a community service question-and-answer database in accordance with the community work management regulations include: Obtain data on outstanding social work cases, and identify community issues, legal opinions, work processes, and reference cases for each such data; Determine the problem category of each piece of social worker excellent work case data based on the community problems of each piece of social worker excellent work case data; The question categories are associated with the social workers' outstanding work case data, and a community service question and answer database is constructed according to the community work management regulations.
4. The method according to claim 3, characterized in that The searching in the community service question-answering database by using a word vector algorithm and an inverted index algorithm according to the question category of the community question includes: According to the problem category of the community problem, determining social workers' excellent work case data of the same problem category in the community service question and answer database; Retrieval is performed among the excellent social work case data of the same problem category using word vector algorithm and inverted index algorithm.
5. The method according to claim 4, characterized in that The obtaining of the community question input by the user in the interactive interface includes: Obtain the community question entered by the user in the question input box of the interactive interface, and the answer category entered in the answer category box; wherein the answer categories include: legal opinions, workflows, and reference cases.
6. The method according to claim 5, characterized in that Determining answer data based on the corresponding social worker excellent work case data, and presenting the answer data to the user through the interactive interface, includes: Determine the answer data in the corresponding social work excellent work case data according to the answer category input by the user; The answer data is presented to the user via a question answering box in the interactive interface.
7. A smart community service question-answering system, characterized in that: include: The database module is used to obtain data on outstanding social work cases and build a community service question-and-answer database based on community work management regulations; Interaction module, used to obtain community questions input by users; A problem classification module is used to classify and judge the community problems using a pre-trained Bert model to determine the problem category of the community problems; A question retrieval module is used to search the community service question-answering database based on the question category of the community question using a word vector algorithm and an inverted index algorithm; If the corresponding community question can be retrieved in the community service question-answering database, then determining the social worker excellent work case data corresponding to the community question; The question expansion module is used to call the big model API interface if the corresponding community question cannot be retrieved in the community service question and answer database, and obtain the corresponding social worker excellent work case data through the big model; The interactive module is further used to determine answer data based on the corresponding social worker excellent work case data, and display the answer data to the user through the interactive interface.
8. A smart community service question-answering device, characterized in that: The device comprises a processor and a memory, wherein the processor is connected to the memory: The processor is configured to call and execute the program stored in the memory; The memory is used to store the program, and the program is at least used to execute the smart community service question and answer method according to any one of claims 1 to 6.
Citation Information
Cited By
Social worker service method and system based on dynamic knowledge base and AI cooperation
CN121233834A