Traffic information service system, method and device based on ChatGPT

Through the ChatGPT-based traffic information service system, the traffic corpus database and artificial intelligence algorithm are used to solve the problems of low interaction efficiency and information fragmentation of existing traffic information service systems, and more intelligent and concise traffic information services are realized, improving the efficiency of traffic management.

CN116758735BActive Publication Date: 2025-03-04SOUTH CHINA UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310595540.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2025-03-04
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

The existing traffic information service system navigation software has low interaction efficiency and low security. The information of the traffic big data platform is based on road sections as units, and is fragmented and difficult to be effectively utilized by road network management units.

Method used

The traffic information service system based on ChatGPT is adopted to analyze user requests, predict and summarize traffic information, and output structured traffic data through the traffic corpus database, task understanding module, task execution module and result summary module.

Benefits of technology

It realizes smarter and concise traffic information services, improves the convenience of drivers and road network management units to obtain real-time traffic status, and improves the practicality and efficiency of traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116758735B_ABST
    Figure CN116758735B_ABST
Patent Text Reader

Abstract

The present invention discloses a traffic information service system, method and device based on ChatGPT, which belongs to the field of traffic information service. The system includes: a traffic corpus database, which is used for personalized training of ChatGPT in the traffic field to convert natural language into structured traffic data including OD and road status; a task understanding module, which is used to parse the user's request for traffic information service and decompose the request into multiple traffic information prediction subtasks; an execution task module, which is used to execute the parsed traffic information prediction subtasks and return fragmented prediction results; a result induction module, which is used to summarize, infer and deduce the fragmented prediction results, and output the final traffic information including road status. The present invention can provide drivers and road network management units with more intelligent and concise traffic information services, facilitate the grasp of real-time traffic status, and has high practicality and convenience in the field of traffic management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic information services, and in particular to a traffic information service system, method and device based on ChatGPT. Background Art

[0002] Traffic information service is an important part of realizing intelligent transportation system, providing more intelligent and concise traffic information service for drivers and road network management units, which can help them grasp the real-time traffic status and participate in and manage traffic efficiently. The existing traffic information service methods and systems, and the interactive mode of navigation software are inefficient and unsafe during driving; the traffic information of the traffic big data platform is based on road sections as information units, which has the problem of fragmentation and is difficult to be effectively used by road network management units. Summary of the invention

[0003] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the object of the present invention is to provide a traffic information service system, method and device based on ChatGPT.

[0004] The technical solution adopted by the present invention is:

[0005] A traffic information service system based on ChatGPT, comprising:

[0006] Traffic corpus database, used for personalized training of ChatGPT in the traffic field, to convert natural language into structured traffic data including OD and road status;

[0007] The task understanding module is used to parse the user's request for traffic information services and decompose the request into multiple traffic information prediction subtasks;

[0008] The task execution module is used to execute the parsed traffic information prediction subtask and return the fragmented prediction results;

[0009] The result summary module is used to summarize, infer and deduce the fragmented prediction results and output the final traffic information including the road status.

[0010] Furthermore, the input form of the traffic corpus database is traffic-related questions in navigation question-and-answer communities and user service records, and the output form is structured traffic data including OD and road status.

[0011] Furthermore, the task understanding module calls the OpenAI API and uses the constructed traffic corpus database to train ChatGPT to parse complex traffic information service requirements into multiple subtasks, and returns the subtask type and its lightweight data format, wherein the information contained in the lightweight data format includes at least the predicted starting point, end point, start time and end time of the subtask, so as to conveniently express complex information and trigger the execution of the task module.

[0012] Furthermore, the task execution module is implemented using an artificial intelligence Transformer model and trained using preset traffic data to achieve high-precision prediction of road network indicators; the traffic data includes traffic flow, vehicle speed and travel time.

[0013] Furthermore, the result summary module calls the OpenAI API again, uses the constructed traffic corpus database to train ChatGPT to summarize and infer the fragmented prediction results, and provides intelligent indicator evaluation and targeted management suggestions. The intelligent indicator evaluation is based on the national standard by default, and also supports the road network management unit to change the indicator evaluation basis according to the actual situation.

