Identification method of base station, network server, electronic device, program product, and readable medium

By matching passenger trajectories with subway network data and eliminating abnormal nodes, the problem of low base station identification accuracy was solved, achieving higher identification accuracy.

CN120201376BActive Publication Date: 2026-04-10HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-03-18
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing base station identification methods are too simple, which leads to non-metro base stations being misidentified as metro base stations, reducing the accuracy of identification.

Method used

By acquiring the location information of base stations during the ride, the system constructs the user's travel trajectory, matches it with the subway network data, uses similarity comparison to identify the base station type, and eliminates abnormal trajectory nodes to improve the accuracy of identification.

Benefits of technology

This improves the accuracy of base station type identification, avoids misidentifying non-metro base stations as metro base stations, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201376B_ABST
    Figure CN120201376B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a base station identification method, a network server, an electronic device, a program product and a readable medium. In the base station identification method, a user vehicle trajectory is constructed based on the position information of the base station, and the user vehicle trajectory can indicate the base station trajectory connected by the user during the vehicle riding process. Since the reference trajectory is used to indicate the vehicle riding trajectory between the starting point and the ending point of the user vehicle trajectory, the similarity between the user vehicle trajectory and the reference trajectory is compared to obtain a similarity value. The similarity value can determine whether the user vehicle trajectory is the same as the running trajectory of the target vehicle, and further deduce whether the base station trajectory connected by the user during the vehicle riding process is the same as the running trajectory of the target vehicle. If the similarity value is higher than a threshold value, it indicates that the base station trajectory connected by the user during the vehicle riding process is the same as the running trajectory of the target vehicle, that is, the base station connected by the user during the vehicle riding process belongs to the base station of the target vehicle. Other types of base stations can be avoided from being misidentified 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 priority to Chinese Patent Application No. 2023117182646, filed on December 13, 2023, entitled “A Base Station Identification Method, Electronic Device and Medium”, the entire contents of which are incorporated herein by reference. Technical Field

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

[0003] Buses, subways, and light rail, among other essential modes of transportation in urban public transport systems, play a vital role in the operation of cities. Taking the subway as an example, electronic devices display a travel card when a user is near the turnstile. Furthermore, to ensure the user is aware of the current and next station names, the electronic device continuously displays the travel card throughout the journey. Currently, the electronic device can determine whether the user is still en route by checking if the base station it is connected to is a subway base station.

[0004] In related technologies, the identification rules used for base station identification are relatively simple, typically based on whether the connection duration to the base station is less than 60 seconds. However, in some application scenarios, electronic devices connect to base stations corresponding to other types of transportation, such as Bus Rapid Transit (BRT) base stations, and their connection duration also meets the criteria for identifying subway base stations. In this case, such base stations may be misidentified as subway base stations, resulting in low identification accuracy. Summary of the Invention

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

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

[0007] In a first aspect, embodiments of this application provide a method for identifying base stations, comprising: acquiring location information of base stations connected to by an electronic device during the time of riding a target vehicle; constructing a user's travel trajectory based on the location information of the base stations; comparing the similarity between the user's travel trajectory and a reference trajectory of the target vehicle to obtain a similarity value; wherein the reference trajectory of the target vehicle indicates the travel trajectory between the start and end points of the user's travel trajectory; and identifying the base stations connected to by the electronic device as target base stations when the similarity value is higher than a threshold.

[0008] The base station identification method provided in this application can be applied to network servers or electronic devices. In the base station identification method, a user's travel trajectory is constructed based on the location information of the base station. The user's travel trajectory can indicate the trajectory of the base stations the user connected to during the journey. Since the reference trajectory is used to indicate the travel trajectory between the start and end points of the user's travel trajectory, the similarity between the user's travel trajectory and the reference trajectory is compared to obtain a similarity value. This similarity value can determine whether the user's travel trajectory is the same as the operating trajectory of the target vehicle, and further infer whether the trajectory of the base stations the user connected to during the journey is the same as the operating trajectory of the target vehicle. If the similarity value is higher than the threshold, it indicates that the trajectory of the base stations the user connected to during the journey is the same as the operating trajectory of the target vehicle. That is, the base stations the user connected to during the journey belong to the base stations of the target vehicle. This can avoid misidentifying other types of base stations as base stations of the target vehicle and improve the accuracy of base station type identification.

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

[0010] Based on the first aspect, in one possible implementation, a user's travel trajectory is constructed based on the location information of the base station, including: using the location information of the base station as user trajectory nodes, and connecting the user trajectory nodes in the order of their connection with the electronic device to obtain the user's travel trajectory.

[0011] Based on the first aspect, in one possible implementation, before connecting user trajectory nodes in the order they were connected to electronic devices to obtain the user's travel trajectory, the method further includes: clustering user trajectory nodes whose distance between them is less than a threshold, and / or deleting user trajectory nodes with abnormal locations.

[0012] In the above possible implementations, clustering user trajectory nodes whose distance to each other is less than a threshold can shorten the subsequent trajectory matching time. It also avoids situations where multiple user trajectory nodes belong to the same node but are not clustered, leading to inconsistencies with the target vehicle's trajectory direction and thus reducing the matching similarity value. Similarly, deleting user trajectory nodes with abnormal locations can also shorten the subsequent trajectory matching time and avoid the problem of reduced matching similarity values ​​caused by abnormally located user trajectory nodes.

[0013] Based on the first aspect, in one possible implementation, after clustering user trajectory nodes whose distance between them is less than a threshold, the following steps are taken: for multiple user trajectory nodes belonging to the same cluster, the user trajectory node with the longest connection time is retained.

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

[0015] Based on the first aspect, in one possible implementation, the similarity between the user's travel trajectory and the reference trajectory of the target vehicle is compared to obtain a similarity value, including: finding the nodes that pair with the user's trajectory nodes in the user's travel trajectory from the reference trajectory; calculating the similarity between the user's trajectory nodes in the user's travel trajectory and their paired nodes in the reference trajectory to obtain a similarity score for the user's trajectory nodes in the user's travel trajectory; and weighting and summing the calculated similarity scores of the nodes in the user's travel trajectory to obtain a similarity value.

[0016] Based on the first aspect, in one possible implementation, the method for generating the reference trajectory includes: determining the stations corresponding to the starting and ending points of a user's travel trajectory in the metro network data; obtaining the shortest path between the stations corresponding to the starting and ending points of the user's travel trajectory based on the metro network data, and using the shortest path as the reference trajectory, with the nodes on the shortest path being assigned weights.

[0017] In the above possible implementations, using the shortest path between the stations corresponding to the starting and ending points in the user's travel trajectory as the baseline trajectory can efficiently determine whether the user's travel trajectory is similar to it.

