Traffic knowledge question-answering method and system, electronic equipment, medium and program product

By constructing a question-and-answer library and knowledge base, combining text similarity and semantic similarity analysis, a prompt word is constructed and a pre-constructed language model is input, and multimodal learning technology is used to process text and image data, which solves the inefficiency of the field of traffic knowledge and The problem of poor accuracy has achieved an efficient and accurate traffic knowledge Q&A system, improving user experience and adaptability.

CN119179769AInactive Publication Date: 2024-12-24BEIJING INSTITUTE FOR GENERAL ARTIFICIAL INTELLIGENCE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411699086.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2024-12-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has problems of low efficiency and poor accuracy in the field of traffic knowledge. Inaccurate data sources make it difficult for users to understand traffic rules and design specifications. The system lacks real-time data processing and multimodal data processing capabilities, poor user experience, and adapts to it. Not very capable, and the deployment and maintenance costs are high.

Method used

By building a question-and-answer library and knowledge base, combining text similarity and semantic similarity analysis, we build prompt words and input pre-constructed language models, and use multimodal learning technology to process text and image data to improve the output quality and relevance of the model. Achieve the efficiency and accuracy of the traffic knowledge question and answer system.

Benefits of technology

Improve the efficiency and accuracy of the traffic knowledge Q&A system, enhance user experience, expand adaptability, reduce deployment and maintenance costs, solve the problem of insufficient multimodal data processing capabilities, and achieve more comprehensive traffic Q&A needs .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179769A_ABST
    Figure CN119179769A_ABST
Patent Text Reader

Abstract

The invention provides a traffic knowledge question-answering method and system, electronic equipment, a medium and a program product. The traffic knowledge question and answer method comprises the steps that a corresponding result is inquired in a database on the basis of obtained user questions, and the database is constructed on the basis of traffic knowledge data; performing similarity analysis based on corresponding results obtained by user questions and queries so as to query related information in a database; constructing cue words based on user questions and related information; and inputting the user question, the corresponding result, the related information and the cue word into a pre-constructed language model to obtain an output result. The purpose of improving efficiency and accuracy is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a traffic knowledge question-answering method, system, electronic equipment, medium and program product. Background Art

[0002] With the construction of smart cities and the continuous improvement of relevant road traffic rules systems, users are encountering more and more problems in the field of traffic. There are many complex and irregular traffic rules, design specifications and other rule data in the field of urban road traffic. These rules are complex and cumbersome, and it is difficult for users to understand them clearly, which is not conducive to users regulating their own traffic behavior, nor is it conducive to the promotion and dissemination of traffic rules in the field of traffic.

[0003] With the development of artificial intelligence, the application of artificial intelligence to learn traffic knowledge can help users understand traffic rules, design specifications, etc. In the process of realizing the concept of the present invention, the inventors found that there are at least the following problems in the related technology: due to inaccurate data sources, there are problems of low efficiency and poor accuracy. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a traffic knowledge question and answer method, system, electronic device, medium and program product, which at least partially solve the problems of low efficiency and poor accuracy existing in the prior art.

[0005] In a first aspect, the present disclosure provides a traffic knowledge question-answering method, including: Based on the acquired user questions, query the corresponding results in the database, where the database is constructed based on traffic knowledge data; Perform similarity analysis based on the corresponding results of user questions and inquiries, so as to query relevant information in the database; Construct prompt words based on user questions and related information; The user's question, corresponding results, related information and prompt words are input into the pre-built language model to obtain the output result.

[0006] Optionally, the database includes a question-answer database and a knowledge database. The question and answer database is constructed based on the acquired question and answer data; The knowledge base is constructed by acquiring traffic-related legal and regulatory data.

[0007] Optionally, querying a database for corresponding results based on the acquired user question includes: First, similar questions are retrieved in the question-and-answer database based on the user's question. If no answer is found in the question-and-answer database, relevant knowledge points are retrieved in the knowledge base based on the user's question.