[0014] Another technical solution adopted by the present invention is:

[0015] A traffic information service method based on ChatGPT comprises the following steps:

[0016] S1. Build a traffic corpus database, and train ChatGPT based on the built traffic corpus database to obtain task understanding function; use the trained ChatGPT to parse user requests for traffic information services to return traffic information prediction subtasks including OD and time;

[0017] S2, execute the traffic information prediction subtask and return the fragmented prediction results;

[0018] S3. Use the traffic corpus database to train ChatGPT to obtain the result summarization function; use the trained ChatGPT to summarize and infer the fragmented prediction results, and output the final traffic information including the road status.

[0019] Furthermore, the step S1 comprises:

[0020] S11, determining the input form and output form of the traffic corpus database;

[0021] S12. Register and subscribe to the OpenAI API, obtain an API key, install the OpenAI Python SDK, use the command: pip install openai, import the openai module in the Python software, and use the API key for authentication, call the gpt-3.5-turbo model and import the traffic corpus database for model fine-tuning.

[0022] Furthermore, the step S2 is implemented using an artificial intelligence Transformer model, and the Transformer model is trained in the following manner:

[0023] The historical inflow and outflow data are used as input and are expressed in the following formats:

[0024]

[0025] In the formula, O t The matrix represents the traffic flow of each element entering from different stations in the historical period before the current period t, D t represents the traffic flow at the exit station, and the two constitute the set and ; Matrix O t Each element o in ti represents the traffic flow from different stations i in the historical period before the current period t, and the matrix D t Each element d in ti represents the traffic volume leaving different stations i in the historical period before the current period t; l represents the number of historical time periods observed;

[0026] Set the input of Transformer in different channels to: ; For the coding layer part:

[0027]

[0028] In the formula, o, d, and h are the three channels of Transformer respectively; Indicates the hidden layer size of the Transformer structure of this channel, is a constant term;

[0029] In order to fully explore the temporal characteristics of traffic flow data, one-hot encoding is used to discretize time labels, and all codes are concatenated. The concatenated vector is set as d time Represents the concatenated code length, generates a mapping matrix, and Mapped to the dimension of the encoder structure; the input carrying time information is calculated by the following formula:

[0030]

[0031] In the formula, represents the concatenated vector, represents the dimension transformation matrix, d label Represents the amount of time information;

[0032] Input information is fed into the multi-head attention module to adjust its own sequence features. The input Q, K, and V are all

[0033]

[0034]

[0035] In the formula, h represents the number of attention heads; the final latent vector matrix of the encoder is obtained, which is expressed as:

[0036]

[0037] Where LN stands for layer normalization; To complete the result matrix after adjusting the characteristics of the own sequence, is the original input, the idea of ​​residual network is used here; ReLU is a nonlinear activation function; express, express, express, All are constant terms;

[0038] For the decoding layer, Q, K, and V of the multi-head attention module are The current effective period is t; the decoder latent vector is obtained through the feedforward network and residual connection , and finally the prediction output for the t+1 period can be obtained through linear mapping:

[0039]

[0040] Continue to the next step of decoding, the last valid period becomes t+1; after looping r times, the final prediction result of the channel is obtained

[0041] Furthermore, the step S3 comprises:

[0042] S31, converting the obtained fragmented prediction results into natural language through a preset mode;

[0043] S32. Import the converted natural language into the fine-tuned ChatGPT to summarize a large number of fragmented prediction results.

[0044] Another technical solution adopted by the present invention is:

[0045] A traffic information service device based on ChatGPT, comprising:

[0046] at least one processor;

[0047] at least one memory for storing at least one program;

[0048] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0049] The beneficial effects of the present invention are as follows: the present invention analyzes and processes road conditions based on ChatGPT and artificial intelligence Transformer algorithms, and predicts road network indicators using existing data such as traffic flow, vehicle speed, and travel time. The prediction results are summarized and summarized by the trained ChatGPT to obtain overall traffic information about road sections and road networks, providing drivers and road network management units with more intelligent and concise traffic information services, making it easier to grasp real-time traffic conditions, and having high practicality and convenience in the field of traffic management. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 is a schematic diagram of the steps of a traffic information service method based on ChatGPT in an embodiment of the present invention;