[0018] Based on the first aspect, in one possible implementation, the nodes on the shortest path include: stations corresponding to the starting and ending points of the user's travel trajectory, stations between the starting and ending points of the user's travel trajectory, and non-stations; wherein, the weight of a station is constant; the weight of a non-station is negatively correlated with the number of non-stations between the first station and the second station, and the first station and the second station are closest to the non-stations and are located before and after the non-stations. In the above possible implementation, a non-station can be understood as a point on the ground line corresponding to the target vehicle's route that is a distance away from the target distance.

[0019] Based on the first aspect, in one possible implementation, before obtaining the location information of the base stations that the electronic device has connected to during the time of riding the target vehicle, the method further includes: determining that the duration of riding the target vehicle is within a preset range.

[0020] Secondly, embodiments of this application provide a network server, including: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store a computer program, the computer program including computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the base station identification method disclosed in any of the first aspects and possible embodiments.

[0021] Thirdly, embodiments of this application provide an electronic device, including: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store a computer program, the computer program including computer instructions, and when one or more processors execute the computer instructions, the electronic device performs a base station identification method as disclosed in any of the first aspects and possible embodiments.

[0022] Based on the third aspect, in one possible implementation, the electronic device is also used to report information about target base stations to a network server and to receive information about a set of target base stations sent by the network server, the set of target base stations including the target base stations reported by the electronic device.

[0023] Fourthly, embodiments of this application provide 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 of the first aspects and possible embodiments.

[0024] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to execute a base station identification method as provided in any of the first aspects and possible implementations. Attached Figure Description

[0025] Figure 1This is a schematic diagram of a transportation card;

[0026] Figure 2 This is a schematic diagram of a base station distribution.

[0027] Figure 3 A flowchart illustrating a base station identification method provided in an embodiment of this application;

[0028] Figure 4 A schematic diagram of the outer area of ​​a subway turnstile;

[0029] Figure 5 This is a schematic diagram of a subway QR code page;

[0030] Figure 6 A schematic diagram of a ride start page provided in an embodiment of this application;

[0031] Figure 7 A schematic diagram of a ride end page provided in an embodiment of this application;

[0032] Figure 8 This is a schematic diagram of a base station connection provided in an embodiment of this application;

[0033] Figure 9 A schematic diagram of a subway station and a non-subway station provided as an embodiment of this application;

[0034] Figure 10 A schematic diagram illustrating the matching of base station trajectory information and shortest path information provided in an embodiment of this application;

[0035] Figure 11 A flowchart illustrating the process of cleaning subway passenger data is provided as an embodiment of this application;

[0036] Figure 12 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0037] Figure 13 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0038] Figure 14 This is a schematic diagram of a base station identification device provided in an embodiment of this application;

[0039] Figure 15 This is a schematic diagram of a network server provided in an embodiment of this application. Detailed Implementation

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

[0041] References to "some embodiments" and the like in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in some embodiments," "in other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiments, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically emphasized.

[0042] The "multiple" mentioned in the embodiments of this application refers to two or more. It should be noted that in the description of the embodiments of this application, terms such as "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implying order.

[0043] For ease of understanding, the following embodiments will be described using the subway as the target mode of transportation.

[0044] Electronic devices can determine whether a user is still riding the subway by identifying whether the base station they are connected to is a subway base station, and then display their travel card during the ride. Therefore, the electronic device needs to first identify which base stations are subway base stations so that it can determine whether it has connected to the identified base station on the next subway ride. If the electronic device is connected to a subway base station, it can display its travel card.

[0045] The transit card refers to a small widget located on the desktop page of an electronic device. See also Figure 1 The transit card 102 is located on the desktop page 101 of the electronic device 100. The transit card 102 is usually larger than the icon on the desktop, and it displays the subway QR code 103 required for entering and exiting the station, as well as the station name information of the current station and the next station.

[0046] In related technologies, if the detection of two QR code scans corresponding to entering and exiting the subway station both occur within the vicinity 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 connection to each base station during the two scans is less than 60 seconds, then all base stations connected during the two scans are determined to be subway base stations. The purpose of determining that the duration of connection to each base station during the two scans is less than 60 seconds is that if the duration of connection to a base station is greater than or equal to 60 seconds, it indicates that the user may be walking, cycling, or otherwise above the ground level of the subway track, rather than quickly boarding the subway within the track.

[0047] However, currently, there is no distinction between QR codes for different modes of transportation (such as bus QR codes and subway QR codes). Therefore, if there are bus stops in the vicinity of both the subway station entrance and exit, and the location, time interval, and base station connection duration of two scans of the bus QR code meet the above-mentioned judgment conditions, the bus base station will be mistakenly identified as a subway base station, and a pop-up reminder for the user's transit card will be displayed, which will cause interference to the user.

[0048] The inventors discovered the reason: electronic devices are equipped with subway base station identifiers to determine if the base station they are connecting to is a subway base station. However, current methods for identifying subway base stations use relatively simple rules: they determine if the duration of the electronic device's connection to the base station is less than a specified value (e.g., 60 seconds). However, this method is very prone to misidentifying non-subway base stations as subway base stations.

[0049] See Figure 2 Suppose a user boards a bus at bus stop A (close to subway station A) by scanning a QR code and alights at bus stop B (close to subway station B). If the time interval between the two wrist-flipping actions (boarding and alighting) is greater than 10 minutes but less than 60 minutes (i.e., the ride duration is greater than 10 minutes but less than 60 minutes), and the connection duration to each base station during the two wrist-flipping actions is less than 60 seconds (i.e., the connection duration to base stations C, D, and E is less than 60 seconds), then base stations A, C, D, E, and B are determined to be subway base stations. However, in reality, base stations C, D, and E are bus base stations, while base stations F, G, and H are subway base stations. Therefore, the accuracy of identifying subway base stations using this method is low and cannot determine whether the user is actually riding the subway.

[0050] In view of this, this application discloses a method for identifying a base station. See also Figure 3This figure is a flowchart of a base station identification method provided in an embodiment of this application. The 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 this application uses the subway as the target mode of transportation for illustration, "taking a ride" in subsequent embodiments refers to taking the subway.

[0051] Before the network server 200 executes the base station identification method provided in the embodiments of this application, some preparatory work needs to be performed, which is combined with Figure 3 As shown, it may include the following:

[0052] Electronic devices used by users, such as mobile phones 100, report relevant data about the user's ride to the network server 200. In some embodiments, this relevant data may include: the start time of the ride, the end time of the ride, and signaling handover data during the user's ride. In this embodiment, numerous electronic devices can report relevant data about the user's ride to the network server 200. For ease of explanation, the following description uses the relevant data about a single ride reported by mobile phone 100 as an example.