[0008] Optionally, the similarity analysis includes: text similarity analysis and semantic similarity analysis.

[0009] Optionally, the prompt words are constructed based on the user's question and related information, including: Determine whether the user's question contains image information. If so, retrieve relevant image information from the database based on the trained image encoder. Construct prompt words based on relevant image information.

[0010] Optionally, after the step of inputting the user's question, corresponding result, related information and prompt word into the pre-built language model to obtain the output result, the step further includes: The output results are sent to users, user feedback is collected, and the pre-built language model is iterated and optimized based on the feedback information.

[0011] In a second aspect, the present disclosure also provides a traffic knowledge question-answering system, including: A query module, used to query corresponding results in a database based on the acquired user questions, wherein the database is constructed based on traffic knowledge data; The analysis module is used to perform similarity analysis based on the corresponding results obtained from the user's questions and inquiries, so as to query relevant information in the database; A construction module, used to construct prompt words based on user questions and related information; The output module is used to input user questions, corresponding results, related information and prompt words into the pre-built language model to obtain output results.

[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the traffic knowledge question and answer method described in any one of the first aspects.

[0013] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the traffic knowledge question and answer methods described in the first aspect.

[0014] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements any of the traffic knowledge question and answer methods described in the first aspect.

[0015] The present invention provides a traffic knowledge question-and-answer method, system, electronic device, medium and program product, wherein the traffic knowledge question-and-answer method performs similarity analysis between user questions and a database, thereby eliminating interference data and improving model accuracy, and constructs prompt words to provide key information or guiding sentences to a large language model, thereby helping the model to better understand the requirements of the question, thereby improving the model processing speed and accuracy, thereby achieving the purpose of improving efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.

[0017] Figure 1 A flow chart of a traffic knowledge question-answering method provided in an embodiment of the present disclosure; Figure 2 A functional block diagram of a traffic knowledge question-answering device provided in an embodiment of the present disclosure; Figure 3 A functional block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0019] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0020] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0021] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0022] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0023] The present invention proposes the following method to solve the following problems in the prior art: 1. Limited data integration capabilities: Existing technologies have limitations in integrating data from different sources and types, leading to information silos.

[0024] 2. Lack of real-time performance: Existing technologies still have room for improvement in processing real-time traffic data and quickly responding to traffic changes.

[0025] 3. Poor user experience: The user interface is not friendly enough, making it difficult for users to obtain and understand traffic information.

[0026] 4. Poor adaptability: The system is not adaptable to changes in traffic patterns and has difficulty coping with emergencies and unconventional traffic conditions.

[0027] 5. Cost and maintenance issues: The deployment and maintenance costs of some intelligent transportation systems are high, limiting their widespread application.

[0028] 6. Privacy and security issues: As the amount of data collected by intelligent transportation systems increases, privacy protection and data security become important issues.

[0029] 7. Low penetration of technology: Intelligent transportation systems are not widely used in some regions and countries.

[0030] 8. Insufficient multimodal data processing capabilities: Existing technologies are incapable of processing multiple data types such as text and images, which limits the system's comprehensive analysis and decision-making capabilities.

[0031] The technologies used in this embodiment include: The question-and-answer database construction technology is used to collect and organize question-and-answer pairs from sources such as the Internet and professional websites using natural language processing technology to build a question-and-answer database.

[0032] Knowledge base construction technology is to download and organize laws, regulations and professional documents from government websites, professional documents and other channels to build a knowledge base.

[0033] Text similarity and semantic similarity technology uses text processing and machine learning technology to achieve similarity and semantic similarity analysis of text content in order to recall relevant questions and answers and knowledge points.

[0034] Prompt word engineering is to construct reasonable prompt words through natural language processing technology to improve the output quality and relevance of the model.

[0035] Language modeling uses pre-trained models, combined with domain-specific data and prompt words, to generate high-quality output.

