WO2023124986A1 - 一种基于位置定位的服务实现方法、数据处理方法及装置 - Google Patents

一种基于位置定位的服务实现方法、数据处理方法及装置 Download PDF

Info

Publication number
WO2023124986A1
WO2023124986A1 PCT/CN2022/138753 CN2022138753W WO2023124986A1 WO 2023124986 A1 WO2023124986 A1 WO 2023124986A1 CN 2022138753 W CN2022138753 W CN 2022138753W WO 2023124986 A1 WO2023124986 A1 WO 2023124986A1
Authority
WO
WIPO (PCT)
Prior art keywords
bus
data
station
ride
travel
Prior art date
Application number
PCT/CN2022/138753
Other languages
English (en)
French (fr)
Inventor
陈维
刘俊材
高翔宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023124986A1 publication Critical patent/WO2023124986A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/42Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for mass transport vehicles, e.g. buses, trains or aircraft
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of communication technology, and in particular to a location-based service realization method, data processing method and device.
  • Location positioning refers to determining the location of the terminal, such as determining the coordinates of the current location of the terminal, or the type of the current location of the terminal, such as whether the current location of the terminal is a bus stop.
  • the bus station scene is closely related to people's life.
  • the location service around the bus station can bring more convenience and better experience to people.
  • Embodiments of the present application provide a location-based service implementation method, a data processing method, and a device.
  • a service implementation method based on position positioning including: when entering a travel time period, start position positioning to obtain a current position; if the current position is a bus stop, execute a bus ride service.
  • the travel time period is learned according to historical data of bus travel.
  • the travel time period includes a commuting time period
  • the commuting time period includes a commuting time period to work and/or a commuting time period after get off work.
  • the position positioning process can be started according to the target bus station.
  • the position positioning process whenever the current position is obtained according to the position positioning, it can be judged whether the current position is the target bus stop , and if yes, perform a bus ride service.
  • the target bus station is learned according to the historical data of the user's bus travel.
  • the position positioning is performed only when entering the travel time period, the power consumption of the terminal can be saved; when the position positioning result is a bus stop, the bus ride service is executed, so as to realize the intelligent service of bus ride travel and improve Convenience of public transport for users.
  • the travel time period is obtained according to the historical data learning (data mining) of the user's bus travel, the travel time period conforms to the user's bus travel habits, so that the user's bus travel habits can be realized. Start location targeting.
  • when entering the travel time period after starting position positioning, it also includes: If the current position is not a bus stop, then determine the target bus that needs to go to during the travel time period station, and perform arrival detection according to the location and movement state of the terminal; if it is determined to arrive at the target bus station according to the arrival detection, then execute the bus ride service.
  • the terminal when entering the travel time period, if the current location is not a bus station, the terminal determines the target bus station to go to, and when it arrives at the target bus station, it executes the bus ride service, so that the bus ride can be realized Intelligent services for car travel.
  • the determining the target bus station to go to during the travel time period, and performing arrival detection according to the terminal's position and motion state includes: if the travel time period is commuting to work Time period, and the current location is the home location, then detect whether to leave the current location; when it is detected that the current location has been left, determine the target bus station that needs to go to during the commuting time period, and Start the arrival detection; or, if the travel time period is the off-duty commuting time period, and the current location is the location of the office, then detect whether to leave the current location; when it is detected that the current location has been left , determine the target bus station that needs to go to during the off-duty commuting time period, and start the arrival detection.
  • the arrival detection when entering the time period for going to work, first determine whether the current location is the location of the home, if so, then determine the target bus stop when it is detected to leave home, and start the arrival detection; similarly, when When entering the off-duty time period, first determine whether the current location is the location of the office location, and if so, determine the target bus stop when it is detected that the office location has left, and start the arrival detection. Since the arrival detection needs to be combined with position positioning (such as satellite positioning), the power consumption of the terminal is relatively high. However, with this implementation, the arrival detection is only performed when it is judged to leave home or office, which can reduce the power consumption of the terminal.
  • the detecting whether to leave the current location includes: detecting a signal of a wireless local area network accessed at the current location; when the signal of the wireless local area network cannot be detected, determining that the user has left The current location.
  • the terminal may subscribe to an event of a change in a wireless local area network signal (such as a Wi-Fi signal), and when the signal of the wireless local area network accessed by the terminal at the current location cannot be received, the terminal may be notified of the event, and Based on this event, it is determined that the terminal has left the current location. Further, at this time, the terminal may cancel the subscription to the event, so as to save power consumption of the terminal.
  • a wireless local area network signal such as a Wi-Fi signal
  • the determining the target bus station to be visited during the travel time period includes: according to the latitude and longitude coordinates of the current location, querying the setting centered on the latitude and longitude coordinates in the bus travel data The bus station within the range; wherein, the bus trip data includes at least one latitude and longitude coordinate and the bus station information corresponding to the at least one latitude and longitude coordinate; the bus station that is queried is determined as being in the travel time period The target bus station to go to.
  • the basis for determining the target bus station is the bus travel data stored by the terminal. Since the bus travel data is obtained through data mining based on the bus station ride data collected by the terminal, it can reflect the user's travel habits (for example, a travel route within a certain travel time period), so that the target bus station determined according to the bus travel data is consistent with the travel habits of the user.
  • the arrival detection includes: determining the timeout time of the arrival detection according to the cut-off time of the travel time period; before the timeout time is reached, start the Position positioning, obtaining the current position, and determining whether to arrive at the target bus stop according to the distance between the current position and the target bus stop; wherein, the movement ratio is used to represent the current time and the last position positioning The ratio of the duration of the terminal being in motion in the time interval between times to the time interval; when the timeout time is reached, the arrival detection is ended.
  • the starting position positioning according to the motion state ratio includes: when it is determined according to the detected motion state that the motion percentage is greater than or equal to a set threshold, starting position positioning.
  • the timeout period of the arrival detection is determined according to the cut-off time of the travel time period, and when the timeout time is reached, the arrival detection process is ended, so that the duration of the terminal's arrival detection can be controlled to avoid too long
  • the terminal power consumption overhead brought by the station arrival detection for example, including the power consumption overhead caused by satellite positioning during the station arrival detection process
  • the station arrival detection when the station arrival detection is performed, when the motion ratio is greater than or If it is equal to the set threshold, it indicates that the terminal is in motion most of the time.
  • performing position positioning for example, satellite positioning
  • the method further includes: according to the distance between the current position and the target bus stop and the motion state, determine the next start of position positioning When the time for starting position positioning next time arrives, determine the current motion ratio; if the current motion ratio is greater than or equal to the set threshold, start position positioning to obtain the current position, according to the The distance between the current position and the target bus stop is used to determine whether to reach the target bus stop.
  • the next location positioning time is determined according to the distance between the current location and the target bus stop and the motion state of the terminal, and the location location is performed when the location location time arrives, so that the terminal can be controlled
  • the time or times of location positioning to avoid the terminal power consumption overhead caused by too many location positioning; Part of the time is in a motion state, and at this time, the terminal position positioning (for example, satellite positioning) can reduce the power consumption caused by invalid position positioning.
  • the determining to arrive at the target bus stop according to the arrival detection includes: obtaining the latitude and longitude coordinates of the current location and the corresponding location of the target bus stop according to the arrival detection.
  • the distance between the longitude and latitude coordinates and obtain the cell signal of the current location if the distance is less than or equal to the set threshold, and the cell signal of the current location matches the cell signal of the cell where the target bus station is located and the signal strength is greater than If the threshold is set, then it is determined to arrive at the target bus stop.
  • the cell signal at the current location matches the cell signal of the cell where the target bus station is located and the signal strength is greater than a set threshold, then it is determined to arrive at the target bus station .
  • the method further includes: obtaining the alighting station within the travel time period, and executing the bus ride service when it is detected that the area where the alighting station is located; and/or Or, acquire the transfer station within the travel time period, and execute the bus ride service when it is detected that the transfer station is within the range.
  • the terminal subscribes to the geographic electronic fence of the alighting station and/or transfer station, and the geographic electronic fence is used to indicate the geographical range of the alighting station and/or transfer station; when the When the terminal detects that it has entered the geo-fence, it indicates that it has arrived at the alighting station and/or transfer station, and performs bus ride service.
  • the bus ride service after entering the travel time period, the bus ride service can be executed when arriving at the transfer station, so that the bus ride service can be executed when the user arrives at the bus station on the entire line of travel service, and then realize the intelligent service of bus travel on the entire travel route.
  • the acquiring the alighting station within the travel time period includes: querying a bus travel data set, the bus travel data set is learned according to historical data of bus travel, Include at least one data record in the described bus travel data set, include travel time section, bus station information at least in the described data record; In obtaining described bus trip data set, travel time section matches with described travel time section and sets There is a data record of getting off the sign, and the getting off station in the travel time period is obtained according to the bus station information in the data record;
  • the obtaining the transfer station within the travel time period includes: querying a bus travel data set, the bus travel data set is learned according to historical data of bus travel, Include at least one data record in the described bus travel data set, include travel time section, bus station information at least in the described data record; In obtaining described bus trip data set, travel time section matches with described travel time section and sets There is a data record with a transfer sign, and the transfer station within the travel time period is obtained according to the bus station information in the data record.
  • the bus trip data stored by the terminal is determined based on the bus station ride data collected by the terminal, which can reflect the user's travel habits (such as travel routes within a certain travel time period), so it is possible to determine the alighting station and/or transfer station that the user may arrive at based on the travel habit of the user, so that the user (terminal) can arrive at the alighting station At the station and/or at the transfer station, the bus ride service provided by the terminal can be obtained.
  • it also includes: when a user operation related to the bus travel application is detected, start location positioning to obtain the latitude and longitude coordinates of the current location; query the corresponding bus station information according to the latitude and longitude coordinates of the current location .
  • the execution of bus ride service includes at least one of the following:
  • the arrival time of the bus stopped at the bus stop where the current position is located is obtained, and the arrival time is output.
  • the method further includes: collecting the data of traveling by bus to obtain historical data of traveling by bus; mining the historical data of traveling by bus to obtain Position-located bus travel data; wherein, the bus travel data includes at least one data record, and each data record in the at least one data record includes travel time period, bus stop location information, bus stop name ; Wherein, the bus station location information includes the latitude and longitude coordinates of the bus station and/or the cluster category to which the latitude and longitude coordinates belong.
  • At least one data record in the bus travel data further includes: a boarding and disembarking identification and/or a transfer identification.
  • At least one data record in the bus trip data further includes: cell signal information, where the cell signal information includes a cell identifier.
  • the collecting data on bus rides includes: acquiring bus ride data when bus ride payment operations are detected, and the bus ride data includes time information, current The location information and motion state of the location information include latitude and longitude coordinates; wherein, the bus ride payment operation includes bus boarding payment operation and/or bus alighting payment operation.
  • a data processing method including: detecting a bus ride payment operation, the bus ride payment operation including a bus boarding payment operation and/or a bus getting off payment operation;
  • the car payment operation is to obtain the bus ride data at the bus station, the bus station ride data includes time information, current location information and motion status, and the location information includes latitude and longitude coordinates; record the bus station ride data.
  • the data collection process is started under event-driven (that is, the bus ride payment operation is detected), so the data collection can be controlled within a certain time and/or space, thereby saving terminal power consumption, It is also possible to collect data in a targeted manner; on the other hand, the collected data is consistent with the behavior of the user's bus travel, and provides data for subsequent bus travel data for location positioning based on the collected data base and source.
  • the ride data at the bus station further includes: cell signal information, the cell signal information is from a cell signal received by a terminal, and the cell signal information includes a cell identifier.
  • the collected bus station ride data since the collected bus station ride data includes cell signal information, it can be used as one of the basis for position positioning when performing position positioning.
  • the bus station ride data also includes evaluation information, and the evaluation information includes at least one of the number of successful verifications, the number of failed verifications, and the recall rate; wherein, the number of successful verifications is when the The number of successful verifications of the location positioning results during the bus ride payment operation, the number of failed verifications is the number of failed verifications of the location location results when the bus ride payment operation is detected, and the recall rate is based on the verification The number of successes and the number of verification failures are determined.
  • the evaluation information can be used to judge the reliability of the bus station ride data, so when data mining the collected bus station ride data, you can choose according to the evaluation information The data with high reliability is mined, and then the reliability can be improved when the position is located according to the mined data.
  • it also includes: obtaining bus trip data for position positioning according to the collected bus station ride data; wherein, the bus trip data includes at least one data record, and the at least one Each data record in the data records includes travel time period, bus station location information, and bus station station name; wherein, the bus station location information includes the longitude and latitude coordinates of the bus station and/or the longitude and latitude coordinates belong to clustering category.
  • the terminal can start data mining when the set conditions are met (that is, determine the bus travel data for position positioning according to the collected bus station ride data), wherein the satisfaction of the set conditions can be Include at least one of the following:
  • a set event occurs, and the set event includes at least one of the following: the performance of the terminal is greater than the set performance threshold, the power of the terminal is greater than the set power threshold, the terminal is in a charging state, the terminal The screen is off and remains in the off-screen state for the set duration.
  • At least one data record in the bus travel data further includes: a boarding and disembarking identification and/or a transfer identification.
  • At least one data record in the bus trip data further includes: cell signal information, where the cell signal information includes a cell identifier.
  • the obtaining the bus travel data for location positioning according to the collected bus ride data includes: selecting the confidence level according to the evaluation information included in the bus stop ride data The ride data at the bus station that meets the requirements; according to the ride data at the bus station with the confidence degree meeting the requirements, the bus travel data used for location positioning is obtained.
  • the confidence level meets the required bus ride data, and at least one of the following conditions is met:
  • the number of successful location positioning result verifications is greater than the set number of times
  • the number of location positioning result verification failures is less than the set number of times
  • the recall rate is greater than the set threshold
  • the acquisition time is after the specified time.
  • selecting the bus ride data whose confidence level meets the requirements for data mining can make the bus travel data for location positioning obtained through mining more reliable.
  • the obtaining the bus trip data for location positioning according to the collected bus ride data includes: performing spatial clustering according to the latitude and longitude coordinates in the bus station ride data , to obtain at least one riding position clustering category, each clustering category in the at least one riding position clustering category corresponds to a latitude and longitude coordinate; according to the latitude and longitude coordinates corresponding to the at least one riding position clustering category respectively, Obtain the corresponding bus station information; according to the time information in the bus station ride data belonging to the same bus station cluster category, the travel time period corresponding to the bus station cluster category is obtained; according to a week The travel time periods corresponding to all the riding position cluster categories in the same day, and determine the travel time periods corresponding to the same day.
  • the bus travel data used for location positioning can be obtained.
  • clustering latitude and longitude, and performing mining processing such as time period statistics for data corresponding to each cluster category, can reduce the impact of latitude and longitude positioning errors, thereby improving reliability.
  • data mining is performed, the travel time period is obtained through mining, and the position positioning can be started according to the travel time period in the subsequent location positioning.
  • the method further includes: according to the movement state in the bus station ride data, determining the behavior type of the corresponding bus ride payment operation, the behavior of the bus ride payment operation The type is one of boarding payment and disembarking payment; according to the determined behavior type of the bus ride payment operation, add the boarding sign or the getting off sign.
  • the behavior type of the bus ride payment operation is mined according to the motion state, so as to add the boarding sign or the getting off sign, which can provide a basis for subsequent data mining of the bus transfer station, and can also be used as a follow-up for getting off the bus.
  • the station sets up a geographical electronic fence, and then provides a basis for performing bus service when entering the electronic fence.
  • the method further includes: according to the bus stops that have been reached within the travel time period of the same day and the order of arriving at the bus stops, determine the the transfer station; set the transfer identification in the data record corresponding to the transfer station.
  • the transfer station can be determined through data mining, and then the transfer sign can be set to provide a basis for the subsequent setting of a geographic electronic fence for the transfer station, and then execute the bus ride service when entering the electronic fence.
  • a communication device including: one or more processors; wherein, when instructions of one or more computer programs are executed by the one or more processors, the communication device performs the above-mentioned The method according to any one of the first aspects, or the method according to any one of the above-mentioned second aspects.
  • a computer-readable storage medium includes a computer program, and when the computer program is run on a computing device, the computing device executes the computer program described in any one of the above-mentioned first aspects.
  • a chip is coupled with a memory, and is used to read and execute program instructions stored in the memory, so as to implement the method as described in any one of the above-mentioned first aspects, or the above-mentioned The method of any one of the second aspects.
  • a computer program product is provided.
  • the computer program product When the computer program product is invoked by a computer, the computer executes the method according to any one of the above-mentioned first aspect, or any one of the above-mentioned second aspects method described in the item.
  • FIG. 1 is a schematic diagram of a scene in an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a terminal in an embodiment of the present application.
  • FIG. 3 is a block diagram of an overall implementation of an embodiment of the present application.
  • Fig. 4 is a schematic flow chart of the data acquisition method provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of a data mining process provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of the principle of the box-and-whisker plot in the embodiment of the present application.
  • FIG. 7 is a schematic diagram of a location-based bus ride service process provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a location-based bus ride service flow in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an arrival detection process in an embodiment of the present application.
  • Indoor positioning technology (such as positioning technology based on indoor Bluetooth beacons) cannot cover bus stop location positioning well.
  • the satellite positioning technology used for outdoor positioning has the problem of high power consumption.
  • various terminal equipment manufacturers have more restrictions on the use of satellite positioning capabilities.
  • the positioning of bus stops adopted by the industry mainly relies on hardware devices (such as Bluetooth beacons, ultra wide band (UWB) devices, etc.) deployed at bus stops.
  • hardware devices such as Bluetooth beacons, ultra wide band (UWB) devices, etc.
  • the terminal receives the signal sent by the Bluetooth beacon, and uses the fingerprint positioning algorithm to locate the bus stop according to the signal strength.
  • Bluetooth positioning technology is easily interfered by external noise signals, the signal stability is poor, and the communication range is small.
  • the hardware device for positioning needs to be arranged at the bus station, the hardware device needs to be continuously maintained (for example, including repairing or replacing worn-out hardware devices, or battery replacement, etc.), and the implementation cost is relatively high.
  • the above bus station location positioning method needs to rely on external conditions (such as including the deployment of hardware devices at the bus station), and its applicability is limited.
  • the embodiment of the present application provides a location-based service implementation method, data processing method and device, which can realize the location location of the bus station without relying on the above external conditions, and can take into account the power consumption of the terminal. If it is detected that a bus stop has been reached, a bus ride service may be provided.
  • the terminal can collect relevant data of the user's daily travel behavior, perform data processing (data mining) on the collected data, and learn the user's bus travel data.
  • the learned bus travel data can be Including the travel time period and the bus stops that have been reached during the travel time period, the bus ride data can reflect the user's bus riding habits, and can be used as the basis for detecting whether the user goes to the bus station and arrives at the bus station . If the terminal determines that the user arrives at the bus station based on the learned bus travel data based on satellite positioning and motion state detection, it can provide the user with a bus ride service.
  • FIG. 1 exemplarily shows a schematic diagram of a scenario of an embodiment of the present application, which includes a terminal 100 , a card reader 300 configured on a bus 200 , a network device 400 and a server 500 .
  • the card reader 300 configured on the bus 200 can scan the boarding identification code displayed on the screen of the terminal 100 (for example, including QR code) for ride payment, or the card reader 300 can read a near field communication (near field communication, NFC) chip built in the terminal 100 for ride payment.
  • the terminal 100 can also communicate with the server 500 through the network device 400 to acquire the information of the current station (such as including the station name, etc.).
  • the terminal 100 may be a mobile phone, a tablet computer, or a wearable device with a wireless communication function (such as a smart watch, etc.).
  • the terminal 100 has a satellite position positioning function.
  • Exemplary embodiments of the terminal include, but are not limited to, carrying or devices with other operating systems.
  • the aforementioned terminal may also be other portable devices.
  • the network device 400 which may also be called a wireless access network device, is a device for connecting a terminal to a wireless network.
  • a base station eg, an access point
  • the server 500 can store public transportation-related point of interest (POI) information, and can obtain the information of the corresponding bus station according to the position coordinates carried in the query request from the terminal 100, such as including the information of the bus station. station name, etc., and send the obtained bus station information to the terminal 100.
  • POI point of interest
  • the terminal 100 when the terminal 100 pays for boarding or getting off the bus by scanning codes or NFC chips, it can obtain the current latitude and longitude coordinates through location positioning, and obtain the corresponding bus stop from the server 500 according to the latitude and longitude coordinates. name, generate a bus station ride data record including information such as the current time, the latitude and longitude coordinates, and the name of the bus station.
  • the terminal 100 can obtain a bus trip data set by mining the bus station ride data records generated within a period of time.
  • the bus trip data set includes at least one bus trip data record, which may include travel time period, bus station information etc.
  • the terminal 100 can query the bus travel data set according to the located latitude and longitude coordinates to determine whether it has arrived at the bus station, and if it arrives at the bus station, it can provide bus ride service.
  • the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 151, wireless communication module 152, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user An identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a fingerprint sensor 180H, a temperature sensor 180J, and a touch sensor 180K (of course, the terminal 100 may also include other sensors, such as a pressure sensor, an acceleration sensor, a gyroscope sensor, an ambient light sensor, bone conduction sensor, etc., not shown in the figure).
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal 100 .
  • the terminal 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • the controller may be the nerve center and command center of the terminal 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • the internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 executes various functional applications and data processing of the terminal 100 by executing instructions stored in the internal memory 121 .
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the storage program area can store operating system, codes of application programs, and the like.
  • the storage data area can store data recorded during the use of the terminal 100 (for example, including bus station ride data, bus travel data, etc.).
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 may execute the instructions stored in the internal memory 121, and/or the instructions stored in the memory provided in the processor 110, so that the terminal 100 executes the data processing method or the data processing method provided by the embodiment of the present application. A service implementation method based on scene recognition.
  • the code of the data processing method or the service method based on location positioning provided by the embodiment of the present application, as well as the collected bus station ride data, and information such as bus travel data mined based on the collected bus station ride data can also be stored in external memory.
  • the processor 110 may execute the code stored in the external memory through the external memory interface 120 for implementing the above method in the embodiment of the present application.
  • the external memory interface 120 may be used to connect an external memory card (for example, a Micro SD card), so as to expand the storage capacity of the terminal 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, information such as the bus station ride data collected by the terminal and the mined bus travel data are stored in the external memory card.
  • the wireless communication function of the terminal 100 may be realized by the antenna 1, the antenna 2, the mobile communication module 151, the wireless communication module 152, the modem processor and the baseband processor. Based on the above wireless communication function, the terminal can obtain the latitude and longitude coordinates through satellite positioning, and obtain the information of the bus station according to the latitude and longitude coordinates, thereby generating bus station ride data.
  • the terminal 100 can determine the motion state.
  • an NFC chip can also be integrated in the terminal 100, so that the terminal can perform bus ride payment through contactless operation based on the NFC chip.
  • FIG. 3 shows a block diagram of an overall implementation manner of the embodiment of the present application.
  • the processing operations shown in FIG. 3 can be performed by the same terminal.
  • the embodiment of the present application includes three processes: the bus station scene orientation data collection process, the process of mining (or learning) the collected data, according to the data obtained by mining and combined with position positioning.
  • the process of bus station arrival detection and bus ride service includes three processes: the bus station scene orientation data collection process, the process of mining (or learning) the collected data, according to the data obtained by mining and combined with position positioning.
  • the process of bus station arrival detection and bus ride service includes three processes: the bus station scene orientation data collection process, the process of mining (or learning) the collected data, according to the data obtained by mining and combined with position positioning.
  • the data collection process may include: when the terminal detects a bus ride payment operation (such as bus ride payment based on code scanning or NFC, including payment operations when boarding and/or getting off the bus), obtain the current Time, latitude and longitude coordinates of the current location, and information such as motion status, and record these to obtain a data record.
  • a bus ride payment operation such as bus ride payment based on code scanning or NFC, including payment operations when boarding and/or getting off the bus
  • This data record can be called bus station ride data or bus station ride data record.
  • This data or data record can be It is stored in the bus station ride data set in the terminal.
  • the bus ride data set is used to store the historical data of bus rides.
  • the following information may be included in the bus station ride data record: time information, location information and motion status.
  • the location information includes latitude and longitude coordinates, which are latitude and longitude coordinates acquired by the terminal based on location positioning when the terminal detects a bus ride payment operation.
  • the motion state is the motion state detected by the terminal at or before the detection of the bus ride payment operation (for example, the motion state within 5 seconds before the bus ride payment operation is detected).
  • the bus station ride data record may also include cell signal information, which is obtained from the received cell signal when the terminal detects the bus ride payment operation.
  • the data mining process may include: mining (or learning) the data records in the collected bus ride data set to form bus travel data or bus travel data records, which can be stored in the terminal In the bus trip data set in .
  • the following information may be included in the bus travel data record: travel time period, bus stop location information, bus stop information (such as the name of the bus stop), and further, the boarding and disembarking signs may also be included.
  • the location information of the bus stop includes the latitude and longitude coordinates of the bus station and/or the cluster category to which the latitude and longitude coordinates belong
  • the getting on and off signs include one of the sign on the bus and the sign off on the bus, or include Car sign and alighting sign (in this case, it indicates that the bus station is both a boarding station and an alighting station, such as a transfer station for two lines of buses).
  • a data record includes the boarding sign, it means that the corresponding bus stop is the boarding station; if a data record includes the getting off sign, it means that the corresponding bus stop is the getting off station; if a If the data record includes the boarding sign and the getting off sign, it means that the corresponding bus station is both a boarding station and an alighting station.
  • the sign of getting on and off the bus in a data record is equal to 0, it means that the corresponding bus station is the bus stop; if the sign of getting on and off the bus in a data record is equal to 1, it means that the corresponding bus stop is the bus stop Bus station; if the boarding and alighting sign in a data record is equal to 2, it means that the corresponding bus station is both a boarding station and an alighting station.
  • the bus trip data record may further include: cell signal information, and the cell signal information includes a cell identifier.
  • the data mining process provided by the embodiment of this application can mine the location semantic information of the bus stops on the user's commuting route based on the data collected when the user takes the bus every day, and provide a basis for the subsequent implementation of location-based bus ride services.
  • the location positioning and bus ride service process may include: according to the travel time period (included in the bus travel data set) obtained by mining, when entering the travel time period, the behavior of the user going to the bus station based on satellite positioning Detect, when the arrival at the bus stop is detected, execute the bus ride service.
  • the terminal detects behaviors related to bus ride intentions (for example, including the user inquiring about a bus stop using a map application), it can detect the user's behavior of going to the bus stop based on satellite positioning.
  • a bus ride service is performed. The location positioning and the ride service process based on the location positioning will be described in detail below with reference to FIG. 7 , FIG. 8 and FIG. 9 .
  • the terminal can collect it under the condition of authorization from the user.
  • the data collected by the terminal is stored locally in the terminal, and there is no need to upload it to the server or other network devices, which can ensure the security of relevant information involving user identities.
  • FIG. 4 it is a schematic diagram of a data collection process provided by an embodiment of the present application.
  • the process can be executed by a terminal, or by an application program in the terminal for realizing the function of collecting bus station ride data.
  • the following process is described by taking the terminal as the execution subject as an example.
  • the process can include:
  • the terminal detects a bus ride payment operation, where the bus ride payment operation includes a bus boarding payment operation and/or a bus getting off payment operation.
  • the terminal can support the detection of multiple payment methods for bus rides, such as the detection of scanning code payment, or the detection of NFC payment.
  • the terminal When getting off the bus, the terminal detects the code-scanning payment behavior as an example.
  • the bus QR code displayed on the terminal screen is scanned and recognized by the card reader installed on the bus, the user account information and the network can be identified.
  • the server on the side interacts with the user account to carry out the bus ride deduction operation, and returns the payment response information to the terminal.
  • the terminal receives the payment response information, it can confirm that the current bus ride payment operation has occurred.
  • the terminal acquires bus ride data in response to the above-mentioned bus ride payment operation, the bus stop ride data includes time information, current location information and motion status of the terminal, and the location information includes latitude and longitude coordinates.
  • the terminal After the terminal detects the bus ride payment operation, it can collect current ride-related data, obtain bus ride data, and record the bus ride data. Every time a bus ride payment operation is detected, a bus ride data record can be generated, and the bus ride data record can be saved in the bus stop ride data set in the terminal.
  • the bus station ride data may include time information, current location information of the terminal (for example, including latitude and longitude coordinates), and motion status.
  • the time information may include date (such as year, month, day, week, etc.) and time (such as hour, minute, and second).
  • the time refers to the time when the terminal currently detects the bus ride payment operation.
  • the terminal can obtain the latitude and longitude coordinates of the current location by initiating position positioning.
  • the terminal can have a position positioning interface built in. When the terminal detects the bus ride payment operation, it can initiate the position positioning process by calling this interface. to get the latitude and longitude coordinates of the current location.
  • the terminal may obtain the motion state of the terminal according to data collected by built-in sensors of the terminal (for example, including an acceleration sensor).
  • the movement state recorded by the terminal may be the movement state when the terminal detects the bus ride payment operation, or the movement state for a period of time (for example, within 5 seconds) before the bus ride payment operation.
  • the recorded motion state can be used as a subsequent data mining process to determine whether the bus ride payment operation occurred when boarding or disembarking.
  • the moving state here may include moving and non-moving states
  • the moving state may include riding state and non-riding state
  • the non-riding state may further include walking state, running state, etc.
  • States under non-motion may include, for example, a dwell state.
  • the terminal may acquire cell signal information contained in the currently received cell signal, and record the cell signal information into the bus station ride data.
  • the cell signal information may include: a cell identifier (such as cell ID, CID for short).
  • the cell signal information may also include: a tracking area identifier, an operator code, a country code, and the like. Wherein, the tracking area identifier is used to identify the tracking area to which the cell belongs, the operator identifier is used to identify the operator to which the base station of the corresponding cell belongs, and the country code is used to identify the country to which the base station of the cell belongs.
  • a cell signal may also be called a base station signal.
  • the cell signal may also be a signal sent by a Bluetooth beacon (or a Bluetooth base station) deployed at a bus station. It can be understood that signals sent by various possible network devices (for example, including base stations, Bluetooth beacons, etc.) may be collectively referred to as wireless signals.
  • the bus ride data can also include evaluation information, which can be used in the subsequent data mining process to select data records whose reliability meets the requirements for data mining.
  • the evaluation information may include at least one of the number of successful verifications, the number of failed verifications, and a recall rate.
  • the number of successful verifications is the number of successful verification of the location positioning result when the terminal detects the bus ride payment operation
  • the number of failed verifications is the number of failed verification of the location positioning result when the terminal detects the bus ride payment operation
  • the recall rate It is determined based on the number of successful verifications and the number of failed verifications.
  • the terminal after the terminal detects the bus ride payment operation, it queries the bus travel data record set according to the latitude and longitude coordinates obtained based on the current position positioning, and obtains the corresponding bus station information (such as the station name of the bus station), and then according to The longitude and latitude coordinates query the server to obtain corresponding POI information (including bus stop information, such as station name), if the bus stop information queried from the bus trip data record collection is the same as the POI information queried from the server. If the bus station information is the same, it means that the verification is successful, and the number of verification successes in the currently generated data record is incremented by one, otherwise it indicates that the verification fails, then the number of verification failures in the currently generated data record is incremented by one. Further, the terminal calculates the recall rate according to the number of successful verifications and the number of failed verifications in the data records.
  • the recall rate can be calculated using the following formula:
  • R is the recall rate
  • TP is the number of successful verifications
  • FN is the number of failed verifications.
  • S403 The terminal records the bus ride data collected at the bus station.
  • a corresponding bus ride data record may be generated and stored in the bus ride data set.
  • Table 1 exemplarily shows a bus station ride data record.
  • the data collection process is started under event-driven (that is, the bus ride payment operation is detected), so the data collection can be controlled within a certain time and/or space, thereby saving terminal power consumption, It is also possible to collect data in a targeted manner; on the other hand, the collected data is consistent with the behavior of the user's bus travel, and provides data for subsequent bus travel data for location positioning based on the collected data base and source.
  • the terminal can perform data mining on the collected bus station ride data set to obtain a bus travel data set for location positioning.
  • the terminal can perform data mining on the bus station ride data set according to the set time or cycle.
  • the terminal can perform data mining on the collected data records at a set time of the day (for example, at night when the terminal load is low).
  • FIG. 5 it is a schematic diagram of a data mining process provided by the embodiment of the present application.
  • the process can be executed by a terminal, or by an application program in the terminal for realizing data mining of bus station ride data.
  • the following process is described by taking the terminal as the execution subject as an example.
  • the process can be triggered based on user interface operations.
  • the embodiment of the present application may provide a user interface, which may include a key for starting a data mining process, and when the key is triggered by a user, the data mining process is started.
  • the data mining process may be automatically started when a set condition (in order to distinguish it from the first condition presented below, here referred to as the second condition) is met.
  • this embodiment of the present application may allow the user to set whether to allow the data mining process to be automatically started in the system setting interface.
  • the meeting the second condition may include meeting at least one of the following conditions:
  • the set time can be set according to the busy state of the terminal. For example, if the terminal is more idle at night than during the day, it can be set to start the data mining process at 10 o'clock in the evening.
  • the setting event includes at least one of the following:
  • the performance of the terminal is greater than the set performance threshold, for example, the CPU usage of the terminal is lower than the set threshold;
  • the power of the terminal is greater than the set power threshold
  • the terminal is in charging state
  • the terminal turns off the screen and stays in the off-screen state for a set period of time (for example, 40 seconds).
  • the terminal may first select bus station ride data whose confidence level meets requirements according to the evaluation information included in the bus station ride data, so as to improve the reliability of the bus travel data.
  • the terminal can obtain bus travel data for location positioning based on the bus station ride data whose confidence meets the requirements.
  • the bus ride data record meets at least one of the following conditions, the bus ride data record meets the confidence requirement:
  • Condition 1 The number of successful location positioning result verifications is greater than the set number of times.
  • Condition 2 The number of failures to verify the location positioning result is less than the set number of times.
  • Condition 3 The recall rate is greater than the set threshold.
  • the time indicated by the time information is after the specified time.
  • the date indicated by the time information is within the last 30 days.
  • the current date is May 1, and the data records with a date after April 1 meet this condition 4 data records.
  • the data mining process provided by the embodiment of the present application may include the following steps:
  • S501 The terminal performs spatial clustering on the longitude and latitude coordinates in the bus station ride data to obtain at least one ride location cluster category, and each ride location cluster category corresponds to a longitude and latitude coordinate.
  • the latitude and longitude coordinates in each data record in the bus station ride data set can be clustered, thereby obtaining multiple ride position cluster categories (clusters), and each cluster obtained A category is assigned a category ID.
  • the latitude and longitude coordinates are close in each ride location cluster category.
  • a latitude and longitude coordinate corresponding to the category can be determined according to all the latitude and longitude coordinates in the category, for example, by taking the average value of the latitude and longitude coordinates in the category or using other algorithms to obtain a Latitude and longitude coordinates.
  • the correspondence between category identifiers and latitude and longitude coordinates may be stored in a correspondence table.
  • the clustering category of the ride location can be added to the bus station ride data records for subsequent data mining.
  • S502 The terminal acquires corresponding bus stop information according to the latitude and longitude coordinates corresponding to each bus location cluster category.
  • the terminal may obtain the corresponding POI from the server according to the latitude and longitude coordinates corresponding to each bus location cluster (cluster), and the POI includes bus station information (such as including the station name of the bus station).
  • the obtained bus station information can be added to the bus station ride data record.
  • bus station information by querying POI information, and other methods may also be used to obtain bus station information, which is not limited in this embodiment of the present application.
  • S503 The terminal calculates the travel time period according to the time information in the bus station ride data belonging to the same ride location cluster category.
  • the terminal can count the time information in these data records to obtain the travel time period corresponding to the ride location cluster category, for example, including The commute to work period and/or the commute to work period.
  • the statistical analysis method of the box-and-whisker plot can be used for the statistics of the travel time period.
  • a box-and-whisker plot was used to statistically model its ride time, outliers were excluded, and commuting time segments were calculated.
  • Figure 6 exemplarily shows the principle of the box-and-whisker plot. Taking the minimum value in the box-and-whisker plot as an example, add 1.5 times the inner distance (IQR) from the upper quartile point, and the maximum value of the variable within this range The value is called the maximum value, and the value of more than 1.5 times the inner distance is called an outlier (outlier value).
  • IQR inner distance
  • the commuting time period and/or the commuting time period corresponding to each bus position clustering category can be calculated.
  • S504 The terminal determines the travel time period corresponding to this day according to the travel time periods corresponding to all the riding position cluster categories in the same day of a week.
  • the travel time period corresponding to the weekday can be obtained statistically.
  • the commuting time period of the working day can be obtained statistically, according to all the bus position clustering categories corresponding to commuting time period, the commuting time period of the working day can be obtained through statistics. For example, on Monday, the bus location cluster category 1 corresponds to the statistical time period for going to work from 8:00 to 8:30, and the bus location cluster category 2 corresponds to the statistical time period for going to work from 8:30 to 9:00. The corresponding commuting time for work is from 8:00 to 9:00.
  • travel time periods on non-working days can also be obtained statistically based on bus ride data records collected on non-working days (weekend).
  • the bus travel data for location positioning can be obtained.
  • clustering latitude and longitude, and performing mining processing such as time period statistics for data corresponding to each cluster category can reduce the impact of latitude and longitude positioning errors, thereby improving reliability.
  • the travel time period is obtained through mining, and the position positioning can be started according to the travel time period in the subsequent location positioning.
  • the terminal determines the behavior type of the corresponding bus ride payment operation (the behavior type includes boarding payment and getting off payment) according to the movement state in the bus station ride data, and according to the determined bus ride payment
  • the behavior type of the operation add the corresponding sign of getting on and off the car.
  • the terminal can determine whether the bus ride payment operation corresponding to the data record is a bus ride payment operation that occurs when getting on the bus or a bus ride payment operation that occurs when getting off the bus according to the motion state in the bus ride data record. Car payment operation. Further, according to the judgment result, a boarding sign or an alighting sign may be added to the bus station ride data for subsequent data mining.
  • the motion state in the current bus station ride data record is a walking state or a stay state, it indicates that the motion state detected by the terminal is If it is in the walking state or staying state, it can be determined that the bus ride payment operation occurred when boarding the bus (in a period of time before boarding the bus, the user is generally stationary or walking at the station), and add the boarding bus to the data record Identification; if the motion state in the current bus station ride data record is the ride state, it indicates that the motion state detected by the terminal is the ride state for a period of time (such as within 5 seconds) before the bus ride payment operation occurs, Then it can be determined that the bus ride payment operation occurs when getting off the bus (the bus is generally in a driving state for a period of time before getting off the bus), and the getting off sign is added to the data record.
  • the terminal can analyze the relationship between stations (for example, whether a certain station is a transfer station on a bus travel line) according to the time sequence of the data records and/or the boarding and disembarking signs contained in the data records, if If a certain station is a transfer station on the bus travel route, the transfer indicator can be set in the data record.
  • the transfer station in each bus station can be determined according to the bus stations that have been reached in the travel time period of the same day and the order of arrival at each bus station; Set the transfer sign in the data record corresponding to the station.
  • the boarding and disembarking identifier included in the data record corresponding to a bus station indicates that the bus station is both a boarding station and an alighting station, then it can be determined that the bus station is a transfer station.
  • the first bus stop corresponding to the first clustering category is set with an alighting sign during the commuting time period on the same day of the week, and the second clustering category in the commuting time period corresponds to The second bus station is provided with boarding signs (the first bus station and the second bus station are bus stations corresponding to adjacent data records), then it is determined that the first bus station is the transfer during the commuting time period station, and add a transfer sign for the first bus stop.
  • the third bus stop corresponding to the third clustering category is set with an alighting sign
  • the fourth bus station corresponding to the fourth clustering category in the off-duty commuting time period The station is provided with boarding signs (the third bus station and the fourth bus station are corresponding bus stations for adjacent data records), then it is determined that the third bus station is a transfer station in the commuting time period after work, And it can add a transfer sign to the third bus station. Determining the transfer station through data mining, and then setting the transfer sign, can provide a basis for the subsequent setting of a geographic electronic fence for the transfer station, and then execute the bus service when entering the electronic fence.
  • the above-mentioned first data record and the second data record are two adjacent data records collected on the same day (arranged in chronological order), and the first data record corresponds to the first station (recorded with the cluster category cluster1 ), and it is the alighting station (recorded with the alighting logo), the second data record corresponds to the second station (recorded with the cluster type cluster2), and it is the boarding station (recorded with the uploading logo), then the first station can be determined For a transfer station, a transfer identifier can be set in the first data record.
  • the terminal may also determine the proportion of occurrences of each weekday in the bus station ride data, and delete the bus station ride data record corresponding to the weekday for a workday whose proportion is less than a set threshold.
  • a set threshold For example, the number of data records dated Friday accounts for 2% of the total data records of all working days, which is less than the set threshold of 5%, indicating that the user may seldom go to work according to the usual bus route on Fridays , so the data records whose date is Friday are deleted, and there is no need to count the commuting time period for Friday.
  • the overhead of data mining can be reduced, and on the other hand, reliability can be improved.
  • bus station ride data records on non-working days can also be counted according to the proportion of occurrence times, so as to delete the bus station ride data records on non-working days whose proportion is less than the set threshold.
  • the terminal may also determine the proportion of small occurrences in the bus station ride data according to the cell information in the bus station ride data, and delete the data records corresponding to the cells whose proportion is smaller than the set threshold. For example, if the number of data records in cell 1 (such as a cell with a cell ID of 1001) accounts for 1% of the total number of data records, which is less than the set threshold of 5%, it indicates that the user is very busy during commuting time or commuting routes. It rarely appears in this location, so the data record corresponding to the district can be deleted, and the data record does not need to be used as the basis for the location of the bus station. On the one hand, it reduces the cost of data mining, and on the other hand, it can improve reliability.
  • the terminal can also calculate the distance between the location and the location of the home, and the distance between the location and the place of work for the longitude and latitude coordinates corresponding to each riding location cluster category, and record the record in Bus trip data records are in progress.
  • the terminal can also perform data aging processing to delete expired data records in the bus ride data collection or bus travel data collection, for example, delete data records with a date before 6 months, and only keep data within 6 months Records to ensure the reliability of location positioning.
  • the bus travel data for bus station location positioning can be obtained.
  • Table 2 exemplarily shows a bus trip data record.
  • clustering category cluster2 date Monday (21/2/1—21/6/7) Commuting time 18:23:56----18:57:12 latitude and longitude coordinates (114.0161691, 22.681934) distance from home 3587.2 distance to work 43.4 Community information ... bus stop name Center Building City City A Get on and off signs 1 (Board sign)
  • the terminal can combine location positioning to determine whether it has arrived at the bus station, and if it is determined to arrive at the bus station, it can provide bus ride services.
  • FIG. 7 it is a schematic flow diagram of a location-based service realization method provided by the embodiment of the present application.
  • the flow can be executed by a terminal, or by an application program in the terminal for realizing bus ride service based on location location.
  • the following process is described by taking the terminal as the execution subject as an example.
  • the process may include the following steps:
  • the terminal starts location positioning, which may include one of the following situations:
  • Case 1 When entering the travel time period, the terminal starts location positioning.
  • the travel time period is determined according to the bus ride data collected by the terminal.
  • the terminal carries out bus ride data collection and data mining according to the above-mentioned embodiment, and obtains the travel corresponding to working days (such as Monday to Friday) period.
  • the travel time period is learned according to the historical data of bus travel, and can be recorded in the bus travel data record. Exemplarily, if the terminal determines that the current time is the morning of a working day (such as a certain day from Monday to Friday), the terminal may determine the When entering the time period for commuting to work, start location positioning to obtain the current location.
  • the position positioning process can be started according to the target bus station.
  • the position positioning process whenever the current position is obtained according to the position positioning, it can be judged whether the current position is the target bus stop , and if yes, perform a bus ride service.
  • the target bus station is learned according to the historical data of the user's bus travel.
  • the terminal may subscribe to a corresponding time fence for the commuting time period, so as to start location positioning to obtain the current position when the current time enters the commuting time period.
  • the terminal can pre-subscribe the time slots for commuting to and from work every weekday. If the current time enters the subscribed time fence, the terminal starts position positioning. For example, the current date is Monday, and when the current time enters the commuting time period of the subscribed Monday, position positioning is started.
  • the terminal can detect the operation behavior of the user on the bus-related application, and when it detects that the user is operating on the bus-related application, it can start location positioning to obtain the latitude and longitude coordinates of the current location, and according to the latitude and longitude coordinates Query the corresponding POI to obtain the corresponding POI, and then determine whether the current location is a bus stop according to the POI.
  • location positioning may be started.
  • S702 If the current location is a bus station, go to S703, otherwise go to S704.
  • the terminal may query the bus travel data based on the latitude and longitude coordinates obtained through location positioning, so as to determine whether the current location is a bus station. If the latitude and longitude coordinates match the latitude and longitude coordinates corresponding to a certain bus stop included in the bus travel data, it is determined that the current location is the bus stop.
  • the latitude and longitude coordinates match the latitude and longitude coordinates corresponding to a bus stop included in the bus travel data, which may include the following two situations: one is that the latitude and longitude coordinates match the latitude and longitude coordinates corresponding to a bus stop included in the bus travel data The coordinates are the same; the second is that the distance between the latitude and longitude coordinates and the latitude and longitude coordinates corresponding to a certain bus station contained in the bus travel data is within a set distance (such as 10 meters).
  • S703 The terminal executes the bus ride service.
  • the bus ride service performed by the terminal may include at least one of the following:
  • the terminal displays an identification code, which is used for bus ride payment.
  • the identification code is a two-dimensional code for bus rides, so that users can scan the code to pay for rides.
  • the terminal carried by the user can automatically display the identification code to facilitate the user to pay for the ride; Automatically display the identification code to facilitate the user to pay for the ride.
  • the terminal prompts to use the bus ride application program to pay for bus rides.
  • the terminal can prompt the user to open the application program for bus ride payment to pay for bus ride by means of voice or interface display.
  • the bus ride application program can be automatically opened through the terminal carried by the user to facilitate the user to pay for the ride;
  • the portable terminal automatically opens the bus ride application to facilitate users to pay for rides.
  • the terminal recommends an application program for bus ride payment.
  • the terminal may recommend applications for paying for bus rides to the user.
  • the terminal prompts the currently arriving bus stop, and the terminal can prompt the user with information such as the name of the currently arriving bus stop through voice or interface display.
  • the station name of the bus station can be prompted when the user arrives at the stop or transfer station.
  • the terminal obtains the arrival time information of the bus stopped at the bus station, and can prompt the time information to the user.
  • the terminal may acquire bus operation information corresponding to the bus stop from the server, such as estimated arrival time at the bus stop.
  • the terminal Based on the bus ride service, when the user arrives at the boarding station, the terminal obtains the estimated arrival time of the bus corresponding to the bus station, and prompts the user.
  • the terminal acquires relevant information of the bus stop, such as temporary prohibition of parking at the bus stop, or temporary change of location, etc., and prompts the information to the user.
  • the terminal can use voice or screen display to prompt the arrival of the station.
  • an arrival reminder can be performed.
  • S704 The terminal performs arrival detection to continue detecting whether the terminal has arrived at the bus station, and transfers to S702.
  • the terminal can dynamically adjust the positioning time interval based on the distance between the current location and the target bus stop, as well as the current motion state, until it detects entering the target bus stop or times out.
  • the process ends to save the terminal power consumption.
  • the position positioning is performed only when the first condition is met, the power consumption of the terminal can be saved; when the position positioning result is a bus stop, the bus ride service is executed, thereby realizing smart bus travel To improve the convenience of public transportation for users.
  • the travel time period can be determined according to the bus ride data (including bus ride time information) collected by the terminal, the travel time period is in line with the user's bus travel habits, so that it can be realized based on the user's bus travel time. Driving habits activate location targeting.
  • the terminal when entering the travel time period, after the terminal starts location positioning, if it is determined that the current location is not a bus stop based on the located position, the terminal can determine that the current location is not a bus stop during the travel time.
  • the terminal needs to go to the target bus station, and start the station detection to determine whether it has arrived at the target bus station according to the position and motion state of the terminal, so as to determine whether it has arrived by combining one or more position positioning and motion state detection bus stop. If the terminal arrives at the target bus station, the bus ride service is performed.
  • the process of the terminal determining the target bus station that needs to go to during the travel time period includes: the terminal queries the bus travel data stored by the terminal according to the latitude and longitude coordinates of the current location, with the latitude and longitude coordinates as The bus station within the set range of the center (for example, within a radius of 1 kilometer), and determine the bus station that is queried as the target bus station that needs to be visited during the travel time period. If there are multiple determined target bus stops, arrival detection is performed for each target bus stop. The basis for determining the target bus station is the bus travel data stored by the terminal.
  • the bus travel data is obtained through data mining based on the bus station ride data collected by the terminal, it can reflect the user's travel habits (for example, at a certain travel time travel lines within the segment), so that the target bus station determined according to the bus travel data is consistent with the travel habits of the user.
  • the terminal can determine the time of the next location location according to the motion state and the time interval between the current time and the last location location time, so as to perform location location in a timely manner, thereby reducing terminal power consumption.
  • the timeout period of the arrival detection can be determined according to the cut-off time of the travel time period; before the timeout period is reached, the terminal can continuously detect the motion state.
  • the terminal determines the motion ratio according to the detected motion state (the motion percentage is used to represent the time interval between the current time and the last location positioning time, the proportion of the time the terminal is in the motion state to the time interval) is greater than or equal to
  • position positioning can be started to obtain the latitude and longitude coordinates of the current location, and according to the distance between the latitude and longitude coordinates of the current location and the target bus stop, determine whether to reach the target bus stop, wherein, if the distance is greater than the set threshold , it can be judged that the target bus stop has not been reached, otherwise it can be judged that the target bus stop has been reached.
  • the threshold used for judging the proportion of motion can be preset, for example, it can be set to 80%.
  • the exercise ratio can reflect the time ratio of the exercise state within a specified time period in the past (for example, the time period between the current time and the last location positioning time), for example, 80% of the time in the past 5 minutes was in the exercise state.
  • the terminal can support subscription and query of exercise proportion.
  • you can pre-set the specified duration, polling cycle, and percentage threshold, and subscribe to the motion percentage.
  • the system can notify the subscription through callback square.
  • subscribe to the exercise ratio and set the specified duration so that you can query the time ratio of the exercise state within the specified duration in the past.
  • the distance between the latitude and longitude coordinates of the current location and the latitude and longitude coordinates corresponding to the target bus station can be obtained and the cell signal of the current location can be obtained. If the distance is less than or equal to the set threshold, and the current location The cell signal of the target bus station matches the cell signal of the target bus station (the cell signal of the target bus station can be obtained by querying the bus travel data) and the signal strength is greater than the set threshold, then it is determined to arrive at the target bus station .
  • the cell signal of the current location can be obtained, if the cell signal of the current location matches the cell signal of the cell where the target bus station is located (the cell signal of the cell where the target bus station is located can be obtained by querying bus travel data) and If the signal strength is greater than the set threshold, it can be determined to arrive at the target bus stop.
  • the timeout period of the arrival detection is determined according to the cut-off time of the travel time period, and when the timeout time is reached, the arrival detection process is ended, so that the duration of the terminal's arrival detection can be controlled to avoid too long
  • the terminal power consumption overhead brought by the station arrival detection for example, including the power consumption overhead caused by satellite positioning during the station arrival detection process
  • the station arrival detection when the station arrival detection is performed, when the motion ratio is greater than or If it is equal to the set threshold, it indicates that the terminal is in motion most of the time.
  • performing position positioning for example, satellite positioning
  • the terminal determines that the target bus stop has not been reached according to the distance between the current position and the target bus stop determined by the current position positioning, it can also be based on the distance between the current position and the target bus stop and the distance between the current position and the target bus stop.
  • the movement speed of the terminal determines the next location positioning time; when the location location time arrives, if the terminal first determines the current motion ratio (that is, within the time interval between the current time and the last location location time, the terminal is in the motion duration accounts for the proportion of the time interval), if the proportion of the movement is greater than or equal to the set threshold, the terminal starts location positioning, obtains the latitude and longitude coordinates of the current location, based on the latitude and longitude coordinates of the current location, according to the current location and the target bus The distance between stops determines whether to reach the target bus stop.
  • the current motion ratio that is, within the time interval between the current time and the last location location time, the terminal is in the motion duration accounts for the proportion of the time interval
  • the proportion of the movement is greater than or equal to the set threshold
  • the next location positioning time is determined according to the distance between the current location and the target bus stop and the motion state of the terminal, and the location location is performed when the location location time arrives, so that the terminal can be controlled
  • the time or times of location positioning to avoid the terminal power consumption overhead caused by too many location positioning; Part of the time is in a motion state, and at this time, the terminal position positioning (for example, satellite positioning) can reduce the power consumption caused by invalid position positioning.
  • next location positioning time can be determined according to the following formula:
  • X represents the interval between the current time and the next position positioning time
  • d represents the distance between the current position and the target bus stop
  • v represents the moving speed of the terminal.
  • the terminal can detect whether to leave the home location; when the terminal detects that it has left the home location , determine the target bus station to go to during the commuting time, and start the arrival detection. Since the arrival detection needs to be combined with position positioning (such as satellite positioning), the power consumption of the terminal is relatively large. However, with this implementation method, the arrival detection is only performed when it is judged to leave home, which can reduce the power consumption of the terminal.
  • the terminal can detect whether to leave the home location by the following method: the terminal detects the signal of the wireless local area network (such as including Wi-Fi signal) accessed at the home location; when the signal of the wireless local area network cannot be detected, it can judge Has left home location.
  • This method can reflect whether the surrounding Wi-Fi list contains the target Wi-Fi signal (here is the Wi-Fi signal of the home location) within the past set time period. For example, the surrounding Wi-Fi list contains the router deployed at home in the past 5 minutes.
  • the Wi-Fi signal sent, and can notify the subscriber (here, the terminal or the application program used to execute the ride-hailing service provided by the embodiment of this application) according to the result after the Wi-Fi scan.
  • the subscriber (such as the application program used to realize the ride-hailing service in the terminal) can subscribe to the event of the change of the wireless local area network signal (such as the Wi-Fi signal), and the system can monitor the Wi-Fi signal at home, and will receive The strength of the Wi-Fi signal is compared with the set threshold, and when the Wi-Fi signal strength is less than the set threshold, the subscriber is notified through a callback. Further, at this time, the terminal may cancel the subscription to the event, so as to save power consumption of the terminal.
  • the terminal may also inquire whether the target Wi-Fi (that is, the Wi-Fi signal sent by the router at home) is included in the surrounding Wi-Fi list within the past set time period.
  • the terminal can detect whether to leave the location of the office location; When the location of the office is located, determine the target bus station that needs to be visited during the off-duty commuting time period, and start the arrival detection.
  • the terminal can detect whether to leave the location of the office by the following method: the terminal detects the signal of the wireless local area network (such as including Wi-Fi signal) accessed at the location of the office; when the signal of the wireless local area network cannot be detected , it can be judged that the location of the office has been left.
  • the terminal can subscribe to the event that the wireless local area network signal (such as Wi-Fi signal) changes.
  • the terminal can learn the event and based on this The event determines that the terminal has left the office location. Further, at this time, the terminal may cancel the subscription to the event, so as to save power consumption of the terminal.
  • the terminal can also perform bus ride service when arriving at the transfer station.
  • the terminal obtains the transfer station within the current travel time period; when the terminal detects that the transfer station has entered the range, it executes the bus ride service.
  • the bus ride service can be executed when arriving at the transfer station, so that the user can execute the bus ride service when arriving at the bus station on the entire line of travel of the user service, and then realize the intelligent service of bus travel on the entire travel route.
  • the terminal can subscribe to the geographic electronic fence of the transfer station, which is used to indicate the geographical range of the transfer station; when the terminal detects that it has entered the geographic electronic fence of the transfer station, it indicates that it has reached the At transfer stations, bus rides are performed.
  • the terminal can determine the transfer station within the current travel time period by querying the bus travel data collection.
  • the terminal can query the bus travel data set stored in the terminal, obtain the data record in the bus travel data set, the travel time period matches the current travel time period and is set with the transfer logo, according to the bus station in the data record The information obtains the transfer station in the current travel time period.
  • the bus travel data stored by the terminal is determined based on the bus station ride data collected by the terminal, which can reflect the user's travel habits (for example, at a certain travel time Therefore, the transfer station that the user may arrive at can be determined based on the travel habit of the user, so that when the user (terminal) arrives at the transfer station, the bus service provided by the terminal can be obtained.
  • the terminal can also perform bus ride service when arriving at the getting off station.
  • the terminal obtains the alighting station within the current travel time period; when the terminal detects that the alighting station is within the range, the bus ride service is performed.
  • the terminal can subscribe to the geographic electronic fence of the getting off station, which is used to indicate the geographical range of the transfer station; when the terminal detects that it has entered the geographic electronic fence of the getting off station, it indicates that it has reached the Get off at the station, then perform bus ride service.
  • the terminal can determine the alighting station within the current travel time period by querying the bus travel data set.
  • the terminal can query the bus travel data set stored in the terminal, obtain the data record in the bus travel data set, the travel time period matches the current travel time period and is set with the sign of getting off, according to the bus stop in the data record The information obtains the alighting stations in the current travel time period.
  • the bus travel data stored by the terminal is determined based on the bus station ride data collected by the terminal, which can reflect the user's travel habits (for example, at a certain travel time Therefore, based on the user’s travel habits, it is possible to determine the possible alighting station that the user may arrive at, so that when the user (terminal) arrives at the alighting station, the bus ride service provided by the terminal can be obtained.
  • FIG. 8 exemplarily shows a flow of a location-based service implementation method. As shown in the figure, the process may include the following steps:
  • S802 Initiate location positioning, obtain the latitude and longitude coordinates of the current location, judge whether it is the location of the home according to the latitude and longitude coordinates, and if the current location is the location of the home, go to S803.
  • the latitude and longitude coordinates of the location of the home can be acquired and saved in advance.
  • this process may end.
  • S803 Subscribe to a Wi-Fi notification event.
  • the terminal can detect the Wi-Fi signal sent by the wireless router set at home.
  • the detected Wi-Fi signal information disappears from the Wi-Fi list (for example, because the Wi-Fi signal is weak or cannot
  • the application program deletes the service set identifier (SSID) corresponding to the Wi-Fi signal from the Wi-Fi list), and then notify the application program (this In the embodiment of the application, it is an application program for providing location-based bus ride services).
  • SSID service set identifier
  • S804 Query whether the Wi-Fi list contains the Wi-Fi signal sent by the wireless router set at home, if not, it indicates that the terminal has left the location of the home, so turn to S805 to determine the user during the commuting time. Need to go to the target bus station; if the Wi-Fi list contains the Wi-Fi signal sent by the wireless router set at home, it indicates that the user has not left home at present, and then transfers to S810 to determine whether it is currently timed out.
  • S805 Based on the data records in the bus travel data set, determine the target bus station that the user needs to go to during the commuting time period.
  • S806 Initiate position positioning, obtain the latitude and longitude coordinates of the current position, judge whether it is at the target bus stop according to the latitude and longitude coordinates, if it is at the target bus station, then turn to S809 to perform bus ride service, otherwise turn to S807 to start to Station detection process.
  • S807 Execute the arrival detection process to detect whether the target bus station has been reached.
  • S808 Based on the arrival detection, it is judged whether the target bus station has been reached, and if the target bus station has been reached, the operator transfers to S809 to perform the bus ride service.
  • S810-S812 may also be executed.
  • S810 Based on the data records in the bus travel data set, determine the alighting stations and transfer stations within the commuting time period.
  • S811 Based on the data records in the bus travel data set, obtain the latitude and longitude coordinates of the getting off station and the transfer station.
  • S812 Subscribing to the geographic electronic fences of the getting off station and the transfer station according to the latitude and longitude coordinates.
  • the flow of the arrival detection-related flow (S807-S809) in the flow shown in FIG. 8 can be shown in FIG. 9. After the arrival detection flow is started, the following steps are performed:
  • S901 Determine the arrival detection timeout time according to the travel time period (the time period for commuting to work in this process).
  • the overtime period may be determined according to the cut-off time of the commuting time period.
  • the terminal can continuously detect the motion state and calculate the motion proportion.
  • the application that subscribes to the event can be notified through a callback (in the embodiment of this application, it is used to provide location-based bus ride-hailing application).
  • S903 Receive an event notification, indicating that the current exercise proportion is greater than or equal to a set threshold.
  • S904 Based on the arrival detection overtime event, judge whether the current time is overtime, if not overtime, then go to S905 to initiate location positioning, if overtime, then go to S913 to end this process.
  • S905 Initiate location positioning, and obtain the latitude and longitude coordinates of the current location.
  • S906 Calculate the distance between the current location and the target bus stop.
  • S907 According to the distance between the current position and the target bus station, judge whether to arrive at the target bus station, if it arrives at the target bus station, then turn to S908 to execute the bus service, otherwise turn to S909 to determine the next location The time of positioning.
  • S909 According to the distance between the current location and the target bus stop and the motion state of the terminal, determine the time for next location positioning.
  • S912 Determine whether the movement proportion is greater than or equal to the set threshold, if greater than or equal to the set threshold, then go to S905 to initiate location positioning, otherwise go to S909 to determine the next location location time.
  • the bus ride service is provided.
  • the arrival detection process is not started until it is detected that the user has left home or office.
  • the frequency of satellite positioning is determined by the motion model, so that power consumption can be controlled.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a computer, the computer can implement the method provided by the above method embodiment.
  • the embodiment of the present application also provides a computer program product, where the computer program product is used to store a computer program.
  • the computer program product is used to store a computer program.
  • the embodiment of the present application further provides a chip, including a processor, the processor is coupled to a memory, and is configured to call a program in the memory so that the chip implements the method provided in the above method embodiment.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Traffic Control Systems (AREA)