[0053] In some embodiments, the mobile phone 100 may be configured to report data to the network server 200 at specific times. These times can be understood as fixed moments or the fulfillment of certain conditions. When the mobile phone 100 determines that the timeframe is met, it reports the user's ride-related data to the network server 200. For example, this timeframe could be a period of time at night when the mobile phone 100 is off and not in use by the user. Thus, the mobile phone 100 can report the user's ride-related data to the network server 200 when the timeframe falls within this period and its display is off and not in use by the user. As another example, this timeframe could also be the end of a user's ride. Thus, the mobile phone 100 can report the user's ride-related data to the network server 200 when it detects the end of a user's ride.

[0054] The user's ride-related data reported by mobile phone 100 can include data related to multiple rides, while data related to a single ride includes the start time, end time, and signaling handover data during the ride. Thus, during the user's ride, the mobile phone can collect and record the start time, end time, and signaling handover data; when mobile phone 100 determines that the time for reporting data is met, it will report the recorded data related to multiple rides to network server 200.

[0055] In some embodiments, the mobile phone 100 can monitor whether a user takes a ride, and when it detects that a user has taken a ride, it can obtain the start time and end time of the ride, and can also record the start time and end time of the ride.

[0056] After the phone detects that the user is outside the subway turnstile area, the phone displays the transit card on its home screen. (See also...) Figure 4 The diagonal line 11 marks the boundary between the outer area and the outer area of ​​the subway turnstile. A user entering the outer area of ​​the subway turnstile indicates that the user is about to pass through. Although location A is outside the subway turnstile, it is not within the outer area. Location B is also outside the subway turnstile, but because it is within the boundary line 11, it is within the outer area. In other words, when a user holding mobile phone 100 is at location A, the phone will not display a transit card; after the user passes the boundary line 11 and is at location B, the phone will display a transit card.

[0057] After the user enters the area surrounding the subway turnstile, such as Figure 1 As shown, the transit 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 transit card 102 on the desktop page 101 to the ticket gate of the subway gate and scan the code to enter the station.

[0058] Users can also click on the subway QR code 103 in the transit card 102 to display the QR code page. See also Figure 5 The subway QR code interface 104 on mobile phone 100 displays a larger subway QR code 103 than the subway QR code 103 on the travel card 102 on the desktop page 101. This means the user can click on it. Figure 1 The subway QR code 103 in the transit card 102 on the desktop page 101 is displayed on the control phone 100. Figure 5 The interface shown also allows users to... Figure 5 The subway QR code 103 on the subway QR code page 104 is displayed to the ticket gate of the subway gate and then scanned to enter the station.

[0059] As can be seen from the above, mobile phone 100 can monitor whether the transit application is being called and running, so as to display the transit card on its own desktop. Mobile phone 100 uses sensor data to monitor whether the user flips their wrist to detect whether the user is taking the train. Specifically, the user displays the subway QR code 103 on the transit card 102 located on the desktop page 101 to the subway gate for scanning to enter the station, or the user... Figure 5 The subway QR code 103 on the subway QR code page 104 shown is displayed to the subway gate for scanning to enter the station, which means that the user has flipped their wrist.

[0060] After a user enters the station by scanning the subway QR code on their transit card, their mobile phone displays a travel start page, which shows the start time of their journey. For example... Figure 6 As shown, the ride start page 105 on mobile phone 100 includes the start time of the ride, the current subway line, the current station name, and the first and last subway train information.

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

[0062] After the user exits the station by scanning the subway QR code on their transit card, their mobile phone displays a "Travel End Page," which shows the end time of their journey. Figure 7 As shown, the ride end page 106 on mobile phone 100 includes the ride end time, current subway line, current station name, a link to view information about the surrounding area of ​​the subway station, a link to apply for an electronic invoice, and a link to view local life information.

[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 motion is recognized as the moment when the user ends their ride.

[0064] The mobile phone 100 monitors the user's ride-hailing application, using sensor data to detect when the user flips their wrist to begin the ride, indicating the user has entered the ride-hailing process. The phone then detects the user flipping their wrist again to indicate the user has ended the ride. During the user's ride, the mobile phone 100 can also perform signaling handover with multiple base stations to access or disconnect from them. The mobile phone 100 records this signaling handover data, which includes base station information for all base stations it has connected to during the user's ride.

[0065] In some embodiments, base station information includes a base station number (cellID), connection duration, and timestamp. The base station number refers to the name or ID of the base station connected to mobile phone 100. Each base station has a unique base station number. For example, the base station number could be 51857952700. The connection duration refers to the duration of the connection between mobile phone 100 and the base station. For example, the connection duration between mobile phone 100 and base station A is 15.9 seconds. The timestamp represents the moment mobile phone 100 connects to the base station. For example, the timestamp could be 15220000. A larger timestamp value indicates a later connection time, and a smaller timestamp value indicates an earlier connection time.

[0066] The base station number (cellID), connection duration, and timestamp can be integrated into a base station information table, see 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] Server 300 reports crowdsourced base station snapshot data to network server 200. Server 300 can be understood as a local server or a server deployed in the cloud.

[0070] Crowdsourced base station snapshot data refers to base station information collected or updated through crowdsourcing. Collecting or updating data through crowdsourcing means that numerous users or participants jointly engage in the process. Crowdsourced data (or simply crowdsourcing) refers to tracking data on specific business behaviors of numerous electronic devices. Thus, it can be seen that in scenarios where server 300 interacts with numerous other electronic devices to complete specific tasks, server 300 obtains the location information (latitude and longitude) of base stations through the location information reported by these other electronic devices. In other words, crowdsourced base station snapshot data can 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 location information to the server 300. The server 300 can use the location information of the multiple electronic devices accessing the same base station to calculate the center position of the multiple electronic devices accessing the same base station, and use this center position as the location information of the base station. For example, if the center position of the multiple electronic devices is 117°12'10"E, 39°08'05"N, then the location information of the base station accessed by the multiple electronic devices can be (39.0805, 117.1210).

[0072] Of course, since server 300 calculates the base station's location information based on the location information of electronic devices, there may be discrepancies between this location information and the actual location information of the base station. Normally, once server 300 receives the updated base station location information, it can simultaneously report it to network server 200 to update the crowdsourced base station snapshot data stored on network server 200.

[0073] Technicians configure subway network data on network server 200. In some embodiments, the subway network data includes descriptive information for multiple subway lines. The descriptive information for a subway line may include the name of the subway line, direction, names of stations along the route, location information (latitude and longitude information), etc.

[0074] The network server 200 executes the base station identification method provided in the embodiments of this application, such as... Figure 3 As shown, it includes:

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

