Base station identification method, network server, electronic device, program product and readable medium

By constructing the user's ride trajectory and comparing the similarity with the reference trajectory of the target transportation tool, identifying the base station type is solved, and the problem of low base station recognition accuracy in the prior art is achieved, and higher recognition accuracy is achieved.

CN120201376AActive Publication Date: 2025-06-24HONOR DEVICE CO LTD

Patent Information

Application Number
CN202410310278.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-13
Filing Date
2024-03-18
Publication Date
2025-06-24
Estimated Expiration
2044-03-18

AI Technical Summary

Technical Problem

The existing base station identification method has low accuracy and is prone to misidentification of non-subway base stations as subway base stations, resulting in low recognition accuracy.

Method used

By obtaining the base station location information connected by the electronic device during riding the target vehicle, the user's ride trajectory is constructed and the similarity is compared with the reference trajectory of the target vehicle. If the similarity value is higher than the threshold value, the base station is identified as the target base station.

Benefits of technology

It improves the accuracy of base station type identification, avoids the misidentification of non-subway base stations as subway base stations, and enhances the accurate judgment of whether users are in the process of taking the subway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201376A_ABST
    Figure CN120201376A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a base station identification method, a network server, electronic equipment, a program product and a readable medium, and the method comprises the steps: building a user riding track based on the position information of a base station, and indicating the track of a base station connected by a user in a riding process through the user riding track; the reference track is used for indicating the riding track between the starting point and the ending point of the riding track of the user, so that similarity comparison is performed on the riding track of the user and the reference track to obtain a similarity value, and the similarity value can judge whether the riding track of the user is the same as the moving track of the target vehicle or not; further deducing whether the base station track connected by the user in the riding process is the same as the moving track of the target vehicle or not, and when the similarity value is higher than the threshold value, indicating that the base station track connected by the user in the riding process is the same as the moving track of the target vehicle, namely the base station connected by the user in the riding process. The base station belonging to the target vehicle can prevent other types of base stations from being mistakenly identified as the base station of the target vehicle, and the accuracy of identifying the base station type is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of a Chinese patent application titled "A Base Station Identification Method, Electronic Device and Medium" with the application number 2023117182646, which was filed with the Chinese Patent Office on December 13, 2023. The entire content of this Chinese patent application is incorporated herein by reference. Technical Field

[0002] This application relates to the technical field of data processing, and in particular, to a base station identification method, network server, electronic device, program product, and readable medium. Background Art

[0003] Important means of transportation in urban public transportation systems such as buses, subways, and light rails play an important role in urban operation. Taking the subway as an example, when the user is near the subway turnstile, the electronic device can display the ride card. And, in order for the user to know the names of the current station and the next station, the electronic device will also continuously display the ride card during the ride. Currently, the electronic device can determine whether the user is still in the process of taking the ride by judging whether the base station it is connected to is a subway base station.

[0004] In related technologies, the identification rules adopted by the base station identification method are relatively simple, usually based on whether the connection duration to the base station is less than 60 seconds. However, in some application scenarios, when the electronic device accesses the base station corresponding to other types of transportation means, such as the rapid bus base station, its connection duration also meets the conditions for identifying the subway base station. In this case, this type of base station will also be misidentified as a subway base station, resulting in a low identification accuracy. Summary of the Invention

[0005] Embodiments of this application provide a base station identification method, network server, electronic device, computer program product, and computer-readable storage medium to improve the accuracy of identifying the type of base station.

[0006] To achieve the above objective, the embodiments of this application provide the following technical solutions:

[0007] In a first aspect, embodiments of this application provide a base station identification method, including: obtaining the location information of the base stations connected by the electronic device during the time of taking the target means of transportation; constructing a user's ride trajectory based on the location information of the base stations; comparing the similarity between the user's ride trajectory and the reference trajectory of the target means of transportation to obtain a similarity value; where the reference trajectory of the target means of transportation indicates the ride trajectory between the starting point and the ending point of the user's ride trajectory; and when the similarity value is higher than the threshold, identifying the base stations connected by the electronic device as the target base stations.

[0008] The base station identification method provided by the embodiments of the present application can be applied to a network server or an electronic device. In the above base station identification method, based on the location information of the base station, a user's riding trajectory is constructed, and the base station trajectory connected by the user during the ride can be indicated by the user's riding trajectory. Since the reference trajectory is used to indicate the riding trajectory between the starting point and the ending point of the user's riding trajectory, the user's riding trajectory and the reference trajectory are compared for similarity to obtain a similarity value. This similarity value can judge whether the user's riding trajectory is the same as the running trajectory of the target vehicle, and further infer whether the base station trajectory connected by the user during the ride is the same as the running trajectory of the target vehicle. When the similarity value is higher than the threshold, it indicates that the base station trajectory connected by the user during the ride is the same as the running trajectory of the target vehicle, that is, the base station connected by the user during the ride belongs to the base station of the target vehicle, which can avoid misidentifying other types of base stations as the base stations of the target vehicle and improve the accuracy of identifying the base station type.

[0009] Based on the first aspect, in a possible implementation, obtaining the location information of the base stations connected by the electronic device during the time of riding the target vehicle includes: based on the signaling handover data, obtaining the base stations connected by the electronic device during the time of riding the target vehicle; screening out the location information of the base stations connected by the electronic device during the time of riding the target vehicle in the base station snapshot data.

[0010] Based on the first aspect, in a possible implementation, constructing a user's riding trajectory based on the location information of the base station includes: using the location information of the base station as user trajectory nodes, and connecting the user trajectory nodes in the order of connection to the electronic device to obtain the user's riding trajectory.

[0011] Based on the first aspect, in a possible implementation, before connecting the user trajectory nodes in the order of connection to the electronic device to obtain the user's riding trajectory, it further includes: clustering the user trajectory nodes with a distance less than the threshold between them, and / or deleting the user trajectory nodes with abnormal positions.

[0012] In the above possible implementation, clustering the user trajectory nodes with a distance less than the threshold between them can shorten the time for subsequent trajectory matching, and can also avoid reducing the similarity value of the match due to multiple user trajectory nodes belonging to the same node but not being clustered, resulting in a direction inconsistent with the running trajectory of the target vehicle. Similarly, deleting the user trajectory nodes with abnormal positions can also shorten the time for subsequent trajectory matching and avoid the problem of reducing the similarity value of the match caused by the user trajectory nodes with abnormal positions.

[0013] Based on the first aspect, in a possible implementation, after clustering user trajectory nodes with a distance less than a threshold between them, it includes: for multiple user trajectory nodes belonging to the same class obtained by clustering, retaining the user trajectory node with the longest connection duration.

[0014] Based on the first aspect, in a possible implementation, deleting user trajectory nodes with abnormal positions includes: determining user long-holding nodes as user trajectory nodes with a connection duration greater than the threshold; constructing vectors of adjacent two user long-holding nodes in the order of connection to the electronic device; for the user trajectory nodes between adjacent two user long-holding nodes, constructing vectors of adjacent two user trajectory nodes in the order of connection to the electronic device; in the case where the included angle between the vectors of adjacent two user trajectory nodes and the vectors of their corresponding adjacent two user long-holding nodes does not meet the preset requirements, deleting the latter of the adjacent two user trajectory nodes.

[0015] Based on the first aspect, in a possible implementation, comparing the similarity between a user's ride trajectory and the reference trajectory of a target vehicle to obtain a similarity value includes: finding the nodes in the reference trajectory that are paired with the user trajectory nodes in the user's ride trajectory; calculating the similarity between the user trajectory nodes in the user's ride trajectory and the nodes in their paired reference trajectory to obtain the similarity scores of the user trajectory nodes in the user's ride trajectory; performing weighted summation on the calculated similarity scores of the nodes in the user's ride trajectory to obtain the similarity value.

[0016] Based on the first aspect, in a possible implementation, the method for generating a reference trajectory includes: in the subway network data, determining the stations corresponding to the starting point and the ending point in the user's ride trajectory; based on the subway network data, obtaining the shortest path between the stations corresponding to the starting point and the ending point in the user's ride trajectory, and this shortest path is used as the reference trajectory, and the nodes on the shortest path are configured with weights.