Abstract

本申请公开了一种基于位置定位的服务实现方法、数据处理方法及装置。可应用于终端。基于位置定位的公交乘车服务方法包括:当进入出行时间段时,启动位置定位,获得当前位置;若所述当前位置为公交车站,则执行公交乘车服务。其中,所述出行时间段是根据公交乘车出行的历史数据学习到的。数据处理方法包括:检测公交乘车支付操作,所述公交乘车支付操作包括公交车上车支付操作和/或公交车下车支付操作;响应于所述公交乘车支付操作,获取公交站乘车数据,所述公交站乘车数据包括时间信息、当前的位置信息和运动状态,所述位置信息包括经纬度坐标;记录所述公交站乘车数据。

Description

一种基于位置定位的服务实现方法、数据处理方法及装置
相关申请的交叉引用
本申请要求在2021年12月30日提交中国专利局、申请号为202111652256.7、申请名称为“一种基于位置定位的服务实现方法、数据处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种基于位置定位的服务实现方法、数据处理方法及装置。
背景技术
随着互联网的快速发展,位置服务(location-based service,LBS)的应用越来越广泛。位置服务的关键技术包括位置定位。位置定位是指确定终端的位置,比如确定终端当前所在位置的坐标,或者终端当前所在位置所属的类型,比如终端当前所在位置是否是公交车站。
公交车作为城市主要的市内交通工具,公交车站场景与人们的生活息息相关,围绕公交车站的位置服务可为人们带来更多的便利以及更好的使用体验。
在公交车站或类似场景下,如何更好的实现位置定位,进而为用户提供更好的公交出行服务,以提高用户感受,是目前需要解决的问题。
发明内容
本申请实施例提供基于位置定位的服务实现方法、数据处理方法及装置。
第一方面,提供一种基于位置定位的服务实现方法,包括:当进入出行时间段时,启动位置定位,获得当前位置;若所述当前位置为公交车站,则执行公交乘车服务。其中,所述出行时间段是根据公交乘车出行的历史数据学习到的。
可选的,所述出行时间段包括通勤时间段,所述通勤时间段包括上班通勤时间段和/或下班通勤时间段。
可选的,当进入出行时间段时,可以根据目标公交车站启动位置定位过程,在该位置定位过程中,每当根据位置定位获得当前位置,则可判断当前位置是否是该目标公交车站,如果是,则执行公交乘车服务。其中,该目标公交车站是根据用户的公交乘车出行的历史数据学习到的。
上述实现方式中,由于在进入出行时间段时才进行位置定位,从而可以节省终端功耗;当位置定位结果为公交车站时执行公交乘车服务,从而实现公交乘车出行智能化服务,提高用户公交乘车的便捷性。另一方面,由于出行时间段是根据用户的公交出行的历史数据学习(数据挖掘)得到的,因而该出行时间段符合该用户的公交乘车出行习惯,从而可以实现基于用户公交乘车出行习惯启动位置定位。
在一种可能的实现方式中,所述当进入出行时间段时,启动位置定位之后,还包括: 若所述当前位置不是公交车站,则确定在所述出行时间段需要前往的目标公交车站,并根据终端的位置和运动状态进行到站检测;若根据所述到站检测确定到达所述目标公交车站,则执行所述公交乘车服务。
上述实现方式中,当进入出行时间段时,若当前位置不是公交车站,则终端确定待前往的目标公交车站,当到达目标公交车站时,执行公交乘车服务,从而可以实现公交乘车出行的智能化服务。
在一种可能的实现方式中,所述确定在所述出行时间段需要前往的目标公交车站,并根据终端的位置和运动状态进行到站检测,包括:若所述出行时间段为上班通勤时间段,且所述当前位置为家所在位置,则检测是否离开所述当前位置;当检测到已离开所述当前位置时,确定在所述上班通勤时间段需要前往的目标公交车站,并启动所述到站检测;或者,若所述出行时间段为下班通勤时间段,且所述当前位置为办公地点所在位置,则检测是否离开所述当前位置;当检测到已离开所述当前位置时,确定在所述下班通勤时间段需要前往的目标公交车站,并启动所述到站检测。
上述实现方式中,当进入上班出勤时间段时,首先确定当前位置是否是家所在位置,如果是,则在检测到离开家时才确定目标公交车站,并启动到站检测;同理,当进入下班出勤时间段时,首先确定当前位置是否是办公地点所在位置,如果是,则在检测到离开办公地点时才确定目标公交车站,并启动到站检测。由于到站检测需要结合位置定位(比如卫星定位),终端的功耗开销较大,而采用本实现方式,只有判断离开家或办公地点时才进行到站检测,可以减少终端功耗。
在一种可能的实现方式中,所述检测是否离开所述当前位置,包括:检测在所述当前位置接入的无线局域网的信号;当无法检测到所述无线局域网的信号时,确定已离开所述当前位置。
可选的,所述终端可订阅无线局域网信号(比如Wi-Fi信号)变化的事件,当终端在所述当前位置接入的无线局域网的信号无法被接收到时,终端可获知该事件,并基于该事件确定终端已经离开所述当前位置。进一步的,此时终端可取消对该事件的订阅,以节省终端功耗。
在一种可能的实现方式中,所述确定在所述出行时间段需要前往的目标公交车站,包括:根据当前位置的经纬度坐标,查询公交出行数据中以所述经纬度坐标为中心的设定范围内的公交车站;其中,所述公交车出行数据包括至少一个经纬度坐标以及所述至少一个经纬度坐标各自对应的公交车站信息;将查询到的公交车站确定为在所述出行时间段需要前往的目标公交车站。
上述实现方式中,确定目标公交车站的依据是该终端存储的公交出行数据,由于该公交出行数据是根据该终端采集的公交站乘车数据通过数据挖掘得到的,能够反映用户的出行习惯(比如在某出行时间段内的出行线路),因此使得根据该公交出行数据所确定出的目标公交站与用户的出行习惯相符。
在一种可能的实现方式中,所述到站检测,包括:根据所述出行时间段的截止时间确定所述到站检测的超时时间;在所述超时时间到达之前,根据运动状态占比启动位置定位,获得当前位置,根据所述当前位置与所述目标公交车站间的距离,确定是否到达所述目标公交车站;其中,所述运动占比用于表征当前时间与上次位置定位时间之间的时间间隔内终端处于运动的时长占所述时间间隔的比例;当所述超时时间到达时,结束所述到站检测。
可选的,所述根据运动状态占比启动位置定位,包括:当根据检测到的运动状态确定运动占比大于或等于设定阈值时,启动位置定位。
上述实现方式中,一方面,根据出行时间段的截止时间确定到站检测的超时时间,并在超时时间到达时,结束到站检测过程,从而可以控制终端进行到站检测的时长,避免过长时间进行到站检测所带来的终端功耗开销(比如包括到站检测过程中进行卫星定位所带来的功耗开销);另一方面,在进行到站检测时,当运动占比大于或等于设定阈值,则表明终端大部分时间处于运动状态,此时进行位置定位(比如进行卫星定位),可以减少无效位置定位所带来的功耗。
在一种可能的实现方式中,若确定未到达所述目标公交车站,则所述方法还包括:根据当前位置与所述目标公交车站间的距离以及运动状态,确定下次启动位置定位的时间;所述下次启动位置定位的时间到达时,确定当前的运动占比;若所述当前动占比大于或等于所述设定阈值,则启动位置定位,获得当前位置,根据所述当前位置与所述目标公交车站间的距离,确定是否到达所述目标公交车站。
上述实现方式中,一方面,根据当前位置与目标公交车站之间的距离以及终端的运动状态确定下次位置定位时间,并在该位置定位时间到达时才进行位置定位,从而可以控制该终端进行位置定位的时间或次数,避免过多次进行位置定位所带来的终端功耗开销;另一方面,在位置定位时间到达时,若运动占比大于或等于设定阈值,则表明终端大部分时间处于运动状态,此时进行终端位置定位(比如进行卫星定位),可以减少无效位置定位所带来的功耗。
在一种可能的实现方式中,所述根据所述到站检测确定到达所述目标公交车站,包括:根据所述到站检测,获得当前位置的经纬度坐标和所述目标公交车站对应的经纬度坐标之间的距离,若所述距离小于设定阈值,则确定到达所述目标公交车站;或者,根据所述到站检测,获得当前位置的经纬度坐标和所述目标公交车站对应的经纬度坐标之间的距离并获得当前位置的小区信号,若所述距离小于或等于设定阈值,并且所述当前位置的小区信号与所述目标公交车站所在小区的小区信号匹配且信号强度大于设定阈值,则确定到达所述目标公交车站。
可选的,获得当前位置的小区信号后,若所述当前位置的小区信号与所述目标公交车站所在小区的小区信号匹配且信号强度大于设定阈值,则确定到达所述目标公交车站。
在一种可能的实现方式中,所述方法还包括:获取所述出行时间段内的下车车站,当检测到进入所述下车车站所在范围时,执行所述公交乘车服务;和/或,获取所述出行时间段内的换乘车站,当检测到进入所述换乘车站所在范围时,执行所述公交乘车服务。
可选的,所述终端订阅所述下车车站和/或换乘车站的地理电子围栏,所述地理电子围栏用于指示所述下车车站和/或换乘车站的地理范围;当所述终端检测到进入该地理电子围栏时,表明已经到达该下车车站和/或换乘车站,执行公交乘车服务。
采用上述实现方式,可以在进入出行时间段后,在到达换乘车站时执行公交乘车服务,从而可以在用户出行的整条线路上,当到达该线路上的公交车站时执行公交乘车服务,进而在整条出行线路上实现公交乘车出行的智能化服务。
在一种可能的实现方式中,所述获取所述出行时间段内的下车车站,包括:查询公交出行数据集合,所述公交出行数据集合是根据公交乘车出行的历史数据学习到的,所述公交出行数据集合中包括至少一个数据记录,所述数据记录中至少包括出行时间段、公交车 站信息;获取所述公交出行数据集合中,出行时间段与所述出行时间段匹配且设置有下车标识的数据记录,根据所述数据记录中的公交车站信息得到所述出行时间段内的下车车站;
在一种可能的实现方式中,所述获取所述出行时间段内的换乘车站,包括:查询公交出行数据集合,所述公交出行数据集合是根据公交乘车出行的历史数据学习到的,所述公交出行数据集合中包括至少一个数据记录,所述数据记录中至少包括出行时间段、公交车站信息;获取所述公交出行数据集合中,出行时间段与所述出行时间段匹配且设置有换乘标识的数据记录,根据所述数据记录中的公交车站信息得到所述出行时间段内的换乘车站。
上述实现方式中,由于确定下车车站或换乘车站的依据是该终端存储的公交出行数据,该终端存储的公交出行数据是根据该终端采集的公交站乘车数据确定出来的,能够反映用户的出行习惯(比如在某出行时间段内的出行线路),因此可以实现基于用户的出行习惯确定用户可能到达的下车车站和/或换乘车站,从而可以在用户(终端)到达该下车车站和/或换乘车站时,能够获得终端提供的公交乘车服务。
在一种可能的实现方式中,还包括:当检测到公交出行应用程序相关的用户操作时,启动位置定位,获得当前位置的经纬度坐标;根据当前位置的经纬度坐标,查询对应的公交车站信息。
在一种可能的实现方式中,所述执行公交乘车服务,包括以下至少一项:
显示标识码,所述标识码用于公交车乘车支付;
提示使用公交乘车应用程序进行公交乘车支付;
推荐用于公交乘车支付的应用程序;
提示当前到达的公交车站;
获取所述当前位置所在的公交车站停靠的公交车的达到时间,输出所述达到时间。
在一种可能的实现方式中,所述方法还包括:对公交乘车出行的数据进行采集,得到公交乘车出行的历史数据;对所处公交乘车出行的历史数据进行挖掘,得到用于位置定位的公交出行数据;其中,所述公交出行数据中包括至少一个数据记录,所述至少一个数据记录中的每个数据记录中包括出行时间段、公交车站位置信息、公交车站站名;其中,所述公交车站位置信息包括公交车站的经纬度坐标和/或所述经纬度坐标所属的聚类类别。
在一种可能的实现方式中,所述公交出行数据中的至少一个数据记录中还包括:上下车标识和/或换乘标识。
在一种可能的实现方式中,所述公交出行数据中的至少一个数据记录中还包括:小区信号信息,所述小区信号信息包括小区标识。
在一种可能的实现方式中,所述对公交乘车出行的数据进行采集,包括:检测到公交乘车支付操作时获取公交站乘车数据,所述公交站乘车数据包括时间信息、当前的位置信息和运动状态,所述位置信息包括经纬度坐标;其中,所述公交乘车支付操作包括公交车上车支付操作和/或公交车下车支付操作。
第二方面,提供一种数据处理方法,包括:检测公交乘车支付操作,所述公交乘车支付操作包括公交车上车支付操作和/或公交车下车支付操作;响应于所述公交乘车支付操作,获取公交站乘车数据,所述公交站乘车数据包括时间信息、当前的位置信息和运动状态,所述位置信息包括经纬度坐标;记录所述公交站乘车数据。
上述实现方式中,一方面,数据采集过程在事件驱动下启动(即检测到公交乘车支付操作),因此可控制数据采集在一定的时间和/或空间内进行,从而可以节省终端功耗,还 可以有针对性的进行数据采集;另一方面,采集到的数据与用户的公交出行的行为习惯相符,并且为后续基于采集到的数据,得到用于进行位置定位的公交出行数据提供了数据基础和来源。
在一种可能的实现方式中,所述公交站乘车数据,还包括:小区信号信息,所述小区信号信息来自于终端接收到的小区信号,所述小区信号信息包括小区标识。上述实现方式中,由于采集的公交站乘车数据中包括小区信号信息,因此在进行位置定位时,可作为位置定位的依据之一。
可选的,所述公交站乘车数据还包括评估信息,所述评估信息包括验证成功次数、验证失败次数和召回率中的至少一项;其中,所述验证成功次数为当检测到所述公交乘车支付操作时对位置定位结果验证成功的次数,所述验证失败次数为当检测到所述公交乘车支付操作时对位置定位结果验证失败的次数,所述召回率是根据所述验证成功次数和所述验证失败次数确定出的。由于采集的公交站乘车数据记录中包评估信息,该评估信息可用于判断公交站乘车数据的可靠性,因此在对采集的公交站乘车数据进行数据挖掘时,可以根据该评估信息选择可靠性高的数据进行挖掘,进而在根据挖掘到的数据进行位置定位时,可提高可靠性。
在一种可能的实现方式中,还包括:根据采集到的公交站乘车数据,得到用于位置定位的公交出行数据;其中,所述公交出行数据中包括至少一个数据记录,所述至少一个数据记录中的每个数据记录中包括出行时间段、公交车站位置信息、公交车站站名;其中,所述公交车站位置信息包括公交车站的经纬度坐标和/或所述经纬度坐标所属的聚类类别。
可选的,所述终端可在满足设定条件时启动数据挖掘(即根据采集到的公交站乘车数据,确定用于进行位置定位的公交出行数据),其中,所述满足设定条件可包括以下至少一项:
设定时间到达;
设定事件发生,所述设定事件包括以下至少一项:所述终端的性能大于设定的性能阈值、所述终端的电量大于设定的电量阈值、所述终端处于充电状态、所述终端息屏且处于息屏状态达到设定时长。
在一种可能的实现方式中,所述公交出行数据中的至少一个数据记录中还包括:上下车标识和/或换乘标识。
在一种可能的实现方式中,所述公交出行数据中的至少一个数据记录中还包括:小区信号信息,所述小区信号信息包括小区标识。
在一种可能的实现方式中,所述根据采集到的公交站乘车数据,得到用于位置定位的公交出行数据,包括:根据所述公交站乘车数据中包括的评估信息,选取置信度满足要求的公交站乘车数据;根据所述置信度满足要求的公交站乘车数据,得到所述用于位置定位的公交出行数据。
可选的,所述置信度满足要求的公交乘车数据,满足以下至少一个条件:
位置定位结果验证成功次数大于设定次数;
位置定位结果验证失败次数小于设定次数;
召回率大于设定阈值;
采集时间在指定时间之后。
上述实现方式中,选取置信度满足要求的公交乘车数据进行数据挖掘,可以使得挖掘 得到的用于位置定位的公交出行数据更加可靠。
在一种可能的实现方式中,所述根据采集到的公交站乘车数据,得到用于位置定位的公交出行数据,包括:根据对所述公交站乘车数据中的经纬度坐标进行空间聚类,得到至少一个乘车位置聚类类别,所述至少一个乘车位置聚类类别中的每个聚类类别对应一个经纬度坐标;分别根据所述至少一个乘车位置聚类类别对应的经纬度坐标,获取对应的公交车站信息;根据对属于同一乘车位置聚类类别的公交站乘车数据中的时间信息进行统计,得到与所述乘车位置聚类类别对应的出行时间段;根据一个星期中的同一天内的所有乘车位置聚类类别对应的出行时间段,确定所述同一天对应的出行时间段。
上述实现方式中,通过对采集到的公交站乘车数据进行数据挖掘,可以得到用于位置定位的公交出行数据。在进行数据挖掘时,对经纬度进行聚类,并针对每个聚类类别对应的数据进行时间段的统计等挖掘处理,可以减少经纬度定位误差带来的影响,从而可以提高可靠性。在进行数据挖掘时,通过挖掘得到出行时间段,可以在后续进行位置定位时,依据该出行时间段启动位置定位。
在一种可能的实现方式中,所述方法还包括:根据所述公交站乘车数据中的运动状态,确定对应的公交乘车支付操作的行为类型,所述公交车乘车支付操作的行为类型为上车支付和下车支付中的一项;根据确定出的公交乘车支付操作的行为类型,添加上车标识或下车标识。
上述实现方式中,根据运动状态对公交乘车支付操作的行为类型进行挖掘,从而添加上车标识或下车标识,可以为后续对换车车站的数据挖掘提供依据,也可以作为后续针对下车车站设置地理电子围栏,进而在进入该电子围栏时执行公交乘车服务提供依据。
在一种可能的实现方式中,所述方法还包括:根据同一天的出行时间段内到达过的各公交车站以及达到所述各公交车站的先后顺序,确定所述各公交车站中的换乘车站;在所述换乘车站对应的数据记录中设置换乘标识。
上述实现方式中,通过数据挖掘可以确定换乘车站,进而设置换乘标识,为后续针对换乘车站设置地理电子围栏,进而在进入该电子围栏时执行公交乘车服务提供依据。
第三方面,提供一种通信装置,包括:一个或多个处理器;其中,当一个或多个计算机程序的指令被所述一个或多个处理器执行时,使得所述通信装置执行如上述第一方面中任一项所述的方法,或者如上述第二方面中任一项所述的方法。
第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在计算设备上运行时,使得所述计算设备执行如上述第一方面中任一项所述的方法,或者如上述第二方面中任一项所述的方法。
第五方面,提供一种芯片,所述芯片与存储器耦合,用于读取并执行所述存储器中存储的程序指令,以实现如上述第一方面中任一项所述的方法,或者如上述第二方面中任一项所述的方法。
第六方面,提供一种计算机程序产品,所述计算机程序产品在被计算机调用时,使得所述计算机执行如上述第一方面中任一项所述的方法,或者如上述第二方面中任一项所述的方法。
以上第三方面到第六方面的有益效果,请参见第一方面或第二方面的有益效果,不重复赘述。
附图说明
图1为本申请实施例的一种场景示意图;
图2为本申请实施例中的终端的结构示意图;
图3为本申请实施例的总体实现方式的框图;
图4为本申请实施例提供的数据采集方法的流程示意图;
图5为本申请实施例提供的数据挖掘流程示意图;
图6为本申请实施例中的盒须图原理示意图;
图7为本申请实施例提供的一种基于位置定位的公交乘车服务流程示意图;
图8为本申请实施例中的一种基于位置定位的公交乘车服务流程示意图;
图9为本申请实施例中的一种到站检测流程示意图。
具体实施方式
室内定位技术(比如基于室内蓝牙信标的定位技术)无法很好地覆盖公交车站位置定位。用于室外定位的卫星定位技术存在高功耗的问题,除了地图类应用程序会频繁使用卫星定位以外,各终端设备厂商在使用卫星定位能力时都有较多限制。
目前,为了降低卫星定位带来的功耗,业界采用的公交车站位置定位主要依赖公交车站部署的硬件设备(如蓝牙信标、超宽带(ultra wide band,UWB)设备等)实现。以蓝牙信标为例,终端接收到蓝牙信标发送的信号,根据信号强度通过指纹定位算法进行公交车站位置定位。蓝牙定位技术容易受到外部噪声信号的干扰,信号稳定性较差,通信范围较小。并且,由于需要在公交车站布置用于定位的硬件设备,因此需要持续对该硬件设备进行维护(比如包括对损耗的硬件设备进行维修或更换,或者电池更换等),实现成本较高。
上述公交车站位置定位方法需要依赖外部条件(比如包括在公交车站部署硬件设备),适用性受限。本申请实施例提供了一种基于位置定位的服务实现方法、数据处理方法及装置,无需依赖上述外部条件即可实现公交车站的位置定位,并可兼顾终端的功耗。若检测到已到达公交车站,则可以提供公交乘车服务。
本申请实施例中,终端可通过对用户日常乘车行为的相关数据进行采集,对采集到的数据进行数据处理(数据挖掘),学习得到用户的公交出行数据,学习到的公交出行数据中可包括出行时间段以及在该出行时间段到达过的公交车站等信息,该公交乘车数据可以反映用户的公交乘车习惯,可以作为检测用户是否前往公交车站以及是否到达公交车站的依据。若终端根据学习到的公交出行数据,基于卫星定位和运动状态检测,确定出用户到达公交车站,则可以为用户提供公交乘车服务。
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步的详细描述。应理解,本申请的说明书实施例和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元。方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
图1示例性示出了本申请实施例的一种场景示意图,其中包括终端100、公交车200 上配置的读卡器300、网络设备400和服务器500。公交车200在车站停车后,当用户手持或佩戴终端100上车或下车时,公交车200上配置的读卡器300可扫描终端100的屏幕上显示的乘车标识码(比如包括乘车二维码)以进行乘车支付,或者该读卡器300可读取终端100内置的近场通信(near field communication,NFC)芯片以进行乘车支付。该终端100还可以通过网络设备400与服务器500通信,获取当前车站的信息(比如包括车站站名等)。
终端100可以是手机、平板电脑或具备无线通信功能的可穿戴设备(如智能手表等)等。该终端100具有卫星位置定位功能。该终端的示例性实施例包括但不限于搭载
Figure PCTCN2022138753-appb-000001
Figure PCTCN2022138753-appb-000002
或者其它操作系统的设备。上述终端也可以是其它便携式设备。
网络设备400,又可称为无线接入网设备,用于将终端接入到无线网络中的设备。例如基站(例如,接入点),可以是指接入网中在空口通过一个或多个小区与无线终端通信的设备。
服务器500中可存储公共交通相关的兴趣点(point of interest,POI)信息,可以根据来自于终端100的查询请求中携带的位置坐标,获取对应的公交车站的信息,比如包括公交车站的站名等,并将获取到的公交车站的信息发送给终端100。
本申请实施例中,终端100通过扫码或NFC芯片进行上车或下车乘车支付时,可通过位置定位获得当前的经纬度坐标,根据该经纬度坐标从服务器500获取对应的公交车站的站名,生成包括有当前时间、该经纬度坐标、该公交车站站名等信息的公交站乘车数据记录。终端100通过对一段时间内生成的公交站乘车数据记录进行挖掘,可得到公交出行数据集合,该公交出行数据集合中包括至少一个公交出行数据记录,其中可包括出行时间段、公交车站的信息等。终端100可根据定位到的经纬度坐标查询该公交出行数据集合以确定是否到达公交车站,若到达公交车站,则可提供公交车乘车服务。
示例性的,如图2所示,为终端100的一种可能结构示意图。终端100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块151,无线通信模块152,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括陀螺仪传感器180A,加速度传感器180B,指纹传感器180H,温度传感器180J,触摸传感器180K(当然,终端100还可以包括其它传感器,比如压力传感器、加速度传感器、陀螺仪传感器、环境光传感器、骨传导传感器等,图中未示出)。
可以理解的是,本申请实施例示意的结构并不构成对终端100的具体限定。在本申请另一些实施例中,终端100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
其中,处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个 或多个处理器中。其中,控制器可以是终端100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,应用程序的代码等。存储数据区可存储终端100使用过程中记录的数据(比如包括公交站乘车数据,公交出行数据等)。
此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,使得终端100执行本申请实施例提供的数据处理方法或基于场景识别的服务实现方法。
当然,本申请实施例提供的数据处理方法或基于位置定位的服务方法的代码,以及采集到的公交站乘车数据,基于采集到的公交站乘车数据挖掘到的公交出行数据等信息还可以存储在外部存储器中。这种情况下,处理器110可以通过外部存储器接口120运行存储在外部存储器中的用于实现本申请实施例的上述方法的代码。
外部存储器接口120可以用于连接外部存储卡(例如,Micro SD卡),实现扩展终端100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将终端采集的公交站乘车数据和挖掘到的公交出行数据等信息保存在外部存储卡中。
终端100的无线通信功能可以通过天线1,天线2,移动通信模块151,无线通信模块152,调制解调处理器以及基带处理器等实现。基于上述无线通信功能,终端可以通过卫星定位获得经纬度坐标,根据经纬度坐标获得公交车站的信息,从而生成公交站乘车数据。
根据加速度传感器180B的检测数据,终端100可确定运动状态。
可选的,终端100中还可以集成NFC芯片,使得终端可以基于NFC芯片,通过非接触式操作进行公交乘车支付。
示例性的,图3示出了本申请实施例的一种总体实现方式框图。图3中所示的处理操作可由同一终端执行。
如图3所示,本申请实施例中包括三个过程:公交车站场景定向数据采集过程、对采集到的数据进行挖掘(或称学习)的过程,根据挖掘得到的数据并结合位置定位进行公交车站到站检测以及公交乘车服务的过程。
(1)数据采集过程可包括:终端在检测到公交乘车支付操作(比如包括基于扫码或NFC进行公交乘车支付,包括上车和/或下车时的支付操作)时,获取当前的时间、当前位置的经纬度坐标,以及运动状态等信息,并将这些进行记录,得到一条数据记录,该数据记录可称为公交站乘车数据或者公交站乘车数据记录,该数据或数据记录可被存储于该终端中的公交站乘车数据集合中。该公交站乘车数据集合用于存储公交乘车出行的历史数据。
可选的,公交站乘车数据记录中可包括以下信息:时间信息、位置信息和运动状态。其中,所述位置信息包括经纬度坐标,该经纬度坐标是终端在检测到公交乘车支付操作时基于位置定位获取到的经纬度坐标。运动状态是终端在检测到公交乘车支付操作时或在此之前检测到的运动状态(比如在检测到公交乘车支付操作时前5秒钟内的运动状态)。进一步的,公交站乘车数据记录中还可包括小区信号信息,该小区信号信息是终端检测到公 交乘车支付操作时,从接收到的小区信号中获取到的。
下文将结合图4对数据采集过程进行详细说明。
(2)数据挖掘过程可包括:对采集到的公交乘车数据集合中的数据记录进行挖掘(或称学习),形成公交出行数据或公交出行数据记录,该数据或数据记录可存储于该终端中的公交出行数据集合中。
可选的,公交出行数据记录中可包括以下信息:出行时间段、公交车站位置信息、公交车站信息(比如公交站站名),进一步的还可包括上下车标识。其中,所述公交车站位置信息包括公交车站的经纬度坐标和/或所述经纬度坐标所属的聚类类别,所述上下车标识包括上车标识和下车标识中的一项,或者包括上车标识和下车标识(这种情况下,表明该公交车站既是上车车站也是下车车站,比如是两个线路公交车的换乘车站)。举例来说,若一个数据记录中包括上车标识,则表示对应的公交车站为上车车站;若一个数据记录中包括下车标识,则表示对应的公交车站为下车车站;若一个数据记录中包括上车标识和下车标识,则表示对应的公交车站既是上车车站也是下车车站。再举例来说,若一个数据记录中的上下车标识等于0,则表示对应的公交车站为上车车站;若一个数据记录中的上下车标识等于1,则表示对应的公交车站为下车车站;若一个数据记录中的上下车标识等于2,则表示对应的公交车站既是上车车站也是下车车站。
进一步的,所述公交出行数据记录中还可包括:小区信号信息,所述小区信号信息包括小区标识。
本申请实施例提供的数据挖掘过程,能够基于用户日常乘坐公交车时采集到的数据,挖掘出用户通勤线路上公交站的地点语义信息,为后续实现基于位置定位的公交乘车服务提供依据。
下文将结合图5和图6对数据挖掘过程进行详细说明。
(3)位置定位和公交乘车服务过程可包括:根据挖掘得到的出行时间段(包含在公交出行数据集合中),当进入出行时间段时,基于卫星定位对用户前往公交车站的行为进行检测,当检测到到达公交车站时,执行公交乘车服务。在另一些情况下,当终端检测到公交乘车意图相关行为(比如包括用户使用地图类应用程序查询了公交车站)时,可基于卫星定位对用户前往该公交车站的行为进行检测,当检测到到达该公交车站时,执行公交乘车服务。下文将结合图7、图8和图9对位置定位以及基于位置定位的乘车服务过程进行详细说明。
需要说明的是,本申请实施例中,对于一些数据,比如传感器数据,终端可在得到用户授权的情况下进行采集。终端采集到的数据存储在终端本地,没有必要不会上传服务器或其他网络设备,可以保证涉及用户身份的相关信息的安全。
参见图4,为本申请实施例提供的一种数据采集流程示意图,该流程可由终端执行,或者由终端中用于实现公交站乘车数据采集功能的应用程序执行。以下流程以终端作为执行主体为例进行描述。
如图4所示,该流程可包括:
S401:终端检测公交乘车支付操作,所述公交乘车支付操作包括公交车上车支付操作和/或公交车下车支付操作。
本申请实施例中,终端可支持对多种公交乘车支付方式的检测,比如对扫码支付进行检测,或者对NFC支付进行检测等。
以下车时终端对扫码支付行为进行检测为例,当终端屏幕上显示的公交乘车二维码被公交车上设置的读卡器扫描并识别后,可根据识别出的用户账户信息与网络侧的服务器进行交互,以对该用户账户进行乘车扣款操作,并向该终端返回支付响应信息,终端接收到该支付响应信息时可确认当前发生了公交乘车支付操作。
再以上下车时终端对NFC支付行为进行检测为例,在上车时,当终端与公交车上设置的读卡器之间的距离在NFC通信的有效距离之内时,读卡器读取该NFC芯片中的公交乘车账户信息,并向该账户写入信息;在下车时,当终端与公交车上设置的读卡器之间的距离在NFC通信的有效距离之内时,读卡器读取该NFC芯片中的公交乘车账户信息,获取到上车时写入的信息,并根据当前车站确定扣款金额并进行扣款。上述过程中,当读卡器对终端中的NFC芯片中的公交乘车账户进行读取或写入时,终端可确认当前发生了公交乘车支付操作。
S402:终端响应于上述公交乘车支付操作,获取公交站乘车数据,所述公交站乘车数据包括时间信息、所述终端当前的位置信息和运动状态,所述位置信息包括经纬度坐标。
该步骤中,当终端检测到公交乘车支付操作后,可对当前乘车相关的数据进行采集,得到公交站乘车数据,并记录该公交站乘车数据。每一次检测到公交乘车支付操作,可以生成一个公交站乘车数据记录,该公交乘车数据记录可保存到该终端中的公交站乘车数据集合中。
所述公交站乘车数据可包括时间信息、终端当前的位置信息(比如包括经纬度坐标)以及运动状态。可选的,时间信息可包括日期(如年月日、星期等)和时间(比如时分秒),该时间是指终端当前检测到公交乘车支付操作的时间。可选的,终端可通过发起位置定位获得当前位置的经纬度坐标,比如,终端中可内置有位置定位接口,当终端检测到公交乘车支付操作后,可通过调用该接口来发起位置定位过程,以获得当前位置的经纬度坐标。可选的,终端可根据该终端内置的传感器(比如包括加速度传感器)采集的数据获得该终端的运动状态。可选的,终端记录的运动状态可以是终端检测到公交乘车支付操作时的运动状态,也可以该公交乘车支付操作前的一段时间(比如5秒钟内)的运动状态。所记录的运动状态可作为后续数据挖掘过程中,用于判断公交乘车支付操作是发生在上车时还是发生在下车时。
可理解的,这里的运动状态可以包括运动和非运动下的状态,运动下的状态可包括乘车状态和非乘车状态,非乘车状态可进一步包括行走状态、跑状态等。非运动下的状态比如可包括停留状态。
可选的,终端还可以在检测到公交乘车支付操作后,获取当前接收到的小区信号中包含的小区信号信息,并将该小区信号信息记录到该公交站乘车数据中。可选的,所述小区信号信息可包括:小区标识(比如cell ID,简称CID)。进一步的,所述小区信号信息还可包括:跟踪区标识、运营商代码、国家代码等。其中,跟踪区标识用于标识该小区所属的跟踪区,运营商标识用于标识相应小区基站所属的运营商,国家代码用于标识该小区基站所属的国家。
可理解的,小区信号也可称为基站信号。该小区信号也可以是在公交车站部署的蓝牙信标(或蓝牙基站)发送的信号。可理解的,对于各种可能的网络设备(比如包括基站、蓝牙信标等)发送的信号,可统称为无线信号。
可选的,公交乘车数据中还可包括评估信息,评估信息可在后续数据挖掘过程中用于 选取可靠性满足要求的数据记录进行数据挖掘。示例性的,所述评估信息可包括验证成功次数、验证失败次数和召回率中的至少一项。其中,验证成功次数为当终端检测到公交乘车支付操作时对位置定位结果验证成功的次数,验证失败次数为当终端检测到公交乘车支付操作时对位置定位结果验证失败的次数,召回率是根据验证成功次数和验证失败次数确定出的。
示例性的,终端检测到公交乘车支付操作后,根据当前基于位置定位获得到的经纬度坐标查询公交出行数据记录集合,得到对应的公交车站信息(比如公交车站的站名),再根据该经纬度坐标查询服务器以获得对应的POI信息(其中包括公交车站信息,比如站名),如果从公交出行数据记录集合查询到的公交车站信息,与从服务器查询到的POI信息中包括的公交车站信息相同,则表明验证成功,则将当前生成的数据记录中的验证成功次数递增一次,否则表明验证失败,则将当前生成的数据记录中的验证失败次数递增一次。进一步的,终端根据数据记录中的验证成功次数和验证失败次数计算得到召回率。
可选的,可采用以下公式计算召回率:
R=TP/(TP+FN)
其中,R表示召回率,TP表示验证成功次数,FN表示验证失败次数。
S403:终端记录采集到的公交站乘车数据。
该步骤中,针对终端当前检测到的公交乘车支付操作,可生成对应的一个公交站乘车数据记录,并将该数据记录存储到公交乘车数据集合中。表1示例性的示出了一个公交站乘车数据记录。
表1:公交站乘车数据记录
日期 星期 时间 经度 纬度
2021-06-07 星期一 18:43:37 114.06153 22.661812
小区标识 跟踪区标识 运营商标识 国家代码 运动状态
1001 9712 460 1
需要说明的是,表1所示的例子中,数据记录中的小区标识、跟踪区标识、运营商标识、国家代码、经纬度坐标等信息的取值仅为用于阐述本申请实施例的示例性描述,并不代表真实场景下的取值。
上述实现方式中,一方面,数据采集过程在事件驱动下启动(即检测到公交乘车支付操作),因此可控制数据采集在一定的时间和/或空间内进行,从而可以节省终端功耗,还可以有针对性的进行数据采集;另一方面,采集到的数据与用户的公交出行的行为习惯相符,并且为后续基于采集到的数据,得到用于进行位置定位的公交出行数据提供了数据基础和来源。
终端可对采集到的公交站乘车数据集合进行数据挖掘,得到用于进行位置定位的公交出行数据集合。示例性的,终端可按照设定时间或周期,对公交站乘车数据集合进行数据挖掘。比如,终端可在一天内的设定时间(比如在终端负载较低的晚上)对采集到的数据记录进行数据挖掘。
参见图5,为本申请实施例提供的一种数据挖掘流程示意图,该流程可由终端执行,或者由终端中用于实现对公交站乘车数据进行数据挖掘的应用程序执行。以下流程以终端作为执行主体为例进行描述。
在一些实施例中,该流程可基于用户的界面操作触发启动。比如,本申请实施例可提供用户界面,其中可包括用于启动数据挖掘流程的按键,当该按键被用户触发时,则启动数据挖掘流程。在另一些实施例中,可在满足设定条件(为了与下文中出现的第一条件进行区分,这里成为第二条件)时自动启动该数据挖掘流程。可选的,本申请实施例可允许用户在系统设置界面中,对是否允许自动启动该数据挖掘流程进行设置。
可选的,所述满足第二条件可包括满足以下条件中的至少一项:
(1)设定时间到达。
可选的,该设定时间可根据终端的忙闲状态设置。比如,终端在晚上相较于白天更空闲,则可设置晚上10点钟时启动数据挖掘流程。
(2)设定事件发生。
可选的,所述设定事件包括以下至少一项:
终端的性能大于设定的性能阈值,比如,终端的CPU占用率低于设定阈值;
终端的电量大于设定的电量阈值;
终端处于充电状态;
终端息屏且处于息屏状态达到设定时长(比如40秒钟)。
可选的,进行数据挖掘之前,终端可首先根据公交站乘车数据中包括的评估信息,选取置信度满足要求的公交站乘车数据,以提高公交出行数据的可靠性。在进行数据挖掘时,终端可根据置信度满足要求的公交站乘车数据,得到用于位置定位的公交出行数据。可选的,若公交站乘车数据记录满足以下条件中的至少一项,则该公交乘车数据记录满足置信度要求:
条件1:位置定位结果验证成功次数大于设定次数。
条件2:位置定位结果验证失败次数小于设定次数。
条件3:召回率大于设定阈值。
条件4:时间信息所指示的时间在指定时间之后,比如时间信息所指示的日期在最近30天内,比如,当前为5月1日,则日期在4月1日之后的数据记录为满足该条件4的数据记录。
如图5所示,本申请实施例提供的数据挖掘过程可包括如下步骤:
S501:终端根据对公交站乘车数据中的经纬度坐标进行空间聚类,得到至少一个乘车位置聚类类别,每个乘车位置聚类类别对应一个经纬度坐标。
该步骤中,可基于聚类算法,对公交站乘车数据集合中各数据记录中的经纬度坐标进行聚类,从而得到多个乘车位置聚类类别(cluster),并对聚类得到的每个类别分配类别标识。每个乘车位置聚类类别中的经纬度坐标位置相近。对于任意一个类别,可根据该类别中的所有经纬度坐标,确定出该类别对应的一个经纬度坐标,比如,将该类别中的各经纬度坐标取平均值或采用其他算法,从而得到该类别对应的一个经纬度坐标。可选的,类别标识与经纬度坐标之间的对应关系,可使用一个对应关系表保存。可选的,可将乘车位置聚类类别添加到公交站乘车数据记录中,以便后续进行数据挖掘。
可理解的,也可以采用其他方法对公交站乘车数据中的经纬度坐标进行分组(或分类),本申请实施例对此不作限制。
S502:终端分别根据每个乘车位置聚类类别对应的经纬度坐标,获取对应的公交车站信息。
可选的,终端可分别根据每个乘车位置聚类类别(cluster)对应的经纬度坐标,从服务器获取对应的POI,该POI中包含公交车站信息(比如包括公交车站的站名)。可选的,可将获取到的公交车站信息添加到公交站乘车数据记录中。
可理解的,以上仅以通过查询POI信息以获取公交站信息为例,除此之外也可以采用其他方法获取公交站信息,本申请实施例对此不作限制。
S503:终端根据属于同一乘车位置聚类类别的公交站乘车数据中的时间信息,统计得到出行时间段。
公交站乘车数据集合中,可能有多个数据记录中包括的乘车位置聚类类别相同,这是因为用户乘坐公交车出行具有一定规律性,比如用户在工作日的每天早上8点钟左右都会到相同公交车站乘坐公交车,因此基于该用户的终端在这些工作日的早上8点左右采集到的公交站乘车数据记录并结合上述步骤的数据挖掘,这些数据记录中的经纬度坐标属于同一乘车位置聚类类别。该步骤中,针对属于同一乘车位置聚类类别的公交站乘车数据记录,终端可对这些数据记录中的时间信息进行统计,得到该乘车位置聚类类别对应的出行时间段,比如包括上班通勤时间段和/或下班通勤时间段。
可选的,可采用盒须图统计分析方法进行出行时间段的统计。对于每个乘车位置聚类,采用盒须图对其乘车时间进行统计建模,排除离群点,并计算通勤时间段。图6示例性示出了盒须图的原理,以盒须图中的最小值为例,从上四分位点加上1.5倍的内距(IQR),该变量在这个范围内的最大取值被称为最大值,超过1.5倍的内距的取值被称为离群值(异常值)。下面结合图6对采用盒须图进行出行时间段统计的流程进行说明。以对星期一对应的数据记录进行时间统计为例,该流程可包括如下步骤:获取日期为星期一的公交站乘车数据记录,且这些数据记录中的乘车位置聚类类别相同;按照时间从前向后的顺序对这些公交站乘车数据记录进行排序;计算这些数据记录中的时间值的下四分位点Q1和上四分位点Q3;计算这些数据记录中的时间值的内距IQR:IQR=Q3-Q1;计算这些数据记录中的时间值的下边缘LB:LB=Q1-1.5*IQR;计算这些数据记录中的时间值的上边缘UB:UB=Q3+1.5*IQR;从这些数据记录中的时间值中,筛选出上边缘UB和下边缘LB之间的时间值;根据上边缘UB和下边缘LB之间的时间值,计算上班通勤时间段,该上班通勤时间段为星期一、该公交位置聚类类别对应的上班通勤时间段。
以此类推,可以计算得到在每个工作日(weekday,比如星期一到星期五),每个公交位置聚类类别对应的上班通勤时间段和/或下班通勤时间段。
可理解的,以上仅以采用盒须图统计分析方法对出行时间段进行挖掘为例描述,除此之外也可以采用其他方法对出行时间段进行挖掘,本申请实施例对此不作限制。
S504:终端根据一个星期中的同一天内的所有乘车位置聚类类别对应的出行时间段,确定这一天对应的出行时间段。
该步骤中,针对每个工作日(weekday,比如星期一到星期五),根据各公交位置聚类类别对应的出行时间段,可统计得到该工作日对应的出行时间段。示例性的,针对一个工作日(比如星期一到星期五),根据所有公交位置聚类类别对应的上班通勤时间段,可以统计得到该工作日的上班通勤时间段,根据所有公交位置聚类类别对应的下班通勤时间段,可以统计得到该工作日的下班通勤时间段。比如,在星期一,公交位置聚类类别1对应的上班统计时间段为8:00~8:30,公交位置聚类类别2对应的上班统计时间段为8:30~9:00,则星期一对应的上班通勤时间段为8:00~9:00。
可选的,还可以基于非工作日(weekend)采集的公交站乘车数据记录,统计得到非工作日的出行时间段。
上述数据挖掘流程,通过对采集到的公交站乘车数据进行数据挖掘,可以得到用于位置定位的公交出行数据。在进行数据挖掘时,对经纬度进行聚类,并针对每个聚类类别对应的数据进行时间段的统计等挖掘处理,可以减少经纬度定位误差带来的影响,从而可以提高可靠性。在进行数据挖掘时,通过挖掘得到出行时间段,可以在后续进行位置定位时,依据该出行时间段启动位置定位。
可选的,终端根据公交站乘车数据中的运动状态,确定对应的公交乘车支付操作的行为类型(该行为类型包括上车支付、下车支付),并根据确定出的公交乘车支付操作的行为类型,添加对应的上下车标识。示例性的,终端可根据公交站乘车数据记录中的运动状态,确定该数据记录对应的公交乘车支付操作是在上车时发生的公交乘车支付操作,还是在下车时发生的公交乘车支付操作。进一步的,可根据判断结果,在公交站乘车数据中添加上车标识或下车标识,以便后续进行数据挖掘。
示例性的,如果当前公交站乘车数据记录中的运动状态为行走状态或停留状态,表明在公交乘车支付操作发生时刻之前的一段时间(比如5秒内),终端检测到的运动状态为行走状态或停留状态,则可确定该公交乘车支付操作是在上车时发生的(在上车之前的一段时间内,用户一般在车站静止或行走),并在该数据记录中添加上车标识;如果当前公交站乘车数据记录中的运动状态为乘车状态,表明在公交乘车支付操作发生时刻之前的一段时间(比如5秒内),终端检测到的运动状态为乘车状态,则可确定该公交乘车支付操作是在下车时发生的(在下车之前的一段时间内,公交车一般处于行驶状态),并在该数据记录中添加下车标识。
可选的,终端可根据数据记录的时间顺序和/或数据记录中包含的上下车标识,分析车站之间的关联关系(比如,某个车站是否是公交出行线路上的换乘车站),如果某个车站是公交出行线路上的换乘站,则可以在数据记录中设置换乘标识。示例性的,可根据同一天的出行时间段内到达过的各公交车站以及达到所述各公交车站的先后顺序,确定所述各公交车站中的换乘车站;在所述换乘车站对应的数据记录中设置换乘标识。示例性的,若一个公交车站对应的数据记录中包括的上下车标识表明该公交车站既是上车车站也是下车车站,则可以确定该公交车站为换乘车站。
举例来说,若一个星期中同一天内的上班通勤时间段内,第一聚类类别对应的第一公交车站设置有下车标识,且该上班通勤时间段内的第二聚类类别对应的第二公交车站设置有上车标识(第一公交车站和第二公交车站为相邻数据记录对应的公交车站),则确定第一公交车站为上班通勤时间段内的换乘车站,并可为第一公交车站添加换乘标识。若一个星期中同一天内的下班通勤时间段内,第三聚类类别对应的第三公交车站设置有下车标识,且该下班通勤时间段内的第四聚类类别对应的第四公交车站设置有上车标识(第三公交车站和第四公交车站为相邻数据记录对应的公交车站),则确定第三公交车站为所述下班通勤时间段内的换乘车站,并可为第三公交车站添加换乘标识。通过数据挖掘确定换乘车站,进而设置换乘标识,可以为后续针对换乘车站设置地理电子围栏,进而在进入该电子围栏时执行公交乘车服务提供依据。
示例性的,上述第一数据记录和第二数据记录是同一天采集到的相邻两条数据记录(按照时间先后顺序排列),第一数据记录对应于第一车站(记录有聚类类别cluster1),且 为下车车站(记录有下车标识),第二数据记录对应第二车站(记录有聚类类别cluster2),且为上车车站(记录有上传标识),则可确定第一车站为换乘车站,进而可在第一数据记录中设置换乘标识。
可选的,终端还可以确定公交站乘车数据中的各工作日出现次数的占比,针对占比小于设定阈值的工作日,删除该工作日对应的公交站乘车数据记录。比如,日期为星期五的数据记录的数量占所有工作日的数据记录总数的占比为2%,小于设定阈值5%,表明该用户在星期五可能很少按照平时上班的公交乘车线路去上班,因此删除日期为星期五的数据记录,进而也无需针对星期五统计上下班通勤时间段,一方面降低数据挖掘的开销,另一方面可以提高可靠性。
可理解的,也可针对非工作日的公交站乘车数据,统计其出现次数的占比,从而删除占比小于设定阈值的非工作日的公交站乘车数据记录。
可选的,终端还可以根据公交站乘车数据中的小区信息,确定公交站乘车数据中的各小出现的占比,并删除占比小于设定阈值的小区所对应的数据记录。比如,若小区1(比如小区标识为1001的小区)的数据记录的数量占所有数据记录总数的占比为1%,小于设定阈值5%,表明该用户在通勤时间段或通勤路线上很少出现在该位置,因此可删除该小区对应的数据记录,进而无需以该数据记录作为公交站位置定位的依据,一方面降低数据挖掘的开销,另一方面可以提高可靠性。
可选的,终端还可以针对每个乘车位置聚类类别对应的经纬度坐标,计算该位置与家所在位置之间的距离,以及该位置与上班地点之间的距离,并将该记录记录到公交出行数据记录中。
可选的,终端还可以进行数据老化处理,以删除公交乘车数据集合或公交出行数据集合中的过期数据记录,比如删除日期在6个月之前的数据记录,仅保留6个月以内的数据记录,以保证位置定位的可靠性。
需要说明的是,上述数据挖掘流程中的各步骤的执行顺序仅为一种示例,本申请实施例对此不做限制。
根据以上数据挖掘过程,可以得到用于公交站位置定位的公交出行数据。表2示例性的示出了一个公交出行数据记录。
表2:公交出行数据记录
聚类类别 cluster2
日期 星期一(21/2/1—21/6/7)
下班通勤时间段 18:23:56----18:57:12
经纬度坐标 (114.0161691,22.681934)
与家之间的距离 3587.2
与上班地点之间的距离 43.4
小区信息 ……
公交车站站名 中心大厦
城市 城市A
上下车标识 1(上车标识)
需要说明的是,表2所示的例子中,数据记录中的小区经纬度坐标等信息的取值仅为 用于阐述本申请实施例的示例性描述,并不代表真实场景下的取值。
基于公交出行数据,终端可以结合位置定位,确定是否到达公交车站,若确定到达公交车站,则可以提供公交乘车服务。
参见图7,为本申请实施例提供的基于位置定位的服务实现方法流程示意图,该流程可由终端执行,或者由终端中用于基于位置定位实现公交乘车服务的应用程序执行。以下流程以终端作为执行主体为例进行描述。
如图7所示,该流程可包括如下步骤:
S701:满足第一条件(比如进入出行时间段)时,终端启动位置定位,获得当前位置。
可选的,满足第一条件时终端启动位置定位,可包括以下情况中的一种:
情况1:当进入出行时间段时,终端启动位置定位。其中,该出行时间段是根据该终端采集到的公交乘车数据确定的,比如该终端按照上述实施例进行公交乘车数据采集以及数据挖掘,得到工作日(比如星期一到星期五)对应的出行时间段。
该出行时间段是根据公交乘车出行的历史数据学习到的,可记录在公交出行数据记录中。示例性的,若终端确定当前时间为工作日(比如星期一至星期五中的某一天)的早上,则终端可根据公交出行数据中该天对应的数据记录中包含的上班通勤时间段,在确定进入该上班通勤时间段时,启动位置定位,以获得当前位置。
可选的,当进入出行时间段时,可以根据目标公交车站启动位置定位过程,在该位置定位过程中,每当根据位置定位获得当前位置,则可判断当前位置是否是该目标公交车站,如果是,则执行公交乘车服务。其中,该目标公交车站是根据用户的公交乘车出行的历史数据学习到的。
可选的,终端可针对通勤时间段,订阅相应的时间围栏,用以在当前时间进入该通勤时间段时,启动位置定位以获得当前位置。举例来说,终端可预先订阅每个工作日的上班通勤时间段。若当前时间进入订阅的时间围栏,则终端启动位置定位,比如,当前日期为星期一,在当前时间进入订阅的星期一的上班通勤时间段时,则启动位置定位。
基于情况1,可以实现基于出行时间段到达的事件,启动位置定位,从而节省终端功耗。另一方面,由于出行时间段是根据该终端采集到的公交乘车数据(其中包括公交乘车时间信息)确定的,因而该出行时间段符合用户的公交乘车出行习惯,从而可以实现基于用户公交乘车出行习惯启动位置定位。
情况2:当终端检测到公交出行应用程序相关的用户操作时,启动位置定位以获得经纬度坐标,并根据该经纬度坐标查询公交车站信息。
示例性的,对于用户对公交相关应用程序的操作行为,终端可进行检测,当检测到用户对公交相关应用程序进行操作时,可启动位置定位以获得当前位置的经纬度坐标,并根据该经纬度坐标查询对应的POI,以获取对应的POI,进而根据该POI确定当前位置是否为公交车站。示例性的,当终端检测到用户打开了地图类应用程序,或者使用地图类应用程序进行公交站查询时,则可启动位置定位。
基于情况2,可以基于用户行为启动位置定位,从而可以节省终端功耗。
S702:若当前位置为公交车站,则转入S703,否则转入S704。
该步骤中,终端可以基于通过位置定位获取到的经纬度坐标,查询公交出行数据,以确定当前位置是否是公交车站。如果该经纬度坐标与公交出行数据中包含的某个公交车站对应的经纬度坐标匹配,则确定当前位置为该公交车站。其中,该经纬度坐标与公交出行 数据中包含的某个公交车站对应的经纬度坐标匹配,可包括以下两种情况:一是该经纬度坐标与公交出行数据中包含的某个公交车站对应的经纬度坐标相同;二是该经纬度坐标与公交出行数据中包含的某个公交车站对应的经纬度坐标之间的距离在设定距离(比如10米)之内。
S703:终端执行公交乘车服务。
可选的,终端执行的公交乘车服务,可包括以下至少一项:
(1)终端显示标识码,该标识码用于公交车乘车支付,比如该标识码为乘车二维码,以便于用户扫码支付进行乘车。
基于该公交乘车服务,可以在用户到达上车车站时,通过该用户携带的终端自动显示标识码以方便用户进行乘车支付;在用户乘车到达下车车站时,通过该用户携带的终端自动显示标识码以方便用户进行乘车支付。
(2)终端提示使用公交乘车应用程序进行公交乘车支付。终端可以通过语音或界面显示等方式,提示用户打开用于公交乘车支付的应用程序,以进行公交乘车支付。
基于该公交乘车服务,可以在用户到达上车车站时,通过该用户携带的终端自动打开公交乘车应用程序以方便用户进行乘车支付;在用户乘车到达下车车站时,通过该用户携带的终端自动打开公交乘车应用程序以方便用户进行乘车支付。
(3)终端推荐用于公交乘车支付的应用程序。终端可向用户推荐用于公交乘车支付的应用程序。
(4)终端提示当前到达的公交车站,终端可通过语音或界面显示等方式,向用户提示当前到达的公交车站的站名等信息。
基于该公交乘车服务,可以在用户到达下车车站或换乘车站时,则提示该公交车站的站名。
(5)终端获取该公交车站停靠的公交车到达的时间信息,并可将该时间信息提示给用户。示例性的,终端可从服务器获取该公交车站对应的公交车运行信息,比如预计到达该公交车站的时间。
基于该公交乘车服务,可以在用户到达上车车站时,终端获取该公交车站对应的公交车的预计到达时间,并提示给用户。
(6)终端获取该公交车站的相关信息,比如该公交车站临时禁止停车,或者临时变更位置等,并将该信息提示给用户。
(7)当检测到到达公交车站时,且该公交车站在公交出行数据中标识为下车车站的情况下,终端可采用语音或屏幕显示等方式进行到站提示。
基于该公交乘车服务,可以在用户到达下车车站或换乘车站时,进行到站提醒。
需要说明的是,以上仅示例性列举了几种公交乘车服务类型,本申请实施例对公交乘车服务的种类不做限制。
S704:终端执行到站检测,以继续检测终端是否到达公交车站,并转入S702。
在到站检测过程中,终端可基于当前位置和目标公交车站之间的距离,以及当前的运动状态,动态调节定位时间间隔,直至检测到进入目标公交车站或者超时。
可选的,终端在启动位置定位后,若在设定时长内未定位到公交车站,或者执行位置定位的次数达到设定阈值时仍未定位到公交车站,则结束流程,以节省终端功耗。
根据以上图7所示的流程,由于在满足第一条件时才进行位置定位,从而可以节省终 端功耗;当位置定位结果为公交车站时执行公交乘车服务,从而实现公交乘车出行智能化服务,提高用户公交乘车的便捷性。另一方面,由于出行时间段可根据该终端采集到的公交乘车数据(其中包括公交乘车时间信息)确定,因而该出行时间段符合用户的公交乘车出行习惯,从而可以实现基于用户公交乘车出行习惯启动位置定位。
在一些实施例中,基于上述图7所示的流程,当进入出行时间段时,终端启动位置定位之后,若基于定位到的位置判断当前位置不是公交车站,则终端可确定在该出行时间段需要前往的目标公交车站,并启动到站检测,用以根据该终端的位置和运动状态确定是否到达该目标公交车站,从而结合一次或多次位置定位和运动状态检测来确定是否到达公交车站。若终端到达该目标公交车站,则执行公交乘车服务。
可选的,上述流程中,终端确定在该出行时间段需要前往的目标公交车站的过程,包括:终端根据当前位置的经纬度坐标,查询该终端存储的公交出行数据中以所述经纬度坐标为中心的设定范围内(比如方圆1公里范围内)的公交车站,并将查询到的公交车站确定为在该出行时间段需要前往的目标公交车站。如果确定出的目标公交车站为多个,则针对每个目标公交车站分别进行到站检测。确定目标公交车站的依据是该终端存储的公交出行数据,由于该公交出行数据是根据该终端采集的公交站乘车数据通过数据挖掘得到的,能够反映用户的出行习惯(比如在某出行时间段内的出行线路),因此使得根据该公交出行数据所确定出的目标公交站与用户的出行习惯相符。
在一些实施例中,终端在进行到站检测过程中,可根据运动状态以及当前时间距离上一次位置定位时间之间的时间间隔,确定下一次位置定位的时间,从而适时进行位置定位,从而减少终端功耗。
示例性的,在终端进行到站检测过程中,可根据出行时间段的截止时间确定到站检测的超时时间;在该超时时间到达之前,终端可不断检测运动状态。当终端根据检测到的运动状态确定运动占比(运动占比用于表征当前时间与上一次位置定位时间之间的时间间隔内,终端处于运动状态的时长占该时间间隔的比例)大于或等于设定阈值时,可启动位置定位以获得当前位置的经纬度坐标,根据当前位置的经纬度坐标与目标公交车站间的距离,确定是否到达该目标公交车站,其中,若该距离大于设定阈值,则可判断未到达该目标公交车站,否则可判断到达该目标公交车站。其中,用于进行运动占比相关判断的阈值可预先设置,比如可设置为80%。当到站检测的超时时间到达时,终端结束到站检测过程。
其中,运动占比能够反映过去指定时长内(比如当前时间距离上一次位置定位时间之间的时长)运动状态的时间占比,如过去5分钟内80%处于运动状态。本申请实施例中,终端可支持对运动占比进行订阅和查询。采用订阅方式时,可预先设置指定时长、轮询周期和占比阈值,并对运动占比进行订阅,当检测到的运动占比大于或等于该占比阈值时,系统可通过回调方式通知订阅方。采用查询方式时,对运动占比进行订阅,设置指定时长,从而可以查询过去指定时长内的运动状态的时间占比。
可选的,本申请实施例中还可根据当前位置与目标公交车站之间的距离并结合小区信号,判断是否到达目标公交车站。示例性的,可根据到站检测,获得当前位置的经纬度坐标和目标公交车站对应的经纬度坐标之间的距离并获得当前位置的小区信号,若该距离小于或等于设定阈值,并且当前位置的小区信号与该目标公交车站所在小区的小区信号匹配(该目标公交车站所在小区的小区信号可通过查询公交出行数据获得)且信号强度大于设定阈值,则确定到达该目标公交车站。
可选的,本申请实施例中还可根据小区信号判断是否到达目标公交车站。示例性的,可获得当前位置的小区信号,若当前位置的小区信号与该目标公交车站所在小区的小区信号匹配(该目标公交车站所在小区的小区信号可通过查询公交出行数据获得)且信号强度大于设定阈值,则可确定到达该目标公交车站。
上述实现方式中,一方面,根据出行时间段的截止时间确定到站检测的超时时间,并在超时时间到达时,结束到站检测过程,从而可以控制终端进行到站检测的时长,避免过长时间进行到站检测所带来的终端功耗开销(比如包括到站检测过程中进行卫星定位所带来的功耗开销);另一方面,在进行到站检测时,当运动占比大于或等于设定阈值,则表明终端大部分时间处于运动状态,此时进行位置定位(比如进行卫星定位),可以减少无效位置定位所带来的功耗。
可选的,若终端根据当前位置定位确定的当前位置与目标公交车站间的距离,确定未到达所述目标公交车站,则还可根据当前位置与目标公交车站之间的距离以及该终端的运动速度确定下次的位置定位时间;当该位置定位时间到达时,若终端首先确定当前的运动占比(即当前时间与上一次位置定位时间之间的时间间隔内,终端处于运动的时长占所述时间间隔的比例),若该运动占比大于或等于设定阈值,则该终端启动位置定位,获得当前位置的经纬度坐标,基于当前位置的经纬度坐标,根据当前位置与目标公交车站间的距离,确定是否到达该目标公交车站。
上述实现方式中,一方面,根据当前位置与目标公交车站之间的距离以及终端的运动状态确定下次位置定位时间,并在该位置定位时间到达时才进行位置定位,从而可以控制该终端进行位置定位的时间或次数,避免过多次进行位置定位所带来的终端功耗开销;另一方面,在位置定位时间到达时,若运动占比大于或等于设定阈值,则表明终端大部分时间处于运动状态,此时进行终端位置定位(比如进行卫星定位),可以减少无效位置定位所带来的功耗。
可选的,可根据以下公式确定下次位置定位时间:
Figure PCTCN2022138753-appb-000003
其中,X表示当前时间距离下次位置定位时间的间隔,d表示当前位置到目标公交车站之间的距离,v表示终端的运动速度。
在一些实施例中,若当前进入的出行时间段为上班通勤时间段,且终端当前位置为家所在位置,则该终端可检测是否离开家所在位置;当该终端检测到已离开家所在位置时,确定在该上班通勤时间段需要前往的目标公交车站,并启动到站检测。由于到站检测需要结合位置定位(比如卫星定位),终端的功耗开销较大,而采用本实现方式,只有判断离开家时才进行到站检测,可以减少终端功耗。
可选的,终端可通过以下方法检测是否离开家所在位置:终端检测在家所在位置接入的无线局域网的信号(比如包括Wi-Fi信号);当无法检测到该无线局域网的信号时,可判断已离开家所在位置。采用该方法能够反映过去设定时长内周围Wi-Fi列表是否包含目标Wi-Fi信号(这里为家所在位置的Wi-Fi信号),比如过去5分钟内周围Wi-Fi列表包含家里部署的路由器发送的Wi-Fi信号,并能够在Wi-Fi扫描后根据结果通知订阅方(这里为终端或终端中用于执行本申请实施例提供的乘车服务的应用程序)。
可选的,订阅方(比如终端中用于实现乘车服务的应用程序)可订阅无线局域网信号 (比如Wi-Fi信号)变化的事件,系统可监听家里的Wi-Fi信号,并将接收到的Wi-Fi信号的强度与设定阈值进行比较,当该Wi-Fi信号强度小于该设定阈值时,通过回调方式通知订阅方。进一步的,此时终端可取消对该事件的订阅,以节省终端功耗。可选的,终端也可以查询过去设定时长内周围Wi-Fi列表中是否包含目标Wi-Fi(即家里的路由器发送的Wi-Fi信号)。
在一些实施例中,若当前进入的出行时间段为下班通勤时间段,且终端当前位置为办公地点所在位置,则该终端可检测是否离开该办公地点所在位置;当该终端检测到已离开该办公地点所在位置时,确定在该下班通勤时间段需要前往的目标公交车站,并启动到站检测。
可选的,终端可通过以下方法检测是否离开办公地点所在位置:终端检测在办公地点所在位置接入的无线局域网的信号(比如包括Wi-Fi信号);当无法检测到该无线局域网的信号时,可判断已离开办公地点所在位置。可选的,终端可订阅无线局域网信号(比如Wi-Fi信号)变化的事件,当终端在办公地点所在位置接入的无线局域网的信号无法被接收到时,终端可获知该事件,并基于该事件确定终端已经离开该办公地点所在位置。进一步的,此时终端可取消对该事件的订阅,以节省终端功耗。
在一些实施例中可选的,终端还可以在到达换乘车站时执行公交乘车服务。示例性的,终端获取当前出行时间段内的换乘车站;当终端检测到进入该换乘车站所在范围时,执行公交乘车服务。采用该实现方式,可以在进入出行时间段后,在到达换乘车站时执行公交乘车服务,从而可以在用户出行的整条线路上,当到达该线路上的公交车站时执行公交乘车服务,进而在整条出行线路上实现公交乘车出行的智能化服务。
可选的,终端可订阅该换乘车站的地理电子围栏,该地理电子围栏用于指示该换乘车站的地理范围;当终端检测到进入该换乘车站的地理电子围栏时,表明已经到达该换乘车站,则执行公交乘车服务。
可选的,终端可通过查询公交出行数据集合,确定当前出行时间段内的换乘车站。示例性的,终端可查询终端存储的公交出行数据集合,获取公交出行数据集合中,出行时间段与当前出行时间段匹配且设置有换乘标识的数据记录,根据该数据记录中的公交车站信息得到当前出行时间段内的换乘车站。由于确定换乘车站的依据是该终端存储的公交出行数据,该终端存储的公交出行数据是根据该终端采集的公交站乘车数据确定出来的,能够反映用户的出行习惯(比如在某出行时间段内的出行线路),因此可以实现基于用户的出行习惯确定用户可能到达的换乘车站,从而可以在用户(终端)到达该换乘车站时,能够获得终端提供的公交乘车服务。
在一些实施例中可选的,终端还可以在到达下车车站时执行公交乘车服务。示例性的,终端获取当前出行时间段内的下车车站;当终端检测到进入该下车车站所在范围时,执行公交乘车服务。可选的,终端可订阅该下车车站的地理电子围栏,该地理电子围栏用于指示该换乘车站的地理范围;当终端检测到进入该下车车站的地理电子围栏时,表明已经到达该下车车站,则执行公交乘车服务。
可选的,终端可通过查询公交出行数据集合,确定当前出行时间段内的下车车站。示例性的,终端可查询终端存储的公交出行数据集合,获取公交出行数据集合中,出行时间段与当前出行时间段匹配且设置有下车标识的数据记录,根据该数据记录中的公交车站信息得到当前出行时间段内的下车车站。由于确定下车车站的依据是该终端存储的公交出行 数据,该终端存储的公交出行数据是根据该终端采集的公交站乘车数据确定出来的,能够反映用户的出行习惯(比如在某出行时间段内的出行线路),因此可以实现基于用户的出行习惯确定用户可能到达的下车车站,从而可以在用户(终端)到达该下车车站时,能够获得终端提供的公交乘车服务。
根据以上实施例,以上班通勤为例,图8示例性示出了一种基于位置定位的服务实现方法的流程。如图所示,该流程可包括如下步骤:
S801:基于公交出行数据集合中的数据记录,确定当前进入上班通勤时间段。
S802:发起位置定位,获得当前位置的经纬度坐标,根据该经纬度坐标判断是否处于家所在的位置,如果当前位置是家所在的位置,则转入S803。
其中,家所在位置的经纬度坐标可预先获取并保存。
可选的,如果判断当前位置不是家所在的位置,则可结束本流程。
S803:订阅Wi-Fi通知事件。
基于该订阅事件,终端可对家里设置的无线路由器发送的Wi-Fi信号进行检测,当检测到该Wi-Fi信号的信息从Wi-Fi列表中消失(比如由于Wi-Fi信号较弱或无法接收到该Wi-Fi信号,则将该Wi-Fi信号对应的服务集标识(service set identifier,SSID)从Wi-Fi列表中删除),则可通过回调方式通知订阅该事件的应用程序(本申请实施例中为用于提供基于位置定位的公交乘车服务的应用程序)。
S804:查询Wi-Fi列表中是否包含家里设置的无线路由器发送的Wi-Fi信号,如果不包含,则表明终端当前已经离开家所在的位置,因此转入S805以确定在该上班通勤时间段用户需要前往的目标公交车站;如果Wi-Fi列表中包含家里设置的无线路由器发送的Wi-Fi信号,则表明用户当前尚未离开家,则转入S810以判断当前是否超时。
S805:基于公交出行数据集合中的数据记录,确定在该上班通勤时间段用户需要前往的目标公交车站。
S806:发起位置定位,获得当前位置的经纬度坐标,根据该经纬度坐标判断是否在目标公交车站,如果在目标公交车站,则转入S809以执行公交乘车服务,否则转入S807以启动到站检测流程。
S807:执行到站检测流程,以检测是否到达目标公交车站。
S808:基于到站检测,判断是否到达目标公交车站,如果到达目标公交车站,者转入S809以执行公交乘车服务。
S809:执行公交乘车服务。
S810:判断当前是否超时,如果超时,则结束本流程。
可选的,上述流程的S804中,如果Wi-Fi列表中不包含家里设置的无线路由器发送的Wi-Fi信号,则还可以执行S810~S812。
S810:基于公交出行数据集合中的数据记录,确定该上班通勤时间段内的下车车站和换乘车站。
S811:基于公交出行数据集合中的数据记录,获取下车车站和换乘车站的经纬度坐标。
S812:根据该经纬度坐标订阅下车车站和换乘车站的地理电子围栏。
S813:当进入该地理电子围栏时,执行公交乘车服务。
示例性的,图8所示流程中的到站检测相关流程(S807~S809)的流程可如图9所示,当启动到站检测流程后,执行以下步骤:
S901:根据出行时间段(本流程中为上班通勤时间段)确定到站检测超时时间。该超时时间可根据该上班通勤时间段的截止时间来确定。
S902:订阅运动占比通知事件。
基于该订阅事件,终端可持续检测运动状态并计算运动占比,当运动占比大于或等于设定阈值时,可通过回调方式通知订阅该事件的应用程序(本申请实施例中为用于提供基于位置定位的公交乘车服务的应用程序)。
S903:收到事件通知,表明当前运动占比大于或等于设定阈值。
S904:基于到站检测超时事件,判断当前时间是否超时,如果没有超时,则转入S905以发起位置定位,如果超时,则转入S913以结束本流程。
S905:发起位置定位,获得当前位置的经纬度坐标。
S906:计算当前位置与目标公交车站之间的距离。
S907:根据当前位置与目标公交车站之间的距离,判断是否到达目标公交车站,如果到达目标公交车站,则转入S908以执行公交乘车服务,否则转入S909以确定下次位置定位的时间。
该步骤中,如果该距离小于或等于设定阈值,则确定到达目标公交车站。
S908:执行公交乘车服务。
S909:根据当前位置与目标公交车站之间的距离以及终端的运动状态,确定下次位置定位的时间。
S910:位置定位时间到达时,基于到站检测超时时间,判断当前是否超时,如果没有超时,则转入S911与确定运动占比,否则转入S913以结束本流程。
S911:获取上次位置定位时间到本次位置定位时间之间的时间段内的运动占比。
S912:判断该运动占比是否大于或等于设定阈值,如果大于或等于设定阈值,则转入S905以发起位置定位,否则转入S909以确定下次位置定位时间。
S913:解除订阅(比如包括运动占比通知事件的订阅),结束本流程。
需要说明的是,各步骤的具体实现方式,可参见前述实施例。
根据本申请的上述一个或多个实施例,基于公交乘车相关行为或者用户公交乘车习惯,结合运动状态检测和卫星定位,可以识别用户当前是否正在前往公交站以及是否已经到达站点,进而在用户到达公交站时,提供公交乘车服务。其中,到站检测流程在检测到用户离家或离开办公地点后才启动,另外,在到站检测过程中,卫星定位的频率由运动模型决定,从而可以实现功耗可控。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,该计算机程序被计算机执行时,所述计算机可以实现上述方法实施例提供的方法。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品用于存储计算机程序,该计算机程序被计算机执行时,所述计算机可以实现上述方法实施例提供的方法。
本申请实施例还提供一种芯片,包括处理器,所述处理器与存储器耦合,用于调用所述存储器中的程序使得所述芯片实现上述方法实施例提供的方法。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机 可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (30)

  1. 一种基于位置定位的服务实现方法,其特征在于,包括:
    当进入出行时间段时,启动位置定位,获得当前位置;其中,所述出行时间段是根据公交乘车出行的历史数据学习到的;
    若所述当前位置为公交车站,则执行公交乘车服务。
  2. 如权利要求1所述的方法,其特征在于,所述当进入出行时间段时,启动位置定位之后,还包括:
    若所述当前位置不是公交车站,则确定在所述出行时间段需要前往的目标公交车站,并根据终端的位置和运动状态进行到站检测;
    若根据所述到站检测确定到达所述目标公交车站,则执行所述公交乘车服务。
  3. 如权利要求2所述的方法,其特征在于,所述确定在所述出行时间段需要前往的目标公交车站,并根据终端的位置和运动状态进行到站检测,包括:
    若所述出行时间段为上班通勤时间段,且所述当前位置为家所在位置,则检测是否离开所述当前位置;当检测到已离开所述当前位置时,确定在所述上班通勤时间段需要前往的目标公交车站,并启动所述到站检测;或者
    若所述出行时间段为下班通勤时间段,且所述当前位置为办公地点所在位置,则检测是否离开所述当前位置;当检测到已离开所述当前位置时,确定在所述下班通勤时间段需要前往的目标公交车站,并启动所述到站检测。
  4. 如权利要求3所述的方法,其特征在于,所述检测是否离开所述当前位置,包括:
    检测在所述当前位置接入的无线局域网的信号;
    当无法检测到所述无线局域网的信号时,确定已离开所述当前位置。
  5. 如权利要求2-4任一项所述的方法,其特征在于,所述确定在所述出行时间段需要前往的目标公交车站,包括:
    根据当前位置的经纬度坐标,查询公交出行数据中以所述经纬度坐标为中心的设定范围内的公交车站;其中,所述公交车出行数据包括至少一个经纬度坐标以及所述至少一个经纬度坐标各自对应的公交车站信息;
    将查询到的公交车站确定为在所述出行时间段需要前往的目标公交车站。
  6. 如权利要求2-5任一项所述的方法,其特征在于,所述到站检测,包括:
    根据所述出行时间段的截止时间确定所述到站检测的超时时间;
    在所述超时时间到达之前,根据运动状态占比启动位置定位,获得当前位置,根据所述当前位置与所述目标公交车站间的距离,确定是否到达所述目标公交车站;其中,所述运动占比用于表征当前时间与上次位置定位时间之间的时间间隔内终端处于运动的时长占所述时间间隔的比例;
    当所述超时时间到达时,结束所述到站检测。
  7. 如权利要求6所述的方法,其特征在于,若确定未到达所述目标公交车站,则所述方法还包括:
    根据当前位置与所述目标公交车站间的距离以及运动状态,确定下次启动位置定位的时间;
    当所述下次启动位置定位的时间到达时,确定当前的运动占比;
    若所述当前动占比大于或等于所述设定阈值,则启动位置定位,获得当前位置,根据所述当前位置与所述目标公交车站间的距离,确定是否到达所述目标公交车站。
  8. 如权利要求2-7任一项所述的方法,其特征在于,所述根据所述到站检测确定到达所述目标公交车站,包括:
    根据所述到站检测,获得当前位置的经纬度坐标和所述目标公交车站对应的经纬度坐标之间的距离,若所述距离小于设定阈值,则确定到达所述目标公交车站;或者
    根据所述到站检测,获得当前位置的经纬度坐标和所述目标公交车站对应的经纬度坐标之间的距离并获得当前位置的小区信号,若所述距离小于或等于设定阈值,并且所述当前位置的小区信号与所述目标公交车站所在小区的小区信号匹配且信号强度大于设定阈值,则确定到达所述目标公交车站。
  9. 如权利要求2-8任一项所述的方法,其特征在于,所述方法还包括:
    获取所述出行时间段内的下车车站,当检测到进入所述下车车站所在范围时,执行所述公交乘车服务;和/或
    获取所述出行时间段内的换乘车站,当检测到进入所述换乘车站所在范围时,执行所述公交乘车服务。
  10. 如权利要求9所述的方法,其特征在于,所述获取所述出行时间段内的下车车站,包括:
    查询公交出行数据集合,所述公交出行数据集合是根据公交乘车出行的历史数据学习到的,所述公交出行数据集合中包括至少一个数据记录,所述数据记录中至少包括出行时间段、公交车站信息;
    获取所述公交出行数据集合中,出行时间段与所述出行时间段匹配且设置有下车标识的数据记录,根据所述数据记录中的公交车站信息得到所述出行时间段内的下车车站。
  11. 如权利要求9所述的方法,其特征在于,所述获取所述出行时间段内的换乘车站,包括:
    查询公交出行数据集合,所述公交出行数据集合是根据公交乘车出行的历史数据学习到的,所述公交出行数据集合中包括至少一个数据记录,所述数据记录中至少包括出行时间段、公交车站信息;
    获取所述公交出行数据集合中,出行时间段与所述出行时间段匹配且设置有换乘标识的数据记录,根据所述数据记录中的公交车站信息得到所述出行时间段内的换乘车站。
  12. 如权利要求1-11任一项所述的方法,其特征在于,还包括:
    当检测到公交出行应用程序相关的用户操作时,启动位置定位,获得当前位置的经纬度坐标;
    根据当前位置的经纬度坐标,查询对应的公交车站信息。
  13. 如权利要求1-12任一项所述的方法,其特征在于,所述执行公交乘车服务,包括以下至少一项:
    显示标识码,所述标识码用于公交车乘车支付;
    提示使用公交乘车应用程序进行公交乘车支付;
    推荐用于公交乘车支付的应用程序;
    提示当前到达的公交车站;
    获取所述当前位置所在的公交车站停靠的公交车的达到时间,输出所述达到时间。
  14. 如权利要求1-13任一项所述的方法,其特征在于,所述方法还包括:
    对公交乘车出行的数据进行采集,得到公交乘车出行的历史数据;
    对所处公交乘车出行的历史数据进行挖掘,得到用于位置定位的公交出行数据;其中,所述公交出行数据中包括至少一个数据记录,所述至少一个数据记录中的每个数据记录中包括出行时间段、公交车站位置信息、公交车站站名;其中,所述公交车站位置信息包括公交车站的经纬度坐标和/或所述经纬度坐标所属的聚类类别。
  15. 如权利要求14所述的方法,其特征在于,所述公交出行数据中的至少一个数据记录中还包括:上下车标识和/或换乘标识。
  16. 如权利要求14-15任一项所述的方法,其特征在于,所述公交出行数据中的至少一个数据记录中还包括:小区信号信息,所述小区信号信息包括小区标识。
  17. 如权利要求14-16任一项所述的方法,其特征在于,所述对公交乘车出行的数据进行采集,包括:
    检测到公交乘车支付操作时获取公交站乘车数据,所述公交站乘车数据包括时间信息、当前的位置信息和运动状态,所述位置信息包括经纬度坐标;其中,所述公交乘车支付操作包括公交车上车支付操作和/或公交车下车支付操作。
  18. 一种数据处理方法,其特征在于,包括:
    检测公交乘车支付操作,所述公交乘车支付操作包括公交车上车支付操作和/或公交车下车支付操作;
    响应于所述公交乘车支付操作,获取公交站乘车数据,所述公交站乘车数据包括时间信息、当前的位置信息和运动状态,所述位置信息包括经纬度坐标;
    记录所述公交站乘车数据。
  19. 如权利要求18所述的方法,其特征在于,所述公交站乘车数据,还包括:小区信号信息,所述小区信号信息来自于终端接收到的小区信号,所述小区信号信息包括小区标识。
  20. 如权利要求18-19任一项所述的方法,其特征在于,还包括:
    根据采集到的公交站乘车数据,得到用于位置定位的公交出行数据;其中,所述公交出行数据中包括至少一个数据记录,所述至少一个数据记录中的每个数据记录中包括出行时间段、公交车站位置信息、公交车站站名;其中,所述公交车站位置信息包括公交车站的经纬度坐标和/或所述经纬度坐标所属的聚类类别。
  21. 如权利要求20所述的方法,其特征在于,所述公交出行数据中的至少一个数据记录中还包括:上下车标识和/或换乘标识。
  22. 如权利要求20所述的方法,其特征在于,所述公交出行数据中的至少一个数据记录中还包括:小区信号信息,所述小区信号信息包括小区标识。
  23. 如权利要求20-22任一项所述的方法,其特征在于,所述根据采集到的公交站乘车数据,得到用于位置定位的公交出行数据,包括:
    根据所述公交站乘车数据中包括的评估信息,选取置信度满足要求的公交站乘车数据;
    根据所述置信度满足要求的公交站乘车数据,得到所述用于位置定位的公交出行数据。
  24. 如权利要求20-23任一项所述的方法,其特征在于,所述根据采集到的公交站乘车数据,得到用于位置定位的公交出行数据,包括:
    根据对所述公交站乘车数据中的经纬度坐标进行空间聚类,得到至少一个乘车位置聚 类类别,所述至少一个乘车位置聚类类别中的每个聚类类别对应一个经纬度坐标;
    分别根据所述至少一个乘车位置聚类类别对应的经纬度坐标,获取对应的公交车站信息;
    根据对属于同一乘车位置聚类类别的公交站乘车数据中的时间信息进行统计,得到与所述乘车位置聚类类别对应的出行时间段;
    根据一个星期中的同一天内的所有乘车位置聚类类别对应的出行时间段,确定所述同一天对应的出行时间段。
  25. 如权利要求24所述的方法,其特征在于,所述方法还包括:
    根据所述公交站乘车数据中的运动状态,确定对应的公交乘车支付操作的行为类型,所述公交车乘车支付操作的行为类型为上车支付和下车支付中的一项;
    根据确定出的公交乘车支付操作的行为类型,添加上车标识或下车标识。
  26. 如权利要求20-25任一项所述的方法,其特征在于,所述方法还包括:
    根据同一天的出行时间段内到达过的各公交车站以及达到所述各公交车站的先后顺序,确定所述各公交车站中的换乘车站;
    在所述换乘车站对应的数据记录中设置换乘标识。
  27. 一种通信装置,其特征在于,包括:一个或多个处理器;其中,当一个或多个计算机程序的指令被所述一个或多个处理器执行时,使得所述通信装置执行如权利要求1-17中任一项所述的方法,或者权利要求18-26中任一项所述的方法。
  28. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在计算设备上运行时,使得所述计算设备执行权利要求1-17中任一项所述的方法,或者权利要求18-26中任一项所述的方法。
  29. 一种芯片,其特征在于,所述芯片与存储器耦合,用于读取并执行所述存储器中存储的程序指令,以实现权利要求1-17中任一项所述的方法,或者权利要求18-26中任一项所述的方法。
  30. 一种计算机程序产品,其特征在于,所述计算机程序产品在被计算机调用时,使得所述计算机执行权利要求1-17中任一项所述的方法,或者权利要求18-26中任一项所述的方法。