[0076] In some application scenarios, subway turnstiles may not respond when a user scans a QR code to enter or exit the station. Taking entering the station as an example, if the turnstile doesn't respond after the first scan, the user will scan it a second time to enter. If the turnstile responds after the second scan, the time of the second scan should be used as the start time of the journey. However, mobile phones and other electronic devices record the time of each QR code scan as the start time of the journey.

[0077] Therefore, the network server 200 can set a first duration threshold to clean up the saved start times of each user's ride. In some embodiments, the start time of the previous ride if the time interval between two consecutive start times is less than the first duration threshold is cleared. That is, the start time corresponding to the first scan of the subway QR code is taken as a possible start time. If the time interval between the possible start time and the start time corresponding to the next scan of the subway QR code is less than the first duration threshold, then the start time corresponding to the next scan of the subway QR code is taken as a possible start time. This process is repeated until the time interval between the possible start time and the start time corresponding to the next scan of the subway QR code is greater than or equal to the first duration threshold. Then, the possible start time is taken as the actual start time.

[0078] Similarly, for exiting the station, a second duration threshold can be set to clear the saved end times of each user's ride. In some embodiments, the end time of the next ride if the time interval between two consecutive end times is less than the second duration threshold is cleared. Specifically, the end time corresponding to the last scan of the subway QR code is taken as a possible end time. If the time interval between this possible end time and the end time corresponding to the previous scan is less than the second duration threshold, then the end time corresponding to the previous scan is taken as a possible end time. This process is repeated until the time interval between the possible end time and the end time corresponding to the previous scan is greater than or equal to the second duration threshold. Then, this possible end time is taken as the actual end time.

[0079] It should be noted that the first duration threshold and the second duration threshold mentioned above can be the same or different. For example, they can be 5 seconds, 10 seconds, etc. Of course, the embodiments of this application do not limit the values ​​of the first duration threshold and the second duration threshold.

[0080] S302: Determine whether the travel time is greater than the first threshold and less than the second threshold. If so, proceed to S303.

[0081] The travel time refers to the difference between the end time and the start time of the journey. For example, if a 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 travel time is 15 minutes.

[0082] Since there are cases where users enter the subway station through the turnstile corresponding to Exit A and immediately exit through the turnstile corresponding to Exit B, or where users stay in the subway station, it is necessary to determine whether the travel time is greater than the first threshold and less than the second threshold.

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

[0084] For example, the first threshold could be 10 minutes, and the second threshold could be 120 minutes. That is, it's necessary to determine whether the travel time is greater than 10 minutes and less than 120 minutes. If yes, then step S303 is executed. If no, then subsequent subway base station identification is stopped.

[0085] In some embodiments, steps S301 and S302 can be executed by an electronic device such as a 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 mobile phone signaling handover data during the ride, obtain information about the base stations connected during the ride.

[0087] In some application scenarios, base station A may be far from the subway tracks, resulting in a situation where although mobile phone 100 connects to base station A, the connection is only for a very short time. In this scenario, the mobile signaling handover data reported by mobile phone 100 to network server 200 will also include base station information of base station A. Therefore, network server 200 needs to clear the information of base stations that the mobile phone has connected to during the user's journey. Typically, network server 200 can only obtain base station information of base stations whose connection time with the user exceeds a third duration threshold during the journey. In some examples, the third duration threshold can be 5 seconds; the value of the third duration threshold is not limited in this embodiment.

[0088] It should be noted that in practical applications, there may be cases where the location information in the base station information is blank. In such cases, the step of obtaining the base station information of that base station can be skipped, that is, the base station can be discarded.

[0089] It should be noted that in practical applications, there may be multiple connections between multiple base stations. In such cases, the base station with the longest connection duration can be retained.

[0090] It is understood that other rules for discarding or retaining can be set, and this application does not limit the specific implementation of these rules.

[0091] It should be noted that the base stations connected to electronic devices at the start and end of the journey are guaranteed to be subway base stations. Furthermore, even if the subway track is underground, the locations where the QR codes are scanned at the start and end of the journey are relatively close to the ground level. This prevents errors caused by shifting the actual latitude and longitude during subsequent base station identification, thus improving the accuracy of base station recognition.

[0092] S304: Based on 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 mentioned 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 the user's mobile phone 100 connected to during the ride based on signaling handover data during the user's journey. Based on the base station numbers of the base stations connected to by the mobile phone 100, the network server 200 filters out the location information of the base stations connected during the ride from the base station snapshot data and uses the base station location information as user trajectory nodes.

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

[0095] The distance between user trajectory nodes can be calculated using the Euclidean distance formula based on the location information of the base stations. For example, 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 value of the third threshold is not limited in this embodiment.

[0096] In some examples, by Figure 2 It is known that location I is the intersection of the ranges of base stations F, G, and H. Therefore, if mobile phone 100 is located at location I, it will repeatedly switch between the signals of base stations F, G, and H. Furthermore, based on the location information of the base stations, the distance between base stations F, G, and H is less than the third threshold. Therefore, it is necessary to aggregate all user trajectory nodes in all base stations whose distances are less than the third threshold, retaining only one user trajectory node.

[0097] It should be noted that the purpose of clustering user trajectory nodes includes: 1. shortening the time for subsequent trajectory matching; 2. avoiding the reduction of matching similarity value because the location information of the base stations is estimated from crowdsourced base station snapshot data, and the location information of the three base stations may be inconsistent with the direction of the subway's travel trajectory based on the trajectory before and after the connection.

[0098] In some embodiments, the above retention principle may be that, for multiple user trajectory nodes in a cluster obtained by a clustering, only the user trajectory node with the longest connection time may be retained. As shown in Table 1, if mobile phone 100 is located at the intersection of the ranges of user trajectory nodes corresponding to the three base stations with serial numbers 1, 2, and 3, since the connection time between mobile phone 100 and the base station with signal number 1 is the longest, which is 15.9 seconds, in the cluster obtained after aggregating the user trajectory nodes corresponding to the three base stations with serial numbers 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 be omitted.

[0100] S306: Remove user trajectory nodes with abnormal locations.

[0101] After clustering user trajectory nodes, the resulting user trajectory nodes can be connected, and user trajectory nodes with abnormal locations can be removed.

[0102] In some embodiments, one implementation of step S306 is: determining user trajectory nodes with a connection duration greater than a threshold as user long-term retention nodes; for example, the threshold can be 1 minute. Constructing vectors for adjacent user long-term retention nodes according to the order of connection with the electronic device; for user trajectory nodes between adjacent user long-term retention nodes, constructing vectors for adjacent user trajectory nodes according to the order of connection with the electronic device. If the angle between the vectors of two adjacent user trajectory nodes and the vectors of their corresponding adjacent two user long-term retention nodes does not meet a preset requirement, deleting the latter of the two adjacent user trajectory nodes.