[0036] Multimodal learning technology combines data from multiple modalities, such as text and images, and achieves retrieval and analysis of multimodal data through training technologies such as image encoders.

[0037] Image retrieval technology uses image recognition and retrieval technology to retrieve relevant images from the database and assist the model in outputting higher-precision results.

[0038] For ease of understanding, Figure 1 As shown, this embodiment discloses a traffic knowledge question-answering method, including: Step S101: querying a corresponding result in a database based on the acquired user question, wherein the database is constructed based on traffic knowledge data; The question-and-answer database is built based on the acquired question-and-answer data, such as collecting question-and-answer pairs in the field of transportation through driving test websites and search engines. The question-and-answer database is specifically used for retrieving similar questions to improve the speed and accuracy of responding to user questions.

[0039] The knowledge base is constructed based on the acquired traffic-related laws and regulations data. For example, traffic-related laws and regulations can be downloaded from government websites, such as the "Road Traffic Safety Law of the People's Republic of China", "Road Traffic Safety Law of the People's Republic of China Implementation Regulations" and other authoritative knowledge, or obtained from textbooks, etc. The knowledge base is mainly to ensure the authority and accuracy of knowledge.

[0040] When building a question-and-answer database and knowledge base, the collected data needs to be preprocessed, including cleaning, labeling, and formatting.

[0041] In a specific embodiment, similar questions are first retrieved in the question-and-answer database based on the user's question. If no answer is found in the question-and-answer database, relevant knowledge points are retrieved in the knowledge database based on the user's question.

[0042] Step S102: performing similarity analysis based on the user's question and the corresponding results obtained by the query, thereby searching for relevant information in the database; In a specific embodiment, text similarity and semantic similarity technology can be used to recall relevant questions and answers and knowledge points, thereby providing more accurate context information for the language model.

[0043] Step S103: construct prompt words based on the user's question and related information; By constructing reasonable prompt words, the language model can be helped to better understand the user's query intent, thereby generating more accurate output.

[0044] The prompt word can guide the output direction of the language model. The prompt word is like a compass for the language model, which can clearly tell the model what kind of output to expect. For example, when the prompt word "speed limit regulations" is input, the language model will describe the speed limit, which may mention the speed limit on rural roads, urban roads, and highways. Without this prompt word, the output of the language model will be more random and difficult to meet specific needs.

[0045] The output direction can be further guided by specific descriptions. For example, "highway speed limit" will make the language model focus more on highways, and the maximum speed limit on highways will appear to be 120 kilometers. "Urban road speed limit" will guide the model to output urban speed limit regulations, such as 80 kilometers on urban expressways.

[0046] Prompt words can improve the accuracy of the output, and high-quality prompt words can help the language model provide more accurate answers. When the prompt word is vague, the language model may give a broad or inaccurate answer. When clear and specific prompt words are used, the model can better understand our needs and give more accurate output. For example, if you ask "What are the colors?" The language model may list some common colors, such as white, yellow, green, etc. But if the prompt word is "What are the colors of traffic lights?", then the language model will give more targeted red, yellow, and green colors.

[0047] In addition, qualifiers can be used to improve accuracy. For example, prompts such as "What are the restricted traffic signs?" will allow the language model to consider qualifiers when answering and give answers that better meet the needs.

[0048] Prompt words can stimulate the creativity of language models. In addition to guiding the output direction and improving accuracy, prompt words can also stimulate the creativity of language models. By using imaginative prompt words, language models can generate unique and novel content. For example, "If we develop a low-altitude economy, what should we pay attention to when specifying rules?" Step S104: input the user's question, corresponding results, related information and prompt words into the pre-built language model to obtain the output result.

[0049] Language models are a type of pre-trained deep learning model that has a large number of parameters, is trained on a wide range of data, and is suitable for a variety of tasks and applications.