[0052] Figure 2 It is a detailed schematic diagram of each step of the traffic information service method based on ChatGPT in an embodiment of the present invention;

[0053] Figure 3 It is a schematic diagram of the flow of the artificial intelligence Transformer algorithm for executing the task module in an embodiment of the present invention;

[0054] Figure 4 It is a schematic diagram of the intelligent information service summarized in the embodiment of the present invention;

[0055] Figure 5 is a schematic diagram of an intelligent information service for congestion evaluation in an embodiment of the present invention;

[0056] Figure 6 is a schematic diagram of an intelligent information service for managing suggestions in an embodiment of the present invention;

[0057] Figure 7 It is a schematic diagram of the intelligent information service of reasoning deduction in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0059] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0060] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0061] In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0062] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0063] In order to solve the technical problems existing in the prior art, the purpose of the present invention is to provide a traffic information service system and method based on ChatGPT, which utilizes existing traffic flow, vehicle speed, travel time and other data, and uses an artificial intelligence Transformer algorithm to predict road network indicators. The prediction results are summarized by the fully trained ChatGPT to obtain the overall traffic information about road sections and road networks, providing drivers and road network management units with more intelligent and concise traffic information services, making it easier to grasp real-time traffic status, and having high practicality and convenience in the field of traffic management.

[0064] This embodiment provides a traffic information service system based on ChatGPT, including:

[0065] Traffic corpus database, used for personalized training of ChatGPT in the traffic field, to convert natural language into structured traffic data including OD and road status;

[0066] The task understanding module is used to parse the user's request for traffic information services and decompose the request into multiple traffic information prediction subtasks;

[0067] The task execution module is used to execute the parsed traffic information prediction subtask and return the fragmented prediction results;

[0068] The result summary module is used to summarize, infer and deduce the fragmented prediction results and output the final traffic information including the road status.

[0069] Among them, the traffic corpus database can be added, deleted, modified and checked according to the functions that the system wants to achieve, without the need to update and debug other modules, and can be flexibly constructed and retrained; the task understanding module can directly use voice or simple natural language to input traffic information service requirements, without the need for users to manually type or use sophisticated traffic professional terms, thereby increasing the safety and convenience of interaction during driving or road network management; the task execution module uses existing traffic flow, vehicle speed, travel time and other data to train artificial intelligence algorithms, breaking the limitations of existing navigation software that the prediction accuracy depends on user-uploaded data and the quality is difficult to guarantee; the result summary module, in addition to providing basic information services on traffic elements, can also realize intelligent information services such as unobstructed lane recommendations, road network global information summary and induction, road network topology structure analysis, management measures recommendations for specific congested sections, and reasoning and deduction of section associations, thereby improving users' travel experience and simplifying managers' workflow.

[0070] As an optional implementation method, the traffic corpus database takes traffic-related questions in navigation question-and-answer communities and user service records as input, contains rich personalized expressions, and the question objects can be divided into drivers and road network management units. The output form is structured traffic data including OD and road status.

[0071] The task understanding module calls the OpenAI API and uses the constructed traffic corpus database to train ChatGPT to parse complex traffic information service requirements into multiple subtasks, and returns the subtask type and its lightweight data format. The information includes at least the predicted starting point, end point, start time and end time of the subtask, which can easily express complex information and trigger the execution of the task module. The task understanding module can directly input traffic information service requirements using voice or simple natural language, without the need for users to manually type or use sophisticated traffic professional terms, increasing the safety and convenience of interaction during driving or road network management.

[0072] The task execution module uses existing data such as traffic flow, vehicle speed, travel time, etc. to train artificial intelligence algorithms, breaking the limitations of existing navigation software that the prediction accuracy depends on user-uploaded data and the quality is difficult to guarantee.