[0103] Analysis of signaling handover data reveals that, typically, base station handover is fast during subway travel, while connection times are longer when the subway stops in the station hall. Therefore, whether a user's trajectory node is a long-term persistent node can be determined based on whether the connection time exceeds a threshold, thus distinguishing between base stations connected when the subway stops at a station and those connected during operation. Furthermore, the base stations connected between two stations can be divided into segments for abnormal location elimination.

[0104] For example, see Figure 8During the journey from user long-term hold node A to user long-term hold node B, mobile phone 100 connects to four base stations: base station A, base station B, base station C, and base station D. Base stations A, B, C, and D serve as user trajectory nodes. Based on the location information of these four base stations, the location information of the corresponding user trajectory nodes is obtained. These four user trajectory nodes are then connected in the order of base station A and B, base station B and base station C, and base station C and base station D, respectively, resulting in three directional vectors.

[0105] Next, the angles between the vector from user long-term node A to user long-term node B and the three vectors mentioned above are determined. For ease of understanding, the following explanation will use vectors 1, 2, and 3, and vector 4 as an example. As shown in the figure, the angles between vectors 1, 2, 3, and 4 are angle 1, angle 2, and angle 3, respectively.

[0106] Finally, it is determined whether angles 1, 2, and 3 are within the included angle threshold range. For example, this included angle threshold range can be (-60°, 60°). Therefore, if angles 1 and 3 are within the included angle threshold range, the base stations (i.e., user trajectory nodes) corresponding to angles 1 and 3 are retained, namely, the user trajectory nodes corresponding to base stations A, B, and D. If angle 2 is not within the included angle threshold range, the base station corresponding to angle 2 (i.e., the base station pointed to by vector 2), namely, the user trajectory node corresponding to base station C, is discarded.

[0107] It should be noted that the embodiments of this application do not limit the range of the included angle threshold.

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

[0109] S307: Construct the user's travel trajectory based on the user's trajectory nodes.

[0110] The user trajectory nodes obtained in step S304, after being aggregated and eliminated in steps S305 and S306, yield the remaining user trajectory nodes, which can be connected according to the order in which the mobile phone 100 accesses the network, thereby obtaining the user's travel trajectory.

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

[0112] As mentioned above, subway network data includes descriptive information for multiple subway lines. The descriptive information for a single subway line may include the line's name, direction, names of stations along its route, and location information (latitude and longitude). The stations along a subway line, referred to as subway stations, have their location information defined by the latitude and longitude of their center points.

[0113] Based on the location information of subway stations, subway stations are marked on the subway line. In some embodiments, in order to divide the subway line into more nodes for trajectory matching in the subsequent 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] Location information for non-subway stations refers to the latitude and longitude of points located at a target distance from the above-ground lines corresponding to the subway lines. For example, the target distance could be 130 meters, 150 meters, 200 meters, etc., and this application embodiment does not limit it.

[0115] It should be noted that if the subway line is above ground, such as on an elevated track, 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 itself, and the location information of non-subway stations can be marked on the corresponding above-ground line. This application does not impose limitations on this aspect.

[0116] In some embodiments, after labeling the location information of subway stations and non-subway stations, it is also necessary to assign weights to the subway stations and non-subway stations. Specifically, each subway station needs to be assigned a weight of 1, and each non-subway station needs to be assigned a weight of 1 / N, where N represents the number of non-subway stations between two adjacent subway stations.

[0117] For example, see 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 may be various rules for weighting subway stations and non-subway stations. This application does not limit the specific marking rules.

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

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

[0121] In some embodiments, the starting and ending trajectory points in the user's travel trajectory are first determined. The nearest subway station within a preset range of the starting trajectory point and the nearest subway station within a preset range of the ending trajectory point are then screened on the subway line. For example, the preset range is 200 meters. 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. The path between the starting station and the ending station is determined in the subway network data, and this path is the baseline trajectory.

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

[0123] To maximize computational efficiency, a shortest path algorithm is employed to determine the path between the starting and ending stations in the metro network data. This shortest path serves as the baseline trajectory. In some embodiments, the shortest path algorithm includes Floyd's algorithm, Dijkstra's algorithm, and Bellman-Ford algorithm.

[0124] The baseline trajectory between the starting and ending stations obtained using the shortest path algorithm may not reflect the user's actual travel trajectory in some cases. The user might choose an alternative path from the starting station to the ending station for other purposes. Therefore, when performing trajectory matching in step S310 using this path, a high matching score is unlikely, preventing further execution of step S311. Thus, it can be seen that the baseline trajectory between the starting and ending stations obtained using the shortest path algorithm is not the most perfect solution. However, the base station identification method provided in this application aims to identify which base stations are subway base stations, not to identify base stations based on every user travel trajectory. Its purpose is to improve the accuracy of identifying subway base stations, not to ensure comprehensiveness. Of course, with a sufficiently large amount of crowdsourced base station snapshot data, high-accuracy comprehensive identification can also be achieved. Based on this, even if the baseline trajectory between the starting and ending stations obtained by the shortest path algorithm may cause some user travel trajectories to be discarded and not participate in step S311, it can still be guaranteed that the user travel trajectory through step S310 is a user travel trajectory with high accuracy, thereby ensuring the accuracy of the execution of step S311, that is, achieving accurate identification of subway base stations.

[0125] In other embodiments, when the network server 200 executes step S309, it can also obtain multiple reference trajectories between the starting trajectory point and the ending trajectory point, such as determining the shortest path, second shortest path, or third shortest path between the starting station and the ending station in the subway network data, and then execute the following steps S310 and S311 on the multiple reference trajectories. This can avoid the problem of only using the shortest path to execute the following steps S310 and S311.

[0126] It should be noted that if the nearest subway station within the preset range of the starting trajectory point or the nearest subway station within the preset range of the ending trajectory point is not found on the subway line, it means that the user's travel trajectory obtained in step S307 may be unreliable and belongs to data obtained by mistake. The user's travel trajectory can be discarded and the next user's travel trajectory can be obtained to execute step S309.

[0127] It should be noted that if multiple nearest subway stations are found within the preset range of the starting trajectory point on the subway line, the station closest to the starting trajectory point among these multiple nearest subway stations will be selected as the starting station; similarly, if multiple nearest subway stations are found within the preset range of the ending trajectory point, the station closest to the ending trajectory point among these multiple nearest subway stations will also be selected as the ending station.

[0128] After the network server obtains the user's travel trajectory in step S307 and the baseline trajectory in step S308, it can execute the following steps S310 and S311.

[0129] S310: Match the user's travel trajectory with the baseline trajectory between the starting and ending stations to obtain a matching score.

[0130] Matching a user's travel trajectory with a baseline trajectory to obtain a matching score refers to the process of comparing the similarity between the two trajectories to obtain a similarity value. The rules for matching a user's travel trajectory with a baseline trajectory mainly include the following three points:

[0131] First, all nodes in the user's travel trajectory need to match the nodes in the baseline trajectory.

[0132] See Figure 10 Let b1, b2, b3, and b4 be nodes in the baseline trajectory, and q1, q2, q3, and q4 be nodes in the user's travel trajectory. Therefore, q1, q2, q3, and q4 must all match nodes in the baseline trajectory.

[0133] In one application scenario, the baseline trajectory is a relatively straight subway line, and the user's travel trajectory is an S-shaped curve around this subway line. If it's not required that all nodes in the user's travel trajectory match nodes in the baseline trajectory, but only some nodes match nodes in the baseline trajectory, then the user's travel trajectory is considered to have a high degree of matching with the baseline trajectory. This would lead to the user's travel trajectory being considered to have a high degree of matching with the baseline trajectory in this scenario, even though the user's travel trajectory does not actually match the baseline trajectory. Therefore, to ensure a more accurate assessment of the matching degree between the user's travel trajectory and the baseline trajectory, it is necessary to require that all nodes in the user's travel trajectory match nodes in the baseline trajectory.

[0134] Second, not all nodes in the baseline trajectory need to match nodes in the user's travel trajectory. Therefore, Figure 10 The nodes b1 and b3 in the data do not match the nodes in the user's travel trajectory.

[0135] Third, the matching of nodes in the user's travel trajectory and nodes in the baseline trajectory must be based on the order of occurrence. That is, the position of the node in the baseline trajectory that matches the next node in the user's travel trajectory must be the same as or later than the position of the node in the baseline trajectory that matches the previous node in the user's travel trajectory.

[0136] For example, such as Figure 10As shown, the user's travel trajectory node q1 matches the node b2 in the baseline trajectory. The user's travel trajectory node q2 needs to find a matching node from the nodes after (including) node b2 in the baseline trajectory.

[0137] In some embodiments, each node in the user's travel trajectory is matched with a node in the baseline trajectory using the above rules. Then, the matching score between each node in the user's travel trajectory and its matched node in the baseline trajectory is calculated. Finally, the matching scores of each node in the user's travel trajectory are weighted and summed to obtain the score of the user's travel trajectory.

[0138] For example, such as Figure 10 As shown, by following the above rules, q1 can be paired with b2, and q2, q3 and q4 can be paired with b4 respectively to calculate the matching score.

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

[0140]

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

[0142] Formula (1) can be used to convert the matching score between the user's travel trajectory Q and the baseline trajectory B into a value between 0 and 1, making it easier to assess whether the matching score between the user's travel trajectory Q and the baseline trajectory B is greater than a threshold score. In some embodiments, the weighted sum of the similarities of nodes in the user's travel trajectory Q and the baseline trajectory B can also be retained as the matching score between the user's travel trajectory Q and the baseline trajectory B.

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

[0144]

[0145] Where w(*) is the weight of node *, B.head is the first node of the baseline trajectory, and w(B.head) is the weight of the first node of the baseline trajectory; e -score(QB) The similarity between two nodes taken from the user's ride trajectory and the baseline trajectory; Q.head is the first node of the user's ride trajectory Q, e -score(Q.head,B.head)This refers to the similarity between paired nodes in the user's travel trajectory Q and the baseline trajectory B. Q.rest represents the remaining nodes of the user's travel trajectory, and B.rest represents the remaining nodes of the baseline trajectory. The remaining nodes can be understood as the nodes after the first node. similarity(Q.rest, B) represents the weighted sum of the similarity between the remaining nodes of the user's travel trajectory and the nodes of the baseline trajectory. similarity(Q, B.rest) represents the weighted sum of the similarity values ​​between the nodes of the user's travel trajectory and the remaining nodes of the baseline trajectory.

[0146] It should be noted that formula (2) can be understood as an iterative process of calculating the weighted sum of similarity values ​​(Q, B) of nodes in the user's travel trajectory Q and the baseline trajectory B; the following content will refer to 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] Assuming that the first node of the user's travel trajectory Q is paired with the first node of the baseline trajectory B, the first formula in formula (2) is used for calculation, and similarity(Q.rest, B) is used to iterate to formula (2) to find the next node of the first node of the user's travel trajectory Q and the paired node of the baseline trajectory B. This process is repeated to iterate and obtain the last node of the user's travel trajectory Q and the paired node of the baseline trajectory B. Then, based on the following formula (3), the similarity value between the last node of the user's travel trajectory Q and the paired node of the baseline trajectory B is calculated. Then, the hierarchical calculation is performed by reverse iteration to obtain the similarity value between the first node of the user's travel trajectory Q and the first node of the baseline trajectory B. Finally, the weighted sum of the similarity values ​​between each node of the user's travel trajectory Q and the paired node of the baseline trajectory B is obtained.

[0148] Assuming that the first node of the user's travel trajectory Q and the first node of the reference trajectory B are not paired, the second formula in formula (2) is used for calculation. That is, the second formula is iterated to formula (2) to judge whether the next node of the first node of the user's travel trajectory Q and the first node of the reference trajectory 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. This process is repeated to obtain the paired node of the last node of the user's travel trajectory Q and the reference trajectory B. Then, the similarity value of the paired node of the last node of the user's travel trajectory Q and the reference trajectory B is calculated based on the following formula (3). Then, the hierarchical calculation is performed by reverse iteration to obtain the similarity value of the paired node of the first node of the user's travel trajectory Q and the reference trajectory B. Finally, the weighted sum of the similarity values ​​of each node of the user's travel trajectory Q and the paired node of the reference trajectory B is obtained.

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

[0150]

[0151] Where distance(a, b) is the Euclidean distance between nodes a and b, indicating the difference in latitude and longitude between the two nodes. threshold distance is the first parameter, and sigma is the second parameter. Both the first and second parameters can be considered constants.

[0152] Where distance(a, b) ≤ threshold distance, it indicates that nodes a and b are relatively close. score(a, b) is 0, and the similarity value e between nodes a and b is calculated based on 0. -score(a,b) Then it is e 0 =1 indicates that the similarity value between nodes a and b is the highest, i.e., the similarity is the greatest.

[0153] If distance(a, b) > threshold distance, it means that nodes a and b are far apart. Therefore, score(a, b) is... It is a numerical value greater than 0, and the similarity value e between nodes a and b is calculated based on this value. -score(a,b) A value less than 1 indicates that the similarity between nodes a and b is small.

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

[0155] Set distance(a, b) > threshold distance. This indicates that the distance between two nodes and the similarity value calculated based on score(a, b) are not linearly related. In other words, it can be guaranteed that the greater the distance between two nodes, the more drastic the change in the similarity value between the two nodes.

[0156] In some embodiments, distance(a, b) > threshold distance, which can also be set.