[0050] The language model has the following main features: Large scale and number of parameters: Language models capture complex data patterns through their large scale, allowing them to understand and generate extremely rich information.

[0051] Strong adaptability and flexibility: The model has strong adaptability and flexibility, can be efficiently migrated to various downstream tasks through fine-tuning or few-shot learning, and has strong cross-domain capabilities.

[0052] Pre-training on extensive datasets: Language models are pre-trained using large amounts of diverse data to learn extensive knowledge representations that can capture common features of data such as language and images.

[0053] Emergent Abilities: As the model size grows, the language model can demonstrate some capabilities that small models do not have. These capabilities refer to new capabilities that are suddenly acquired when the model reaches a certain size and are difficult to predict in advance, such as understanding complex contexts, creative thinking, and multi-step reasoning. This qualitative change caused by quantitative change enables language models to perform more advanced tasks and even simulate certain aspects of human intelligence.

[0054] Universality and flexibility: The language model learns a wide range of knowledge and language structures through pre-training. It does not need to be fine-tuned for each specific task. It can complete a variety of tasks with simple prompts or instructions, which improves the universality of the model and the flexibility of deployment.

[0055] Solving complex problems: For complex problems that require comprehensive analysis and deep understanding, such as long text understanding and cross-domain reasoning, language models can provide more accurate and comprehensive solutions with their deep background knowledge and powerful processing capabilities.

[0056] Data-driven optimization: Language models are trained by absorbing and analyzing massive amounts of data, which can continuously optimize their own performance, improve accuracy and robustness, and are applicable to multiple industries, promoting the practical application of AI technology.

[0057] Multimodal processing capabilities: With the advancement of technology, language models are not limited to text processing, but can also integrate multimodal information such as images and sounds, providing a basis for more comprehensive human-computer interaction and intelligent decision-making.

[0058] Promote industrial intelligence: In industrial applications, language models can accelerate the digitalization and intelligence process of enterprises, improve efficiency, create new business models and services, and bring economic and social benefits.

[0059] Multimodal language models can simultaneously process and understand data from different perceptual channels, such as text, images, audio, video, etc., and establish associations and interactions between these modalities. They can integrate different types of input information and perform cross-modal reasoning, generation, and understanding tasks. The applications of multimodal language models cover areas such as visual question answering, image description generation, cross-modal retrieval, and multimedia content understanding.

[0060] The most well-known language model architecture now is the Transformer architecture, which first performs word embedding to convert words into high-dimensional vector representations. Then, the data is passed through multiple Transformer layers. In these layers, the self-attention mechanism plays a key role in understanding the relationship between words in the sequence. Finally, after being processed by the Transformer layer, the model generates text by predicting the most likely next word or token in the sequence based on the learned context.

[0061] Word embeddings are a crucial first step when building a language model. They represent words as vectors in a high-dimensional space, so that similar words are grouped together. This helps the model understand the meaning of the words and make predictions based on that. Once word embeddings are created, they can be passed as input to a larger neural network trained on a specific language task, such as text classification or machine translation. By using word embeddings, the model is able to better understand the meaning of words and make more accurate predictions based on this understanding.

[0062] The position encoding in the Transformer architecture uses a series of vectors with a specific pattern to represent the position of the word. These vectors are added to the vectors of the word embedding to obtain a representation that contains position information. In this way, the model is able to take the position of the word as part of the input and keep it consistent when generating the output.

[0063] The self-attention mechanism is a core component in the Transformer architecture. It allows the model to effectively interact and pay attention to different positions in the input sequence when generating output. The key idea of ​​the self-attention mechanism is to calculate the correlation between each word in the input sequence and use these correlations to weigh the model's attention at each position.

[0064] The representation of each position is further processed by the feedforward neural network in the Transformer architecture. The feedforward neural network is composed of multiple fully connected layers, each of which has a set of parameters for nonlinearly transforming the input. This process can help the model introduce more complexity and flexibility when generating output.