[0017] In the above possible implementation, using the shortest path between the stations corresponding to the starting point and the ending point in the user's ride trajectory as the reference trajectory can efficiently realize obtaining whether the user's ride trajectory is similar to it through the reference trajectory.

[0018] Based on the first aspect, in a possible implementation, the nodes on the shortest path include: the stations corresponding to the starting point and the ending point in the user's riding trajectory, the stations between the stations corresponding to the starting point and the ending point in the user's riding trajectory, and non-station points; wherein, the weight value of a station is a constant; the weight value of a non-station point has a negative correlation with the number of non-station points between a first station and a second station, the first station and the second station are respectively the closest to the non-station point and are located before and after the non-station point. In the above possible implementation, the non-station point can be understood as a point at a target distance from the ground line corresponding to the line of the target means of transportation.

[0019] Based on the first aspect, in a possible implementation, before obtaining the location information of the base stations connected by the electronic device during the time of taking the target means of transportation, it further includes: determining that the duration of taking the target means of transportation is within a preset range.

[0020] In a second aspect, an embodiment of the present application provides a network server, including: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store a computer program, the computer program includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the base station identification method disclosed in any one of the first aspect and its possible implementations.

[0021] In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store a computer program, the computer program includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the base station identification method disclosed in any one of the first aspect and its possible implementations.

[0022] Based on the third aspect, in a possible implementation, the electronic device is further configured to report information about the target base station to the network server and receive information about the target base station set sent by the network server, and the target base station set includes the target base station reported by the electronic device.

[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, which, when executed, is specifically used to implement the base station identification method provided in any one of the first aspect and its possible implementations.

[0024] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, causes the computer to execute the base station identification method provided in any one of the first aspect and its possible implementations. Description of the Drawings

[0025] Figure 1Schematic diagram of a ride card;

[0026] Figure 2 Schematic diagram of a base station distribution;

[0027] Figure 3 Flowchart of a method for identifying a base station provided by an embodiment of the present application;

[0028] Figure 4 Schematic diagram of the peripheral area of a subway turnstile;

[0029] Figure 5 Schematic diagram of a subway QR code page;

[0030] Figure 6 Schematic diagram of a ride start page provided by an embodiment of the present application;

[0031] Figure 7 Schematic diagram of a ride end page provided by an embodiment of the present application;

[0032] Figure 8 Schematic diagram of a base station connection provided by an embodiment of the present application;

[0033] Figure 9 Schematic diagram of a subway station and a non - subway station provided by an embodiment of the present application;

[0034] Figure 10 Schematic diagram of the matching of base station trajectory information and shortest path information provided by an embodiment of the present application;

[0035] Figure 11 Flowchart of a method for cleaning subway ride data provided by an embodiment of the present application;

[0036] Figure 12 Schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0037] Figure 13 Schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;

[0038] Figure 14 Schematic diagram of a base station identification device provided by an embodiment of the present application;

[0039] Figure 15 Schematic diagram of a network server provided by an embodiment of the present application. Detailed implementation manners

[0040] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include forms such as "one or more", unless the context clearly indicates otherwise.

[0041] Reference to "some embodiments" described in this specification means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in some embodiments" and "in other embodiments" that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized.

[0042] The "multiple" involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, terms such as "first" and "second" are only used for the purpose of distinguishing descriptions and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0043] For ease of understanding, the subsequent embodiments will be described by taking the target vehicle as the subway as an example.

[0044] The electronic device can determine whether the user is still in the process of taking the subway by determining whether the base station it is connected to is a subway base station, and then display the boarding card during the process of taking the subway. Therefore, it is necessary for the electronic device to first identify which base stations are subway base stations so that when taking the subway next time, it can determine whether it has been connected to the identified subway base station. If the electronic device is connected to the subway base station, the boarding card can be displayed.

[0045] Among them, the boarding card refers to a widget located on the desktop page of the electronic device. See Figure 1 , the boarding card 102 is located on the desktop page 101 of the electronic device 100. The boarding card 102 is usually larger than the icons on the desktop, and displays the subway QR code 103 required for entering and leaving the station, as well as the station names of the current station and the next station, etc.

[0046] In the related art, when it is detected that the moments of scanning two subway QR codes corresponding to entering and leaving the station respectively are both within the surrounding area of the subway station, and the time interval between the two scans is greater than 10 minutes and less than 60 minutes, and the duration of connecting each base station during the two scans is less than 60 seconds, it is determined that all the base stations connected during the two scans are subway base stations. Among them, the purpose of judging that the duration of connecting each base station during the two scans is less than 60 seconds is that if the duration of connecting a certain base station is greater than or equal to 60 seconds, it indicates that the user may be walking, cycling, etc. above the ground plane of the subway track, rather than taking the subway quickly on the subway track.

[0047] However, currently, the ride QR codes of different means of transportation (such as bus QR codes and subway QR codes) are not distinguished. Therefore, if there are bus stops within the surrounding area of the entering subway station and the leaving subway station, and the location, time interval, and base station connection duration of the two scans of the bus QR code also meet the above judgment conditions, the bus base station will be misjudged as a subway base station, and a pop-up reminder of the ride card will be given to the user, which will interfere with the user.

[0048] After studying the reasons, the inventor found that: the electronic device is configured with the identification of the subway base station to judge whether the base station accessed by the electronic device belongs to the subway base station. However, the rule adopted by the current subway base station identification method for base station identification is relatively simple: judge whether the duration of the electronic device accessing the base station is less than a specified value (such as 60 seconds). However, this identification method is very likely to cause non-subway base stations to be misidentified as subway base stations.

[0049] See Figure 2 , assuming that the user takes a bus by scanning the bus QR code at bus stop A which is close to subway station A, and gets off at bus stop B which is close to subway station B; if the time interval between the two wrist flicks corresponding to getting on and off is greater than 10 minutes and less than 60 minutes (that is, the riding duration is greater than 10 minutes and less than 60 minutes), and the duration of connecting each base station during the two wrist flicks is less than 60 seconds (that is, the durations of connecting base station C, base station D, and base station E are all less than 60 seconds), it is determined that base station A, base station C, base station D, base station E, and base station B are all subway base stations. In fact, base stations C, D, and E are bus base stations, and base stations F, G, and H are subway base stations. Therefore, the accuracy of the subway base stations identified by the above method is relatively low, and it is impossible to judge whether the user is in the process of taking the subway.

[0050] In view of this, the present application discloses a method for identifying base stations. See Figure 3, This figure is a flowchart of a method for identifying a base station provided by an embodiment of the present application. This method is applied to a network server 200, which can be understood as a server deployed in the cloud. It should be understood that since the present application takes the subway as the target vehicle as an example for illustration, the "riding" mentioned in subsequent embodiments refers to taking the subway.

[0051] Before the network server 200 executes the base station identification method provided by the embodiment of the present application, some preparatory work needs to be carried out. This preparatory work is combined with Figure 3 As shown, it may include the following contents:

[0052] Electronic devices used by users such as mobile phone 100 report relevant data of the user's ride to the network server 200. In some embodiments, the relevant data may include: the starting time of the ride, the ending time of the ride, and the signaling handover data during the user's ride. In the embodiments of the present application, numerous electronic devices can report relevant data of the user's ride to the network server 200. For the convenience of introduction, in the following content, the relevant data of the user's one-time ride reported by the mobile phone 100 is taken as an example for illustration.

[0053] In some embodiments, the mobile phone 100 can be configured with the timing for reporting data to the network server 200. This timing can be understood as a fixed moment or meeting certain conditions, etc. When the mobile phone 100 determines that the timing is met, it reports the relevant data of the user's ride to the network server 200. Exemplarily, the timing is within a certain period at night and the screen of the mobile phone 100 is turned off and not used by the user. In this way, when the time is within this period and the mobile phone 100 monitors that its display screen is turned off and not used by the user, it reports the relevant data of the user's ride to the network server 200. Another example is that the timing can also be the end of a user's ride. In this way, when the mobile phone 100 monitors the end of a user's ride, it reports the relevant data of the user's ride to the network server 200.