[0157]

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

[0159] The process iterates through the nodes of the user's travel trajectory, performing multiple rounds of filtering on the nodes of the baseline trajectory according to the first principle. This filters out paired nodes for each node in the user's travel trajectory. The first principle states that the position of the next node in the user's travel trajectory paired with its corresponding node in the baseline trajectory is the same as or later than the position of the previous node in the user's travel trajectory paired with its corresponding node in the baseline trajectory. For each round of filtering, the similarity between each node in the user's travel trajectory and its paired node is calculated, resulting in a similarity value for each node. A weighted sum of these similarity values ​​is then calculated. Finally, the maximum value of the weighted sum of the similarity values ​​calculated from the multiple rounds of filtering is used to calculate the matching score between the user's travel trajectory and the baseline trajectory.

[0160] Figure 10 In the example of user travel trajectories and baseline trajectories, in the first filtering, b1 is selected as the paired node for q1, q2, q3, and q4 respectively. The similarity between the nodes of the user travel trajectory and their paired baseline trajectory nodes is calculated as the similarity of the user travel trajectory nodes, and a weighted sum of the similarity of the user travel trajectory nodes is calculated. Then, in the second filtering, b1 is selected as the paired node for q1, and b2 is selected as the paired node for q2, q3, and q4. The similarity between the nodes of the user travel trajectory and their paired baseline trajectory nodes is calculated as the similarity of the user travel trajectory nodes, and a weighted sum of the similarity of the user travel trajectory nodes is calculated. And so on, the weighted sum of the similarity of the user travel trajectory nodes in each subsequent filtering result is obtained.

[0161] The weighted sum of the similarity values ​​of the nodes of the user's travel trajectory calculated from the results of multiple rounds of screening is used to select the maximum value as the matching score between the user's travel trajectory and the baseline trajectory.

[0162] In other embodiments, the matching score between the user's travel trajectory and the baseline trajectory can also be calculated as follows:

[0163] The process iterates through the nodes of the user's travel trajectory, pairing each node with a node in the baseline trajectory to obtain a similarity value. The node with the highest similarity value is selected as the final pairing node between that node and the baseline trajectory node. Then, the calculated similarity values ​​of each node in the user's travel trajectory are weighted and summed; the weights represent the final pairing weights of the baseline nodes for each node in the user's travel trajectory. Of course, the process of pairing each node with a node in the baseline trajectory must also satisfy the three rules mentioned above.

[0164] In some embodiments, the result of the weighted summation can 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 dynamic programming approach that selects paired nodes in the baseline trajectory for the nodes of the user's travel trajectory and calculates the similarity value. It is a faster and more efficient way to calculate the weighted sum of the similarity between the nodes in the user's travel trajectory Q and the baseline trajectory B.

[0166] S312: The user's travel trajectory with a matching score higher than the threshold is taken as a valid trajectory, and the base station corresponding to the valid trajectory is taken as a subway base station.

[0167] Once a valid trajectory is obtained, the base station connected to mobile phone 100 in the valid trajectory can be used as a 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 other embodiments, the matching score is not normalized by formula (1), and the threshold can be set empirically.

[0169] During a ride, once the user's electronic device connects to a base station, the system can determine whether the base station is a subway base station, thus identifying the user's status as a passenger and displaying a transit card on the device's screen. In some examples, the transit card can be displayed as follows: Figure 1 As shown.

[0170] The base station identification method disclosed in this application can also be used to clean subway passenger data. See also Figure 11If an electronic device determines that the base station it is connected to is a subway base station, thus knowing that the user is riding 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 travel data. Subsequently, all the original travel data that is not subway travel data can be cleaned, and the accuracy of the outer area of ​​the subway gate (i.e., the electronic fence) can be improved based on the subway travel data.

[0171] It should be noted that the base station identification method provided in this application embodiment can also determine whether a user is a frequent passenger. If the electronic device detects the number of times the user flips their wrist, or if the number of times the electronic device connects to the subway base station exceeds a threshold, the user can be labeled as a frequent passenger, and more favorable fare packages can be offered to the user.

[0172] In summary, this application discloses a base station identification method. This method first constructs a user's travel trajectory based on the locations of base stations connected to by the electronic device, and then compares this trajectory with a baseline trajectory. If the similarity between the user's travel trajectory and the baseline trajectory is higher than a threshold, it proves that all base stations connected to by the electronic device along the user's travel trajectory are subway base stations. This avoids the problem in related technologies where electronic devices cannot distinguish between subway QR codes and bus QR codes, leading to the misidentification of bus base stations as subway base stations. This improves the accuracy of subway base station identification, thus accurately determining whether the user is currently riding the subway. Furthermore, during the next ride after identifying the target base station, the electronic device can determine whether the base station it is connected to is the target base station, thereby determining whether the user is still riding the target mode of transportation. This allows for the display of a travel card on the desktop page, enhancing the user's travel experience.

[0173] Figure 3 The base station identification method demonstrated can also be executed by electronic devices such as mobile phones (which can be understood as end-side devices).

[0174] During use, mobile devices like 100 can collect user data related to their travel behavior. Furthermore, these devices can obtain crowdsourced base station snapshot data and subway network data through pre-configuration or interaction with a server. For details on user travel data, crowdsourced base station snapshot data, and subway network data, please refer to... Figure 3 The corresponding implementation details are as follows. Based on the user's travel-related data collected by the mobile phone 100 and other electronic devices, the system executes... Figure 3 The method for identifying base stations is demonstrated by performing steps S301 to S311 to obtain the identified subway base stations.

[0175] The mobile phone 100 and other electronic devices then report the subway base stations they have identified to the network server 200. Since the mobile phone 100 and other electronic devices are user-side devices and there are many of them, each device can identify subway base stations based on user-related data obtained from its own user's travel behavior and report it to the network server 200. In this way, the network server 200 can collect a large number of subway base station data, which, after being processed, can then be distributed to the mobile phone 100 and other electronic devices.

[0176] This application provides an electronic device that, as disclosed in the foregoing mobile phone 100, collects relevant user travel data during a user's journey and reports this data to a network server 200. Alternatively, it can perform... Figure 3 The demonstration shows the base station identification method. This electronic device can be a mobile phone, laptop, wearable electronic device (such as a smartwatch), tablet, augmented reality (AR) device, virtual reality (VR) device, etc.

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

[0178] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has just used or is reusing. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of processor 110, and thus improves system efficiency.

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

[0180] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 130, wireless communication module 140, modem processor, and baseband processor. In some embodiments, electronic device 100 can use its wireless communication function to report user travel-related data to network server 200.

[0181] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0182] The mobile communication module 130 can provide solutions for wireless communication, including 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 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 130 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 130 may be housed 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 housed in the same device.

