Electronic device and traffic data tag generation method
By segmenting traffic public opinion text data and performing semantic analysis on the annotation information generation model, combined with load balancing and road topology networks, the problems of low accuracy in traffic public opinion data label classification and insufficient early warning capabilities in existing technologies have been solved, enabling real-time perception and predictive early warning of traffic incidents.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO HISENSE TRANS TECH
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-08
AI Technical Summary
Existing methods lack an understanding of complex semantics and contextual relationships when processing traffic-related public opinion data, resulting in insufficient accuracy in label classification. Furthermore, traditional systems lack real-time perception and adaptive capabilities, making it difficult to conduct effective traffic risk warnings.
By segmenting traffic-related public opinion text data and using labeled information to generate models for semantic understanding and analysis, and combining load balancing principles to call models in parallel, information labeling results are generated. Furthermore, by predicting the propagation path and spatiotemporal evolution of traffic events through road topology networks, early warning information is generated.
It improved the accuracy and processing efficiency of information labeling results, enabled real-time perception and predictive early warning of traffic incidents, and enhanced the system's adaptability.
Smart Images

Figure CN121350255B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to data processing technology. More specifically, it relates to an electronic device and a method for generating traffic data tags. Background Technology
[0002] Traffic-related public opinion originates from multiple channels, including news, social media, and government platforms. The data is mostly in the form of unstructured text, resulting in fragmented information and significant differences in expression. Existing methods primarily rely on keyword matching or static rules, lacking an understanding of complex semantics and contextual relationships, leading to insufficient accuracy in label classification. Summary of the Invention
[0003] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides an electronic device and a method for generating traffic data tags.
[0004] In a first aspect, embodiments of this disclosure provide an electronic device, including: a controller configured to: process traffic public opinion text data into blocks to obtain multiple data blocks; input at least one of the multiple data blocks and prompt word information into a labeling information generation model to obtain at least one information labeling result, wherein the prompt word is used to instruct the labeling information generation model to determine the information labeling result of the traffic event corresponding to the data block by performing semantic understanding and analysis on the data block, and the information labeling result includes a label of the corresponding traffic event and an intersection sign of the intersection where the event occurred.
[0005] In this embodiment, the traffic public opinion text data is first divided into blocks. Then, the data blocks and prompt word information obtained from the blocks are input into the annotation information generation model to obtain at least one information annotation result. By processing the blocks in this way, the length of the text data can be reduced, and the processing success rate and processing efficiency can be improved. By understanding and analyzing the data blocks based on the prompt word information through the annotation information generation model, unstructured text data, fragmented information and text data with significantly different expression methods can be effectively understood to obtain structured information annotation results. Moreover, by understanding complex semantics and contextual relationships, the accuracy of the information annotation results can be improved, thereby improving the utilization rate of the information annotation results.
[0006] In some embodiments of this disclosure, the controller is specifically configured to: obtain the word segmentation result of the traffic public opinion text data, the word segmentation result including multiple words, the part-of-speech tag corresponding to the word segment, and the position information of the word segment in the traffic public opinion text data; based on the word segmentation result, obtain the sentence segmentation result corresponding to the traffic public opinion text data, the sentence segmentation result including multiple sentences, and the position information of the sentences in the traffic public opinion text data; based on the sentence segmentation result, obtain the block segmentation result of the traffic public opinion text data, the block segmentation result including the multiple data blocks, and the position information of the data blocks in the traffic public opinion text data.
[0007] In this embodiment of the disclosure, by sequentially performing word segmentation, sentence segmentation, and block segmentation, the resulting data blocks can be made more detailed and accurate.
[0008] In some embodiments of this disclosure, the controller is specifically configured to: allocate the multiple data blocks to multiple worker threads based on the load balancing principle; and, based on the multiple worker threads, call the annotation information generation model in parallel, and perform speech understanding and analysis based on the input data blocks and prompt word information through the annotation information generation model to obtain the at least one information annotation result.
[0009] In this embodiment of the disclosure, based on the principle of load balancing, the multiple data blocks are allocated to multiple worker threads; then, based on the multiple worker threads, the annotation information generation model is called in parallel to annotate the traffic public opinion text data, which can improve the information annotation efficiency.
[0010] In some embodiments of this disclosure, the information labeling result further includes target information of the traffic event; the controller is further configured to: filter the at least one information labeling result based on the target information and filtering rules to obtain at least one final information labeling result; when the target information includes the identification confidence level of the traffic event, the filtering rule includes filtering out information labeling results with identification confidence levels less than or equal to a first confidence level threshold; when the target information includes the timestamp of the traffic event, the filtering rule includes filtering out information labeling results with timestamps prior to a preset duration; when the target information includes evidence text corresponding to the traffic event, the filtering rule includes merging multiple information labeling results where the evidence texts are related and the tags and intersection signs match; when the target information includes timestamps and source information, the filtering rule includes merging multiple information labeling results where timestamps, tags, and intersection signs match and the sources are different.
[0011] In this embodiment of the disclosure, by filtering the at least one information labeling result based on the target information and filtering rules, invalid information labeling results and duplicate information labeling results can be removed, thus making the final information labeling result more accurate.
[0012] In some embodiments of this disclosure, the controller is further configured to: acquire the road topology network corresponding to the target intersection identifier in the first information annotation result, and the propagation time information between adjacent intersections corresponding to the road topology network, wherein the first information annotation result is one of the at least one information annotation results; generate warning information based on the road topology network and the propagation time information, wherein the warning information includes a warning intersection identifier, a warning label, and an estimated arrival time; wherein, in the road topology network, the warning intersection indicated by the warning intersection identifier and the target intersection indicated by the target intersection identifier belong to the same transmission path, the warning label is determined based on the first label in the first information annotation result, and the estimated arrival time is determined based on the transmission time between the target intersection and the warning intersection in the propagation time information.
[0013] In this embodiment of the disclosure, road topology network and propagation time information can be used to predict possible traffic events based on existing traffic events, thereby achieving predictive early warning of traffic events.
[0014] In some embodiments of this disclosure, the propagation time information includes at least one of the following: the propagation time between adjacent intersections in different time periods, and the propagation time between adjacent intersections under different road conditions.
[0015] In this embodiment of the disclosure, the propagation time information is subdivided according to time period and road conditions, thereby making the determined estimated arrival time more accurate.
[0016] In some embodiments of this disclosure, the warning information further includes impact level information, which is used to indicate the degree of impact of the traffic event corresponding to the first information labeling result on the warning intersection.
[0017] In this embodiment of the disclosure, by adding impact level information to the warning information, the impact level of the traffic event corresponding to the first information labeling result on the warning intersection can be indicated. Thus, users can determine the corresponding countermeasures based on the impact level information, which can improve the user experience.
[0018] In some embodiments of this disclosure, the prompt word information includes multiple tags, each tag including an initial tag confidence level. The controller is further configured to: update the confidence level of a first tag based on at least one of a model output confidence level and a decay factor, and the initial tag confidence level, to obtain a first confidence level for the first tag. The model output confidence level is used to indicate the identification confidence level of the labeling information generation model in recognizing the traffic event corresponding to the first tag. The decay factor is used to indicate the decay coefficient of the first tag over time. The first tag is any one of the multiple tags. If the first confidence level is less than or equal to a first confidence level threshold, the first tag is determined to be in a pending verification state. If the first tag is verified to be usable in the pending verification state, the pending verification state of the first tag is canceled, and the first confidence level is updated to a second confidence level, which is greater than the first confidence level threshold. If the first tag is verified to be unusable, the first tag is deleted from the multiple tags.
[0019] In this embodiment of the disclosure, by setting a tag update mechanism and combining it with a manual verification mechanism, the accuracy and usability of the tags can be maintained at all times, thereby improving the accuracy of information labeling.
[0020] In some embodiments of this disclosure, the controller is further configured to: when the second label in the second information labeling result is verified to be correct, acquire at least one feature in the traffic public opinion text data corresponding to the second information labeling result; update the weight of the first feature associated with the second label from a first weight to a second weight, the second weight being greater than the first weight, and the first feature being one of the at least one feature; update the confidence level of the second label from a third confidence level to a fourth confidence level, the fourth confidence level being greater than the third confidence level; when the third label in the third information labeling result is modified to a fourth label, acquire at least one target feature in the traffic public opinion text data corresponding to the third information labeling result; update the weight of the second feature associated with the third label from a third weight to a fourth weight, the fourth weight being less than the third weight, and the second feature being one of the at least one target feature; update the weight of the third feature associated with the fourth label from a fifth weight to a sixth weight, the sixth weight being less than the fifth weight, and the third feature being one of the at least one target feature; update the weight of the third feature associated with the fourth label from a fifth weight to a sixth weight, the sixth weight being less than the fifth weight, and the third feature being one of the at least one target feature. The controller is further configured to: update the confidence level of the third label from the fifth confidence level to the sixth confidence level, where the sixth confidence level is less than the fifth confidence level; update the confidence level of the fourth label from the seventh confidence level to the eighth confidence level, where the eighth confidence level is greater than the seventh confidence level; the controller is also configured to: update the confidence level of the label and the weight of the feature associated with the label to the corresponding label recognition rule when the prompt word information also includes a rule for determining the recognition confidence level of the label; update the confidence level of the label and the weight of the feature associated with the label to the determination rule when the prompt word information also includes an example sample; update the label and the feature associated with the label to the example sample of the corresponding label when the prompt word information also includes an example sample; or determine at least one candidate label corresponding to the traffic public opinion text data based on the confidence level of the label and the weight of the feature associated with the label; and add the at least one candidate label to the prompt word information.
[0021] In this embodiment of the disclosure, the accuracy and efficiency of information labeling of the labeling information generation model can be improved by manually verifying and correcting the labels, and then updating the label confidence and the weight of the label association features.
[0022] In some embodiments of this disclosure, the controller is further configured to: calculate the target weight of a target feature under at least one associated label within a target duration; determine the target feature as a new label if the target weight is greater than or equal to a weight threshold; or, calculate the co-occurrence support and co-occurrence confidence of the target feature and the target label within a target duration, wherein the co-occurrence support indicates the probability of the target feature and the target label co-occurring, and the co-occurrence confidence indicates the probability of the target label appearing when the target feature appears; determine the target feature as a new label if the co-occurrence support is greater than or equal to a support threshold and the co-occurrence confidence is greater than or equal to a second confidence threshold.
[0023] In this embodiment of the disclosure, the accuracy of information labeling in the labeling information generation model can be improved by mining the newly added labels.
[0024] Secondly, this disclosure provides a method for generating traffic data labels, including: dividing traffic public opinion text data into blocks to obtain multiple data blocks; inputting at least one of the multiple data blocks and prompt word information into a labeling information generation model to obtain at least one information labeling result, wherein the prompt word is used to instruct the labeling information generation model to determine the information labeling result of the traffic event corresponding to the data block by performing semantic understanding and analysis on the data block, and the information labeling result includes the label of the corresponding traffic event and the intersection sign of the intersection where the event occurred.
[0025] Thirdly, embodiments of this disclosure provide a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the traffic data tag generation method as shown in the second aspect.
[0026] Fourthly, embodiments of this disclosure provide a computer program product, including: when the computer program product is run on a computer, causing the computer to implement the traffic data tag generation method as shown in the second aspect. Attached Figure Description
[0027] To more clearly illustrate the implementation methods in the embodiments of this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings.
[0028] Figure 1 A hardware configuration block diagram of an electronic device 100 according to some embodiments is shown;
[0029] Figure 2 One of the flowcharts for a traffic data tag generation method according to some embodiments is shown;
[0030] Figure 3 A second schematic flowchart of a traffic data tag generation method according to some embodiments is shown;
[0031] Figure 4 The third schematic diagram of a traffic data tag generation method according to some embodiments is shown;
[0032] Figure 5 A fourth schematic flowchart of a traffic data tag generation method according to some embodiments is shown;
[0033] Figure 6 Fifth of a series of schematic flowcharts illustrating a traffic data tag generation method according to some embodiments;
[0034] Figure 7 This is the sixth schematic flowchart of a traffic data tag generation method according to some embodiments. Detailed Implementation
[0035] To make the objectives and implementation methods of this disclosure clearer, the exemplary embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this disclosure. Obviously, the exemplary embodiments described are only some embodiments of this disclosure, and not all embodiments.
[0036] It should be noted that the brief descriptions of terms in this disclosure are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this disclosure. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0037] The terms "first," "second," "third," etc., used in this disclosure, in the specification, claims, and accompanying drawings are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0038] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0039] The electronic devices provided in this disclosure can take many forms, such as televisions, mobile phones, tablet computers, laptops, handheld computers, servers, or server clusters.
[0040] like Figure 1The electronic device 100 includes at least one of the following: a tuner / demodulator 110, a communicator 120, a detector 130, an external device interface 140, a controller 150, a display 160, an audio output interface 170, a user interface 180, an external memory, and a power supply.
[0041] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output.
[0042] The display 160 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user interface for displaying video content, image content, menu control interface, and user control UI.
[0043] The display 160 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0044] The communicator 120 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The electronic device 100 can establish the transmission and reception of control signals and data signals with an external control device or server through the communicator 120.
[0045] User interface 180 can be used to receive control signals from control device 100 (such as an infrared remote control). It can also be used to directly receive user input operation commands and convert the operation commands into commands that electronic device 100 can recognize and respond to; in this case, it can be called a user input interface.
[0046] Detector 130 is used to acquire signals from the external environment or to interact with the external environment. For example, detector 130 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 130 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 130 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0047] The external device interface 140 may include, but is not limited to, one or more of the following: High Definition Multimedia Interface (HDMI), analog or high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.
[0048] The tuner / demodulator 110 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.
[0049] In some embodiments, the controller 150 and the tuner 110 may be located in different separate devices, that is, the tuner 110 may also be located in an external device of the main device where the controller 150 is located, such as an external set-top box.
[0050] Controller 150 controls the operation of the electronic device and responds to user operations through various software control programs stored in memory (internal or external memory). Controller 150 controls the overall operation of electronic device 100. For example, in response to receiving a user command to select a UI object to display on display 160, controller 150 can perform operations related to the object selected by the user command.
[0051] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and random access memory (RAM), read-only memory (ROM), a first to an nth interface for input / output, a communication bus, etc.
[0052] RAM, also known as main memory, is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except during refresh) and is very fast, typically serving as temporary data storage for the operating system or other running programs. Its biggest difference from ROM is data volatility; data stored in RAM is lost when power is off. RAM is used in computers and digital systems to temporarily store programs, data, and intermediate results. ROM operates in a non-destructive read-only manner, allowing only reading and not writing. Once information is written, it is fixed and will not be lost even if power is cut off; therefore, it is also called fixed-function memory.
[0053] Users can input commands through a graphical user interface (GUI) displayed on the monitor 160, and the user input interface receives the user input commands through the GUI. Alternatively, users can input commands by entering specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0054] A "user interface" is the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form that the user can accept. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0055] With the acceleration of urbanization, traffic congestion, accidents, construction, and illegal driving incidents occur frequently and spread rapidly through news media, social media platforms, and forums. Traditional traffic management systems mainly rely on post-event statistics and fixed rules, which have the following shortcomings: Lag: the system often intervenes only after an event occurs, lacking real-time perception and early warning capabilities; Static tags: most existing systems use static tag libraries (such as accidents, congestion, construction), making it difficult to adapt to newly emerging traffic concepts and risk points in the public opinion context, resulting in low identification accuracy; Lack of prediction: there is a lack of effective modeling of the propagation path and spatiotemporal evolution of traffic risk events, making it impossible to provide early risk warnings; Insufficient adaptability: lacking feedback-based self-learning capabilities, the system accuracy decreases over time and is prone to "aging."
[0056] This disclosure provides an electronic device, including: a controller configured to: segment traffic public opinion text data to obtain multiple data blocks; input at least one of the multiple data blocks and prompt word information into a labeling information generation model to obtain at least one information labeling result, wherein the prompt word is used to instruct the labeling information generation model to determine the information labeling result of the traffic event corresponding to the data block by performing semantic understanding and analysis on the data block, and the information labeling result includes a label of the corresponding traffic event and an intersection sign of the intersection where the event occurred.
[0057] Among them, traffic-related text data can be traffic-related text data directly obtained from news media, social platforms, forums and other channels, or traffic-related text data filtered from text data obtained from news media, social platforms, forums and other channels. There is no limitation here.
[0058] Traffic-related public opinion text data is generally long text data, but the specific length of traffic-related public opinion text data is not limited here.
[0059] The traffic-related public opinion text data can be collected within a preset time window. The preset time window can be any time window. When real-time analysis of traffic events is required, the preset time window can be a time window within a preset duration before the current moment. In this way, the real-time information labeling results can be guaranteed.
[0060] Here, block processing refers to splitting data into semantically coherent and length-controllable sub-data blocks according to preset rules. The specific details can be determined based on actual usage requirements and are not limited here.
[0061] For example, the segmentation process can be segmented according to a fixed length, according to semantic similarity, or according to keyword anchoring, or it can be segmented using a pre-trained segmentation model.
[0062] At least one data block can be a portion or all of a plurality of data blocks, which is not limited here.
[0063] The prompt words can be determined based on the actual situation and are not limited here. The prompt words may also include the data format and specific data type of the model output.
[0064] Among them, at least one information labeling result can be the information labeling result corresponding to one traffic event or multiple traffic events respectively. For example, one information labeling result can correspond to one traffic event, and two or more information labeling results (which may be duplicated or not duplicated, where the intersection in different information labeling results is the same intersection, and other information in the information labeling results may be the same or different) can correspond to one traffic event, without limitation here.
[0065] The label is used to indicate a traffic incident. The label can be an identifier of the traffic incident, such as the name or icon of the traffic incident, and there is no limitation here.
[0066] For example, the labels could be congestion, accident, construction, traffic organization optimization, illegal driving, traffic light outage, etc.
[0067] Intersection signs are used to indicate intersections. Intersection signs can include the name, icon, geographical coordinates, etc., and there are no restrictions here.
[0068] The information annotation results may include other information besides labels and intersections, which is not limited here. For example, the information annotation results may also include the corresponding evidence text, the recognition confidence of the corresponding label, the timestamp information of the corresponding label, and the source information of the corresponding evidence text.
[0069] Among them, the evidence text can be the text content in the traffic public opinion text data that corresponds to the information labeling results, the timestamp information is used to indicate the time of occurrence of the traffic event indicated by the corresponding label, and the source information is used to indicate the source of the traffic public opinion text data (such as news, forums, etc.).
[0070] The annotation information generation model is a Transformer-based model with logical reasoning capabilities. Through unsupervised learning on large amounts of text data, it learns the syntax, semantics, and usage of language, enabling it to generate natural and fluent text. It is a large-scale language model capable of understanding and processing various natural language tasks; the specific model can be determined based on actual circumstances and is not limited here. Based on the semantic understanding and analysis capabilities of the annotation information generation model, it performs in-depth analysis and accurate labeling of massive amounts of traffic-related public opinion text data.
[0071] In some embodiments of this disclosure, a single traffic-related public opinion text data can be analyzed and labeled, or multiple traffic warning text data can be analyzed and labeled, or a large number of traffic warning text data can be analyzed and labeled; no limitation is made here.
[0072] In this embodiment, the traffic public opinion text data is first divided into blocks. Then, the data blocks and prompt word information obtained from the blocks are input into the annotation information generation model to obtain at least one information annotation result. By processing the blocks in this way, the length of the text data can be reduced, and the processing success rate and processing efficiency can be improved. By understanding and analyzing the data blocks based on the prompt word information through the annotation information generation model, unstructured text data, fragmented information and text data with significantly different expression methods can be effectively understood to obtain structured information annotation results. Moreover, by understanding complex semantics and contextual relationships, the accuracy of the information annotation results can be improved, thereby improving the utilization rate of the information annotation results.
[0073] In some embodiments of this disclosure, the controller is specifically configured to: obtain the word segmentation result of the traffic public opinion text data, the word segmentation result including multiple words, the part-of-speech tag corresponding to the word segment, and the position information of the word segment in the traffic public opinion text data; based on the word segmentation result, obtain the sentence segmentation result corresponding to the traffic public opinion text data, the sentence segmentation result including multiple sentences, and the position information of the sentences in the traffic public opinion text data; based on the sentence segmentation result, obtain the block segmentation result of the traffic public opinion text data, the block segmentation result including the multiple data blocks, and the position information of the data blocks in the traffic public opinion text data.
[0074] Among them, the position information of the word segment in the traffic public opinion text data is used to indicate the position of the corresponding word segment in the traffic public opinion text data; the position information of the clause in the traffic public opinion text data is used to indicate the position of the corresponding clause in the traffic public opinion text data; the position information of the data block in the traffic public opinion text data is used to indicate the position of the corresponding data block in the traffic public opinion text data.
[0075] Location information can also be understood as index information, and the specific form of location information is not limited in this embodiment. For example, location information can be the position of the starting and ending characters of the corresponding content (word segmentation, sentence segmentation, and data block) in the traffic public opinion text data. Characters can include Chinese characters, numbers, letters, punctuation marks, emoticons, line breaks, paragraph breaks, etc., and are not limited here.
[0076] In this embodiment of the disclosure, by sequentially performing word segmentation, sentence segmentation, and block segmentation, the resulting data blocks can be made more detailed and accurate.
[0077] In some embodiments of this disclosure, the controller is specifically configured to: allocate the multiple data blocks to multiple worker threads based on the load balancing principle; and, based on the multiple worker threads, call the annotation information generation model in parallel, and perform speech understanding and analysis based on the input data blocks and prompt word information through the annotation information generation model to obtain the at least one information annotation result.
[0078] The load balancing principle can be determined based on actual usage requirements, and is not limited here.
[0079] Among them, the worker thread can be a worker.
[0080] In this embodiment of the disclosure, based on the principle of load balancing, the multiple data blocks are allocated to multiple worker threads; then, based on the multiple worker threads, the annotation information generation model is called in parallel to annotate the traffic public opinion text data, which can improve the information annotation efficiency.
[0081] For example, traffic-related public opinion text data within a time window is obtained from news, social media, reports, and public opinion. The text is segmented using a word segmentation tool, and each word is labeled with its part of speech (e.g., noun, verb, punctuation). The start and end index positions of each word in the original text are also recorded, resulting in (word, tokenType, IntervalT). The segmented list is divided into sentences according to the following rules: when a specific punctuation mark (e.g., period, question mark, exclamation mark) is encountered, the current sentence is determined as a clause; when a stop word (e.g., "but," "however," etc.) is encountered, and the current sentence length is greater than or equal to a length threshold, the current sentence is determined as a clause; when a newline character (or paragraph break) is encountered, the current sentence is determined as a clause, and the position information (IntervalS) of each clause in the traffic-related public opinion text data is determined. Here, newline characters and paragraph breaks indicate the end of a sentence.
[0082] Initialize an empty block with a token count of 0. Iterate through each clause: calculate the token count (i.e., word count) of the current clause. If the sum of the current block's token count and the current clause's token count does not exceed the maximum limit, fill the current clause into the current block and update the current block's token count. If the sum of the current block's token count and the current clause's token count exceeds the maximum limit (e.g., 500), first save the current block (i.e., obtain a data block), then create a new empty block, repeat the above operation, and iterate until all clauses are filled into data blocks, resulting in multiple data blocks. Record the position information (IntervalC) of each data block in the traffic sentiment text data. When filling the next data block after the end of one data block, you can select adjacent data blocks to include some overlapping tokens (e.g., 50 tokens) to maintain context (e.g., fill the last clause from the previous data block into the next data block). Use the itertools.batch algorithm (an iterator-based batch splitting algorithm) to evenly distribute the data blocks to a preset number of worker processes. Data blocks in each Worker can be contiguous or non-contiguous; this is not a limitation. The number of data blocks in each Worker is calculated (e.g., total number of blocks / number of Workers) to ensure a relatively balanced processing load across Workers and avoid resource idleness. Each Worker calls the annotation information generation model API interface in parallel, parses the returned JSON format result data, and extracts three core elements: label type, intersection signage, and evidence information, obtaining multiple information annotation results. The evidence information can include evidence text, timestamp information, and source information.
[0083] For example, a prompt word template is shown below:
[0084] PROMPT_TEMPLATE = """
[0085] As a traffic analysis expert, please analyze the following text snippet and identify the traffic incidents mentioned and the intersections involved.
[0086] Text fragment: {text_chunk}
[0087] Please output in JSON format:
[0088] {{
[0089] "labels": ["Label1", "Label2", ...],
[0090] "intersections": ["intersection 1", "intersection 2", ...],
[0091] "confidences": [0.95, 0.87, ...],
[0092] "evidence": ["Original evidence 1", "Original evidence 2", ...]
[0093] }}
[0094] Available tags: congestion, accident, construction, traffic organization optimization, illegal driving, traffic light outage...;
[0095] """
[0096] In some embodiments of this disclosure, the information labeling result further includes target information of the traffic event; the controller is further configured to: filter the at least one information labeling result based on the target information and filtering rules to obtain at least one final information labeling result; when the target information includes the identification confidence level of the traffic event, the filtering rule includes filtering out information labeling results with identification confidence levels less than or equal to a first confidence level threshold; when the target information includes the timestamp of the traffic event, the filtering rule includes filtering out information labeling results with timestamps prior to a preset duration; when the target information includes evidence text corresponding to the traffic event, the filtering rule includes merging multiple information labeling results where the evidence texts are related and the tags and intersection signs match; when the target information includes timestamps and source information, the filtering rule includes merging multiple information labeling results where timestamps, tags, and intersection signs match and the sources are different.
[0097] Among them, the recognition confidence score is the accuracy and reliability of the labeling results output by the labeling information generation model.
[0098] The first confidence threshold can be determined based on the actual situation, and is not limited here.
[0099] The timestamp of the traffic event corresponds to the timestamp information of the above tags. Filtering based on the timestamp of the traffic event can satisfy the requirement of obtaining information labeling results with time requirements, such as information labeling results with real-time requirements.
[0100] The preset duration can be determined according to the actual situation and is not limited here.
[0101] Among them, the association relationship can be the existence of word segments (features) with the same part of speech and a similarity greater than or equal to the similarity threshold in the evidence text, or the existence of overlapping content in the evidence text, or the existence of content belonging to the same sentence in the traffic public opinion text data in the evidence text, even if there is no overlapping content in the evidence text, or other association relationships, which are not limited here.
[0102] Here, semantic similarity refers to the similarity between two word segments. Semantic similarity can be calculated using any similarity algorithm, and no limitation is made here. For example, the similarity algorithm can be Jaccard similarity.
[0103] The target information and filtering rules are not limited to those listed above and can be determined based on actual usage needs.
[0104] Specifically, filtering out information annotation results with a recognition confidence level less than or equal to the first confidence threshold, and filtering out information annotation results with timestamps earlier than a preset time period, represents filtering out invalid information annotation results. Merging multiple information annotation results where the evidence texts are related and the labels and intersection signs match, and merging multiple information annotation results where the timestamps, labels, and intersection signs match but the sources are different, represents filtering out duplicate information annotation results.
[0105] In this embodiment of the disclosure, by filtering the at least one information labeling result based on the target information and filtering rules, invalid information labeling results and duplicate information labeling results can be removed, thus making the final information labeling result more accurate.
[0106] In this embodiment, to address the semantic fragmentation problem in long text processing, an intelligent segmentation method based on part-of-speech analysis and sentence boundary recognition is proposed. By recognizing punctuation marks, logical transition words, and line break markers, the semantic integrity of each text block is ensured. Furthermore, a distributed worker architecture is used to parallelly call the annotation information generation model for processing, combined with a dynamic load balancing algorithm, significantly improving processing efficiency. The unique "tag-evidence-intersection" triple output format provides a structured and traceable data foundation for subsequent processing.
[0107] In some embodiments of this disclosure, the controller is further configured to: acquire the road topology network corresponding to the target intersection identifier in the first information annotation result, and the propagation time information between adjacent intersections corresponding to the road topology network, wherein the first information annotation result is one of the at least one information annotation results; generate warning information based on the road topology network and the propagation time information, wherein the warning information includes a warning intersection identifier, a warning label, and an estimated arrival time; wherein, in the road topology network, the warning intersection indicated by the warning intersection identifier and the target intersection indicated by the target intersection identifier belong to the same transmission path, the warning label is determined based on the first label in the first information annotation result, and the estimated arrival time is determined based on the transmission time between the target intersection and the warning intersection in the propagation time information.
[0108] The road topology network can be obtained through road topology network modeling or other methods, which are not limited here.
[0109] For example, road topology network modeling includes: constructing a directed graph G=(V, E), where vertices V represent intersections and edges E represent road connections. Each edge E(U→D) contains attributes: physical distance, number of lanes, road type, intersection identifier (where U and D are the intersection identifiers of two adjacent intersections), and level. A mapping database between intersection coordinates and topological relationships is established.
[0110] The propagation time information can be calculated or predicted based on historical statistical traffic data. It can be the average propagation time calculated from historical statistical traffic data between adjacent intersections, the average propagation time calculated from historical statistical traffic data between adjacent intersections for a specific time period and / or under a specific scenario, or other propagation times, which are not limited here.
[0111] If the traffic public opinion text data is real-time data, and the preset time window is a time window within a preset duration before the current moment, then the first information labeling result is any one of the at least one information labeling results; if the traffic public opinion text data is not real-time data, then the first information labeling result is the information labeling result after real-time filtering and repeated filtering.
[0112] The warning intersection sign indicates an intersection where a traffic incident may occur and a warning needs to be triggered (hereinafter referred to as a warning intersection). The warning label indicates the sign of a possible traffic incident. The estimated time of arrival indicates the time when a traffic incident will occur at the warning intersection. The estimated time of arrival is an estimate, not an absolute time; it may be a point in time or a period of time, and is not limited here.
[0113] The warning intersection and the target intersection can be two adjacent intersections on the same transmission path, or two intersections separated by a certain number of intersections; this is not limited here. If the warning intersection and the target intersection are not adjacent, then the intersections between them also need to be warned. Regardless of whether the warning intersection and the target intersection are adjacent, the intersections following the warning intersection in the direction from the target intersection to the warning intersection may or may not need to be warned; this can be determined based on the propagation of the traffic event occurring at the target intersection, and is not limited here.
[0114] The warning intersection can be an intersection upstream of the target intersection or an intersection downstream of the target intersection; the direction of propagation is not limited here.
[0115] The warning label can be the same as or different from the first label, depending on the actual situation, and is not limited here.
[0116] For example, if the first label is congestion, the warning label can be either congestion or accident; if the first label is accident, the warning label can be either accident or congestion; if the first label is construction, the warning label can be either congestion or accident.
[0117] Among them, the warning label can be an identifier for a predicted traffic event. The traffic event indicated by the warning label may not actually occur. Based on the warning label, the corresponding traffic event can be avoided through manual intervention, or even if the corresponding traffic event occurs, the impact or duration of the traffic event can be mitigated.
[0118] The estimated arrival time can be determined based on historical statistics of the transmission time between the target intersection and the warning intersection.
[0119] In this embodiment of the disclosure, road topology network and propagation time information can be used to predict the propagation path and arrival time of possible traffic events based on the traffic events that have already occurred, thereby achieving predictive early warning of traffic events.
[0120] In some embodiments of this disclosure, the propagation time information includes at least one of the following: the propagation time between adjacent intersections in different time periods, and the propagation time between adjacent intersections under different road conditions.
[0121] The different time periods can include weekdays and non-weekdays, various time periods on weekdays, various time periods on non-weekdays, peak hours on weekdays, off-peak hours on weekdays, peak hours on non-weekdays, and off-peak hours on non-weekdays. Traffic conditions can also be divided into multiple types, such as peak, mid-peak, and off-peak, which can be determined according to the actual situation and are not limited here.
[0122] Different road conditions can include congested road conditions, accident road conditions, construction road conditions, etc., or each road condition can be further subdivided into different severity levels. For example, congested road conditions can be subdivided into three levels: high, medium, and low (severe congestion, moderate congestion, and general congestion).
[0123] In some embodiments of this disclosure, the average vehicle speed between adjacent intersections at different times and / or different road conditions can be calculated based on historical GPS trajectory data, and then the corresponding propagation time can be calculated based on t = distance / historical average vehicle speed.
[0124] For example, assuming the label in the first information annotation result is "accident", the prediction engine is triggered to perform multi-path propagation calculation. Taking the downstream path P(U→D1→D2→...) of the target intersection (U) in the road topology network as an example, the propagation chain is calculated as follows:
[0125] First-order propagation: T1 = T + t1 (U → D1),
[0126] Second-order propagation: T2 = T1 + t2(D1→D2),
[0127] ...
[0128] Where T is the time when a traffic event occurs at the target intersection, t1 is the time required for the event to propagate from the target intersection to intersection D1, T1 is the estimated time to reach intersection D1, t2 is the time required for the event to propagate from intersection D1 to intersection D2, T2 is the estimated time to reach intersection D2, and so on. This allows us to obtain multiple warning messages corresponding to multiple warning intersections along a propagation path, and further obtain the warning messages corresponding to warning intersections along different propagation paths corresponding to the target intersection.
[0129] In this embodiment of the disclosure, the propagation time information is subdivided according to time period and road conditions, thereby making the determined estimated arrival time more accurate.
[0130] In some embodiments of this disclosure, the warning information further includes impact level information, which is used to indicate the degree of impact of the traffic event corresponding to the first information labeling result on the warning intersection.
[0131] The present disclosure does not limit the calculation method and process of the influence degree information, which can be determined according to the actual situation.
[0132] For example, the degree of influence information can be determined according to the following formula: .
[0133] in, Predicting the arrival of the 1st The impact intensity at each downstream intersection The initial impact intensity at the source intersection. : The number of road segments (hops) traversed from the source intersection to the target intersection. Natural constant : Decay time constant; : Maximum attenuation coefficient (0 < λ ≤ 1). It is a key parameter that controls the rate at which the influence intensity decays with the number of jumps k. The smaller the value, the faster the decay; The larger the value, the slower the decay, and the farther the influence propagates. This represents the maximum intensity percentage that an influence can retain at an infinite distance, ensuring that the influence does not completely disappear but tends to a stable value. The above formula simulates the baseline level of congestion that a major accident could cause across the entire region, avoiding the unreasonable scenario of the impact weakening or spreading indefinitely. Controlling the decay rate can be related to factors such as road density and intersection capacity. The ultimate scope of control over the impact can be correlated with the severity of the event itself. and It can also be used as a learnable parameter, optimized through a third-level feedback loop, so that the prediction model can continuously evolve.
[0134] In some embodiments of this disclosure, after generating early warning information, it is also possible to sort it by time urgency and prioritize the push of early warnings that are about to occur, and the propagation path and scope of influence can be visualized on the road topology network.
[0135] In this embodiment of the disclosure, by adding impact level information to the warning information, the impact level of the traffic event corresponding to the first information labeling result on the warning intersection can be indicated. Thus, users can determine the corresponding countermeasures based on the impact level information, which can improve the user experience.
[0136] In some embodiments of this disclosure, the prompt word information includes multiple tags, each tag including an initial tag confidence level. The controller is further configured to: update the confidence level of a first tag based on at least one of a model output confidence level and a decay factor, and the initial tag confidence level, to obtain a first confidence level for the first tag. The model output confidence level is used to indicate the identification confidence level of the labeling information generation model in recognizing the traffic event corresponding to the first tag. The decay factor is used to indicate the decay coefficient of the first tag over time. The first tag is any one of the multiple tags. If the first confidence level is less than or equal to a first confidence level threshold, the first tag is determined to be in a pending verification state. If the first tag is verified to be usable in the pending verification state, the pending verification state of the first tag is canceled, and the first confidence level is updated to a second confidence level, which is greater than the first confidence level threshold. If the first tag is verified to be unusable, the first tag is deleted from the multiple tags.
[0137] The initial confidence level can be preset or it can be the recognition confidence level of the corresponding label when the model outputs it for the first time; there is no limitation here.
[0138] The first confidence threshold can be determined based on the actual situation and is not limited here. For example, the first confidence threshold can be 0.3.
[0139] For example, the initial confidence level of the label The value can be 0.5, and the mapping relationship between the label confidence and the model output confidence is as follows: ,in, It can be the first The label confidence level before the update, if it is the first update, then , It can be the first The updated label confidence score can be either the recognition confidence score or a value normalized to the range of 0.5-1.0; no specific limitation is imposed here.
[0140] For example, the label confidence level can be periodically updated by setting a preset update cycle, with the decay formula as follows: ,in As the attenuation factor, For the update cycle.
[0141] In some embodiments of this disclosure, after the first tag is in a state of pending verification, the user is prompted to verify the first tag, thus enabling rapid verification of the first tag.
[0142] The second confidence level can be determined based on the actual situation and is not limited here. For example, the second confidence level can be the sum of the first confidence level and a preset value. When the sum of the first confidence level and the preset value is greater than 1, the second confidence level is 1. The preset value is not limited here.
[0143] In this embodiment of the disclosure, by setting a tag update mechanism and combining it with a manual verification mechanism, the accuracy and usability of the tags can be maintained at all times, thereby improving the accuracy of information labeling.
[0144] In some embodiments of this disclosure, the controller is further configured to: if the second label in the second information labeling result is verified to be correct, acquire at least one feature in the traffic public opinion text data corresponding to the second information labeling result; update the weight of the first feature associated with the second label from a first weight to a second weight, the second weight being greater than the first weight, the first feature being one of the at least one feature; update the confidence level of the second label from a third confidence level to a fourth confidence level, the fourth confidence level being greater than the third confidence level.
[0145] The second label can be any one of the at least one features, or a specific one of the at least one features; no limitation is made here. The second weight can be preset or determined based on the first weight, and the fourth confidence level can be preset or determined based on the third confidence level; no limitation is made here.
[0146] In some embodiments of this disclosure, if the second tag is verified as incorrect, the second tag can be deleted from multiple tags.
[0147] It is understandable that the second label being verified as correct actually means that the traffic event indicated by the evidence text corresponding to the second information labeling result is accurately labeled.
[0148] In some embodiments of this disclosure, the controller is further configured to: when the third label in the third information annotation result is modified to a fourth label, acquire at least one target feature in the traffic public opinion text data corresponding to the third information annotation result; update the weight of the second feature associated with the third label from a third weight to a fourth weight, the fourth weight being less than the third weight, and the second feature being one of the at least one target feature; update the weight of the third feature associated with the fourth label from a fifth weight to a sixth weight, the sixth weight being less than the fifth weight, and the third feature being one of the at least one target feature; update the confidence level of the third label from a fifth confidence level to a sixth confidence level, the sixth confidence level being less than the fifth confidence level; and update the confidence level of the fourth label from a seventh confidence level to an eighth confidence level, the eighth confidence level being greater than the seventh confidence level.
[0149] The third label can be any one of the at least one features, or a specific one of the at least one features; no limitation is made here. The fourth weight can be preset or determined based on the third weight; the sixth weight can be preset or determined based on the fifth weight; the sixth confidence level can be preset or determined based on the fifth confidence level; and the eighth confidence level can be preset or determined based on the seventh confidence level; no limitation is made here.
[0150] It is understandable that changing the third label in the third information annotation result to the fourth label indicates that the traffic event indicated by the evidence text corresponding to the third information annotation result is the traffic event indicated by the fourth label, not the traffic event indicated by the third label.
[0151] For example, the improvement in label confidence can be obtained using the following formula: ,in, It is the updated label confidence level. It is the confidence level before the update. To increase the margin.
[0152] The decrease in label confidence can be obtained using the following formula: ,in, It is the updated label confidence level. It is the confidence level before the update. To reduce the magnitude.
[0153] In some embodiments of this disclosure, the controller is further configured to: update the confidence level of the label and the weight of the feature associated with the label to the corresponding label recognition rule when the prompt word information also includes a rule for determining the recognition confidence level of the label; or update the confidence level of the label and the weight of the feature associated with the label to the determination rule when the prompt word information also includes a rule for determining the recognition confidence level of the label; or update the label and the feature associated with the label to the example sample of the corresponding label when the prompt word information also includes an example sample.
[0154] Among them, the associated features, or feature information, can be one or more keywords.
[0155] In this embodiment of the disclosure, when a label is manually confirmed to be correct, the confidence level of the label is increased, and the weight of the associated features is also increased. When an administrator corrects a label, the confidence level of the incorrect label and the weight of the associated features are reduced, while the confidence level of the correct label and the weight of the associated features are increased. By learning the correct pattern, the accuracy of subsequent recognition can be improved.
[0156] For example, the prompt words can be increased: if words such as 'rear-end collision' or 'scratch' appear in the text, it is more likely to be an accident label; if words such as 'queue' or 'slow traffic' appear, it is more likely to be a congestion label.
[0157] In this embodiment of the disclosure, the updated confidence level of the label and the weight of the features associated with the label are updated in the prompt word information, thereby guiding the labeling information generation model to pay more attention to these labels and associated features, and thus improving the accuracy of information labeling.
[0158] In some embodiments of this disclosure, the controller is further configured to: determine at least one candidate label corresponding to the traffic public opinion text data based on the confidence level of the label and the weight of the features associated with the label; and add the at least one candidate label to the prompt word information.
[0159] It is understandable that for some cases where labels and features are strongly correlated, a fast matching layer can be performed before understanding and analyzing them through the annotation information generation model. For example, when high-weight features appear in traffic public opinion text data, the associated candidate labels can be given directly, and then the candidate labels can be used as prompt words. The annotation information generation model can then make a fine judgment, which can improve the processing speed.
[0160] In some embodiments of this disclosure, the controller is further configured to: calculate the target weight of a target feature under at least one associated label within a target time period; and determine the target feature as a new label if the target weight is greater than or equal to a weight threshold.
[0161] The weight threshold can be determined based on the actual situation, and is not limited here.
[0162] In this embodiment of the disclosure, the weight relationship between features and associated tags can be used as a factor to consider in mining new tags. If a feature is associated with multiple tags and all of them have high weights, or is associated with a tag and has a particularly high weight, it can be called a new tag.
[0163] In some embodiments of this disclosure, the controller is further configured to: calculate the co-occurrence support and co-occurrence confidence of the target feature and the target label within a target time period, wherein the co-occurrence support is used to indicate the probability that the target feature and the target label co-occur, and the co-occurrence confidence is used to indicate the probability that the target label appears when the target feature appears; and determine the target feature as a new label when the co-occurrence support is greater than or equal to a support threshold and the co-occurrence confidence is greater than or equal to a second confidence threshold.
[0164] For example, the FP-Growth association mining algorithm can be run periodically (weekly) to analyze the co-occurrence patterns of labels and features, such as determining co-occurrence support and co-occurrence confidence, when feature X is found to satisfy:
[0165] If the co-occurrence support of X with the existing label Y is greater than the minimum support threshold (e.g., 0.01), the co-occurrence confidence of X with the existing label Y is greater than the minimum confidence threshold (e.g., 0.7), and X is not in the existing label system, then a new label is generated.
[0166] In some embodiments of this disclosure, an example sample corresponding to the new label can also be generated at the same time as the new label is generated (which can be determined by referring to the evidence text corresponding to label Y).
[0167] In some embodiments of this disclosure, new labels can be added directly to the prompt word information, or they can be added after manual verification and confirmation; this is not limited here. Simultaneously, the recognition rules and example samples corresponding to the new labels can be added to the prompt word information.
[0168] In this embodiment of the disclosure, the accuracy of information labeling in the labeling information generation model can be improved by mining the newly added labels.
[0169] In this embodiment of the disclosure, through human feedback and data mining, the accuracy of the tagging system is improved over time, and new tags can be automatically discovered and expanded, enabling the tagging system to have the ability to continuously learn and self-optimize.
[0170] In this embodiment, the system employs a unique human feedback reinforcement mechanism. When a label is manually confirmed to be correct, the weight of relevant feature words is automatically increased, and inefficient features are eliminated through a weight decay mechanism. The novel label discovery algorithm based on association rule mining can automatically identify emerging transportation concepts from massive amounts of data, ensuring the label system remains up-to-date. This self-evolutionary capability guarantees the accuracy and adaptability of the system's long-term operation.
[0171] In this embodiment, a fundamental shift in traffic management from passive response to proactive early warning is achieved by constructing a three-tiered intelligent closed-loop system of "perception-prediction-evolution." This system utilizes the deep semantic understanding capabilities of a labeled information generation model to achieve accurate real-time analysis of massive amounts of public opinion; a spatiotemporal propagation model based on road topology can predict the propagation path and impact range of hot-spot traffic events in advance, gaining valuable time for decision-making; a unique self-evolutionary mechanism enables the system to continuously learn from human feedback, constantly optimizing its identification accuracy and automatically discovering emerging traffic problems, ensuring long-term timeliness and adaptability. This significantly improves the intelligence level of traffic management and emergency response efficiency, providing reliable technical support for the construction of smart transportation.
[0172] To illustrate this solution in more detail, the following will use examples to illustrate it. Figures 2 to 7 To explain, it is understandable that Figures 2 to 7The steps involved may include more or fewer steps in actual implementation, and the order of these steps may also differ, as long as the traffic data tag generation method provided in this disclosure embodiment can be achieved. The executing entity of the traffic data tag generation method can be an electronic device, or a functional module or functional entity within the electronic device that can implement the traffic data tag generation method; no limitation is made here. Furthermore, the specific description of the traffic data tag generation method provided in this disclosure embodiment can be referred to the relevant description of the aforementioned electronic device, and the same or similar technical effects can be achieved; further details are omitted here.
[0173] Figure 2 The flowchart illustrates the steps of a traffic data tag generation method according to one or more embodiments of the present disclosure. The traffic data tag generation method may include steps S201 to S202.
[0174] S201. The traffic public opinion text data is divided into blocks to obtain multiple data blocks.
[0175] S202. Input at least one of the multiple data blocks and the prompt word information into the annotation information generation model to obtain at least one information annotation result.
[0176] The prompt word is used to instruct the annotation information generation model to determine the information annotation result of the traffic event corresponding to the data block by performing semantic understanding and analysis on the data block. The information annotation result includes the label of the corresponding traffic event and the intersection sign of the intersection where it occurred.
[0177] In some embodiments of this disclosure, combined with Figure 2 ,like Figure 3 As shown, the above S201 can be specifically implemented through S201a to S201c.
[0178] S201a. Obtain the word segmentation results of the traffic public opinion text data.
[0179] The word segmentation result includes multiple words, the part-of-speech tag of each word, and the position information of each word in the traffic public opinion text data.
[0180] S201b. Based on the word segmentation result, obtain the sentence segmentation result corresponding to the traffic public opinion text data.
[0181] The segmentation result includes multiple segments, as well as the position information of each segment in the traffic public opinion text data.
[0182] S201c. Based on the sentence segmentation result, obtain the block segmentation result of the traffic public opinion text data.
[0183] The segmentation result includes the multiple data blocks and the location information of the data blocks in the traffic public opinion text data.
[0184] In some embodiments of this disclosure, combined with Figure 3 ,like Figure 4 As shown, the above S202 can be specifically implemented through S202a to S202b.
[0185] S202a. Based on the load balancing principle, the multiple data blocks are allocated to multiple worker threads.
[0186] S202b: Based on the parallel invocation of the annotation information generation model by multiple working threads, the annotation information generation model performs speech understanding and analysis based on the input data block and prompt word information to obtain at least one information annotation result.
[0187] In some embodiments of this disclosure, the information annotation result also includes target information of the traffic event; combined with Figure 4 ,like Figure 5 As shown, after S202, the traffic data tag generation method provided in this embodiment may further include the following S203.
[0188] S203. Based on the target information and filtering rules, filter the at least one information labeling result to obtain at least one final information labeling result.
[0189] Specifically, when the target information includes the identification confidence level of the traffic event, the filtering rule includes filtering out information annotation results with an identification confidence level less than or equal to a first confidence level threshold; when the target information includes the timestamp of the traffic event, the filtering rule includes filtering out information annotation results with timestamps earlier than a preset time period; when the target information includes the evidence text corresponding to the traffic event, the filtering rule includes merging multiple information annotation results where the evidence texts are related and the labels and intersection signs match; when the target information includes timestamps and source information, the filtering rule includes merging multiple information annotation results where the timestamps, labels, and intersection signs match but the sources are different.
[0190] In some embodiments of this disclosure, combined with Figure 5 ,like Figure 6 As shown, after S202, the traffic data tag generation method provided in this embodiment may further include S204 and S205 as described below.
[0191] S204. Obtain the road topology network corresponding to the target intersection identifier in the first information annotation result, and the propagation time information between adjacent intersections corresponding to the road topology network.
[0192] The first information annotation result is one of the at least one information annotation results.
[0193] S205. Based on the road topology network and the propagation time information, generate early warning information.
[0194] The warning information includes a warning intersection sign, a warning tag, and an estimated arrival time. In the road topology network, the warning intersection indicated by the warning intersection sign and the target intersection indicated by the target intersection sign belong to the same transmission path. The warning tag is determined based on the first tag in the first information labeling result, and the estimated arrival time is determined based on the transmission time between the target intersection and the warning intersection in the propagation time information.
[0195] In some embodiments of this disclosure, the propagation time information includes at least one of the following: the propagation time between adjacent intersections in different time periods, the propagation time between adjacent intersections under different road conditions; and / or, the warning information also includes impact degree information, which is used to indicate the degree of impact of the traffic event corresponding to the first information labeling result on the warning intersection.
[0196] In some embodiments of this disclosure, the prompt word information includes multiple tags, each tag including an initial confidence level, combined with... Figure 6 ,like Figure 7 As shown, after S202, the traffic data tag generation method provided in this embodiment may further include S206 to S209 as described below.
[0197] S206. Based on at least one of the model output confidence and decay factor, and the initial confidence of the label, update the confidence of the first label to obtain the first confidence of the first label.
[0198] The model output confidence score is used to indicate the confidence score of the labeling information generation model in recognizing the traffic event corresponding to the first label. The decay factor is used to indicate the decay coefficient of the first label over time. The first label is any one of the multiple labels.
[0199] S207. If the first confidence level is less than or equal to the first confidence threshold, the first label is determined to be in a state of pending verification.
[0200] S208. In the pending verification state, if the first tag is verified to be usable, cancel the pending verification state of the first tag and update the first confidence level to the second confidence level.
[0201] The second confidence level is greater than the first confidence level threshold.
[0202] S209. If the first tag is verified as unavailable, delete the first tag from the plurality of tags.
[0203] In some embodiments of this disclosure, after S202, the traffic data label generation method provided in this disclosure may further include the following process: If the second label in the second information labeling result is verified to be correct, obtain at least one feature in the traffic public opinion text data corresponding to the second information labeling result; update the weight of the first feature associated with the second label from a first weight to a second weight, the second weight being greater than the first weight, and the first feature being one of the at least one feature; update the confidence level of the second label from a third confidence level to a fourth confidence level, the fourth confidence level being greater than the third confidence level; if the third label in the third information labeling result is modified to a fourth label, obtain the... At least one target feature in the traffic public opinion text data that corresponds to the third information annotation result; the weight of the second feature associated with the third label is updated from the third weight to the fourth weight, the fourth weight being less than the third weight, and the second feature being one of the at least one target feature; the weight of the third feature associated with the fourth label is updated from the fifth weight to the sixth weight, the sixth weight being less than the fifth weight, and the third feature being one of the at least one target feature; the confidence level of the third label is updated from the fifth confidence level to the sixth confidence level, the sixth confidence level being less than the fifth confidence level; the confidence level of the fourth label is updated from the seventh confidence level to the eighth confidence level, the eighth confidence level being greater than the seventh confidence level.
[0204] In some embodiments of this disclosure, after S202, the traffic data label generation method provided in this disclosure may further include the following processes: if the prompt word information also includes a traffic event identification rule corresponding to the label, update the confidence level of the label and the weight of the feature associated with the label to the identification rule of the corresponding label; or, if the prompt word information also includes a rule for determining the identification confidence level of the label, update the confidence level of the label and the weight of the feature associated with the label to the determination rule; or, if the prompt word information also includes an example sample, update the label and the feature associated with the label to the example sample of the corresponding label; or, based on the confidence level of the label and the weight of the feature associated with the label, determine at least one candidate label corresponding to the traffic public opinion text data; and add the at least one candidate label to the prompt word information.
[0205] In some embodiments of this disclosure, after S202, the traffic data label generation method provided in this disclosure may further include the following process: calculating the target weight of a target feature under at least one associated label within a target time period; if the target weight is greater than or equal to a weight threshold, determining the target feature as a new label; or, calculating the co-occurrence support and co-occurrence confidence of the target feature and the target label within a target time period, wherein the co-occurrence support is used to indicate the probability of the target feature and the target label co-occurring, and the co-occurrence confidence is used to indicate the probability of the target label appearing when the target feature appears; if the co-occurrence support is greater than or equal to a support threshold and the co-occurrence confidence is greater than or equal to a second confidence threshold, determining the target feature as a new label.
[0206] The present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the traffic data tag generation method described above and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0207] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0208] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the above-described traffic data tag generation method.
[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this disclosure.
[0210] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. An electronic device, characterized in that, include: The controller is configured as follows: Traffic-related public opinion text data is divided into blocks to obtain multiple data blocks; At least one data block from the plurality of data blocks, along with prompt word information, is input into the annotation information generation model to obtain at least one information annotation result. The prompt word is used to instruct the annotation information generation model to determine the information annotation result of the traffic event corresponding to the data block by performing semantic understanding and analysis on the data block. The information annotation result includes the label of the corresponding traffic event and the intersection sign of the intersection where the event occurred. Obtain the road topology network corresponding to the target intersection identifier in the first information annotation result, and the propagation time information between adjacent intersections corresponding to the road topology network. The first information annotation result is one of the at least one information annotation results. The propagation time information includes at least one of the following: the propagation time between adjacent intersections in different time periods, and the propagation time between adjacent intersections under different road conditions. Based on the road topology network and the propagation time information, early warning information is generated. The early warning information includes a warning intersection sign, a warning tag, and an estimated arrival time. In the road topology network, the warning intersection indicated by the warning intersection sign and the target intersection indicated by the target intersection sign belong to the same transmission path. The warning tag is determined based on the first tag in the first information annotation result. The estimated arrival time is determined based on the transmission time between the target intersection and the warning intersection in the propagation time information. The warning information also includes impact information, which is used to indicate the degree of impact of the traffic event corresponding to the first information labeling result on the warning intersection. The degree of influence information is determined according to the following formula: ; in, Predicting the arrival of the 1st The extent of the impact on downstream intersections The initial impact level of the target intersection. The number of road segments traversed from the target intersection to the warning intersection. Natural constant : Decay time constant; Maximum attenuation coefficient, 0 < λ ≤ 1. This represents the maximum proportion of the intensity that the influence can retain after traveling at an infinite distance. The ultimate scope of the impact is used to control the severity of the traffic incident itself.
2. The electronic device according to claim 1, characterized in that, The controller is specifically configured as follows: Obtain the word segmentation results of the traffic public opinion text data. The word segmentation results include multiple words, the part-of-speech tags of the words, and the position information of the words in the traffic public opinion text data. Based on the word segmentation results, the sentence segmentation results corresponding to the traffic public opinion text data are obtained. The sentence segmentation results include multiple sentences and the position information of the sentences in the traffic public opinion text data. Based on the sentence segmentation results, the traffic public opinion text data is segmented into blocks. The segmentation results include the multiple data blocks and the location information of the data blocks in the traffic public opinion text data.
3. The electronic device according to claim 1, characterized in that, The controller is specifically configured as follows: Based on the principle of load balancing, the multiple data blocks are allocated to multiple worker threads; The annotation information generation model is invoked in parallel by multiple working threads. The annotation information generation model performs semantic understanding and analysis based on the input data block and prompt word information to obtain at least one information annotation result.
4. The electronic device according to claim 1, characterized in that, The information annotation results also include target information of the traffic event; the controller is further configured to: Based on the target information and filtering rules, the at least one information annotation result is filtered to obtain at least one final information annotation result; When the target information includes the identification confidence level of the traffic event, the filtering rule includes filtering out information labeling results with an identification confidence level less than or equal to a first confidence threshold; When the target information includes the timestamp of the traffic event, the filtering rule includes filtering out information annotation results whose timestamps are before a preset duration; When the target information includes evidence text corresponding to the traffic incident, the filtering rule includes merging multiple information labeling results where the evidence texts are related and the labels and intersection signs match; When the target information includes timestamps and source information, the filtering rules include merging multiple information labeling results that match timestamps, tags, and intersection signs, and have different sources.
5. The electronic device according to claim 1, characterized in that, The prompt word information includes multiple tags, each tag including an initial confidence level; the controller is further configured to: Based on at least one of the model output confidence and decay factor, and the initial confidence of the label, the confidence of the first label is updated to obtain the first confidence of the first label. The model output confidence is used to indicate the recognition confidence of the labeling information generation model in identifying the traffic event corresponding to the first label. The decay factor is used to indicate the decay coefficient of the first label over time. The first label is any one of the plurality of labels. If the first confidence level is less than or equal to the first confidence threshold, the first label is determined to be in a state of pending verification. In the pending verification state, if the first tag is verified to be usable, the pending verification state of the first tag is cancelled, and the first confidence level is updated to a second confidence level, wherein the second confidence level is greater than the first confidence level threshold. If the first tag is verified as unavailable, the first tag is deleted from the plurality of tags.
6. The electronic device according to any one of claims 1 to 5, characterized in that, The controller is also configured to: If the second label in the second information annotation result is verified to be correct, at least one feature in the traffic public opinion text data corresponding to the second information annotation result is obtained; The weight of the first feature associated with the second label is updated from the first weight to the second weight, where the second weight is greater than the first weight, and the first feature is one of the at least one features; The confidence level of the second label is updated from the third confidence level to the fourth confidence level, where the fourth confidence level is greater than the third confidence level. When the third label in the third information annotation result is modified to the fourth label, at least one target feature in the traffic public opinion text data that corresponds to the third information annotation result is obtained; The weight of the second feature associated with the third label is updated from the third weight to the fourth weight, where the fourth weight is less than the third weight, and the second feature is one of the at least one target feature; The weight of the third feature associated with the fourth label is updated from the fifth weight to the sixth weight, where the sixth weight is less than the fifth weight, and the third feature is one of the at least one target feature; The confidence level of the third label is updated from the fifth confidence level to the sixth confidence level, where the sixth confidence level is less than the fifth confidence level. The confidence level of the fourth label is updated from the seventh confidence level to the eighth confidence level, where the eighth confidence level is greater than the seventh confidence level.
7. The electronic device according to claim 6, characterized in that, The controller is also configured to: If the prompt word information also includes the identification rules for the traffic events corresponding to the tags, the confidence level of the tags and the weights of the features associated with the tags are updated in the identification rules for the corresponding tags. or, If the prompt word information also includes a rule for determining the recognition confidence of the tag, the confidence of the tag and the weight of the features associated with the tag are updated in the determination rule; or, If the prompt word information also includes example samples, the label and the features associated with the label are updated to the corresponding example samples of the label; or, Based on the confidence level of the label and the weight of the features associated with the label, at least one candidate label is determined corresponding to the traffic public opinion text data; Add the at least one candidate label to the prompt word information.
8. The electronic device according to claim 6, characterized in that, The controller is also configured to: The target weight of the target feature under at least one associated label within the target time period; If the target weight is greater than or equal to the weight threshold, the target feature is determined as a new label.
9. The electronic device according to claim 6, characterized in that, The controller is also configured to: The co-occurrence support and co-occurrence confidence of target features and target labels within the target time period are statistically analyzed. The co-occurrence support is used to indicate the probability that the target feature and the target label co-occur, and the co-occurrence confidence is used to indicate the probability that the target label appears when the target feature appears. If the co-occurrence support is greater than or equal to the support threshold and the co-occurrence confidence is greater than or equal to the second confidence threshold, the target feature is determined as a new label.
10. A method for generating traffic data tags, characterized in that, Applied to electronic devices, including: Traffic-related public opinion text data is divided into blocks to obtain multiple data blocks; At least one data block from the plurality of data blocks, along with prompt word information, is input into the annotation information generation model to obtain at least one information annotation result. The prompt word is used to instruct the annotation information generation model to determine the information annotation result of the traffic event corresponding to the data block by performing semantic understanding and analysis on the data block. The information annotation result includes the label of the corresponding traffic event and the intersection sign of the intersection where the event occurred. Obtain the road topology network corresponding to the target intersection identifier in the first information annotation result, and the propagation time information between adjacent intersections corresponding to the road topology network. The first information annotation result is one of the at least one information annotation results. The propagation time information includes at least one of the following: the propagation time between adjacent intersections in different time periods, and the propagation time between adjacent intersections under different road conditions. Based on the road topology network and the propagation time information, early warning information is generated. The early warning information includes a warning intersection sign, a warning tag, and an estimated arrival time. In the road topology network, the warning intersection indicated by the warning intersection sign and the target intersection indicated by the target intersection sign belong to the same transmission path. The warning tag is determined based on the first tag in the first information annotation result. The estimated arrival time is determined based on the transmission time between the target intersection and the warning intersection in the propagation time information. The warning information also includes impact information, which is used to indicate the degree of impact of the traffic event corresponding to the first information labeling result on the warning intersection. The degree of influence information is determined according to the following formula: ; in, Predicting the arrival of the 1st The extent of the impact on downstream intersections The initial impact level of the target intersection. The number of road segments traversed from the target intersection to the warning intersection. Natural constant : Decay time constant; Maximum attenuation coefficient, 0 < λ ≤ 1. This represents the maximum proportion of the intensity that the influence can retain after traveling at an infinite distance. The ultimate scope of the impact is used to control the severity of the traffic incident itself.
Citation Information
Patent Citations
Event tag generation method and device, electronic equipment and storage medium
CN115708086A
Data labeling method, device and equipment and readable storage medium
CN119622328A
AI intelligent customer service response method and system based on remote digital service
CN119719319A
Traffic event cascade influence prediction method and device and storage medium
CN120031208A
Data annotation method and device, equipment and medium
CN120744713A