[0054] The relevant data of the user's ride reported by the mobile phone 100 can include the relevant data of the user's multiple rides. The relevant data of one ride includes the starting time of the ride, the ending time of the ride, and the signaling handover data during the user's ride. In this way, during the user's ride, the mobile phone can collect and record the starting time of the ride, the ending time of the ride, and the signaling handover data during the user's ride; when the mobile phone 100 determines that the timing for reporting data is met, it reports the recorded relevant data of the user's multiple rides to the network server 200 uniformly.

[0055] In some embodiments, the mobile phone 100 can monitor whether the user is riding, and when it monitors that the user is riding, it obtains the starting time and the ending time of the user's ride, and can also record the starting time and the ending time of the ride.

[0056] After the mobile phone 100 detects that the user is in the peripheral area of the subway turnstile, a boarding card is displayed on the desktop of the mobile phone 100. Refer to Figure 4 , the diagonal line 11 is the demarcation line 11 for distinguishing whether it is the peripheral area of the subway turnstile. The user entering the peripheral area of the subway turnstile indicates that the user will immediately pass through the subway turnstile. Although position A is outside the subway turnstile, position A is not a position in the peripheral area of the subway turnstile. Position B is also outside the subway turnstile, but since it is within the demarcation line 11, position B is a position in the peripheral area of the subway turnstile. That is to say, when the user holding the mobile phone 100 is at position A, the mobile phone 100 will not display the boarding card. After the user holding the mobile phone 100 passes the demarcation line 11 of the peripheral area and is at position B, the mobile phone 100 will display the boarding card.

[0057] After the user enters the peripheral area of the subway turnstile, as Figure 1 shown, the boarding card 102 can be displayed on the desktop page 101 of the mobile phone 100. At this time, the user can directly show the subway QR code 103 in the boarding card 102 on the desktop page 101 to the ticket checking entrance of the subway turnstile and then scan the code to enter the station.

[0058] The user can also click on the subway QR code 103 in the boarding card 102 to display the QR code page. Refer to Figure 5 , the subway QR code interface 104 of the mobile phone 100 shows a larger subway QR code 103 than the subway QR code 103 in the boarding card 102 on the desktop page 101. That is to say, the user can click on the subway QR code 103 in the boarding card 102 on the desktop page 101 as shown in Figure 1 to control the mobile phone 100 to display the interface as shown in Figure 5 . The user can also show the subway QR code 103 in the subway QR code page 104 as shown in Figure 5 to the ticket checking entrance of the subway turnstile and then scan the code to enter the station.

[0059] It can be seen from the above that: The mobile phone 100 can monitor whether the riding application is called and run to display the boarding card on its own desktop. The mobile phone 100 monitors whether the user takes a ride by monitoring whether the user has the behavior of flipping the wrist through sensor data. Among them, the user shows the subway QR code 103 in the boarding card 102 on the desktop page 101 to the ticket checking entrance of the subway turnstile and then scans the code to enter the station, or the user shows the subway QR code 103 in the subway QR code page 104 as shown in Figure 5 to the ticket checking entrance of the subway turnstile and then scans the code to enter the station, which means that the user has the behavior of flipping the wrist.

[0060] After the user enters the subway station by scanning the subway QR code on the ride card, the mobile phone 100 displays the ride start page, and the ride start time is displayed on the ride start page. As Figure 6 shown, the ride start page 105 of the mobile phone 100 includes the ride start time, the current subway line, the current station name, the subway first and last train information, etc.

[0061] In some embodiments, the mobile phone 100 may use the moment when the subway QR code page is displayed and the wrist flipping action is recognized as the user's ride start time.

[0062] After the user exits the subway station by scanning the subway QR code on the ride card, the mobile phone 100 displays the ride end page, and the ride end time is displayed on the ride end page. As Figure 7 shown, the ride end page 106 of the mobile phone 100 includes the ride end time, the current subway line, the current station name, the link to view the information around the subway station, the link to apply for an electronic invoice, and the link to view local life, etc.

[0063] In some embodiments, the mobile phone 100 may also use the moment when the subway QR code page is displayed and the wrist flipping action is recognized as the user's ride end time.

[0064] The mobile phone 100 monitors that the ride application is called and run, and also monitors the user's wrist flipping behavior through sensor data to start the ride, indicating that the user enters the ride process; the mobile phone monitors the user's wrist flipping behavior through sensor data again, indicating that the user ends the ride. During the user's ride, the mobile phone 100 can also perform signaling handover with multiple base stations to access or exit the base stations. The mobile phone 100 will also record the signaling handover data, and the signaling handover data includes the base station information of all the base stations that the mobile phone 100 has connected to during the user's ride.

[0065] In some embodiments, the base station information includes the base station number (cellID), the connection duration, the timestamp, etc. Among them, the base station number refers to the name or ID of the base station connected to the mobile phone 100. Each base station has a unique corresponding base station number. Exemplarily, the base station number can be 51857952700. The connection duration refers to the duration of the connection between the mobile phone 100 and the base station. Exemplarily, the connection duration between the mobile phone 100 and base station A is 15.9s. The timestamp represents the connection moment between the mobile phone 100 and the base station. Exemplarily, the timestamp can be 15220000. The larger the value of the timestamp, the later the connection moment between the mobile phone 100 and the base station, and the smaller the value of the timestamp, the earlier the connection moment between the mobile phone 100 and the base station.

[0066] The base station number (cellID), the connection duration, and the timestamp can be integrated into a base station information table, as shown in Table 1.

[0067] Table 1

[0068] Serial number Base station number Timestamp Connection duration 1 51857952700 15220000 15.9 2 51858235394 15230000 7.1 3 51785494530 15240000 8.6 4 51858235394 15250000 5.8

[0069] The server 300 reports the crowdsourced base station snapshot data to the network server 200 . The server 300 can be understood as a local server or a server deployed in the cloud.

[0070] Crowdsourced base station snapshot data refers to the information of base stations collected or updated by crowdsourcing. Collecting or updating data by crowdsourcing means that many users or participants participate in the process. Crowdsourced data (referred to as crowdsourcing) refers to the dot data of specific business behaviors of many electronic devices. It can be seen that in the scenario where the server 300 and many other electronic devices interact to complete some specific businesses, the server 300 also obtains the location information (latitude and longitude information) of the base station through the location information reported by many other electronic devices, that is to say, crowdsourced base station snapshot data may include the base station numbers and location information of multiple base stations.

[0071] In some embodiments, in a specific service scenario, multiple electronic devices access the same base station and report their own location information to the server 300. The server 300 can use the location information of multiple electronic devices accessing the same base station to calculate the center position of multiple electronic devices accessing the same base station, and use the center position as the location information of the base station. For example, if the center position of multiple electronic devices is 117°12'10 east longitude and 39°08'05 north latitude, the location information of the base station accessed by the multiple electronic devices can be (39.0805, 117.1210).

[0072] Of course, since the server 300 calculates the location information of the base station through the location information of the electronic device, the location information of the base station may deviate from the actual location information of the base station. Generally, when the server 300 obtains the updated location information of the base station, it can report it to the network server 200 synchronously to update the crowdsourced base station snapshot data stored by the network server 200.

[0073] The technician configures the subway network data on the network server 200. In some embodiments, the subway network data includes description information of multiple subway lines, and the description information of a subway line may include the name of the subway line, direction, names of the passing stations, location information (latitude and longitude information), etc.

[0074] The network server 200 performs a base station identification method provided in an embodiment of the present application, such as Figure 3 As shown, including:

[0075] S301: Obtain the user's ride start time and ride end time.

[0076] In some application scenarios, when a user scans the subway QR code to enter or exit the station, the subway turnstile may not respond. Taking entering the station as an example, after the user scans the subway QR code for the first time and the subway turnstile does not respond, in order to enter the station, the user will scan the subway QR code a second time. If the subway turnstile responds after the second scan of the subway QR code, then the time of the second scan of the subway QR code should be used as the starting time of the ride. However, electronic devices such as mobile phone 100 will record the time of each scan of the subway QR code as the starting time of the ride.

