Bus station matching method
Technical Field
The invention relates to the technical field of intelligent buses, in particular to a bus stop matching method.
Background
With the popularization of Global Positioning System (GPS) technology, track data mining based on vehicle-mounted GPS equipment has become a feature of research on urban intelligent transportation systems and Positioning services, and particularly, massive GPS track data provides data support for station matching of a bus service platform. However, the implementation of the service requires the platform to develop a reasonable site matching method to be used with the platform.
At present, the matching of bus stops is mostly realized based on the combination of GPS and IC card data in China, a bus positioning system, mainly a GPS, is utilized, the supervision and dispatching level of buses is improved to a great extent, the collected real-time geographic position, time and speed of the buses make up the missing key information in the bus IC card data to a great extent, and the quality of the bus IC card data is greatly improved. The bus stop matching method has the problems that as the GPS uploaded data is uploaded at regular time, if the data is uploaded right at the time of bus arrival, the GPS uploaded data is the bus arrival data; when the bus arrives at the station, the data are not uploaded, the GPS positioning data closest to the geographical coordinates of the station are needed to be searched, and the bus approximate arrival data are calculated according to the positioning time, speed and the like, so that the data are inaccurate, and the difficulty is increased for data processing; in addition, the method can only match the bus arrival data, and can not make correct matching for the buses in the driving process.
Disclosure of Invention
The invention aims to solve the defects of the prior art and provides a bus stop matching method.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a bus station matching method comprises the following steps:
s1, acquiring the bus driving route and the position information of the bus stop, and dividing the bus stop area by taking the bus stop as the center;
s2, dividing the bus driving route between any adjacent bus stop points into a plurality of bus driving road sections;
s3, acquiring position information of any bus according to a time period, matching the any bus with the any bus stop if the position of the any bus is always located in any bus stop area in two continuous periods, and performing step S4, or performing step S5 if the position of the any bus is not located in any bus stop area;
s4, acquiring position information of any other bus according to a time period, matching the any other bus with the any bus stop if the position of the any other bus is always located in the any bus stop area in two continuous periods, and repeating the step S4, or performing the step S5 if the position of the any other bus is not located in the any bus stop area;
s5, taking the bus position in the step S3 or the step S4 as an original point, taking the due north direction as 0 degree and acquiring the uplink and downlink angles of the bus, taking the original point of any bus driving road section as an original point, taking the due north direction as 0 degree and acquiring the uplink and downlink angles of any bus driving road section, and comparing the uplink and downlink angles of the bus with the uplink and downlink angles of any bus driving road section to acquire the bus driving road section corresponding to the bus, so that the bus driving road section where the bus is located is acquired; the above steps are completed and step S4 is repeatedly performed.
According to the technical scheme, the bus route is divided into the bus stop area and the plurality of bus traveling road sections, so that any bus can be accurately positioned in the bus stop area or a certain bus traveling road section, the traveling bus can be accurately matched with the bus route in real time, the bus is accurately determined to be located in a certain road section or stop of the bus route in real time, and data such as the bus up-down traveling time and the bus traveling time are acquired in real time.
Preferably, in step S5, if the absolute value of the difference between the uplink and downlink angle of any bus and the uplink and downlink angle of any bus driving road section is less than 10 degrees, any bus is matched with any bus driving road section; and if a plurality of bus driving road sections corresponding to any bus are obtained, calculating the distance between the any bus and the central point of each bus driving road section, and comparing to obtain the central point of the bus driving road section closest to the any bus, thereby obtaining the bus driving road section where the any bus is located. In the technical scheme, the bus runs along the bus running route, so that the uplink and downlink angles of the bus are necessarily close to or consistent with a certain bus running road section, and the fact that the bus is located on the certain bus running road section in real time can be obtained by comparing the uplink and downlink angles of the bus with the uplink and downlink angles of the bus running road section; when the ascending and descending angles of a plurality of sections of bus driving road sections are close to or consistent with those of the same bus, the distance between the bus and each central point of the plurality of sections of bus driving road sections is calculated, and the central point closest to the bus, namely the nearest road section of the bus, is obtained through comparison, so that the bus driving road section where the bus is located is obtained. Compared with the prior art, the method has the advantages that the positions of the bus and the bus driving road section are positioned by using the positioning system, the position signals of the bus driving road section area range do not need to be acquired, and the system is greatly simplified.
Preferably, in step S2, the bus travel route is divided according to the angular deviation of the bus travel route, a rectangular coordinate system is established with the start point of the bus travel route as the origin and the due north direction as the Y axis, a bus travel route having a continuous angular deviation of the bus travel route from the Y axis in one quadrant is established as one bus travel route, a rectangular coordinate system is established with the end point of the bus travel route as the origin and the due north direction as the Y axis, and a bus travel route having a continuous angular deviation of the bus travel route from the Y axis in one quadrant is established as the next bus travel route to the end point of the bus travel route. According to the technical scheme, the bus driving route is divided into multiple sections of straight bus driving road sections, the urban bus route is generally straight or continues to move straight after turning, and therefore the method can accurately segment the bus driving route when being applied to urban traffic.
Preferably, the bus stop area in step S1 is a circular area with a radius of 80 meters and with the bus stop position as a center. In the technical scheme, when a bus enters any circular area range and stays for two continuous periods, the bus is matched with any bus stop and is considered as the bus enters the station.
Preferably, in step S1, the bus driving route and the bus stop position information are acquired by the bus company. In the technical scheme, the bus company has the bus running route, the bus running route and the bus stop position information can be conveniently and directly acquired through the bus company, the bus running route and the bus stop position information do not need to be acquired again, the whole system is simplified, and the efficiency of the bus stop matching method is improved.
Preferably, the time period in step S3 is 10 seconds. Among the above technical scheme, according to common city bus road conditions and bus speed, obtain arbitrary bus position information according to 10 seconds a cycle and efficient and can monitor the bus position to a certain extent in requesting.
Preferably, the position information of the bus and the up-down angle of the bus are obtained according to the positioning terminal in the bus. In the technical scheme, the intelligent terminals used for positioning the positions of the buses are arranged on the common buses at present, and the position information of the buses and the uplink and downlink angles of the buses can be directly acquired through the intelligent terminals.
The invention has the beneficial effects that:
the bus stop matching method can accurately obtain whether the bus is in which stop or accurately obtain the road section where the bus is located in real time according to the real-time position and the driving direction of the bus matched with the preset bus route, solves the problem of inaccurate bus data in the prior art, and reduces the difficulty in processing the bus data.
Drawings
FIG. 1 is a flow diagram of a bus stop matching method of the present invention;
FIG. 2 is a schematic diagram illustrating the principle of determining whether a bus is located at a road section or a stop in the present invention;
fig. 3 is a schematic diagram illustrating the principle of dividing the bus driving road sections in the invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and embodiments.
As shown in fig. 1, the bus stop matching method of the present invention includes the following steps:
s1, acquiring the bus driving route and the position information of the bus stop, and dividing the bus stop area by taking the bus stop as the center;
s2, dividing the bus driving route between any adjacent bus stop points into a plurality of bus driving road sections;
s3, acquiring position information of any bus according to a time period, matching the any bus with the any bus stop if the position of the any bus is always located in any bus stop area in two continuous periods, and performing step S4, or performing step S5 if the position of the any bus is not located in any bus stop area;
s4, acquiring position information of any other bus according to a time period, matching the any other bus with the any bus stop if the position of the any other bus is always located in the any bus stop area in two continuous periods, and repeating the step S4, or performing the step S5 if the position of the any other bus is not located in the any bus stop area;
s5, taking the bus position in the step S3 or the step S4 as an original point, taking the due north direction as 0 degree and acquiring the uplink and downlink angles of the bus, taking the original point of any bus driving road section as an original point, taking the due north direction as 0 degree and acquiring the uplink and downlink angles of any bus driving road section, and comparing the uplink and downlink angles of the bus with the uplink and downlink angles of any bus driving road section to acquire the bus driving road section corresponding to the bus, so that the bus driving road section where the bus is located is acquired; the above steps are completed and step S4 is repeatedly performed.
In this embodiment, in step S5, if the absolute value of the difference between the uplink and downlink angle of any bus and the uplink and downlink angle of any bus travel section is less than 10 degrees, any bus is matched with any bus travel section; and if a plurality of bus driving road sections corresponding to any bus are obtained, calculating the distance between the any bus and the central point of each bus driving road section, and comparing to obtain the central point of the bus driving road section closest to the any bus, thereby obtaining the bus driving road section where the any bus is located. As shown in fig. 2, the bus B is located in the area of the station B, and the bus B is matched with the station B; the uplink and downlink angles of the first road section and the second road section are close to the uplink and downlink angles of the bus A, and the distance between the center point of the first road section and the center point of the second road section and the bus A is compared to obtain that the bus A is located in the first road section.
In this embodiment, in step S2, the bus travel route is divided according to the angle deviation of the bus travel route, a rectangular coordinate system is established with the starting point of the bus travel route as the origin and the due north direction as the Y axis, the bus travel route in which the continuous angle deviation of the bus travel route and the Y axis is in one quadrant is taken as one bus travel route, the rectangular coordinate system is established with the end point of the bus travel route as the origin and the due north direction as the Y axis, and the bus travel route in which the continuous angle deviation of the bus travel route and the Y axis is in one quadrant is taken as the next bus travel route until the end point of the bus travel route. As shown in fig. 3, a rectangular coordinate system is established with a stop C as a starting point of a bus driving route, an included angle between a third road segment and a Y axis is a, an included angle between a fourth road segment and the Y axis is b, the angle a is smaller than 90 degrees and is located in a first quadrant, the angle b is between 90 degrees and 180 degrees and is located in a second quadrant, so the angle a and the angle b are not located in the same quadrant, and the third road segment and the fourth road segment are two different bus driving road segments.
In this embodiment, the bus stop area in step S1 is a circular area with a radius of 80 meters and taking the bus stop position as a center of a circle.
In this embodiment, in step S1, the public transportation company obtains the public transportation driving route and the position information of the public transportation station.
In this embodiment, the time period in step S3 is 10 seconds.
In the embodiment, the position information of the bus and the uplink and downlink angles of the bus are obtained according to the positioning terminal in the bus.
In the description of the present invention, it should be noted that, as the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. appear, their indicated orientations or positional relationships are based on those shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" as appearing herein are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly stated or limited, the terms "mounted," "connected," and "connected" should be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Simple substitutions without changing the inventive content of the present invention are considered to be the same. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.