PCT/CN2022/138753 2021-12-30 2022-12-13 一种基于位置定位的服务实现方法、数据处理方法及装置 WO2023124986A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111652256.7 2021-12-30
CN202111652256.7A CN116418831A (zh) 2021-12-30 2021-12-30 一种基于位置定位的服务实现方法、数据处理方法及装置

Publications (1)

Publication Number Publication Date
WO2023124986A1 true WO2023124986A1 (zh) 2023-07-06

Family

ID=86997747

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138753 WO2023124986A1 (zh) 2021-12-30 2022-12-13 一种基于位置定位的服务实现方法、数据处理方法及装置

Country Status (2)

Country Link
CN (1) CN116418831A (zh)
WO (1) WO2023124986A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151168A (zh) * 2018-07-20 2019-01-04 阿里巴巴集团控股有限公司 乘车码的切换方法、装置、移动终端及可读存储介质
CN109614025A (zh) * 2018-11-26 2019-04-12 努比亚技术有限公司 乘车码显示控制方法、移动终端及计算机可读存储介质
CN110636174A (zh) * 2019-10-09 2019-12-31 维沃移动通信有限公司 乘车码调出方法及移动终端
CN111966439A (zh) * 2020-08-25 2020-11-20 维沃移动通信有限公司 乘车码显示方法、装置及电子设备
WO2021203835A1 (zh) * 2020-04-09 2021-10-14 Oppo广东移动通信有限公司 公共交通到站提醒方法、装置、存储介质及移动终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151168A (zh) * 2018-07-20 2019-01-04 阿里巴巴集团控股有限公司 乘车码的切换方法、装置、移动终端及可读存储介质
CN109614025A (zh) * 2018-11-26 2019-04-12 努比亚技术有限公司 乘车码显示控制方法、移动终端及计算机可读存储介质
CN110636174A (zh) * 2019-10-09 2019-12-31 维沃移动通信有限公司 乘车码调出方法及移动终端
WO2021203835A1 (zh) * 2020-04-09 2021-10-14 Oppo广东移动通信有限公司 公共交通到站提醒方法、装置、存储介质及移动终端
CN111966439A (zh) * 2020-08-25 2020-11-20 维沃移动通信有限公司 乘车码显示方法、装置及电子设备