[0077] Therefore, the network server 200 can set a first duration threshold to clean up the starting time of each ride of the user saved according to the first duration threshold. In some embodiments, the starting time of the previous ride whose time interval between the starting times of the previous and the next rides is less than the first duration threshold is cleared. That is, the starting time corresponding to the time of the first scan of the subway QR code is used as the possible starting time of the ride. If the time interval between the possible starting time of the ride and the starting time corresponding to the time of the next scan of the subway QR code is less than the first duration threshold, then the starting time corresponding to the time of the next scan of the subway QR code is used as the possible starting time of the ride. Repeat this process until the time interval between the possible starting time of the ride and the starting time corresponding to the time of the next scan of the subway QR code is greater than or equal to the first duration threshold, and the possible starting time of the ride this time is used as the actual starting time of the ride.

[0078] Similarly, for exiting the station, which is similar to entering the station, a second duration threshold can be set to clean up the ending time of each ride of the user saved according to the second duration threshold. In some embodiments, the ending time of the next ride whose time interval between the ending times of the previous and the next rides is less than the second duration threshold is cleared. That is, the ending time corresponding to the time of the last scan of the subway QR code is used as the possible ending time of the ride. If the time interval between the possible ending time of the ride and the ending time corresponding to the time of the previous scan of the subway QR code is less than the second duration threshold, then the ending time corresponding to the time of the previous scan of the subway QR code is used as the possible ending time of the ride. Repeat this process until the time interval between the possible ending time of the ride and the ending time corresponding to the time of the previous scan of the subway QR code is greater than or equal to the second duration threshold, and the possible ending time of the ride this time is used as the actual ending time of the ride.

[0079] It should be noted that the above first duration threshold and second duration threshold can be the same or different. Exemplarily, they can be 5 seconds, 10 seconds, etc. Of course, the values of the first duration threshold and the second duration threshold are not limited in the embodiments of the present application.

[0080] S302: Determine whether the ride duration is greater than the first threshold and less than the second threshold. If so, execute S303.

[0081] The riding duration refers to the difference between the end time and the start time of the ride. Exemplarily, if the user scans the subway QR code to enter the station at 8:00:50 and scans the subway QR code to exit the station at 8:15:50, then the user's riding duration is 15 minutes.

[0082] Since there are cases where the user enters the station through the turnstile corresponding to Exit A of the subway station and immediately exits through the turnstile corresponding to Exit B, or there are cases where the user stays in the subway station, it is necessary to determine whether the riding duration is greater than the first threshold and less than the second threshold.

[0083] If the riding duration is greater than the first threshold and less than the second threshold, it means that the user is taking the subway during the riding duration. If the riding duration is less than or equal to the first threshold, or greater than or equal to the second threshold, it means that the user is not taking the subway during the riding duration.

[0084] Exemplarily, the first threshold can be 10 minutes and the second threshold can be 120 minutes. That is to say, it is necessary to determine whether the riding duration is greater than 10 minutes and less than 120 minutes. If so, perform step S303. If not, stop the subsequent subway base station identification.

[0085] In some embodiments, steps S301 and S302 can be executed by an electronic device such as the mobile phone 100 before reporting data to the network server 200. Based on this, the network server can execute step S303 and subsequent steps.

[0086] S303: Based on the mobile phone signaling handover data during the ride, obtain the information of the base stations connected during the ride.

[0087] In some application scenarios, there may be a situation where base station A is far from the subway track, resulting in the mobile phone 100 being connected to base station A for only a very short time. In this application scenario, the mobile phone signaling handover data reported by the mobile phone 100 to the network server 200 will also include the base station information of base station A. Therefore, the network server 200 needs to clear the information of the base stations connected by the user during the ride recorded by itself. Generally, the network server 200 can only obtain the base station information of the base stations whose connection duration with the base station by the user during the riding duration exceeds the third duration threshold. In some examples, the third duration threshold can be 5s, and the value of the third duration threshold is not limited in the embodiments of the present application.

[0088] It should be noted that in actual applications, there may be a situation where the location information in the base station information is blank, then the acquisition step of the base station information of this base station can be skipped, that is, this base station is discarded.

[0089] It should be noted that in actual applications, there may also be cases of multiple connections to multiple base stations. In this case, the base station with the longest connection duration information can be retained.

[0090] It can be understood that other rules for discarding and retaining can also be set, and the embodiments of this application do not make any limitations in this regard.

[0091] It should be noted that the base stations connected by the electronic device at the start and end of the ride must be subway base stations. Moreover, even if the subway track is underground, the locations of the two code scans corresponding to the start and end of the ride are relatively close to the ground plane. In the subsequent base station identification process, there will be no error of real longitude and latitude drift, thereby improving the accuracy of base station identification.

[0092] S304: Based on the base station snapshot data, obtain the location information of the base stations connected during the ride, and use the location information of the base stations as user trajectory nodes.

[0093] As described above, the base station snapshot data includes the base station numbers and location information of multiple base stations. The network server 200 can determine the base station numbers of the base stations connected by the mobile phone 100 during the user's ride based on the signaling handover data during the user's ride. The network server 200 screens out the location information of the base stations connected during the ride from the base station snapshot data based on the base station numbers of the base stations connected by the mobile phone 100, and uses the location information of the base stations as user trajectory nodes.

[0094] S305: Cluster the user trajectory nodes with a distance less than a third threshold between the user trajectory nodes to obtain the clustered user trajectory nodes.

[0095] The distance between user trajectory nodes can be calculated based on the location information of the base stations through the Euclidean distance formula. Exemplarily, the third threshold is 100 meters. If the distance between base station A and base station B is less than 100 meters, that is, the distance between user trajectory node A and user trajectory node B is less than 100 meters, then user trajectory node A and user trajectory node B can be aggregated. It should be noted that the embodiments of this application do not make any limitations on the value of the third threshold.

[0096] In some examples, from Figure 2 it can be seen that location I is the intersection of the ranges of base station F, base station G, and base station H. Therefore, if the mobile phone 100 is located at location I, the signals of base station F, base station G, and base station H will be repeatedly switched, and based on the location information of the base stations, the distances between base station F, base station G, and base station H are less than the third threshold. Therefore, among all the base stations, it is necessary to aggregate the user trajectory nodes with a distance less than the third threshold between the user trajectory nodes and only retain one user trajectory node.

[0097] It should be noted that the purposes of clustering user trajectory nodes include: 1. Shortening the time for subsequent trajectory matching; 2. Avoiding a decrease in the matching similarity value due to the position information of the base stations being estimated from crowdsourced base station snapshot data, and the position information of three base stations may be inconsistent with the subway traveling trajectory direction based on the trajectories at the previous and subsequent moments.

[0098] In some embodiments, the above retention principle may be that for multiple user trajectory nodes of a cluster obtained by clustering, only the user trajectory node with the longest connection duration may be retained. As shown in Table 1, if the mobile phone 100 is at the intersection of the ranges of user trajectory nodes corresponding to the three base stations numbered 1, 2, and 3, since the connection duration between the mobile phone 100 and the base station with signal 1 is the longest, which is 15.9 seconds, therefore, in the cluster obtained after aggregating the user trajectory nodes corresponding to the three base stations numbered 1, 2, and 3, only the base station information of the user trajectory node corresponding to base station 1 is retained.

[0099] In some embodiments, step S305 may not be executed.

[0100] S306: Eliminate user trajectory nodes with abnormal positions.

[0101] The user trajectory nodes obtained after clustering the user trajectory nodes can be connected, and the user trajectory nodes with abnormal positions are eliminated.

[0102] In some embodiments, one implementation manner of step S306 is: determining the user trajectory nodes with a connection duration greater than a threshold as user long-holding nodes. Exemplarily, the threshold may be 1 minute. According to the connection sequence with the electronic device, vectors of two adjacent user long-holding nodes are constructed; for the user trajectory nodes between two adjacent user long-holding nodes, vectors of two adjacent user trajectory nodes are constructed according to the connection sequence with the electronic device. In the case where the included angle between the vectors of two adjacent user trajectory nodes and the vectors of the corresponding two adjacent user long-holding nodes does not meet the preset requirements, the latter of the two adjacent user trajectory nodes is deleted.