[0183] The wireless communication module 140 can provide solutions for wireless communication applications on 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), and infrared (IR) technologies. The wireless communication module 140 can be one or more devices integrating at least one communication processing module. The wireless communication module 140 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 140 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0184] See Figure 13 This figure is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. The software system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of the electronic device 100.

[0185] A layered architecture divides software into several layers, each with a clear role and function. 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, the Android runtime and system libraries, the hardware abstraction layer, and the kernel layer.

[0186] The application layer may include a series of application packages. For example, it may include a transit card.

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

[0188] The Android Runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries consist of two parts: one part contains the functionalities that Java needs to call, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and 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 (HAL) can contain multiple library modules. The Android system loads the corresponding library modules for the device hardware, thereby enabling the application framework layer to access the device hardware. The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, and sensor drivers.

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

[0191] See Figure 14 The figure is a schematic diagram of a base station identification device provided in an embodiment of this 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] The acquisition module 1401 is used to acquire the location information of base stations connected to by the electronic device during the time of riding the target vehicle; the construction module 1402 is used to construct the user's travel trajectory based on the location information of the base stations; the comparison module 1403 is used to compare the similarity between the user's travel trajectory and the baseline trajectory of the target vehicle to obtain a similarity value; wherein, the baseline trajectory of the target vehicle includes: stations between the start and end points of the user's travel trajectory; and a route indicating the travel trajectory between the start and end points of the user's travel trajectory; the identification module 1404 is used to identify the base stations connected to by the electronic device as target base stations if the similarity value is higher than a threshold. This avoids the problem in related technologies where electronic devices cannot distinguish between the QR codes of different vehicles, leading to misidentification of target base stations, thus improving the accuracy of target base station identification and enabling accurate determination of whether the user is riding the target vehicle.

[0193] Another embodiment of this application also provides a network server 200, such as Figure 15 As shown, it may include a processor 210 and internal memory 220, etc. The processor 210 may include one or more processing units, wherein different processing units may be independent devices or integrated into one or more processors.

[0194] Internal memory 220 can be used to store computer executable program code, including instructions. Processor 210 executes various functional applications and data processing of the network server by running the instructions stored in internal memory 220. In some embodiments, internal memory 220 stores instructions for executing the base station identification method provided in the above embodiments. Processor 210 can accurately identify the base station corresponding to the vehicle being used by by executing the instructions stored in internal memory 420.

[0195] Another embodiment of this application provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of any of the above methods.

[0196] Computer-readable storage media can be non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage devices.

[0197] Another embodiment of this application provides a computer program product containing instructions. When the computer program product is run on a computer or processor, it causes the computer or processor to perform one or more steps of any of the methods described above.

Claims

1. A method of identifying a base station, characterized by, The method comprises the following steps: obtaining position information of base stations connected by an electronic device within a time period of riding a target vehicle; constructing a user riding track based on the position information of the base stations; finding a node pair of a user track node in the user riding track from a reference track of the target vehicle, wherein the reference track of the target vehicle indicates a riding track between a starting point and an ending point of the user riding track; calculating a similarity between the user track node in the user riding track and the node in the reference track paired with the user track node to obtain a similarity score of the user track node in the user riding track; performing weighted summation on the similarity scores of the nodes in the user riding track to obtain a similarity value; in a case where the similarity value is higher than a threshold value, identifying the base stations connected by the electronic device as target base stations.

2. The method of claim 1, wherein, The method comprises the following steps: obtaining base stations connected by an electronic device within a time period of riding a target vehicle based on signaling switching data; screening out position information of the base stations connected by the electronic device within the time period of riding the target vehicle from base station snapshot data.

3. The method of claim 1, wherein, The method comprises the following steps: taking the position information of the base stations as user track nodes, and connecting the user track nodes in the order of connection with the electronic device to obtain the user riding track.

4. The method of claim 3, wherein, Before the step of connecting the user track nodes in the order of connection with the electronic device to obtain the user riding track, the method further comprises the following steps: clustering user track nodes with a distance between them less than a threshold value, and / or deleting user track nodes with an abnormal position.

5. The method of claim 4, wherein, After the step of clustering user track nodes with a distance between them less than a threshold value, the method further comprises the following step: for a plurality of user track nodes belonging to the same class obtained by clustering, retaining a user track node with the longest connection duration.

6. The method of claim 4, wherein, The step of deleting user track nodes with an abnormal position comprises the following steps: determining a user track node with a connection duration greater than a threshold value as a user long-keeping node; constructing a vector of two adjacent user long-keeping nodes in the order of connection with the electronic device; constructing a vector of two adjacent user track nodes in the order of connection with the electronic device; in a case where an included angle between the vector of the two adjacent user track nodes and a vector of two adjacent user long-keeping nodes corresponding to the two adjacent user track nodes does not meet a preset requirement, deleting a latter one of the two adjacent user track nodes.

7. The method of claim 1, wherein, The method for generating a reference track comprises the following steps: determining stations corresponding to a starting point and an ending point in the user riding track in subway line network data; obtaining a shortest path between the stations corresponding to the starting point and the ending point in the user riding track based on the subway line network data, taking the shortest path as the reference track, and configuring weights on nodes on the shortest path.

8. The method of claim 7, wherein, The nodes on the shortest path include: stations corresponding to the start point and the end point in the user's riding track, stations between the stations corresponding to the start point and the end point in the user's riding track, and non-stations; The weight value of the station is a constant; the weight value of the non-station is in a negative correlation with the number of non-stations between a first station and a second station, the first station and the second station being closest to the non-stations and being located before and after the non-stations.

9. The method according to any one of claims 1 to 8, characterized in that, Before the position information of the base station connected by the electronic device in the time of riding the target vehicle is acquired, the method further includes: Determining that the duration of riding the target vehicle is within a preset range.

10. A network server, characterized by The method includes: One or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store a computer program, the computer program including computer instructions, when the one or more processors execute the computer instructions, the electronic device executes the base station identification method according to any one of claims 1 to 9.

11. An electronic device, comprising: The method includes: One or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store a computer program, the computer program including computer instructions, when the one or more processors execute the computer instructions, the electronic device executes the base station identification method according to any one of claims 1 to 9.

12. The electronic device of claim 11, wherein, The electronic device is further configured to report information of the target base station to a network server and receive information of a target base station set sent by the network server, the target base station set including the target base station reported by the electronic device.

13. A computer-readable storage medium, characterized in that, A computer program for storing, when executed, is specifically configured to implement the base station identification method according to any one of claims 1 to 9.

14. A computer program product, characterised in that, When the computer program product is running on the computer, the computer is caused to execute the base station identification method according to any one of claims 1 to 9.

Citation Information

Patent Citations

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

    CN115604662A