[0065] So, after the self-attention layer finishes processing the sequence, the position-by-position feed-forward layer takes in each position in the input sequence and processes it independently. For each position, the fully connected layer receives the vector representation of the token (word or subword) at that position. This vector representation is the output of the previous self-attention layer. The fully connected layer in this context is used to transform the input vector representation into a new vector representation that is more suitable for the model to learn complex patterns and relationships between words.

[0066] During training, the weights of the Transformer layers are repeatedly updated to reduce the difference between the predicted output and the actual output.

[0067] Optionally, the prompt words are constructed based on the user's question and related information, including: Determine whether the user's question contains image information. If so, retrieve relevant image information from the database based on the trained image encoder. Construct prompt words based on relevant image information.

[0068] If the user asks, "Based on the given picture, please determine which of the following is the traffic light sign," the image needs to use the image encoder to query the relevant test questions from the question and answer library, and then calculate the cosine similarity to find the correct answer.

[0069] Image encoder, used to retrieve images from the database. Prompts constructed with relevant test content serve as reference materials for the model to assist in outputting higher-precision results.

[0070] Image encoders are components used to process visual information, converting image data into a format that can be further analyzed by the model. This usually involves feature extraction, which is extracting useful information from the image, such as color, texture, shape, and object location.

[0071] The main network structures include: NFNet and ViT, NFNet (Normalizer-Free ResNets) is a ResNet-based network structure that does not require Batch Normalization. Its core is an AGC (adaptive gradient clipping technique).

[0072] The initial backbone of the NFNet model, also known as the starting layer of the model, is the basis for building the entire network structure. This part includes a series of convolutional layers designed to extract primary features from the input image. First, the model uses a 3x3 convolution kernel with a stride of 2, which helps to extract basic features while reducing the image size. The number of channels in this layer is set to 16, which means that it can process 16 different feature maps, thereby capturing rich image information.

[0073] Next, the model further deepens the feature extraction through two 3x3 convolutional layers with a stride of 1. The number of channels in these layers is 32 and 64 respectively. Gradually increasing the number of channels helps the network learn more complex features. This design strategy not only increases the depth of the network, but also increases its width, thereby improving the richness and diversity of features.

[0074] After the above convolutional layer, the model uses a 3x3 convolutional layer with a stride of 2 and 128 channels. This layer further reduces the image size while aggregating higher-level features by increasing the number of channels. This design helps the network extract more abstract image features while maintaining computational efficiency.

[0075] It is worth noting that a nonlinear activation function GELU is embedded between each convolutional layer. GELU (Gaussian Error Linear Unit) is a lightweight activation function that can effectively improve the performance of deep learning models, especially when dealing with complex and abstract features. By applying GELU after each convolutional layer, the model can better capture and transfer the nonlinear relationship between features.

[0076] After the initial backbone, the model enters 4 residual stages. These stages are the core of the model and are responsible for further extracting and transferring image features. Each stage starts with a transition block, followed by a standard residual block. The transition block performs downsampling in all stages except the first stage, which helps to reduce the size of the feature map while increasing its depth. In the downsampling path, a 2x2 average pooling layer is used to reduce the spatial dimension, while the first 3x3 convolutional layer is responsible for changing the number of output channels to accommodate the increase in the depth of the network.

[0077] After the inception block, the model goes through 4 different residual blocks, each consisting of a series of convolutional layers and activation functions. These residual blocks are designed to allow gradients to flow directly through these blocks through skip connections, effectively solving the gradient vanishing problem in deep network training. In this way, the model is able to extract rich features from the input image, which will be further processed and analyzed in subsequent network layers, ultimately achieving understanding and classification of the image content.

[0078] ViT (Vision transformer) is a model that directly applies transformer to image classification. Vit's method of image processing is very simple: first divide the image into small patches of the same size, and then obtain patch embeddings through linear transformation. Since the input of the transformer is a combination of word vectors, after embedding the image's patches into the transformer, it can extract features and perform classification.