[0103] Analyzing the signaling handover data shows that: usually, during subway rides, base station handovers are fast, and when the subway stops at the station hall, the base station connection duration is long; therefore, based on whether the connection duration is greater than the threshold to determine whether a user trajectory node is a user long-holding node, so as to distinguish the base stations connected when the subway stops at the station and the base stations connected during operation. And the connected base stations between two stations can be divided into one segment to perform abnormal position elimination.

[0104] Exemplarily, see Figure 8During the ride from the user's long - held node A to the user's long - held node B, the mobile phone 100 is connected to four base stations: base station A, base station B, base station C, and base station D respectively. Then, the four base stations, namely base station A, base station B, base station C, and base station D, serve as user trajectory nodes respectively. Based on the location information of the four base stations, the location information of the user trajectory nodes corresponding to the four base stations is obtained. Then, the four user trajectory nodes are connected in the order of base station A and base station B, base station B and base station C, and base station C and base station D respectively to obtain three vectors with directions.

[0105] Subsequently, the angles between the vector from the user's long - held node A to the user's long - held node B and the above - mentioned three vectors are judged respectively. For the convenience of understanding, in the following, the three vectors are taken as vector 1, vector 2, and vector 3 respectively, and the vector from the user's long - held node A to the user's long - held node B is taken as vector 4 for illustration. As can be seen from the figure, the angles between vector 1, vector 2, vector 3, and vector 4 are angle 1, angle 2, and angle 3 respectively.

[0106] Finally, it is judged whether angle 1, angle 2, and angle 3 are within the angle threshold range. Exemplarily, the angle threshold range can be (-60°, 60°). It can be seen that since angle 1 and angle 3 are within the angle threshold range, the base stations (i.e., user trajectory nodes) corresponding to angle 1 and angle 3 are retained, that is, the user trajectory nodes corresponding to base station A, base station B, and base station D. Since angle 2 is not within the angle threshold range, the base station corresponding to angle 2 (that is, the base station pointed to by vector 2) is discarded, that is, the user trajectory node corresponding to base station C.

[0107] It should be noted that the present application embodiment does not limit the value of the angle threshold range.

[0108] In some embodiments, step S306 may not be executed.

[0109] S307: Construct the user's riding trajectory according to the user trajectory nodes.

[0110] The user trajectory nodes obtained in step S304, after aggregation and elimination in step S305 and step S306, the remaining user trajectory nodes can be connected in the order of the connection sequence of the mobile phone 100 to obtain the user's riding trajectory.

[0111] S308: Based on the subway network data, mark the location information of subway stations and non - subway stations, and assign weights to subway stations and non - subway stations.

[0112] As described above, subway network data includes: description information of multiple subway lines. The description information of a subway line may include the name of the subway line, the direction, the names and location information (latitude and longitude information) of the stations along the line. The stations along the subway line are abbreviated as subway stations, and their location information refers to the latitude and longitude information of the center point of the subway station.

[0113] Based on the location information of the subway stations, subway stations are marked on the subway line. In some embodiments, in order to divide the subway line into more nodes for subsequent trajectory matching in step S310, the subway line also needs to mark non-subway stations at certain intervals, that is, mark the location information of non-subway stations.

[0114] The location information of non-subway stations refers to the latitude and longitude information of the points at a target distance from the above-ground line corresponding to the subway line. Exemplarily, the above target distance can be 130 meters, 150 meters, 200 meters, etc., and the embodiments of the present application do not make limitations.

[0115] It should be noted that if the subway line is above ground, for example, on an elevated structure, then the location information of subway stations and non-subway stations can be marked on the subway line. If the subway line is underground, the location information of subway stations can be marked on the subway line, and the location information of non-subway stations can be marked on the above-ground line corresponding to the subway line. For this, the embodiments of the present application do not make limitations.

[0116] In some embodiments, after marking the location information of subway stations and non-subway stations, it is also necessary to mark the weight of subway stations and non-subway stations. Specifically, the weight of each subway station needs to be marked as 1, and the weight of each non-subway station needs to be marked as 1 / N, where N refers to the number of non-subway stations between two adjacent subway stations.

[0117] Exemplarily, referring to Figure 9 , there are 8 non-subway stations between subway station A and subway station B. Therefore, the weight of each non-subway station between subway station A and subway station B is 1 / 8.

[0118] It should be noted that there can also be multiple rules for marking the weights of subway stations and non-subway stations. For the specific marking rules, the embodiments of the present application do not make limitations.

[0119] In some embodiments, the network server 200 can be understood as executing steps S301 to S307 in parallel, and steps S308 and S309. In other embodiments, the network server 200 can also execute steps S308 and S309 after executing steps S301 to S307.

[0120] S309: In the subway network data, determine the reference trajectory between the starting trajectory point and the ending trajectory point in the given user's travel trajectory.

[0121] In some embodiments, first determine the starting trajectory point and the ending trajectory point in the user's travel trajectory, screen out the nearest subway station within the preset range of the starting trajectory point on the subway line, and screen out the nearest subway station within the preset range of the ending trajectory point. Exemplarily, the preset range is 200 meters. Among them, the nearest subway station within the preset range of the starting trajectory point is the starting station, and the nearest subway station within the preset range of the ending trajectory point is the ending station. Determine the path between the starting station and the ending station in the subway network data, and this path is the reference trajectory.

[0122] It should be noted that since the subway network data marks subway stations and non-subway stations, usually, the reference trajectory also includes subway stations and non-subway stations between the starting station and the ending station.

[0123] To pursue the maximization of computing efficiency, use the shortest path algorithm to determine the path between the starting station and the ending station in the subway network data, that is, determine the shortest path between the starting station and the ending station in the subway network data, and this shortest path is used as the reference trajectory. In some embodiments, the shortest path algorithms include the Floyd algorithm, the Dijkstra algorithm, the Bellman-Ford algorithm, etc.

[0124] The reference trajectory between the starting station and the ending station obtained by using the shortest path algorithm may not be the real trajectory of the user's ride in some cases. For some other purposes, the user may not take the shortest path from the starting station to the ending station, but take other paths. Based on this, when using this path to execute the following step S310 for trajectory matching, it is very likely that a high matching score cannot be obtained, and thus the following step S311 cannot be continued. Therefore, it can be seen that the reference trajectory between the starting station and the ending station obtained by using the shortest path algorithm is not the most perfect solution. However, the purpose of the base station identification method provided in the embodiments of the present application is to identify which base stations are subway base stations, rather than identifying whether a base station is a subway base station based on each user's ride trajectory brought by the user. Its purpose lies in the accuracy of identifying the base station as a subway base station, rather than comprehensiveness. Of course, when the data volume of the crowdsourced base station snapshot data is large enough, high-accuracy comprehensive identification can also be achieved. Based on this, even if the reference trajectory between the starting station and the ending station obtained by using the shortest path algorithm may cause some user ride trajectories to be discarded and not participate in step S311, it can still ensure that the user ride trajectories passing through step S310 belong to user ride trajectories with high accuracy, thereby ensuring the execution accuracy of step S311, that is, accurately identifying subway base stations.

[0125] In some other embodiments, when the network server 200 executes step S309, multiple reference trajectories between the starting trajectory point and the ending trajectory point can also be obtained. For example, the shortest path, the second shortest path, or the third shortest path, etc. between the starting station and the ending station are determined in the subway network data, and the multiple reference trajectories are used to execute the following step S310 and step S311. In this way, the problem of only using the shortest path to execute the following step S310 and step S311 can be avoided.

[0126] It should be noted that if the nearest subway station within the preset range of the starting trajectory point is not screened out on the subway line, or the nearest subway station within the preset range of the ending trajectory point is not screened out, it means that the user ride trajectory obtained in step S307 may not be credible and belongs to data obtained by incorrect collection. The user ride trajectory can be discarded, and the next user ride trajectory can be obtained to execute step S309.

[0127] It should be noted that in the case where there are multiple nearest subway stations within the preset range of the starting trajectory point screened out on the subway line, the station closest to the starting trajectory point among the multiple nearest subway stations is selected as the starting station; similarly, in the case where there are multiple nearest subway stations within the preset range of the ending trajectory point screened out, the station closest to the ending trajectory point among the multiple nearest subway stations is also selected as the ending station.

