Traffic event mining method and device and electronic equipment
By constructing an event network and performing event reasoning, the problem of low traffic event determination efficiency in the existing technology is solved, and fast and accurate traffic event identification and real-time release are achieved.
Patent Information
- Application Number
- CN202310325492.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-18
AI Technical Summary
The efficiency of determining traffic events in the existing technology is low and cannot meet the demand for real-time release.
By obtaining the target text related to the traffic event, the event network is constructed, including location nodes, event nodes and element nodes, and event reasoning is used to determine the traffic event.
It achieves rapid and accurate determination of traffic events, improves efficiency and accuracy, and can simultaneously process traffic events described by multiple target texts.
Smart Images

Figure CN118796906A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic information technology, and in particular to a method, device and electronic equipment for mining traffic events. Background Art
[0002] When a road is closed, controlled, or restricted, the traffic management department will usually issue a road notice. Traffic information service providers can release the corresponding traffic events to the travelers affected by the traffic events based on the description of the road notice. For example, traffic events can be released to the affected travelers through software with map navigation functions, or the impact of traffic events can be considered when planning travel routes to provide more reasonable travel routes for travelers.
[0003] Related technologies use manual processing to determine traffic events indicated by road announcements. However, the efficiency of manual processing is low and does not meet the demand for real-time release of traffic events. Summary of the invention
[0004] The present application provides a method, device and electronic device for mining traffic events, which are used to solve the technical problem of low efficiency in determining traffic events in the prior art.
[0005] In a first aspect, the present application provides a method for mining traffic events, the method comprising:
[0006] Obtain target text related to traffic events;
[0007] Determine a logic network according to the target text, wherein the logic network includes a position node, an event node, an element node associated with the event node, and edges between nodes;
[0008] Event reasoning is performed according to the event network to determine the traffic event corresponding to the target text.
[0009] In a second aspect, the present application provides a traffic event mining device, the traffic event mining device comprising an acquisition module, a first determination module and a second determination module, wherein:
[0010] The acquisition module is used to acquire target text related to the traffic event;
[0011] The first determination module is used to determine a network of events according to the target text, wherein the network of events includes position nodes, event nodes, element nodes associated with the event nodes, and edges between nodes;
[0012] The second determination module is used to perform event reasoning according to the event network to determine the road event corresponding to the target text.
[0013] In a third aspect, the present application provides an electronic device, including: a processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the first aspect and various traffic event mining methods that may be involved in the first aspect.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the first aspect and various traffic event mining methods that may be involved in the first aspect.
[0017] The present application provides a method, device and electronic device for mining traffic events. The electronic device can obtain a target text related to the traffic event, and determine a cause-and-effect network based on the target text, wherein the cause-and-effect network includes a location node, an event node, an element node associated with the event node, and edges between the nodes. Event reasoning is performed based on the cause-and-effect network to determine the traffic event corresponding to the target text. In the above method, since the electronic device can infer the traffic event based on the cause-and-effect network corresponding to the target text, the electronic device can quickly determine the traffic event described by the target text, and the electronic device can simultaneously determine the traffic events described by multiple target texts, thereby improving the efficiency of determining the traffic event. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0019] Figure 2 A flow chart of a method for mining traffic events provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of an edge between location nodes provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of an edge between a location node and an event node provided in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of an edge between an event node and an element node provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of a method for determining a network of events provided in an embodiment of the present application;
[0024] Fig. 7AA schematic diagram of a process for generating an initial geographic affairs network provided in an embodiment of the present application;
[0025] Figure 7B A schematic diagram of another process for generating an initial geographic affairs network provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of a process for generating a geographic affairs network provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of determining a corresponding relationship provided in an embodiment of the present application;
[0028] Fig. 10A A schematic diagram of determining a corresponding relationship provided in an embodiment of the present application;
[0029] Fig. 10B A schematic diagram of another method for determining a corresponding relationship provided in an embodiment of the present application;
[0030] Fig.11 A schematic diagram of a process for determining a traffic event description provided in an embodiment of the present application;
[0031] Fig.12 A schematic diagram of a network of events provided in an embodiment of the present application;
[0032] Fig.13 A process diagram of a traffic incident mining method provided in an embodiment of the present application;
[0033] Fig.14 A schematic diagram of the structure of a traffic incident excavation device provided in an embodiment of the present application;
[0034] Fig.15 A schematic diagram of the hardware structure of the electronic device provided in this application. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0036] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0037] The user information (including but not limited to user device information such as location information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0038] To facilitate understanding, some concepts involved in the embodiments of the present application are explained below.
[0039] Traffic event description: The traffic event description may be a type of traffic event included in the target text. For example, the traffic event description described in the target text may include road closure events, road construction events, traffic control events, etc., which are not limited in the embodiments of the present application. It should be noted that the traffic event description shown in the embodiments of the present application is a macroscopic type of traffic event. For example, the traffic event description may be a road closure event, and the traffic event description does not include specific road names, the start time of the road closure, and other information.
[0040] Traffic events: Road events can be specific traffic events indicated by the target text, and traffic events can be structured data. Electronic devices can identify traffic events. For example, traffic events can include the start time, end time, location, and cause of the traffic event.
[0041] Location entity: Location entity can be text related to location in the target text. For example, location entity can be a word or phrase describing location in the target text. For example, location entity can be a road name, toll booth name, mile post name, etc. in the target text. For example, if the target text is: Route 1 is closed, then the location entity in the target text can be the name of Route 1.
[0042] Location attribute: Location attribute is attribute information associated with the location entity. For example, location attribute can be attribute information such as direction, event cause, restricted vehicle type, allowed vehicle type, etc. associated with the location, which is not limited in the embodiments of the present application. For example, if the location attribute is direction: city a-city b direction, it means that the specific road direction affected by the traffic event related to the location is the road direction from city a to city b.
[0043] Feature Entity: Feature Entity can be text related to the description of the traffic incident in the target text. For example, Feature Entity can be a word or phrase of a feature related to the description of the traffic incident in the target text. For example, Feature Entity can be the name of the entrance and exit, the start time and the end time in the target text. For example, if the target text is: Route 1 is closed from 18:00, then the feature entity in the target text can be Start Time: 18:00.
[0044] In related technologies, when traffic incidents such as road closures, road control, and road restrictions occur on a road, traffic-related departments usually issue relevant road announcements to remind traffic information service providers that they can publish corresponding traffic incidents based on the traffic incidents indicated in the road announcements. For example, traffic information service providers can publish traffic incidents to affected travelers through software with map navigation functions, or take into account the impact of traffic incidents when planning travel routes to provide more reasonable travel routes for travelers. Since road announcements are usually natural language texts, the traffic incidents indicated by each road announcement can be determined through manual processing. However, manual processing is inefficient and does not meet the needs of real-time release of traffic incidents.
[0045] In order to solve the technical problems in the related art, the embodiment of the present application provides a method for mining traffic events, wherein the electronic device can obtain a target text related to the traffic event, obtain the location entity and location attribute for determining the location node, the element entity for determining the element node, and the location inclusion relationship for determining the edge between the location nodes from the target text, generate a geographic event network according to the location entity, the location attribute, and the location inclusion relationship, wherein the geographic event network may include the location node related to the location entity and the location attribute, and the edge between the location nodes corresponding to the location inclusion relationship, generate an event network according to the target text, the geographic event network, and the element entity, and perform event reasoning according to the event network to determine the traffic event corresponding to the target text. In this way, since the electronic device can determine the location information, event information, element information, and the association relationship between each information in the target text based on the event network, the electronic device can accurately obtain the traffic event corresponding to the target text based on the event network, thereby improving the accuracy and efficiency of determining the traffic event.
[0046] Next, combine Figure 1, the application scenarios of the embodiments of the present application are described.
[0047] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , including construction notices and electronic devices. Among them, the construction notice is "Section B is under temporary construction. Starting from 18:00, the road in Section B from north to south is closed." After the traffic information service provider obtains the construction notice, the traffic information service provider can publish the construction notice in the electronic map. When the electronic device uses the navigation function in the electronic map at 18:05, the navigation page displayed by the electronic device may include the navigation starting point (position 1), the navigation end point (position 2), the navigation route (Section A and Section B) and the navigation mode (walking mode).
[0048] See also Figure 1 Since the navigation route includes the road section B where the traffic incident occurred, the location of the road section B in the navigation page (or navigation interface) also includes a construction mark (when the electronic map is zoomed in, the construction mark can be displayed in the lane position from north to south), and the bottom of the navigation page also includes a notification window, wherein the notification window prompts the user that the road section B is closed from north to south for construction, and the current navigation can pass normally. In this way, the electronic device can quickly determine the traffic incident indicated by the road notice, improve the efficiency of determining the traffic incident, and the electronic map can timely display the traffic incident occurring in the navigation route, improve the accuracy of navigation.
[0049] It should be noted that Figure 1 The application scenarios of the embodiments of the present application are merely illustrative and are not intended to limit the application scenarios of the embodiments of the present application.
[0050] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0051] Figure 2 A flow chart of a method for mining traffic events provided in an embodiment of the present application. Figure 2 , the method may include:
[0052] S201: Obtain target text related to a traffic event.
[0053] The execution subject of the embodiment of the present application can be an electronic device, or a traffic event mining device set in the electronic device. Among them, the traffic event mining device can be implemented by software, and the traffic event mining device can also be implemented by a combination of software and hardware, which is not limited by the embodiment of the present application. Optionally, the electronic device can be any device with terminal computing capabilities. For example, the electronic device can be a computer device, a mobile phone, a server and other devices, which is not limited by the embodiment of the present application.
[0054] The target text may be a text associated with a traffic event. For example, the target text may be a notice of road construction, a notice of a road accident, a notice of a road closure, a notice of a road reopening, or any other text associated with a traffic event, which is not limited in the present embodiment of the application.
[0055] Optionally, the target text may include at least one type of traffic event. For example, if the target text is: the route between location 1 and location 2 allows vehicles with 6 seats or less to pass, but does not allow vehicles with more than 6 seats to pass, then the traffic event corresponding to the target text is a road restriction event; if the target text is: the route between location 1 and location 2 is under construction, and the route from south to north is closed, then the traffic event corresponding to the target text is a road closure event; if the target text is: buses add stops at station 1 and station 2, then the traffic event corresponding to the target text is a bus line opening event.
[0056] Specifically, the electronic device can obtain multiple target texts in the network. For example, the electronic device can obtain texts related to traffic events, such as road closure announcements, road control announcements, road construction announcements, and traffic accident announcements, from the website of the traffic management department. For example, the electronic device can obtain texts related to traffic events on a network information publishing platform. For example, a user can upload texts related to traffic events on multiple network information publishing platforms, and the electronic device can obtain target texts related to traffic events on multiple network information publishing platforms. Optionally, the electronic device can also obtain multiple target texts based on other feasible implementation methods (such as obtaining multiple target texts in a database, receiving multiple target texts sent by other devices, etc.), which is not limited to this in the embodiments of the present application.
[0057] S202. Determine the network of facts and principles based on the target text.
[0058] The event network may include location nodes, event nodes, element nodes associated with event nodes, and edges between nodes. For example, the event network may include multiple types of nodes, different nodes contain different information, and the edges between nodes may indicate the association relationship between the information corresponding to each node.
[0059] Optionally, the location node may correspond to the location information, wherein the location information may include the location entity and the location attribute corresponding to the location entity. For example, if the target text includes 3 location information, the transaction network corresponding to the target text includes at least 3 location nodes. For example, if the target text is: the route between location 1 and location 2 is closed, then the target text includes 2 location information (information of location 1 and location 2), therefore, the transaction network corresponding to the target text may include location node A and location node B, wherein location node A corresponds to the information of location 1, and location node B corresponds to the information of location 2.
[0060] Optionally, the event node may correspond to a traffic event description. For example, if the target text includes three traffic event descriptions, the event network corresponding to the target text includes three event nodes. For example, if the target text is: Due to the construction of the route between position 1 and position 2, the route between position 1 and position 2 is suspended, then the target text includes two traffic event descriptions (road construction event and road closure event), and the event network corresponding to the target text may include event node A and event node B, event node A may correspond to the road construction event, and event node B may correspond to the road closure event.
[0061] Optionally, the element node can be associated with the element entity. For example, if the target text includes 2 element entities, the event network corresponding to the target text can include 2 element nodes. For example, the element entity in the target text can be the start time, end time, entrance and exit, cause of the event, the location of the traffic event description in the target text, road name, lane, vehicle type, etc., which is not limited in the embodiment of the present application. For example, if the target text is: the entrance of the expressway section is restricted from 18:00, then the element entity in the target text is the start time: 18:00 and entrance and exit: entrance. Therefore, the event network corresponding to the target text can include element node A and element node B, element node A is associated with the start time 18:00, and element node B is associated with entrance and exit: entrance.
[0062] Optionally, the edges between the nodes may include edges between location nodes, edges between location nodes and event nodes, and edges between event nodes and element nodes.
[0063] Specifically, the edge between location nodes can indicate the location inclusion relationship between the location entities corresponding to the location nodes. For example, the location entity corresponding to location node A is location 1, and the location entity corresponding to location node B is location 2. If location node A is the upstream node of location node B, it means that location 1 includes location B.
[0064] Next, combine Figure 3, describe the edges between location nodes.
[0065] Figure 3 A schematic diagram of an edge between location nodes provided in an embodiment of the present application. Figure 3 , including the target text, where the target text is "Starting from 18:00, Section 1 of Route A is closed to traffic", so the location entities included in the target text are Route A and Section 1. The event network corresponding to the target text ( Figure 3 (not shown) may include location node a and location node b, location node a corresponds to route A, location node b corresponds to section 1, and since section 1 belongs to route A, the edge between location node a and location node b points from location node a to location node b.
[0066] Optionally, the edge between the location node and the event node can indicate the location information of the traffic event description corresponding to the event node. For example, the location entity corresponding to the location node in the event network is location 1, and the traffic event description corresponding to the event node is a road closure event. If there is an edge between the location node and the event node, it means that a road closure event occurs at location 1.
[0067] Next, combine Figure 4 , describe the edge between the location node and the event node.
[0068] Figure 4 A schematic diagram of an edge between a location node and an event node provided in an embodiment of the present application. Figure 4 , including the target text, where the target text is "Starting from 18:00, Section 1 is closed to traffic". Therefore, the location entity in the target text is Section 1, and the traffic event in the target text is described as a road closure event. The event network corresponding to the target text ( Figure 4 (not shown) may include a location node and an event node. The location node corresponds to section 1, and the event node corresponds to a road closure event. Since the road closure event occurs in section 1, the edge between the location node and the event node is from the event node to the location node.
[0069] Optionally, the edge between the event node and the element node can indicate the element information associated with the traffic event description corresponding to the event node. For example, the traffic event description corresponding to the event node in the event network is a road closure event, and the element entity corresponding to the element node is 18:00 start. If there is an edge between the element node and the event node, it means that the road closure event starts at 18:00.
[0070] Next, combine Figure 5 , describe the edges between event nodes and feature nodes.
[0071] Figure 5This is a schematic diagram of the edge between an event node and an element node provided in an embodiment of the present application. Figure 5 , including the target text, where the target text is "Starting from 18:00, Section 1 is closed to traffic". Therefore, the traffic event in the target text is described as a road closure event, and the element entity in the target text is: Starting from 18:00. The event network corresponding to the target text Figure 5 (not shown) may include event nodes and element nodes. The traffic road description corresponding to the event node is a road closure event, and the element entity corresponding to the element node starts at 18:00. Since the element information related to the road closure event starts at 18:00, the edge between the event node and the element node is from the element node to the event node.
[0072] Specifically, the electronic device can determine the anecdotal network according to the following feasible implementation method: from the target text, obtain the location entity and location attribute used to determine the location node, the element entity used to determine the element node and the location inclusion relationship used to determine the edge between the location nodes, generate a geographic anecdotal network according to the location entity, location attribute and location inclusion relationship, and generate the anecdotal network according to the target text, the geographic anecdotal network and the element entity.
[0073] The geographic anecdotal network includes location nodes related to location entities and location attributes, as well as edges between location nodes corresponding to location inclusion relationships.
[0074] Optionally, the electronic device can obtain location entities, location attributes and feature entities according to the following feasible implementation method: the target text is processed through a named entity recognition model to obtain multiple location entities and multiple feature entities, and the location attributes are determined according to other entities other than the location entities and feature entities. For example, the named entity recognition model can be a combination model of a Bidirectional Encoder Representations from Transformers (BERT) model and a Conditional Random Field (CRF). The named entity recognition model is obtained by BERT+CRF. After the named entity recognition model converges, all entities in the target text can be identified by sequence labeling. It should be noted that the training process of the BERT+CRF combination model is similar to the prior art, and the embodiments of the present application will not be repeated here.
[0075] For example, for ease of understanding, this application can determine entities of types such as jurisdiction, road name, section, road section, toll booth road section, point of interest name, mileage post, toll booth, ramp and lane that constitute the location node as location entities. The location entity is the specific geographical location where the event occurs. The entities of types such as the start time, end time, entrance and exit that constitute the element node are determined as element entities. Other entities other than the location entity and the element entity can be location attributes, and the location attribute corresponding to each location entity is determined in multiple location attributes. For example, if the target text is: Highway Route 1 is controlled from 18:00 by the direction of City B-City A of the City A-City B section, then the named entities in the target text can include Highway Section 1, City A-City B section, entrance direction, and 18:00. Therefore, the location entity is the highway route, the city A-City B section, the element entity is 18:00, and the direction of City B-City A can be the selected location attribute. In this way, the network of things can include multiple named entities in the target text, thereby improving the accuracy of the network of things.
[0076] Optionally, the location inclusion relationship may indicate the geographical location relationship between the location entities corresponding to the location nodes. The electronic device may determine the location inclusion relationship through external geographical knowledge and the order of appearance of multiple location entities in the target text. For example, the first location entity that appears in the target text is usually the largest geographical area. Therefore, the electronic device may determine the location inclusion relationship between multiple location entities based on the location where each location entity appears and the external geographical knowledge. For example, if the target text is: A car accident occurred in the overtaking lane of Section A in Highway Route 1, then the location entities in the target text are Highway Route 1, Section A, and Overtaking Lane. Therefore, Highway Route 1 contains Section A, and Section A contains the overtaking lane.
[0077] It should be noted that the electronic device can determine the location inclusion relationship between each location entity based on a geographic location relationship database (the database includes the geographic location relationship between any two locations), or can determine the location inclusion relationship between each location entity through other feasible implementation methods, and the embodiments of the present application are not limited to this.
[0078] Among them, the electronic device generates a geographic event network according to the location entity, location attribute and location inclusion relationship. Specifically, it can be: based on the location entity and the location inclusion relationship, an initial geographic event network is generated, the corresponding relationship between the location entity and the location attribute is obtained, and the location attribute corresponding to the location node is filled in the location node of the initial geographic event network to obtain the geographic entity network.
[0079] The initial geographic network includes location nodes related to location entities and edges between location nodes with location inclusion relationships. For example, the location nodes in the initial geographic network include location entities, but are not connected to the geographic network, and the location nodes in the initial geographic network do not include location attributes corresponding to the location entities.
[0080] The corresponding relationship may indicate the association between the location entity and the location attribute. For example, if the target text is: the direction control of the G1 highway from city a to city b, then the location entity G1 highway in the target text corresponds to the location attribute from city a to city b.
[0081] The location attributes corresponding to the location nodes are filled in the location nodes to obtain a geographic entity network. For example, the initial geographic entity network obtained by the electronic device may include multiple location nodes, each location node is associated with a location entity, and the electronic device may determine the location attribute corresponding to each location node and fill the corresponding location attribute in the location node. After all the location attributes are filled, a geographic entity network is obtained.
[0082] It should be noted that one or more location nodes in the geographic affairs network may have corresponding location attributes, which is not limited in the embodiments of the present disclosure. For example, the geographic affairs network includes location node A and location node B, wherein the corresponding relationship between the location node and the location attribute may be: location node A has a corresponding location attribute, location node B has a corresponding location attribute, location node A and location node B both have corresponding location attributes, or location node A and location node B do not have corresponding location attributes.
[0083] After the electronic device obtains the geographic event network, it can generate an event network based on the target text, the geographic event network and the element entity. For example, the electronic device can determine the traffic event description related to the event node based on the target text and the geographic event network, and generate an event network based on the traffic event description, the element entity and the geographic event network.
[0084] S203: Perform event reasoning based on the event network to determine the traffic event corresponding to the target text.
[0085] Specifically, the electronic device can determine the traffic event corresponding to the target text according to the following feasible implementation methods: determine the traffic event description corresponding to the event node according to the event node in the event network, determine the element information of the traffic event description according to the element nodes connected to the event node, determine the location information corresponding to the traffic event description according to the location nodes connected to the event node, and determine the traffic event corresponding to the target text according to the traffic event description, element information and location information.
[0086] The element information at least includes time information corresponding to the traffic event description. For example, the element information at least includes the start time and end time corresponding to the traffic event description, and the element information may also include information such as the event cause corresponding to the traffic event description.
[0087] For example, if the event network includes two event nodes, the electronic device can obtain two traffic events corresponding to the target text according to the event network. For example, since the event network may include a location node, an event node, an element node related to the event node, and the association relationship between the nodes, the electronic device can obtain the specific traffic road event described in the target text according to the event network.
[0088] For example, the electronic device can start from the event node and determine the start and end time of the traffic event description corresponding to the event node through the time element node connected to the event node. If the element node corresponding to the event node is not obtained, the element information is determined based on external traffic knowledge (for example, construction and accident events can inherit the direction of their upstream location, and in the same highway, the traffic event description occurring at the upstream location is the cause of the traffic event description at the downstream location, etc.), and the specific location of the traffic event is determined based on the location node connected to the event node, and the location attribute corresponding to the location node (such as direction, etc.) is determined through the connected location node, and then a structured traffic event is obtained. In this way, based on the relevant nodes connected to the event node in the event network, the electronic device can accurately determine the location, time, and other information of the traffic event description corresponding to the event node, and then accurately determine the traffic event corresponding to the target text.
[0089] Optionally, after the electronic device determines the traffic event corresponding to the target text, the electronic device may also publish the traffic event. For example, the electronic device may publish the traffic event in software with a map navigation function. For example, if a user uses an electronic map program for navigation, the electronic map program may recommend a navigation route based on the traffic event. For example, if the traffic event indicates that a road section is closed, the navigation route recommended by the electronic map program may avoid the road section, which may improve the accuracy of navigation and enhance the user experience.
[0090] The embodiment of the present application provides a method for mining traffic events. An electronic device can obtain a target text related to traffic events, and obtain from the target text the location entity and location attribute for determining the location node, the element entity for determining the element node, and the location inclusion relationship for determining the edge between the location nodes. A geographic event network is generated based on the location entity, the location attribute, and the location inclusion relationship. An event network is generated based on the target text, the geographic event network, and the element entity, and event reasoning is performed based on the event network to determine the traffic event corresponding to the target text. In this way, since the electronic device can determine the location information, event information, element information, and the association relationship between each information in the target text based on the event network, the electronic device can accurately obtain the traffic event corresponding to the target text based on the event network, thereby improving the accuracy of determining the traffic event. In addition, the electronic device can simultaneously determine the traffic events corresponding to multiple target texts, thereby saving labor resources and improving the efficiency of determining the traffic event.
[0091] exist Figure 2 Based on the embodiment shown below, combined with Figure 6 , the method of determining the event network based on the target text in the above-mentioned traffic incident mining method is explained.
[0092] Figure 6 A schematic diagram of a method for determining a network of events provided in an embodiment of the present application. Figure 6 ,include:
[0093] S601. Obtain, from the target text, a position entity and a position attribute for determining a position node, a feature entity for determining a feature node, and a position inclusion relationship for determining edges between position nodes.
[0094] It should be noted that the process of step S601 may refer to step S202, and this embodiment of the present disclosure will not be described in detail.
[0095] S602: Generate a geographic event network based on location entities, location attributes and location inclusion relationships.
[0096] The geographic anecdotal network includes location nodes related to location entities and location attributes, as well as edges between location nodes corresponding to location inclusion relationships.
[0097] Optionally, the electronic device may generate an initial geographic network based on the location entity and the location inclusion relationship, and fill the corresponding location attributes in multiple location nodes in the initial geographic network to obtain the geographic network. The number of location nodes in the initial geographic network is the same as the number of location entities. For example, if the target text includes 2 location entities, the initial geographic network may include 2 location entities.
[0098] Optionally, the electronic device may generate an initial geographic affairs network according to the following feasible implementation method: obtain the order of appearance of multiple location entities in the target text, generate a temporary stack to save location nodes, traverse the multiple location entities in the order of appearance, and generate an initial geographic affairs network according to the location inclusion relationship between the multiple location nodes. For example, if the stack is empty, the location node corresponding to the current location entity is placed in the stack, and the location inclusion relationship between the location node and the location node at the top of the stack is obtained. If there is no location inclusion relationship, the location node at the top of the stack is popped out. If there is a location inclusion relationship, the location inclusion relationship is saved and the current node is placed in the stack. It should be noted that the electronic device may also generate an initial geographic affairs network according to any other feasible implementation method, and the embodiments of the present disclosure are not limited to this.
[0099] Next, combine Figure 7A-7B , the process of generating the initial geographic event network is explained.
[0100] Fig. 7A A schematic diagram of a process for generating an initial geographic network provided in an embodiment of the present application. Fig. 7A , including a location entity set and a stack. Among them, the location entity set includes location entity 1, location entity 2 and location entity 3 (arranged in order of appearance), and the stack is empty. Place location entity 1 in the stack and save the location node corresponding to location entity 1. Place location entity 2 in the stack. Since location entity 1 includes location entity 2, location entity 1 is popped off the top of the stack, and the top of the stack is location node 2.
[0101] See also Fig. 7A , place location entity 3 in the stack. Since location entity 2 includes location entity 3, location entity 2 is popped from the top of the stack. The top of the stack is location entity 3, and the initial geographic affairs network includes the nodes of location entity 1 and location entity 2. The node of location entity 1 points to the node of location entity 2 (that is, location entity 1 includes location entity 2). Since the location entity set is empty, location entity 3 is popped from the top of the stack. Since location entity 2 includes location entity 3, a node of location entity 3 is generated at the node of location entity 2 in the initial geographic affairs network. The node of location entity 2 points to the node of location entity 3, and the initial geographic affairs network is obtained.
[0102] Figure 7B Another schematic diagram of the process of generating an initial geographic network provided by the embodiment of the present application. Figure 7B, including a location entity set and a location entity relationship. The location entity set includes location entity 1, location entity 2, location entity 3 and location entity 4, and the location relationship between the location entities is that location entity 1 includes location entity 2 and location entity 4, and location entity 2 includes location entity 3. Electronic device ( Figure 7B (not shown) can generate an initial geographic affiliation network based on a set of location entities and location entity relationships.
[0103] See also Figure 7B , the initial geographic affairs network includes location node A corresponding to location entity 1, location node B corresponding to location entity 2, location node C corresponding to location entity 3, and location node D corresponding to location entity 4. Among them, location node A is connected to location node B and location node D, and the connection line points from location node A to location node B and location node D. Location node B is connected to location node C, and the connection line points from location node B to location node C. In this way, since the initial geographic affairs network includes the connection relationship between multiple location nodes, the electronic device can accurately determine the association relationship between location entities in the target text based on the initial geographic affairs network, and then accurately determine the road event.
[0104] Specifically, the electronic device can fill the location attribute corresponding to the location node in the location node in the initial geographic affairs network based on the correspondence between the location entity and the location attribute to obtain the geographic affairs network. Specifically, the electronic device can determine the geographic affairs network according to the following two feasible implementation methods:
[0105] A possible implementation method:
[0106] The electronic device can determine the degree of correlation between each location attribute and the location entity corresponding to each location node, and add location attributes whose correlation with the location node is greater than or equal to a preset threshold value in the location node of the initial geographic affairs network to obtain a geographic affairs network. For example, the target text includes location attribute 1, location attribute 2, and location attribute 3. If the correlation between location attribute 1 and the location entity is greater than the preset threshold value, the correlation between location attribute 2 and the location entity is equal to the preset threshold value, and the correlation between location attribute 3 and the location entity is less than the preset threshold value, then the location attributes corresponding to the location entity are determined to be location attribute 1 and location attribute 2. The electronic device can add location attribute 1 and location attribute 2 to the location node corresponding to the location entity in the initial geographic affairs network. After the electronic device adds all the location attributes to the relevant location nodes, the geographic affairs network can be obtained.
[0107] Next, combine Figure 8 , the process of generating geographic event networks is explained.
[0108] Figure 8 A schematic diagram of a process for generating a geographic affairs network provided in an embodiment of the present application. Figure 8 , including: initial geographic affairs network. The initial geographic affairs network includes location node 1, location node 2, location node 3 and location node 4. The location entity of location node 1 is G1 Expressway, the location entity of location node 2 is section A, the location entity of location node 3 is milepost F, and the location node of location node 4 is the section from city a to city b.
[0109] See also Figure 8 , obtain the location attribute corresponding to each location node, where location node 3 and location node 4 include location attributes. The location attribute (direction location attribute) of location node 2 is the direction of city e-city f, and the location attribute (direction location attribute) of location node 4 is the direction of city c and city d. Add the location attribute of location node 2 to location node 2, and add the location attribute of location node 4 to location node 4 to obtain a geographic affairs network.
[0110] See also Figure 8 The location entity in location node 2 of the geographic network is road section A, and the location attribute is the direction from city e to city f. Since location node 4 includes the location attribute city c direction and the location attribute city d direction, the two directions are different, and location node 4 needs to be split into two location nodes. The location entities in the two location nodes are both road sections from city a to city b. The location attribute of one location node is the direction from city c, and the location attribute of the other location node is the direction from city d.
[0111] For any location node, the electronic device can determine the degree of correlation between the location node and each location attribute based on the classifier. For example, a sentence with L tokens (x0, x1, ..., x L ), where x iIt is a combination of a token's word embedding and its position encoding. The sentence includes N position attributes in the target text. The hidden layer representation features of the sentence are obtained through the pre-trained language model, and the features of the position entity and the features of each position attribute are Max-pooling processed to make the position entity features and each position attribute feature have a fixed length. The position entity features are respectively concatenated with each position attribute feature to obtain multiple concatenated features. The dimension of each concatenated feature is mapped to the input dimension through a fully connected layer, and each concatenated feature is processed using a classifier to obtain the correlation degree corresponding to each concatenated feature. If the correlation degree is greater than or equal to the threshold, it means that the position attribute corresponding to the concatenated feature is associated with the position entity. If the correlation degree is less than the threshold, it means that the position attribute corresponding to the concatenated feature is not associated with the position entity. Through the above method, the correlation degree between each position entity and each position attribute can be determined.
[0112] Next, combine Fig. 9 , the process of determining the correspondence between location entities and location attributes is explained.
[0113] Fig. 9 A schematic diagram of determining a corresponding relationship provided in an embodiment of the present application. Taking a location entity and a location attribute as an example, see Fig. 9 , including location attributes and location entities. The location attributes and location entities are input into the pre-trained language model, and the language model can output location attribute features corresponding to the location attributes and location entity features corresponding to the location entities.
[0114] See also Fig. 9 After fixed-length processing of the location attribute feature and the location entity feature, the location attribute feature has the same length as the location entity feature. The location attribute feature and the location entity feature are concatenated to obtain a concatenated feature, and the concatenated feature is input into the classifier. If the probability output by the classifier is greater than or equal to the threshold, it means that the location entity is related to the location attribute. If the probability output by the classifier is less than the threshold, it means that the location entity is not related to the location attribute.
[0115] In this way, through the above method, the electronic device can accurately determine the location attributes corresponding to each location entity through the classifier, and then add the location attributes to the corresponding location nodes to obtain a geographic event network. Therefore, the electronic device can accurately determine the relationship between the location entities and the attribute information corresponding to each location entity through the geographic event network, and then accurately determine traffic events and improve the accuracy of traffic event determination.
[0116] Another possible implementation:
[0117] For each location attribute, obtain the location entity closest to the location attribute on the left and right texts in the target text, and determine whether the location attribute is the location attribute corresponding to the location entity according to the preset matching rules. For example, if the number of characters between the location attribute and the location entity is less than N (an integer greater than 0, which can be set arbitrarily), and there are no other location entities in the sentence, then the location attribute is determined as the location attribute of the location entity, or, if the location attribute is located after the location entity and is marked with an identifier (such as brackets, etc.), then the location attribute is determined as the location attribute of the location entity. After the electronic device determines the location attribute corresponding to each location entity, the location attribute can be added to the location node corresponding to the location entity in the initial geographic event network to obtain a geographic event network.
[0118] Next, combine Figure 10A-10B , the process of determining the correspondence between location entities and location attributes is explained.
[0119] Fig. 10A A schematic diagram of determining a corresponding relationship provided in an embodiment of the present application. Fig. 10A , including the target text. The target text is "Route 1 is temporarily under construction. Starting from 18:00, Section B is closed from south to north". The location attribute in the target text is determined to be from south to north. According to the location of the location attribute, the nearest location entity is determined to be Section B. Since there are no other location entities in the segmented sentence, the electronic device can determine that the location attribute corresponding to Section B is from south to north.
[0120] Fig. 10B This is another schematic diagram of determining a corresponding relationship provided in an embodiment of the present application. Fig. 10B , including the target text. The target text is "Highway Route 1 (from City A to City B) is temporarily under construction. Starting from 18:00, Section B is closed." The location attribute in the target text is determined to be from City A to City B. According to the location of the location attribute, the nearest location entity is determined to be Highway Route 1. Since the location attribute is located after Highway Route 1 and is marked by brackets, the electronic device can determine that the location attribute corresponding to Highway Route 1 is from City A to City B.
[0121] It should be noted that Figure 10A-10B The preset matching rules in the embodiments of the present application are merely illustrative. In actual application, the preset matching rules may be any feasible matching rules, and the embodiments of the present application do not limit this.
[0122] It should be noted that in the above two feasible implementation methods, the two methods of determining the corresponding relationship can be used separately or in combination (for example, first determine it through a preset matching rule, and if the location attribute of the location entity cannot be determined, then determine it through splicing features and classifiers), and the embodiments of the present application do not limit this.
[0123] S603, generating a geographical network based on the target text, geographical network and element entities.
[0124] Specifically, the electronic device can generate an event network according to the following feasible implementation method: from the geographic event network, determine the target location entity corresponding to the leaf node among multiple location nodes, determine the traffic event description for determining the event node and the event location relationship between the event node and the location node from the target text based on the target location entity and the target text, and further generate event nodes, element nodes, and edges between nodes in the geographic event network based on the traffic event description, element entities, and event location relationships to obtain the event network.
[0125] The target location entity may be a location entity corresponding to a leaf node in the geographic network, and the leaf node may be a location node at the bottom of each branch in the geographic network. Figure 8 Taking the illustrated embodiment as an example, the leaf nodes in the location map may be the location node of milepost F and the location nodes of the road sections from city a to city b.
[0126] Since traffic event descriptions usually occur in the smallest geographical area, the electronic device can determine whether the location entity corresponding to the leaf node is associated with the traffic event description, thereby improving the accuracy and efficiency of determining the traffic event description.
[0127] Optionally, the electronic device determines the traffic event description for determining the event node from the target text according to the target location entity and the target text, specifically by segmenting the target text to obtain multiple target sentences. For example, the electronic device may segment the target text based on symbols in the target text to obtain multiple target sentences, or the electronic device may obtain the target sentences based on other methods, which is not limited in the embodiments of the present application.
[0128] The electronic device can input a target location entity and multiple target sentences into the event classification model, obtain an event detection result corresponding to the target location entity, and determine a traffic event description for determining an event node and an event location relationship for determining an edge between an event node and a location node based on the event detection result. The event detection result is used to indicate whether a traffic event description exists for the target location entity. For example, if the event detection result indicates that a traffic event description exists for the target location entity, the electronic device can also determine the event location relationship, that is, the corresponding relationship between the target location entity and the traffic event description, based on the event detection result.
[0129] The event classification model is a model obtained by training multiple groups of samples, and the multiple groups of samples include sample location entities, multiple sample sentences corresponding to the sample location entities, and sample traffic event descriptions. For example, a sample location entity 1 and multiple sample sentences 2 in the text where the sample location entity 1 is located are obtained, and the traffic event description corresponding to the text is determined to obtain a sample traffic event description 3, and then a group of samples is obtained, which includes the sample location entity 1 and multiple sample sentences corresponding to the sample location entity 1, and the sample traffic event description 3.
[0130] For example, input a sentence with L tokens (x0, x1, ..., x L ), which includes a target location entity and multiple target sentences. The text is processed by the BERT model to obtain hidden layer representation features containing text information. For any target location entity, the features corresponding to the target location entity and the features of each target sentence are Max-pooling processed, the features corresponding to the target location entity and the features of each target sentence are fixed in length, the features of the target location entity are concatenated with the features of each target sentence, and the position of the target location entity in the target sentence is marked. The concatenated features are encoded again by the Transformer encoder to obtain the final representation of the concatenated features, and the final representation of the concatenated features is classified by the softmax classifier to obtain the probability that the target entity position belongs to each event, thereby determining the traffic event corresponding to the target location entity.
[0131] Next, combine Fig.11 , the process of determining the traffic event description corresponding to the target location entity is explained.
[0132] Fig.11 A schematic diagram of a process for determining a traffic event description provided in an embodiment of the present application. Fig.11, including the target text. Among them, the target text is "An accident occurred on Section 1 of G1 Expressway. A bus caught fire. The fire truck has arrived. The section to City A is temporarily closed." The target text is input into the language model character by character. The language model can output the sentence features corresponding to each sentence and the location entity features corresponding to Section 1 (Section 1 is the marked target location entity).
[0133] See also Fig.11 , the feature set includes the features of the text "an accident occurred on Section 1 of the G1 Expressway", the features of the text "a bus caught fire", the features of the text "the fire truck has arrived", the features of the text "the section to city a is temporarily closed", and the features of Section 1. Section 1 is in the first sentence, and after the above features are concatenated, the concatenated features are output to the Transformer encoder, and the Transformer encoder can output the encoded features.
[0134] See also Fig.11 , input the coded features into the classifier, and the classifier can output the probability of each traffic event description occurring on section 1. For example, the classifier outputs a set of parameters, each parameter is a number between 0 and 1, and each parameter corresponds to a traffic event description. For example, if the classifier output is (0.8, 0.1, 0.1), it means that the probability of the first type of traffic event description occurring on section 1 is 0.8, the probability of the second type of traffic event description occurring is 0.1, and the probability of the third type of traffic event description occurring is 0.1. If the first type of traffic event description is a road closure event, it means that a road closure event occurs on section 1, and the traffic event description corresponding to section 1 is a road closure event. In this way, based on the event classification model, the electronic device can accurately determine the traffic event description occurring at the location corresponding to each leaf node, thereby improving the accuracy and efficiency of determining the traffic event description.
[0135] The electronic device further generates event nodes, element nodes, and edges between nodes in the geographic event network according to the traffic event description, element entities, and event location relationships to obtain an event network. Specifically, the electronic device can generate event nodes in the geographic event network according to the traffic event description, further generate element nodes in the geographic event network according to the element entities, obtain element binding relationships between the traffic event description and the element entities, further generate edges between event nodes and element nodes in the geographic event network according to the element binding relationships, and further generate edges between event nodes and location nodes in the geographic event network according to the event location relationships to obtain an event network.
[0136] Optionally, the electronic device can determine the element binding relationship between the traffic event description and the element entity according to the type of the element entity. For example, if the element entity is the start time, the end time, and the entrance and exit information, the element entity of the start time and the end time can be bound to all traffic event descriptions (that is, the element nodes corresponding to the start time and the end time are connected to all event nodes), and the element entity of the entrance and exit information can be bound to the traffic event description associated with the location entity closest to the end time in the target text. It should be noted that the electronic device can also determine the element binding relationship between the traffic event description and the element entity according to any other feasible implementation method, and the embodiments of the present application are not limited to this.
[0137] Optionally, when connecting an event node and a position node, the starting point of the connection between the event node and the corresponding position node is the event node, and the end point is the leaf node. For example, when connecting an event node and a leaf node, the arrow of the connection line points to the leaf node. Optionally, when connecting an element node and an event node, the starting point of the connection between the element node and the corresponding event node is the element node, and the end point is the event node. For example, when connecting an event node and an element node, the arrow of the connection line points to the event node.
[0138] Next, combine Fig.12 , explaining the network of things.
[0139] Fig.12 A schematic diagram of a network of events provided in an embodiment of the present application. Fig.12 , including: geographic affairs network. Among them, the geographic affairs network includes location node 1, location node 2, location node 3 and location node 4. The location entity corresponding to location node 1 is G1 Expressway, the location entity corresponding to location node 2 is section A, and the location attribute is the direction of city e-city f, the location entity corresponding to location node 3 is milepost F, and the location entity corresponding to location node 4 is the section from city a to city b, and the location attribute is the direction of city c.
[0140] See also Fig.12 , the electronic device can determine the traffic event descriptions corresponding to the leaf nodes (location node 3 and location node 4) in the geographic event network. Among them, the traffic event description of location node 3 is new construction, and the traffic event description of location node 4 is new control. The element entity corresponding to the new construction is 18:00 start, and the element entity corresponding to the new control is entrance and 18:00 start. According to the geographic event network, the traffic event description and the element entity corresponding to each traffic event description, the event network is generated.
[0141] See also Fig.12, the location node 3 corresponding to the mileage post F in the event network is connected to the event node corresponding to the new construction, and the connection line points from the event node to the location node. The location node 4 corresponding to the section from city a to city b is connected to the event node corresponding to the new control, and the connection line points from the event node to the location node. The event node of the new construction is connected to the element node corresponding to the start time: 18:00, and the connection line points from the element node to the event node. The event node of the new control is connected to the element node corresponding to the entrance and the element node corresponding to the start time: 18:00, and the connection line points from the element node to the event node.
[0142] Below, Fig.12 Taking this as an example, the process of electronic devices determining traffic events based on the event network is described in detail.
[0143] The electronic device locates the event node corresponding to the new construction, and obtains that the event type is new construction, the start time is 18:00, and the location where the event occurred is mileage post F. Since the location node has no direction location attribute, the location node corresponding to the upstream section A determines the direction as the direction of city e-city f, and the location of the road name in the upstream location node is determined to be G1 Expressway. Therefore, the electronic device determines that the first road event corresponding to the event network is: road name: G1 Expressway; scene: mileage post; mileage post: mileage post F; direction: city e-city f; traffic event: new construction; start time: 18:00, that is, mileage post F of G1 Expressway, new construction is added in the direction of city e-city f, and the start time is 18:00.
[0144] The electronic device locates the event node corresponding to the new control and obtains the event type as new control. The location of the event is the section from city a to city b, the direction is the direction of city c, the control location is the highway entrance, and the road name is G1 Highway. Therefore, the electronic device determines that the second road event corresponding to the event network is: Road name: G1 Highway; Scenario: Section; Section: Section from city a to city b; Direction: City c; Traffic event: New control; Reason: Construction; Start time: 18:00, that is, on the section from city a to city b of G1 Highway, new control is added in the direction of city c, the reason for the control is construction, and the start time is 18:00.
[0145] It should be noted that when the traffic event description in the event network is a preset traffic event description, the electronic device can determine the event cause corresponding to the traffic event description based on other traffic event descriptions or external traffic content. For example, control events, vehicle operation restrictions and other events can determine the event cause, which is not limited in the embodiments of the present application.
[0146] The embodiment of the present application provides a method for determining a network of events, which obtains, from a target text, a location entity and location attribute for determining a location node, an element entity for determining an element node, and a location inclusion relationship for determining edges between location nodes, generates a geographic network of events based on the location entity, location attribute, and location inclusion relationship, and generates a network of events based on the target text, the geographic network of events, and the element entity. In this way, the electronic device can accurately determine the location information and element information related to the description of a traffic event based on other nodes connected to the event node, and can then quickly and accurately determine the traffic event corresponding to the target text, thereby improving the accuracy and efficiency of determining the traffic event.
[0147] Based on any of the above embodiments, Fig.13 , the process of the above-mentioned traffic event mining method is explained.
[0148] Fig.13 A process diagram of a traffic incident mining method provided in an embodiment of the present application. Fig.13 , including: target text. Among them, the target text is "Starting from 18:00, emergency operations will be carried out on G1 Expressway Section A from City a to City b, and milepost F will be under road construction. In order to control the flow, the entrance from City c to City d in the direction of City e will be controlled." The named entities determined in the target text include: G1 Expressway, Section A, City a to City b Direction, Milepost F, Entrance, City c to City d Section, and City e Direction.
[0149] See also Fig.13 According to the location entity in the named entity, the location attribute corresponding to the location entity, and the location inclusion relationship between the location entities, the geographic event network is determined. Among them, the location entity corresponding to the location node 1 in the geographic event network is G1 Expressway, the location entity corresponding to the location node 2 is the road section A, and the location attribute is the direction of city a-city b, the location entity corresponding to the location node 3 is the milepost F, and the location entity corresponding to the location node 4 is the road section from city c to city d, and the location attribute is city e.
[0150] See also Fig.13 , determine the traffic event descriptions corresponding to the milepost and the section from city C to city D, where the traffic event description corresponding to milepost F is new construction, and the traffic event description corresponding to the section from city C to city D is new control. The element entity corresponding to the new construction event is 18:00 start, and the element entity corresponding to the new control is entrance and 18:00 start. Generate an event network based on the element nodes corresponding to the element entities, the event nodes corresponding to the traffic events, the event location relationship, and the geographic event network.
[0151] See also Fig.13, the location node corresponding to the mileage post F in the event network is connected to the event node corresponding to the new construction, and the connection line points from the event node to the location node. The location node corresponding to the section from city c to city d is connected to the event node corresponding to the new control, and the connection line points from the event node to the location node. The event node of the new construction is connected to the element node corresponding to the start time: 18:00, and the connection line points from the element node to the event node. The event node of the new control is connected to the element node corresponding to the entrance and the element node corresponding to the start time: 18:00, and the connection line points from the element node to the event node.
[0152] See also Fig.13 ,Since the event network includes two types of traffic event descriptions, according to the event network, it can be determined that traffic event 1 is: Road name: G1 Expressway; Scene: Milepost; Milepost: Milepost F; Direction: City a-City b; Traffic event description: New construction; Start time: 18:00. Traffic event 2 is: Road name: G1 Expressway; Scene: Road section; Road section: City c to City d section; Direction: City e direction; Traffic event description: New control; Reason: Construction; Start time: 18:00.
[0153] In this way, since the network of things can indicate location entities, traffic events, element entities, and the relationship between each entity, the electronic device can accurately and quickly determine the traffic event corresponding to the target text based on the network of things, thereby improving the accuracy and efficiency of determining traffic events.
[0154] Fig.14 A schematic diagram of a traffic incident excavation device provided in an embodiment of the present application. Fig.14 The traffic event mining device 140 includes an acquisition module 141, a first determination module 142 and a second determination module 143, wherein:
[0155] The acquisition module 141 is used to acquire target text related to the traffic event;
[0156] The first determination module 142 is used to determine a network of events according to the target text, wherein the network of events includes position nodes, event nodes, element nodes associated with the event nodes, and edges between nodes;
[0157] The second determination module 143 is used to perform event reasoning according to the event network to determine the road event corresponding to the target text.
[0158] In a possible implementation manner, the first determining module 142 is specifically configured to:
[0159] Acquire, from the target text, a position entity and a position attribute for determining the position node, a feature entity for determining the feature node, and a position inclusion relationship for determining edges between the position nodes;
[0160] Generate a geographic affiliation network according to the location entity, the location attribute and the location inclusion relationship, wherein the geographic affiliation network includes location nodes related to the location entity and the location attribute, and edges between the location nodes corresponding to the location inclusion relationship;
[0161] The event network is generated according to the target text, the geographic event network and the element entities.
[0162] In a possible implementation manner, the first determining module 142 is specifically configured to:
[0163] Determine, from the geographic network, a target location entity corresponding to a leaf node among a plurality of location nodes;
[0164] According to the target location entity and the target text, determining from the target text a traffic event description for determining an event node and an event location relationship for determining an event node and a location node;
[0165] According to the traffic event description, the element entity, and the event location relationship, the event node, the element node, and the edges between the nodes are further generated in the geographic event network to obtain the event network.
[0166] In a possible implementation manner, the first determining module 142 is specifically configured to:
[0167] According to the traffic event description, further generating an event node in the geographic event network;
[0168] According to the element entity, in the geographic affairs network, further generating element nodes;
[0169] Obtain the feature binding relationship between the traffic event description and the feature entity;
[0170] According to the element binding relationship, in the geographic affairs network, edges between event nodes and element nodes are further generated;
[0171] According to the event-location relationship, in the geographic event network, edges between event nodes and location nodes are further generated to obtain the event network.
[0172] In a possible implementation manner, the first determining module 142 is specifically configured to:
[0173] Generate an initial geographic affiliation network according to the location entity and the location inclusion relationship, wherein the initial geographic affiliation network includes location nodes related to the location entity and edges between location nodes having location inclusion relationships;
[0174] Acquire a correspondence between the location entity and the location attribute, wherein the correspondence is used to determine the location attribute corresponding to the location node of the location entity;
[0175] The location attributes corresponding to the location nodes in the initial geographic affairs network are filled in to obtain the geographic affairs network.
[0176] In a possible implementation manner, the first determining module 142 is specifically configured to:
[0177] Performing sentence segmentation processing on the target text to obtain multiple target sentences;
[0178] Inputting the target location entity and the multiple target sentences into an event classification model to obtain an event detection result corresponding to the target location entity, wherein the event detection result is used to indicate whether the target location entity has the traffic event description;
[0179] Determining, according to the event detection result, a traffic event description for determining the event node and the event position relationship for determining an edge between the event node and the position node;
[0180] The event classification model is a model obtained by training multiple groups of samples, and the multiple groups of samples include sample location entities, multiple sample sentences corresponding to the sample location entities, and sample traffic events.
[0181] In a possible implementation manner, the second determining module 143 is specifically configured to:
[0182] According to the event node in the event network, determining the traffic event description corresponding to the event node;
[0183] Determining element information of the traffic event description according to the element nodes connected to the event node, wherein the element information at least includes time information corresponding to the traffic event description;
[0184] Determining the location information corresponding to the traffic event description according to the location node connected to the event node;
[0185] The traffic event corresponding to the target text is determined according to the traffic event description, the element information and the location information.
[0186] The traffic incident mining device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0187] The traffic event mining device shown in the embodiment of the present application may be a chip, a hardware module, a processor, etc. Of course, the traffic event mining device may be in other forms, and the embodiment of the present application does not specifically limit this.
[0188] Fig.15 Schematic diagram of the hardware structure of the electronic device provided for this application. Fig.15 The electronic device 150 may include: a processor 151 and a memory 152, wherein the processor 151 and the memory 152 can communicate; exemplarily, the processor 151 and the memory 152 communicate via a communication bus 153, the memory 152 is used to store program instructions, and the processor 151 is used to call the program instructions in the memory to execute the traffic event mining method shown in any of the above method embodiments.
[0189] Optionally, the electronic device 150 may further include a communication interface, which may include a transmitter and / or a receiver.
[0190] Optionally, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the present application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0191] An embodiment of the present application provides a computer-readable storage medium, on which computer-executable instructions are stored; when the computer-executable instructions are executed by a processor, they are used to implement the traffic event mining method as described in any of the above embodiments.
[0192] An embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed, a computer executes the above-mentioned traffic event mining method.
[0193] All or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated: ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.
[0194] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable electronic device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable electronic device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0195] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0196] These computer program instructions may also be loaded onto a computer or other programmable electronic device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0197] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0198] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.
Claims
1. A method for mining traffic events, characterized in that: include: Obtain target text related to traffic events; Determine a logic network according to the target text, wherein the logic network includes a position node, an event node, an element node associated with the event node, and edges between nodes; Event reasoning is performed according to the event network to determine the traffic event corresponding to the target text.
2. The method according to claim 1, characterized in that According to the target text, a logic network is determined, wherein the logic network includes a position node, an event node, an element node associated with the event node, and edges between nodes, including: Acquire, from the target text, a position entity and a position attribute for determining the position node, a feature entity for determining the feature node, and a position inclusion relationship for determining edges between the position nodes; Generate a geographic affiliation network according to the location entity, the location attribute and the location inclusion relationship, wherein the geographic affiliation network includes location nodes related to the location entity and the location attribute, and edges between the location nodes corresponding to the location inclusion relationship; The event network is generated according to the target text, the geographic event network and the element entities.
3. The method according to claim 2, characterized in that Generating the event network according to the target text, the geographic event network and the element entity includes: Determine, from the geographic network, a target location entity corresponding to a leaf node among a plurality of location nodes; According to the target location entity and the target text, determining from the target text a traffic event description for determining an event node and an event location relationship for determining an event node and a location node; According to the traffic event description, the element entity, and the event location relationship, the event node, the element node, and the edges between the nodes are further generated in the geographic event network to obtain the event network.
4. The method according to claim 3, characterized in that According to the traffic event description, the element entity, and the event location relationship, in the geographic event network, the event node, the element node, and the edges between the nodes are further generated to obtain the event network, including: According to the traffic event description, further generating an event node in the geographic event network; According to the element entity, in the geographic affairs network, further generating element nodes; Obtain the feature binding relationship between the traffic event description and the feature entity; According to the element binding relationship, in the geographic affairs network, edges between event nodes and element nodes are further generated; According to the event-location relationship, in the geographic event network, edges between event nodes and location nodes are further generated to obtain the event network.
5. The method according to any one of claims 2 to 4, characterized in that: A geographic affiliation network is generated according to the location entity, the location attribute and the location inclusion relationship. The geographic affiliation network includes location nodes related to the location entity and the location attribute, and edges between the location nodes corresponding to the location inclusion relationship, including: Generate an initial geographic affiliation network according to the location entity and the location inclusion relationship, wherein the initial geographic affiliation network includes location nodes related to the location entity and edges between location nodes having location inclusion relationships; Acquire a correspondence between the location entity and the location attribute, wherein the correspondence is used to determine the location attribute corresponding to the location node of the location entity; The location attributes corresponding to the location nodes in the initial geographic affairs network are filled in to obtain the geographic affairs network.
6. The method according to claim 3 or 4, characterized in that: According to the target location entity and the target text, determining from the target text a traffic event description for determining an event node and an event location relationship for determining an event node and a location node, including: Segmenting the target text to obtain a plurality of target sentences; Inputting the target location entity and the multiple target sentences into an event classification model to obtain an event detection result corresponding to the target location entity, wherein the event detection result is used to indicate whether the target location entity has the traffic event description; Determining, according to the event detection result, a traffic event description for determining the event node and the event position relationship for determining an edge between the event node and the position node; The event classification model is a model obtained by training multiple groups of samples, and the multiple groups of samples include sample location entities, multiple sample sentences corresponding to the sample location entities, and sample traffic events.
7. The method according to any one of claims 1 to 4, characterized in that: Performing event reasoning according to the event network to determine the traffic event corresponding to the target text includes: According to the event node in the event network, determining the traffic event description corresponding to the event node; Determine the element information of the traffic event description according to the element nodes connected to the event node, wherein the element information at least includes time information corresponding to the traffic event description; Determining the location information corresponding to the traffic event description according to the location node connected to the event node; The traffic event corresponding to the target text is determined according to the traffic event description, the element information and the location information.
8. A traffic incident excavation device, characterized in that: It includes an acquisition module, a first determination module and a second determination module, wherein: The acquisition module is used to acquire target text related to the traffic event; The first determination module is used to determine a network of events according to the target text, wherein the network of events includes position nodes, event nodes, element nodes associated with the event nodes, and edges between nodes; The second determination module is used to perform event reasoning according to the event network to determine the road event corresponding to the target text.
9. An electronic device, characterized in that: include: Processor, memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the traffic event mining method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for mining traffic events as described in any one of claims 1 to 7.