[0073] The result summary module calls the OpenAI API again, and uses the constructed traffic corpus database to train ChatGPT to summarize and generalize, reason and deduce prediction results, and provide intelligent indicator evaluation and targeted management suggestions. The indicator evaluation defaults to the national standard, and also supports the road network management unit to change the indicator evaluation basis according to actual conditions. In addition to providing basic information services for traffic elements, the result summary module can also provide intelligent information services such as recommendation of unblocked lanes, summary and induction of global road network information, analysis of road network topology, recommendation of management measures for specific congested sections, and reasoning and deduction of section associations, which can improve the user's travel experience and simplify the manager's workflow.

[0074] like Figure 1 As shown, this embodiment also provides a traffic information service method based on ChatGPT, comprising the following steps:

[0075] S1. Build a traffic corpus database, and train ChatGPT based on the built traffic corpus database to obtain task understanding function; use the trained ChatGPT to parse user requests for traffic information services to return traffic information prediction subtasks including OD and time;

[0076] S2, execute the traffic information prediction subtask and return the fragmented prediction results;

[0077] S3. Use the traffic corpus database to train ChatGPT to obtain the result summarization function; use the trained ChatGPT to summarize and infer the fragmented prediction results, and output the final traffic information including the road status.

[0078] In some optional embodiments, step S1 includes the following steps S11-S12:

[0079] S11. The format of the traffic corpus database is as follows: "The output I give is as follows: ..., I hope your output is in Json format as follows: ... ", the natural language input and structured traffic data output constitute a mapping table, as shown in Table 1 below,

[0080] Table 1 Example table of traffic corpus database

[0081]

[0082] S12. Register and subscribe to the OpenAI API, obtain an API key, install the OpenAI Python SDK, use the command: pip install openai, import the openai module in Python, and use the API key for authentication, call the gpt-3.5-turbo model and import the traffic corpus database for model fine-tuning, such as Figure 2 shown.

[0083] In some optional embodiments, step S2 includes the following steps S21-S22:

[0084] S21. Select 646,436 gantry data (including multiple fields such as truck ratio, temperature, rainfall, wind speed, etc.) from September 6, 2022 to October 12, 2022 from the 10 highways in Guangzhou City for preprocessing and divide them into training set and test set.

[0085] S22, using historical inflow and outflow data as input, expressed in the following formats:

[0086]

[0087] O t The matrix represents the traffic flow of each element entering from different stations in the historical period before the current period t, D t represents the traffic flow at the exit station, and the two constitute the set and Obviously, Where l represents the number of historical time periods observed. Based on the previous formula, a multi-channel traffic volume prediction model framework considering spatiotemporal correlation is proposed.

[0088] First, set the input of the Transformer in different channels to: . For the encoding layer part:

[0089]

[0090] in: Indicates the size of the hidden layer of the Transformer structure of the channel. In order to fully explore the time characteristics of traffic flow data, time information such as month, day, hour, and whether it is a holiday or weekend is added to the model. Use one-hot encoding to discretize time labels, and concatenate all the codes. Let the concatenated vector be d time Represents the concatenated code length, and then uses the following formula to generate the mapping matrix: Mapped to the dimension of the encoder structure:

[0091]

[0092] Where: pos∈[1,d time ]express The position of the element in Indicates which dimension is mapped to. The above formula can generate the dimension conversion matrix as follows: Therefore, the input carrying time information can be calculated as follows:

[0093]

[0094] Input it into the multi-head attention module, adjust its own sequence features, and input Q, K, and V are all

[0095]

[0096]

[0097] in h represents the number of attention heads. Finally, the latent vector matrix of the encoder is obtained, which is expressed as:

[0098]

[0099] For the decoding layer, Q, K, and V of the multi-head attention module are The current effective period is t, and this method can flexibly grasp the impact of different past periods on the future. Then, the decoder latent vector is obtained through a simple feedforward network and residual connection Finally, the prediction output for the t+1 period can be obtained through linear mapping:

[0100]

[0101] After that, the next step of decoding is continued. At this time, the last valid period becomes t+1. After looping r times, the final prediction result of the channel is obtained. ,like Figure 3 shown.

[0102] In some optional embodiments, step S3 includes the following steps S31-S32:

[0103] S31. Convert the fragmented prediction results obtained in S22 into natural language through a fixed pattern in the following format: "The average vehicle speed from G000444003005020040 (gantry number) to G000444003054020040 is 52.363885939121246, and the average vehicle speed from G000444003009020040 to G000444003007020040 is 38.958147168159485..."

[0104] S32, import the fine-tuned ChatGPT model to summarize a large number of fragmented prediction results, such as Figure 4 As shown in the table 2, the default evaluation and prediction indicators are based on the Urban Traffic Operation Status Evaluation Standard (GB / T 33171-2016), and the road network management unit is also supported to change the evaluation basis of the indicators according to the actual situation, such as Figure 5 As shown; recommend management measures for specific congested sections to provide reference for decision-making, such as Figure 6 As shown in the figure, the association rules of road sections in the road network are summarized, and the congestion conditions of unknown road sections are directly deduced from the congestion prediction results of known data sections, such as Figure 7 shown.

[0105] Table 2 Example of default basis for indicator evaluation

[0106]

[0107] In summary, the system and method of this embodiment have at least the following advantages and beneficial effects compared to the prior art:

[0108] (1) This example uses structured natural language to interact with users to meet personalized needs: drivers can reduce the potential dangers of operating navigation software while driving and increase efficiency through the voice-to-text conversion function; road network management units can use the functions of summary, induction, and deductive reasoning to reduce the cost of repeated predictions and reduce work intensity.

[0109] (2) This example fully exploits the value of data and realizes lane-level traffic flow prediction: the traffic corpus database has data from a wide range of sources; the algorithm training data uses highway gantry data with a spatial accuracy of lane level and a temporal accuracy of 15 minutes; the prediction model uses an advanced Transformer model with high prediction quality.

[0110] (3) This example has good market space and development prospects for two groups: drivers and road network management units: the driver side can be integrated with navigation software or smart vehicles, use voice interaction to assist in optimizing navigation, recommend unobstructed lanes, provide vehicles with more intelligent driving support, and achieve a safer and more comfortable driving experience; the road network management side can provide governments, enterprises, regulatory departments, etc. with intelligent functions such as road network global information summary, road network topology structure analysis, recommendation of control measures for specific congested sections, reasoning and deduction of section associations, and inference of congestion causes, which will help improve management efficiency and quickly alleviate congestion.

[0111] (4) This example has strong generalization ability: With the continuous iteration of GPT and AI technology, the system will become more intelligent. Currently, ChatGPT-4API has not been officially released, but combined with the development trend of generating AI images based on semantics, the system will be able to automatically generate traffic maps and prediction charts; ChatGPT as a controller can connect more traffic models and can be easily promoted in the transportation industry.

[0112] This embodiment also provides

[0113] A traffic information service device based on ChatGPT, comprising:

[0114] at least one processor;

[0115] at least one memory for storing at least one program;

[0116] When the at least one program is executed by the at least one processor, the at least one processor implements Figure 1 The method shown.

[0117] A traffic information service device based on ChatGPT in this embodiment can execute a traffic information service method based on ChatGPT provided by the method embodiment of the present invention, can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.

[0118] The present application also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 1 The method shown.