[0128] After the network server obtains the user's riding trajectory through step S307 and the reference trajectory through step S308, the following steps S310 and S311 can be executed.

[0129] S310: Match the user's riding trajectory with the reference trajectory between the starting station and the ending station to obtain a matching score.

[0130] Matching the user's riding trajectory and the reference trajectory to obtain a matching score refers to the process of comparing the similarity between the user's riding trajectory and the reference trajectory to obtain a similarity value. The rules for matching the user's riding trajectory and the reference trajectory are mainly the following three points:

[0131] First, all nodes in the user's riding trajectory need to be matched with the nodes in the reference trajectory.

[0132] See Figure 10 , b1, b2, b3, and b4 are all nodes in the reference trajectory, and q1, q2, q3, and q4 are all nodes in the user's riding trajectory. Then, q1, q2, q3, and q4 all need to be matched with the nodes in the reference trajectory.

[0133] In an application scenario, the reference trajectory is a relatively straight subway line, and the user's riding trajectory is an S-shaped curve around the subway line. If it is not required that all nodes in the user's riding trajectory need to be matched with the nodes in the reference trajectory, only some nodes in the user's riding trajectory are matched with the nodes in the reference trajectory, then it is considered that the matching degree between the user's riding trajectory and the reference trajectory is relatively high, which will lead to the user's riding trajectory in this scenario being considered to have a relatively high matching degree with the reference trajectory, while in fact, the user's riding trajectory does not match the reference trajectory. Based on this, to ensure a more accurate evaluation of the matching degree between the user's riding trajectory and the reference trajectory, it is necessary to require that all nodes in the user's riding trajectory need to be matched with the nodes in the reference trajectory.

[0134] Second, not all nodes in the reference trajectory need to be matched with the nodes in the user's riding trajectory. Therefore, Figure 10 The b1 and b3 nodes in

[0135] Third, the matching of the nodes of the user's riding trajectory and the nodes of the reference trajectory should be based on the order, that is, the position of the node in the reference trajectory that matches the subsequent node of the user's riding trajectory is the same as or behind the position of the node in the reference trajectory that matches the previous node of the user's riding trajectory.

[0136] Exemplarily, such as Figure 10As shown, the user's ride track node q1 matches the node b2 in the reference track, and the user's ride track node q2 needs to find a matching node from the nodes after (including node b2) the node b2 in the reference track.

[0137] In some embodiments, for each node in the user's ride track, a paired node is found from the reference track according to the above rules, and then the matching score between each node in the user's ride track and its paired node in the reference track is calculated. Finally, the matching scores of each node in the user's ride track are weighted and summed to obtain the score of the user's ride track.

[0138] Exemplarily, as Figure 10 shown, according to the above rules, q1 can be paired with b2, and q2, q3, and q4 are respectively paired with b4 for calculating the matching score.

[0139] In some embodiments, the calculation method of the matching score can be as shown in formula (1):

[0140]

[0141] Among them, standard similarity(Q, B) is the matching score between the user's ride track Q and the reference track B, similarity(Q, B) is the weighted sum of the similarities of the nodes in the user's ride track Q and the reference track B, w(b i ) is the weight of the node bi, and the node bi refers to each node in the reference track.

[0142] Through formula (1), the matching score between the user's ride track Q and the reference track B can be converted into a value between 0 and 1, which is more convenient to evaluate whether the matching score between the user's ride track Q and the reference track B is greater than the threshold. In some embodiments, the weighted sum of the similarities of the nodes in the user's ride track Q and the reference track B can also be retained as the matching score between the user's ride track Q and the reference track B.

[0143] In some embodiments, the weighted sum of the similarities of the nodes in the user's ride track Q and the reference track B, similarity(Q, B), can be as shown in formula (2):

[0144]

[0145] Among them, w(*) is the weight of the node *, B.head is the first node of the reference track, and w(B.head) is the weight of the first node of the reference track; e -score(QB) is the similarity between two nodes respectively taken from the user's ride track and the reference track; Q.head is the first node of the user's ride track Q, e -score(Q.head,B.head)It refers to the similarity of the paired nodes in the user's ride track Q and the reference track B. Q.rest is the remaining nodes of the user's ride track, and B.rest is the remaining nodes of the reference track. The remaining nodes can be understood as the nodes after the first node; similarity(Q.rest, B) refers to the weighted sum of the similarities between the remaining nodes of the user's ride track and the nodes of the reference track; similarity(Q, B.rest) refers to the weighted sum of the similarity values between the nodes of the user's ride track and the remaining nodes of the reference track.

[0146] It should be noted that formula (2) can be understood as a process of iteratively calculating the weighted sum similarity(Q, B) of the nodes in the user's ride track Q and the reference track B; in the following content, w(B.head)*e in formula (2) -score(Q.head,B,head) +similarity(Q.rest, B) is called the first formula, and similarity(Q, B.rest) in formula (2) is called the second formula.

[0147] Assume that the first node of the user's ride track Q is paired with the first node of the reference track B. Then, the first formula in formula (2) is used for calculation, and it is iterated with similarity(Q.rest, B) to formula (2) to find the paired node of the next node of the first node of the user's ride track Q and the reference track B, and so on. The paired node of the last node of the user's ride track Q and the reference track B is iteratively obtained, and then the similarity value of the paired node of the last node of the user's ride track Q and the reference track B is calculated based on the following formula (3). Furthermore, a hierarchical calculation is performed in a reverse iteration manner to obtain the similarity value of the first node of the user's ride track Q and the first node of the reference track B, and finally, the weighted sum of the similarity values of each node of the user's ride track Q and the paired nodes of the reference track B is obtained.

[0148] Assume that the first node of the user's ride track Q is not paired with the first node of the reference track B. Then, the second formula in formula (2) is used for calculation, that is, it is iterated to formula (2) with the second formula to judge whether the first node of the user's ride track Q and the next node of the first node of the reference track B are paired. If they are paired, the first formula in formula (2) is used and the iteration continues. Otherwise, the second formula in formula (2) is used and the iteration continues, and so on. The paired node of the last node of the user's ride track Q and the reference track B is iteratively obtained, and then the similarity value of the paired node of the last node of the user's ride track Q and the reference track B is calculated based on the following formula (3). Then, a hierarchical calculation is performed in a reverse iteration manner to obtain the similarity value of the paired node of the first node of the user's ride track Q and the reference track B, and finally, the weighted sum of the similarity values of each node of the user's ride track Q and the paired nodes of the reference track B is obtained.

[0149] Taking the paired nodes a and b in the user's riding trajectory Q and the reference trajectory B as an example, the scores (a, b) of the two nodes a and b are calculated by formula (3). Score (a, b) can be understood as a parameter used to calculate the similarity value between the two nodes.

[0150]

[0151] Wherein, distance(a, b) is the Euclidean distance between two nodes a and b, which is used to indicate the difference between the longitude and latitude of two nodes a and b. threshold distance is the first parameter, and sigma is the second parameter. Both the first parameter and the second parameter can be understood as constants.

[0152] Among them, distance(a, b)≤threshold distance, indicating that the distance between nodes a and b is relatively close, score(a, b) is 0, and the similarity value e between nodes a and b calculated based on 0 is -score(a,b) Then e 0 =1, indicating that the similarity value between nodes a and b is the largest, that is, the similarity is the highest.

[0153] distance(a, b)>threshold distance, indicating that the distance between nodes a and b is far, score(a, b) is It is a value greater than 0, and the similarity value e between the two nodes a and b is calculated based on this value. -score(a,b) It is a value less than 1, indicating that the similarity between nodes a and b is small.

[0154] And, the larger the distance(a, b), The larger the value, the smaller the calculated similarity value between the two nodes a and b, indicating that the two nodes are less similar, that is, the lower the similarity.

[0155] Set distance(a, b)>threshold distance, This indicates that the distance between two nodes and the similarity value of the two nodes calculated based on score(a, b) are not linearly related, that is, the farther the distance between two nodes, the more drastic the change in the similarity value of the two nodes.

[0156] In some embodiments, distance(a, b)>threshold distance, or

[0157]