[0079] A Vit module can be divided into the following steps: (1) Block embedding. Assume that the size of the input image after preprocessing is 224x224, with 3 channels. First, the image is divided into 16x16 patches, with a total of 196 patches. At this time, the image is transformed into a sequence of length 196, that is, there are a total of 196 tokens. These patches are flattened into column vectors through linear transformation, and the 16x16x3 patches are flattened into 768-dimensional column vectors. At this time, the dimension of the token sequence is 196x768. In addition, a class token specifically used for classification needs to be added, which is concatenated with the token sequence to obtain a 197x768 vector.

[0080] (2) Positional encoding. Like Transformer, Vision Transformer also needs to add positional encoding. Positional encoding can be seen as a table. For a sequence of length 196, a positional encoding with 196 rows is also required. The dimension of each row of positional encoding is the same as the dimension of each token, which is 768. The method of adding positional encoding is to add each row of positional encoding to each token in the sequence, and the dimension of the new vector obtained is still 197x768.

[0081] (3) Input to Transformer Encoder. Transformer Encoder is to repeatedly stack Encoder Block N times, mainly composed of the following parts: Layer Norm is a normalization method specifically for the NP field.

[0082] Multi-head self-attention, first process the input 197x768 dimensional token sequence separately. Assuming there are 12 heads (768 / 12=64), then the dimension mapped to each q, k, v is 197x64, there are 12 groups of q, k, v, and finally concatenate the outputs of the 12 groups of qkv, with a dimension of 197x768.

[0083] Finally, after a layer of Dropout regularization, the encoding process is completed.

[0084] (4) MLP Head. The dimension of the token after the Transformer Encoder is still 197x768. At this time, MLP Head is needed for classification. At this time, it is only necessary to extract the class token and generate the corresponding classification result. Here, the class token is 1X768 dimensional. Finally, the final classification result is obtained through MLP Head. MLP Head consists of two fully connected layers and a tanh activation function.

[0085] Optionally, after the step of inputting the user's question, corresponding result, related information and prompt word into the pre-built language model to obtain the output result, the step further includes: Step S105: Send the output result to the user, collect user feedback information, and iterate and optimize the pre-built language model based on the feedback information.

[0086] Each step of this embodiment involves specific data processing and analysis technology, ensuring the efficiency and accuracy of the entire process from user questions to result output. By comprehensively utilizing text and image data, the new technology solution can better meet the question-answering needs in the transportation field.

[0087] Through the dual-library retrieval system, users can find the information they need more accurately. Enhance user experience: The integration of multimodal learning and image encoders makes the user experience richer and more intuitive. Improve processing efficiency: The combination of prompt word engineering and language models can quickly generate high-quality output results. Expand the scope of application: This technical solution is not only applicable to the transportation field, but can also be extended to other fields that require multimodal data processing.

[0088] like Figure 2 As shown, the embodiment of the present invention also discloses a traffic knowledge question-answering system, including: A query module, used to query corresponding results in a database based on the acquired user questions, wherein the database is constructed based on traffic knowledge data; The analysis module is used to perform similarity analysis based on the corresponding results obtained from the user's questions and inquiries, so as to query relevant information in the database; A construction module, used to construct prompt words based on user questions and related information; The output module is used to input user questions, corresponding results, related information and prompt words into the pre-built language model to obtain output results.

[0089] Optionally, the database includes a question-answer database and a knowledge database. The question and answer database is constructed based on the acquired question and answer data; The knowledge base is constructed by acquiring traffic-related legal and regulatory data.

[0090] Optionally, querying a database for corresponding results based on the acquired user question includes: First, similar questions are retrieved in the question-and-answer database based on the user's question. If no answer is found in the question-and-answer database, relevant knowledge points are retrieved in the knowledge base based on the user's question.