[0119] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0120] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0123] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0124] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0125] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0126] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0127] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A traffic information service method based on ChatGPT, characterized in that: The following steps are involved: S1. Build a traffic corpus database, and train ChatGPT based on the built traffic corpus database to obtain task understanding function; use the trained ChatGPT to parse user requests for traffic information services to return traffic information prediction subtasks including OD and time; S2, execute the traffic information prediction subtask and return the fragmented prediction results; S3. Use the traffic corpus database to train ChatGPT to obtain the result summarization function; use the trained ChatGPT to summarize and infer the fragmented prediction results, and output the final traffic information including the road status; The step S2 is implemented by using a Transformer model, and the Transformer model is trained in the following manner: historical inflow and outflow data are used as input, and are respectively expressed in the following formats: In the formula, O t The matrix represents the traffic flow of each element entering from different stations in the historical period before the current period t, D t represents the traffic flow at the exit station, and the two constitute the set and Matrix O t Each element o in ti represents the traffic flow from different stations i in the historical period before the current period t, and the matrix D t Each element d in ti represents the traffic volume leaving different stations i in the historical period before the current period t; l represents the number of historical time periods observed; Set the input of Transformer in different channels to: For the encoding layer part: In the formula, All are constant terms; o, d, h are the three channels of Transformer respectively; In order to fully explore the temporal characteristics of traffic flow data, one-hot encoding is used to discretize time labels, and all codes are concatenated. The concatenated vector is set as d time Represents the concatenated code length, generates a mapping matrix, and Mapped to the dimension of the encoder structure; the input carrying time information is calculated by the following formula: In the formula, represents the concatenated vector, represents the dimension transformation matrix, d label Represents the amount of time information; Input information is fed into the multi-head attention module to adjust its own sequence features. The input Q, K, and V are all In the formula, h represents the number of attention heads; the final latent vector matrix of the encoder is obtained, which is expressed as: Where LN represents layer normalization, To complete the result matrix after adjusting the characteristics of the own sequence, ReLU is a nonlinear activation function; express, express, express, All are constant terms; For the decoding layer, Q, K, and V of the multi-head attention module are The current effective period is t; the decoder latent vector is obtained through the feedforward network and residual connection Finally, the prediction output for the t+1 period can be obtained through linear mapping: Continue to the next step of decoding, the last valid period becomes t+1; after looping r times, the final prediction result of the channel is obtained 2. A traffic information service method based on ChatGPT according to claim 1, characterized in that: The steps S1, including: S11, determining the input form and output form of the traffic corpus database; S12. Register and subscribe to the OpenAI API, obtain an API key, install the OpenAI Python SDK, use the command: pip install openai, import the openai module in the Python software, and use the API key for authentication, call the gpt-3.5-turbo model and import the traffic corpus database for model fine-tuning.

3. The traffic information service method based on ChatGPT according to claim 1, characterized in that: The steps S3, including: S31, converting the obtained fragmented prediction results into natural language through a preset mode; S32. Import the converted natural language into the fine-tuned ChatGPT to summarize a large number of fragmented prediction results.

4. A traffic information service system based on ChatGPT, used to execute a traffic information service method based on ChatGPT as claimed in any one of claims 1 to 3, characterized in that: include: Traffic corpus database, used for personalized training of ChatGPT in the traffic field, to convert natural language into structured traffic data including OD and road status; The task understanding module is used to parse the user's request for traffic information services and decompose the request into multiple traffic information prediction subtasks; The task execution module is used to execute the parsed traffic information prediction subtask and return the fragmented prediction results; The result summary module is used to summarize, infer and deduce the fragmented prediction results and output the final traffic information including the road status.

5. A traffic information service system based on ChatGPT according to claim 4, characterized in that: The input form of the traffic corpus database is traffic-related questions in navigation question-and-answer communities and user service records, and the output form is structured traffic data including OD and road status.

6. A traffic information service system based on ChatGPT according to claim 4, characterized in that: The task understanding module calls the OpenAI API and uses the constructed traffic corpus database to train ChatGPT to parse complex traffic information service requirements into multiple subtasks, and returns the subtask type and its lightweight data format, where the information contained in the lightweight data format includes at least the predicted starting point, end point, start time and end time of the subtask, so as to conveniently express complex information and trigger the execution of the task module.

7. A traffic information service system based on ChatGPT according to claim 4, characterized in that: The task execution module is implemented using a Transformer model and trained using preset traffic data to achieve high-precision prediction of road network indicators; Traffic data includes traffic flow, vehicle speed and travel time.

8. The traffic information service system based on ChatGPT according to claim 4, characterized in that: The result summary module calls the OpenAI API again and uses the constructed traffic corpus database to train ChatGPT to summarize and infer the fragmented prediction results, and provides intelligent indicator evaluation and targeted management suggestions.

9. A traffic information service device based on ChatGPT, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Intelligent question-answering method, system and device for traffic optimization strategy, and medium

    CN111914099A