[0158] As can be seen from the above, calculating the matching score between the user's travel trajectory and the reference trajectory can be understood in principle as follows:

[0159] Traverse the nodes of the user's travel trajectory, and perform multiple rounds of screening among the nodes of the reference trajectory according to the first principle to screen out the paired nodes of each node of the user's travel trajectory. The first principle refers to: the position of the node paired with the reference trajectory after the node of the user's travel trajectory is the same as or behind the position of the node paired with the reference trajectory before the node of the user's travel trajectory; for the screening results of each round, calculate the similarity between each node of the user's travel trajectory and its paired node respectively to obtain the similarity value of each node of the user's travel trajectory; then calculate the weighted sum of the similarity values of the nodes of the user's travel trajectory; for the weighted sum of the similarity values of the nodes of the user's travel trajectory calculated from the screening results of multiple rounds, select the maximum value as the matching score for calculating the user's travel trajectory and the reference trajectory.

[0160] Figure 10 In the example of the user's travel trajectory and the reference trajectory shown, in the first screening, select b1 as the paired node of q1, q2, q3, and q4 respectively, calculate the similarity between each node of the user's travel trajectory and its paired node of the reference trajectory as the similarity of each node of the user's travel trajectory, and calculate the weighted sum of the similarity of each node of the user's travel trajectory; then, in the second screening, select b1 as the paired node of q1 and b2 as the paired node of q2, q3, and q4 respectively, calculate the similarity between each node of the user's travel trajectory and its paired node of the reference trajectory as the similarity of each node of the user's travel trajectory, and calculate the weighted sum of the similarity of each node of the user's travel trajectory; and so on, calculate the weighted sum of the similarity of each node of the user's travel trajectory for the screening results respectively to obtain the weighted sum of the similarity of each node of the user's travel trajectory corresponding to each screening result.

[0161] For the weighted sum of the similarity values of the nodes of the user's travel trajectory calculated from the screening results of multiple rounds, select the maximum value as the matching score for calculating the user's travel trajectory and the reference trajectory.

[0162] In some other embodiments, the method for calculating the matching score between the user's travel trajectory and the reference trajectory can also be:

[0163] Traverse the nodes of the user's riding trajectory, pair each node with the nodes of the reference trajectory to obtain their similarity values, select the maximum value of the similarity values as the similarity value between the node and the node of the reference trajectory, and use the node of the reference trajectory corresponding to the maximum value of the similarity value as the final paired node of the node of the user's riding trajectory. Then, perform a weighted sum of the similarity values of each node of the user's riding trajectory calculated, and the weight value is the weight of the reference node finally paired with the node of the user's riding trajectory. Of course, in the process of pairing each node with the nodes of the reference trajectory, the three rules proposed above also need to be satisfied.

[0164] In some embodiments, the result of the above weighted sum can also be normalized by formula (1) to obtain a value between 0 and 1.

[0165] It should be noted that the aforementioned formula (2) is a way to select paired nodes in the reference trajectory for the nodes of the user's riding trajectory by using dynamic programming and calculate the similarity value, which is a more efficient way to calculate the weighted sum of the similarities of the nodes in the user's riding trajectory Q and the reference trajectory B.

[0166] S312: Use the user's riding trajectory with a matching score higher than the threshold as a valid trajectory, and use the base station corresponding to the valid trajectory as the subway base station.

[0167] After obtaining the valid trajectory, the base station connected by the mobile phone 100 in the valid trajectory can be used as the subway base station.

[0168] In some embodiments, the matching score is a value between 0 and 1, and the threshold can also be configured as a value between 0 and 1, usually a value closer to 1. In some other embodiments, the matching score is not normalized by formula (1), and the threshold can be set according to experience.

[0169] When the user is riding, after the electronic device accesses the base station, it can determine whether the user is in the process of taking the subway by judging whether the base station is a subway base station, and then display a riding card on the desktop page of the electronic device. In some examples, the riding card can be as Figure 1 shown.

[0170] The method for identifying the base station disclosed in the embodiments of the present application can also be used to clean subway riding data. See Figure 11, if the electronic device determines through identification that the base station it is connected to is a subway base station, thereby learning that the user is in the process of taking the subway, then the QR code scanned by the user when entering the station can be marked as a subway QR code, and the data corresponding to the subway QR code is the subway ride data. Subsequently, the data in all the original ride data that is not subway ride data can be cleaned, and the accuracy of the peripheral area (i.e., the electronic fence) of the subway turnstile can be improved according to the subway ride data.

[0171] It should be noted that through the base station identification method provided by the embodiments of the present application, it can also be determined whether the user is a high-frequency rider. If the electronic device detects the number of times the user flips the wrist, or the number of times the electronic device is connected to the subway base station is greater than the number threshold, then the user can be labeled as a high-frequency rider, and a more preferential ride package can be provided for the user.

[0172] In summary, the embodiments of the present application disclose a base station identification method. This method first constructs the user's ride trajectory based on the positions of the base stations connected by the electronic device, and then compares this user's ride trajectory with the reference trajectory. If the similarity between the user's ride trajectory and the reference trajectory is higher than the threshold, it proves that all the base stations connected by the electronic device on the user's ride trajectory are subway base stations. Thus, it avoids the problem in the related art that the electronic device cannot distinguish between subway QR codes and bus QR codes, resulting in the easy misjudgment of bus base stations as subway base stations, improves the accuracy of the identified subway base stations, and can accurately determine whether the user is in the process of taking the subway. Moreover, in the next ride after the electronic device identifies the target base station, it can determine whether the user is still in the process of taking the target means of transportation by judging whether the base station it is connected to is the target base station, and then display the ride card on the desktop page, which can enhance the fun of the user's ride.

[0173] Figure 3 The shown base station identification method can also be executed by an electronic device such as the mobile phone 100 (which can be understood as an end-side device).

[0174] During the use of an electronic device such as the mobile phone 100, along with the user's riding behavior, relevant data of the user's ride can be obtained. Moreover, an electronic device such as the mobile phone 100 can also obtain crowdsourced base station snapshot data and subway network data through pre-configuration or interaction with the server. For the relevant data of the user's ride, crowdsourced base station snapshot data, and subway network data, please refer to Figure 3 the corresponding embodiment content. Based on the relevant data of the user's ride collected by itself, an electronic device such as the mobile phone 100 executes Figure 3 the shown base station identification method, that is, executes steps S301 to S311 to obtain the identified subway base stations.

[0175] Electronic devices such as mobile phone 100 report the subway base stations they identify to network server 200. Since electronic devices such as mobile phone 100 are end-side devices used by users and there are a large number of them, each end-side device can obtain the identified subway base stations based on the user's riding-related data obtained from the riding behavior of its own user and report them to network server 200. In this way, network server 200 can collect a large number of subway base stations, and after organizing them, it can then send them to electronic devices such as mobile phone 100.

[0176] An embodiment of the present application provides an electronic device. This electronic device can be like mobile phone 100 disclosed in the foregoing content. During the user's ride, it collects the relevant data of the user's ride and reports the relevant data of the user's ride to network server 200. Alternatively, it executes Figure 3 the base station identification method shown. This electronic device can be a mobile phone, a laptop computer, a wearable electronic device (such as a smart watch), a tablet computer, an augmented reality (AR) device, a virtual reality (VR) device, etc.

[0177] Taking the mobile phone as an example, electronic device 100 is as Figure 12 shown and may include a processor 110, antenna 1, antenna 2, internal memory 120, a mobile communication module 130, a wireless communication module 140, etc. It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0178] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0179] The internal memory 120 may be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120.

[0180] The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 130, the wireless communication module 140, the modem processor, and the baseband processor, etc. In some embodiments, the electronic device 100 may use the wireless communication function to report relevant data of the user's ride to the network server 200.

[0181] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0182] The mobile communication module 130 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 130 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 130 may receive electromagnetic waves through the antenna 1, perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through the antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 130 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 130 and at least some modules of the processor 110 may be provided in the same device.

[0183] The wireless communication module 140 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 140 may be one or more devices integrating at least one communication processing module. The wireless communication module 140 receives electromagnetic waves through the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 140 may also receive the signal to be sent from the processor 110, perform frequency modulation and amplification on it, and convert it into electromagnetic waves through the antenna 2 and radiate it out.