Also Published As

Publication number Publication date
CN116418831A (zh) 2023-07-11

Similar Documents

Publication Publication Date Title
US20210191979A1 (en) Distributed video storage and search with edge computing
US20230403530A1 (en) Determining a significant user location for providing location-based services
Hu et al. Smartroad: Smartphone-based crowd sensing for traffic regulator detection and identification
EP3790292A1 (en) Method and apparatus for activating near field communication card
US20150087264A1 (en) Contextually Aware Mobile Device
EP3796682A1 (en) Geo-fencing based upon semantic location
US20130303198A1 (en) Inferring a context from crowd-sourced activity data
Vhaduri et al. Discovering places of interest using sensor data from smartphones and wearables
CN105023020A (zh) 语义标注设备及其方法
WO2023071804A1 (zh) 一种基于位置定位的服务实现方法、数据处理方法及装置
CN108171965B (zh) 到站提醒方法、装置、存储介质及移动终端
CN111629337B (zh) 一种控制搜网的方法及终端
Higuchi et al. Mobile devices as an infrastructure: A survey of opportunistic sensing technology
CN107995367B (zh) 到站提醒方法、装置、存储介质及移动终端
JP6358247B2 (ja) 情報処理装置、情報処理方法およびプログラム
CN109974726A (zh) 一种道路通行状态确定方法及装置
WO2023124986A1 (zh) 一种基于位置定位的服务实现方法、数据处理方法及装置
CN116668580B (zh) 场景识别的方法、电子设备及可读存储介质
CN116033343B (zh) 卡片的显示方法及电子设备
CN114879879B (zh) 一种显示健康码的方法、电子设备及存储介质
KR20210078203A (ko) 거점 기반의 프로파일링 방법 및 이를 이용하는 단말기
CN112444831B (zh) 一种用于gps数据采集的终端省电方法、装置和智能终端
CN115550843B (zh) 一种定位方法及相关设备
CN105991822B (zh) 终端应用的控制方法及装置
JP2023091673A (ja) 位置検索システムおよび位置検索方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914241

Country of ref document: EP

Kind code of ref document: A1