[0091] Optionally, the similarity analysis includes: text similarity analysis and semantic similarity analysis.

[0092] Optionally, the prompt words are constructed based on the user's question and related information, including: Determine whether the user's question contains image information. If so, retrieve relevant image information from the database based on the trained image encoder. Construct prompt words based on relevant image information.

[0093] Optionally, after the step of inputting the user's question, corresponding result, related information and prompt word into the pre-built language model to obtain the output result, the step further includes: The output results are sent to users, user feedback is collected, and the pre-built language model is iterated and optimized based on the feedback information.

[0094] The electronic device disclosed in this embodiment includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.

[0095] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the electronic device performs all or part of the steps of the traffic knowledge question-answering method of each embodiment of the present disclosure.

[0096] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.

[0097] like Figure 3 The present invention provides a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, which is suitable for implementing the electronic device in the embodiment of the present invention. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0098] like Figure 3 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.

[0099] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device allows the electronic device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 3An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0100] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, all or part of the steps of the traffic knowledge question-and-answer method of the embodiment of the present disclosure are executed.

[0101] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0102] The computer-readable storage medium disclosed in this embodiment stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the traffic knowledge question-answering method of each embodiment of the present disclosure are executed.

[0103] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).

[0104] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0105] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0106] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0107] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0108] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0109] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0110] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0111] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A traffic knowledge question-answering method, characterized in that: include: Based on the acquired user questions, query the corresponding results in the database, where the database is constructed based on traffic knowledge data; Perform similarity analysis based on the corresponding results of user questions and inquiries, so as to query relevant information in the database; Construct prompt words based on user questions and related information; The user's question, corresponding results, related information and prompt words are input into the pre-built language model to obtain the output result.

2. The traffic knowledge question-answering method according to claim 1, characterized in that: The database includes a question-answer database and a knowledge base. The question and answer database is constructed based on the acquired question and answer data; The knowledge base is constructed by acquiring traffic-related legal and regulatory data.

3. The traffic knowledge question-answering method according to claim 2, characterized in that: The querying of the database for corresponding results based on the acquired user questions includes: First, similar questions are retrieved in the question-and-answer database based on the user's question. If no answer is found in the question-and-answer database, relevant knowledge points are retrieved in the knowledge base based on the user's question.

4. The traffic knowledge question-answering method according to claim 1, characterized in that: The similarity analysis includes text similarity analysis and semantic similarity analysis.

5. The traffic knowledge question-answering method according to claim 1, characterized in that: The prompt words are constructed based on the user's question and related information, including: Determine whether the user's question contains image information. If so, retrieve relevant image information from the database based on the trained image encoder. Construct prompt words based on relevant image information.

6. The traffic knowledge question-answering method according to claim 1, characterized in that: After the step of inputting the user's question, the corresponding result, the related information and the prompt word into the pre-built language model to obtain the output result, the method further includes: The output results are sent to users, user feedback is collected, and the pre-built language model is iterated and optimized based on the feedback information.

7. A traffic knowledge question-answering system, characterized in that: include: A query module, used to query corresponding results in a database based on the acquired user questions, wherein the database is constructed based on traffic knowledge data; The analysis module is used to perform similarity analysis based on the corresponding results obtained from the user's questions and inquiries, so as to query relevant information in the database; A construction module, used to construct prompt words based on user questions and related information; The output module is used to input user questions, corresponding results, related information and prompt words into the pre-built language model to obtain output results.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the traffic knowledge question and answer method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the traffic knowledge question-answering method described in any one of claims 1-6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the traffic knowledge question-answering method described in any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Complex equipment knowledge graph construction system

    CN116450833A

  • Optimization method and device for knowledge graph question-answering system

    CN118093842A

  • Large model voice question-answering system for multi-source heterogeneous local knowledge base

    CN118193694A

  • A decision-support application and system for problem solving using a question-answering system

    WO2012122198A1