[0184] See Figure 13 , which is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application. The software system of the electronic device 100 may adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture. In an embodiment of the present invention, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device 100.

[0185] The layered architecture divides software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, Android runtime and system libraries, the hardware abstraction layer, and the kernel layer.

[0186] The application layer may include a series of application packages. Exemplarily, it may include a ride card.

[0187] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0188] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for the scheduling and management of the Android system. The core libraries contain two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0189] The hardware abstraction layer may include multiple library modules. The Android system can load the corresponding library modules for the device hardware, thereby achieving the purpose of the application framework layer accessing the device hardware. The kernel layer is the layer between the hardware and the software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.

[0190] It should be noted that although the embodiments of the present application are described by taking the Android system as an example, its basic principles are equally applicable to electronic devices 100 based on operating systems such as iOS and Windows.

[0191] See Figure 14 , this figure is a schematic diagram of a base station identification device provided by the embodiments of the present application. The base station identification device 1400 includes: an acquisition module 1401, a construction module 1402, a comparison module 1403, and an identification module 1404.

[0192] An acquisition module 1401 is configured to acquire the location information of the base stations connected by the electronic device during the time of taking the target transportation vehicle; a construction module 1402 is configured to construct a user's riding track according to the location information of the base stations; a comparison module 1403 is configured to compare the similarity between the user's riding track and the reference track of the target transportation vehicle to obtain a similarity value; wherein, the reference track of the target transportation vehicle includes: the stations between the starting point and the ending point of the user's riding track; the riding track indicating between the starting point and the ending point of the user's riding track; an identification module 1404 is configured to, when the similarity value is higher than a threshold, identify the base stations connected by the electronic device as target base stations. Thereby, it avoids the problem in the related art that the electronic device cannot distinguish the riding QR codes of different transportation vehicles, resulting in easy misidentification of the target base stations, improves the accuracy of the identified target base stations, and further can accurately determine whether the user is in the process of taking the target transportation vehicle.

[0193] Another embodiment of the present application further provides a network server 200, as Figure 15 shown, which may include a processor 210 and an internal memory 220, etc. The processor 210 may include one or more processing units, wherein different processing units may be independent devices or integrated in one or more processors.

[0194] The internal memory 220 may be used to store computer-executable program codes, and the executable program codes include instructions. The processor 210 executes various functional applications and data processing of the network server by running the instructions stored in the internal memory 220. In some embodiments, the instructions stored in the internal memory 220 are for executing the method for identifying base stations provided in the above embodiments. The processor 210 may accurately identify the base stations corresponding to the taken transportation vehicle by executing the instructions stored in the internal memory 420.

[0195] Another embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored, and when they run on a computer or a processor, the computer or the processor is caused to execute one or more steps in any of the above methods.

[0196] The computer-readable storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0197] Another embodiment of the present application further provides a computer program product containing instructions. When the computer program product runs on a computer or a processor, it causes the computer or the processor to execute one or more steps in any of the above methods.

Claims

1. A method for identifying a base station, characterized in that: include: Obtaining location information of base stations that the electronic device has connected to during the time of riding the target transportation vehicle; Constructing a user's riding trajectory based on the location information of the base station; Comparing the user's riding trajectory with the reference trajectory of the target vehicle for similarity to obtain a similarity value; wherein the reference trajectory of the target vehicle indicates the riding trajectory between the starting point and the end point of the user's riding trajectory; When the similarity value is higher than a threshold, the base station to which the electronic device has been connected is identified as a target base station.

2. The method according to claim 1, characterized in that: The obtaining of location information of base stations to which the electronic device has been connected during the time of riding the target transportation vehicle includes: Based on the signaling switching data, the base stations to which the electronic device has been connected during the time of riding the target transportation vehicle are obtained; The location information of the base stations to which the electronic device has been connected during the time of riding the target transportation vehicle is screened out from the base station snapshot data.

3. The method according to claim 1, characterized in that The step of constructing a user's riding trajectory based on the location information of the base station includes: The location information of the base station is used as a user track node, and the user track nodes are connected in the order of connection with the electronic device to obtain the user's riding track.

4. The method according to claim 3, characterized in that Before the user trajectory nodes are connected to the electronic devices in the order of being connected to each other to obtain the user's riding trajectory, the method further comprises: Cluster the user trajectory nodes whose distances between the user trajectory nodes are less than a threshold, and / or delete the user trajectory nodes with abnormal locations.

5. The method according to claim 4, characterized in that After clustering the user trajectory nodes whose distances between the user trajectory nodes are less than a threshold, the method further comprises: For multiple user trajectory nodes belonging to the same category obtained by clustering, the user trajectory node with the longest connection time is retained.

6. The method according to claim 4, characterized in that The method of deleting user trajectory nodes with abnormal locations includes: Determine the user trajectory node whose connection time is longer than the threshold as the user long-hold node; Constructing vectors of two adjacent user long-hold nodes according to the order of connection with the electronic device; For user trajectory nodes between two adjacent user long-hold nodes, constructing vectors of two adjacent user trajectory nodes according to the order of connection with the electronic device; When the angle between the vector of the two adjacent user trajectory nodes and the vector of the two corresponding adjacent user long-hold nodes does not meet a preset requirement, the latter of the two adjacent user trajectory nodes is deleted.

7. The method according to any one of claims 1 to 6, characterized in that: Comparing the user's riding trajectory with the reference trajectory of the target vehicle for similarity to obtain a similarity value includes: Finding a node that is paired with a user trajectory node in the user's riding trajectory from the reference trajectory; Calculating the similarity between the user trajectory node in the user's riding trajectory and the node in the paired reference trajectory to obtain a similarity score of the user trajectory node in the user's riding trajectory; The similarity value is obtained by performing weighted summation on the calculated similarity scores of the nodes in the user's riding trajectory.

8. The method according to claim 7, characterized in that The method for generating the reference trajectory comprises: In the subway network data, determining the stations corresponding to the starting point and the ending point in the user's riding trajectory; Based on the subway network data, the shortest path between the stations corresponding to the starting point and the end point in the user's riding trajectory is obtained, and the shortest path is used as the reference trajectory. The nodes on the shortest path are configured with weights.

9. The method according to claim 8, characterized in that The nodes on the shortest path include: the stations corresponding to the starting point and the ending point in the user's riding trajectory, the stations between the stations corresponding to the starting point and the ending point in the user's riding trajectory, and the non-stations; Among them, the weight of the site is a constant; the weight of the non-site is negatively correlated with the number of non-sites between the first site and the second site, and the first site and the second site are respectively closest to the non-site and are located before and after the non-site.

10. The method according to any one of claims 1 to 9, characterized in that: Before obtaining the location information of the base station to which the electronic device has been connected during the time of riding the target transportation vehicle, the method further includes: Determine that the duration of the ride on the target transportation is within a preset range.

11. A network server, characterized in that: include: one or more processors, and memory; The memory is coupled to the one or more processors, and the memory is used to store a computer program, wherein the computer program includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the base station identification method as described in any one of claims 1 to 10.

12. An electronic device, characterized in that: include: one or more processors, and memory; The memory is coupled to the one or more processors, and the memory is used to store a computer program, wherein the computer program includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the base station identification method as described in any one of claims 1 to 10.

13. The electronic device according to claim 12, characterized in that: The electronic device is further used to report the information of the target base station to the network server and receive the information of the target base station set sent by the network server, wherein the target base station set includes the target base station reported by the electronic device.

14. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the base station identification method according to any one of claims 1 to 10.

15. A computer program product, characterized in that When the computer program product runs on a computer, the computer is enabled to execute the base station identification method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Network access equipment identification method, network access equipment positioning method, network access equipment identification device, network access equipment positioning device and network access equipment

    CN113518328A

  • Subway base station identification method, device, equipment and medium

    CN115604662A

  • Bus travel feature recognition method, device, equipment and medium

    CN116129643A

Cited By

  • Position processing model training method and device, position processing method and device, electronic equipment, storage medium and product

    CN120849976A