A method for identifying a means of transportation used for travel, a terminal device and a storage medium
By identifying the movement interval and start and end time points of the terminal device, combined with the preset travel mode recognition model, the problem of insufficient accuracy of the terminal device in identifying travel modes is solved, achieving higher recognition accuracy and user experience optimization.
Patent Information
- Application Number
- CN202310859421.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-07-12
AI Technical Summary
Existing terminal devices have insufficient accuracy when identifying the means of transportation used by users to travel, especially due to the overlap in the moving speeds of different means of transportation, resulting in inaccurate recognition results.
By identifying the movement interval of the terminal device within the specified time interval and determining the start and end time points of the target movement interval, the preset travel mode recognition model is used to identify these intervals and determine the means of transportation used for travel. The method includes constructing travel mode samples, using artificial construction and samples collected by terminal equipment, correcting the start and end time points, and optimizing the recognition results under combined conditions.
It improves the terminal device's recognition accuracy of users' transportation means, and can respond in advance and optimize user operations during a specific period of time, such as displaying payment code icons and providing convenient payment services.
Smart Images

Figure CN117061990B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a method for identifying a means of transportation used for travel, a terminal device, and a storage medium. Background Art
[0002] With the research and development of terminal technology, the functions that terminal devices can realize are becoming more and more extensive. As a new function of terminal devices, the identification of the means of transportation used by users when traveling can identify user behavior. For example, by measuring the moving speed of the terminal device carried by the user, the means of transportation used by the user can be identified.
[0003] Currently, terminal devices can identify the means of transportation used for travel by collecting the user's moving speed, thereby providing personalized services to users and improving user experience. However, due to the overlap of moving speeds of different means of transportation on the terminal side, the accuracy of identifying the means of transportation used for travel needs to be improved. Summary of the invention
[0004] The embodiments of the present application provide a method for identifying a means of transportation used for travel, a terminal device, and a storage medium, which can improve the accuracy of the terminal device in identifying the means of transportation used by a user for travel.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a method for identifying a means of transportation used for travel is provided, which is applied to a terminal device, and the method includes: identifying a moving interval of the terminal device within a specified time interval; selecting at least one target moving interval from the moving interval, and determining the start and end time points of each target moving interval in the at least one target moving interval; any target moving interval in the at least one target moving interval corresponds to one of a plurality of specified means of transportation; and using a preset travel mode recognition model to identify the at least one target moving interval, and determining the means of transportation used for travel in each target moving interval.
[0007] When the technical solution provided in this embodiment is used to identify the means of transportation used for travel, the moving interval is first identified, and then at least one target moving interval is determined, as well as the start and end time points of each target moving interval. Then, the at least one target moving interval is identified using a preset travel mode identification model, and the means of transportation used for travel in each target moving interval is determined. This can improve the accuracy of the terminal device in identifying the means of transportation used by the user for travel.
[0008] In a possible implementation manner of the first aspect, it also includes: constructing the preset travel mode identification model according to the travel mode sample.
[0009] In a possible implementation manner of the first aspect, the travel mode sample includes: at least one of: an artificially constructed sample, a sample collected from the terminal device, and a sample constructed through a questionnaire.
[0010] In a possible implementation manner of the first aspect, before identifying the at least one target movement interval using a preset travel mode identification model, the method further includes: correcting the start and end time points of the target movement interval.
[0011] In a possible implementation manner of the first aspect, the correcting the start and end time points of the target moving interval includes: correcting using preset transportation tool events that match transportation tools corresponding to each target moving interval.
[0012] In a possible implementation manner of the first aspect, when the means of transportation is a subway, the preset means of transportation event matching the subway includes: a subway card code scanning event.
[0013] In a possible implementation manner of the first aspect, when the transportation tool is a bus, the preset transportation tool event matching the bus includes: a bus card code scanning event.
[0014] In a possible implementation manner of the first aspect, when the means of transportation is a taxi, the preset means of transportation event that matches the taxi includes: a taxi order event.
[0015] In a possible implementation manner of the first aspect, before identifying the at least one target movement interval using a preset travel mode recognition model, it also includes: merging adjacent target movement intervals when adjacent target movement intervals meet a preset merging condition.
[0016] In a possible implementation of the first aspect, the preset merging condition includes: when the transportation tools corresponding to adjacent target moving intervals are the same, and the time interval between the adjacent target moving intervals is less than a preset first time interval, the adjacent target moving intervals are merged into one target moving interval. It should be noted that the speed can be used to preliminarily identify the transportation tools corresponding to each target moving area, and then the travel mode recognition model is used to determine the transportation tools used for each target moving interval.
[0017] In a possible implementation manner of the first aspect, the preset merging condition includes: when adjacent target moving intervals correspond to different means of transportation, and the time interval between the adjacent target moving intervals is less than a preset second time interval, the adjacent target moving intervals are merged into one target moving interval.
[0018] In a second aspect, the present application provides a terminal device, comprising: a memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the terminal device executes the method described in the first aspect or any possible implementation method of the first aspect.
[0019] In a third aspect, the present application provides a computer-readable storage medium comprising computer instructions, which, when executed on a terminal device, causes the terminal device to execute the method described in the first aspect or any possible implementation of the first aspect.
[0020] In a fourth aspect, the present application provides a computer program product including program instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any first possible implementation. For example, the computer may be the terminal device described above.
[0021] In a fifth aspect, the present application provides a chip system, which is applied to the above-mentioned terminal device. The chip system includes an interface circuit and a processor. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from a memory and send a signal to the processor, and the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the terminal device executes the method described in the above-mentioned first aspect and any possible implementation thereof.
[0022] It can be understood that the technical solutions provided in the above-mentioned second to fifth aspects can respectively correspond to any solution provided in the first aspect and its possible implementation, and the beneficial effects that can be achieved are similar, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1A A schematic diagram of a flow chart of a method for identifying a means of transportation used for travel provided in an embodiment of the present application;
[0024] Figure 1B A schematic diagram of a flow chart of a method for identifying a means of transportation used for travel provided in another embodiment of the present application;
[0025] Figure 2A A schematic diagram of a display interface of a terminal device provided in an embodiment of the present application;
[0026] Figure 2B A schematic diagram of another display interface of a terminal device provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of a method for identifying a means of transportation used for travel provided in an embodiment of the present application;
[0028] Figure 4A A schematic diagram of a method for constructing, training and using a travel mode identification model provided in an embodiment of the present application;
[0029] Figure 4B A schematic diagram of an example of a base station location provided in an embodiment of the present application;
[0030] Figure 4C A schematic diagram of an example of a base station location and payment behavior in a sample provided in an embodiment of the present application;
[0031] Figure 4D A schematic diagram of an example of a base station location and payment behavior in a sample provided in an embodiment of the present application;
[0032] Figure 4E A schematic diagram of an example of a base station location and payment behavior in a sample provided in an embodiment of the present application;
[0033] Figure 4F This is a schematic diagram of a target moving interval merging process in an embodiment of the present application;
[0034] Figure 4G This is a schematic diagram of a target moving interval merging process in an embodiment of the present application;
[0035] Figure 5 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application when it is a mobile phone;
[0036] Figure 6 A schematic diagram of the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] An embodiment of the present application provides a method for identifying a means of transportation used for travel. The moving interval can be first identified according to the moving speed, at least one target moving interval can be determined, and the start and end time points of each target moving interval can be determined. Then, at least one target moving interval can be identified using a preset travel mode identification model, and the means of transportation used for travel in each target moving interval can be determined. This method can improve the accuracy of the terminal device in identifying the means of transportation used for user travel.
[0038] After the means of transportation used for travel is identified by the method for identifying the means of transportation used for travel provided by the embodiment of the present application, the terminal device can be triggered to respond to the means of transportation used for travel in a specific time period, for example, a payment code matching the means of transportation used is displayed on the interface of the mobile terminal, such as Figure 2A As shown, Figure 2A It is the default display interface of the terminal device. When it is predicted that you will take the bus after a certain time period, the icon corresponding to the payment code can be displayed on the terminal display interface, such as Figure 2B As shown, the user's operation when taking the bus can be optimized through the payment code icon in the operation interface.
[0039] The user data collected by the terminal device may include: current time, Wi-Fi data, speed data, user location, base station identification and other information. When identifying the means of transportation used for travel, it is usually necessary to consider the user location. The following are some solutions for obtaining the user location.
[0040] In one possible implementation, the terminal device can determine the current user location by scanning the surrounding Wi-Fi access points (Access Point, AP). Specifically, the terminal device can start the Wi-Fi function to scan nearby Wi-Fi access points and collect nearby Wi-Fi access point data. Each Wi-Fi access point has a corresponding Media Access Control (Media Access Control, MAC) address, which corresponds to the geographical location of the Wi-Fi access point. The Wi-Fi access point data collected by the terminal device may include the MAC address and the received signal strength. The terminal device can calculate the current user location based on the collected MAC addresses and received signal strengths of each Wi-Fi access point.
[0041] Since Wi-Fi coverage is small, the terminal device can use Wi-Fi positioning to locate the current user location more accurately. When users travel, they may need to perform Wi-Fi scans multiple times to different places. The location of the terminal device can be located through scanning.
[0042] In another possible implementation, the terminal device may determine the current user location by means of a positioning fence to achieve positioning. Specifically, the terminal device may use a preset base station identifier list as a static space fence. The static space fence corresponds to the base station location where the user may have a user behavior. When the base station identifier of the base station to which the terminal device is currently connected is in the preset base station identifier list, it can be considered that the user is located at the base station location of the static space fence. If the base station identifier of the base station to which the terminal device is currently connected is not in the preset base station identifier list, it can be considered that the user is not currently at the base station location of the static space fence. For example, if Figure 4B As shown in the figure, the route from the company to the mall passes through five base stations represented by base station identifiers, namely base station 1, base station 2, base station 3, base station 4 and base station 5. It can be seen that each base station identifier indicates a geographical location, and the base station locations indicated by different base station identifiers may overlap. When a terminal device accesses a base station, it will obtain the base station identifier of the base station and communicate through the mobile communication network provided by the base station. FIG. 4C to FIG. 4EAs shown, in some samples, payment operations can communicate by connecting to different base stations, and the payment time and corresponding base station identifier of each sample payment operation can be collected. Through this information, it can be determined that a payment action will occur within a specific time interval in the subsequent prediction, and the payment code icon or scan icon can be displayed on the interface of the terminal device in advance to facilitate timely payment when the payment event occurs. It can be understood that when the payment operation is determined to occur between 18:00 and 18:30, the display interface of the terminal device can be updated at 18:00 to display the payment code logo or scan logo. After 18:30, the display interface of the terminal device can be restored to the default display interface.
[0043] like Figure 3 As shown, Figure 3 is a schematic diagram of a method for identifying a means of transportation used for travel provided in an embodiment of the present application. The terminal device can obtain the user's trajectory information within a period of time before the current moment (such as a first preset period of time, such as 0:00 on the previous day to 0:00 on the current day), such as Figure 3 As shown in the track 3-3' in the figure. The track information includes the moving speed information of the terminal device, and the moving interval in which the mobile terminal is in a moving state within the first preset time period can be identified according to the speed information. It should be noted that although the mobile terminal moves, different speeds correspond to different moving states of the user. For example, when the user is taking a walk, the moving speed of the mobile terminal is low. When the user is working in the company, the moving speed of the mobile terminal is 0 or low, and at this time the mobile terminal moves in a smaller range.
[0044] Figure 3 The positions corresponding to the midpoints A, B, and C are the stop points, where the user may be shopping in a mall, working in an office, or walking in a park, etc. When the user's movement trajectory is mapped onto the timeline, it can be mapped into multiple areas, such as E1, E2, E3, E4, E5, and E6, etc.
[0045] Get the start time and end time between the stop points as the initial travel start and end time. Between the two stop points, there is a moving trajectory in a moving state, which may include walking, running, and traveling by public transportation. The end time of the previous stop point and the start time of the subsequent stop point between the two stop points form the start and end time of the moving trajectory, which can form the following initial moving trajectory sequence [(E1, S2), (E2, S3), (E3, S4), ...,], where E1 is the abbreviation of the end time of the first stop point, S2 is the start time of the second stop point, and E2 is the end time of the second stop point, and so on. Get the cleaned motion trajectory and construct a more complete start and end time sequence. Through the previous processing, we can obtain the initialized moving trajectory including walking and running, not just the moving trajectory of the means of transportation. Therefore, it is necessary to further screen the moving trajectories corresponding to the means of transportation such as subways, buses, and rides.
[0046] In some embodiments, the multimodal sensor data platform (MSDP) identifies the movement trajectory, and the MSDP can obtain the speed information of the corresponding trajectory of the terminal device. According to the MSDP, the entry and exit states of the movement states of the subway, bus, and car can be determined (real-time judgment by hardware such as accelerators and gyroscopes). Between the initialized movement trajectories obtained above, the start and end point times of the movement states of the subway, bus, and car given by the MSDP are used as the start and end point time series for further improvement, for example, it can be determined by using the movement speeds corresponding to different means of transportation.
[0047] It should be noted that when using MSDP for vehicle identification, due to the overlap of speeds of different vehicles, there will be errors in using MSDP, and there will be overlaps and conflicts in trajectories, which need to be resolved. For example, for the trajectories of the same MSDP within a preset time interval, such as within 5 minutes, they can be merged into the same moving trajectory. Figure 4FAs shown, according to the historical trajectory information combined with the speed, it can be determined that the moving intervals include: moving interval 1, moving interval 2, moving interval 3, moving interval 4, moving interval 5, moving interval 6 and moving interval 7. Further, the target moving intervals using transportation tools are screened from the moving intervals, including: the first target moving interval, the second target moving interval and the third target moving interval. If it is preliminarily determined that the transportation tool used in the first target moving interval is a taxi, the transportation tool used in the second target moving interval is a taxi, and the transportation tool used in the third target moving interval is a subway, and the interval between the end time of the first target moving interval and the start time of the second target moving interval is 3 minutes, and the interval between the end time of the second target moving interval and the start time of the third target moving interval is 7 minutes. Then the first target moving interval and the second target moving interval can be merged, and the merged one is a new first target moving interval, the transportation tool used is a taxi, and the original third target moving interval is updated to the second target moving interval.
[0048] For the movement trajectories of different types of MSDPs with a short distance, the movement trajectories within 2 minutes can be merged into the same movement trajectory. Figure 4G As shown, according to the historical trajectory information combined with the speed, the moving intervals can be determined to include: moving interval 1, moving interval 2, moving interval 3, moving interval 4, moving interval 5, moving interval 6 and moving interval 7. Further, the target moving intervals using transportation tools are screened from the moving intervals, including: the first target moving interval, the second target moving interval and the third target moving interval. If it is preliminarily determined that the transportation tool used in the first target moving interval is a taxi, the transportation tool used in the second target moving interval is a subway, and the transportation tool used in the third target moving interval is a bus, and the interval between the end time of the first target moving interval and the start time of the second target moving interval is 1 minute, and the interval between the end time of the second target moving interval and the start time of the third target moving interval is 10 minutes. Then the first target moving interval and the second target moving interval can be merged, and the merged one is a new first target moving interval, the transportation tool used is a taxi, and the original third target moving interval is updated to the second target moving interval.
[0049] In addition, the time points when the signal is missing or turned off can be processed separately as a segment. Then, when it is initially determined that the person is traveling by means of transportation, the travel mode identification model can be used to identify the means of transportation used in each moving interval. The means of transportation used for the trip can be determined by identification. The means of transportation can be one or more of the specified means of transportation, such as: bus, subway, taxi, etc.
[0050] The terminal device can collect user data and identify user behavior through the collected user data. Furthermore, the method can be applied to scenarios where some events are predicted. By identifying the means of transportation used for travel, the user's behavior is predicted to better provide convenience for the user. For example, the terminal device can start or prompt target applications related to the means of transportation used for travel in advance, such as starting a check-in application, a map application, etc. in advance. The terminal device can display application icons of target applications related to user behavior in the display interface, such as displaying function icons, payment code icons, scanning icons, etc. of the map application in the display interface. Exemplarily, if the terminal device is a mobile phone, combined with information such as location and time, it can be predicted that the user is about to use the bus. The display interface of the mobile phone can be displayed as follows: Figure 2B As shown. It can be seen that at this time, the display interface of the mobile phone displays the function icons of the payment application (such as "payment code", "scan", etc.). If the user wants to use the mobile phone to pay, the user can see the function icons of the payment application by operating the mobile phone to open the display interface. The mobile phone can provide users with quick payment services and convenience through the function icons of the payment application.
[0051] Exemplarily, the terminal device described in the embodiments of the present application can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR)\virtual reality (VR) device, a media player, a wearable device, and the like.
[0052] In the embodiment of the present application, the terminal device is as follows Figure 5 Taking the mobile phone 500 as an example, the hardware structure of the terminal device is introduced through the mobile phone 500. Figure 5As shown, the mobile phone 500 may include: a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a mobile communication module 550, a wireless communication module 560, an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an earphone interface 570D, a sensor module 580, a button 590, a motor 591, an indicator 592, a camera 593, a display screen 594, and a subscriber identification module (SIM) card interface 595, etc.
[0053] The processor 510 may include one or more processing units, for example, the processor 510 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), a driver processor, etc. Different processing units may be independent devices or integrated into one or more processors. The processor 510 may be the nerve center and command center of the mobile phone 500. The processor 510 may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0054] The processor 510 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 510 is a cache memory. The memory may store instructions or data that the processor 510 has just used or cyclically used. If the processor 510 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 510, and thus improves the efficiency of the system.
[0055] The external memory interface 520 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 500. The external memory card communicates with the processor 510 through the external memory interface 520 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0056] The internal memory 521 may be used to store computer executable program codes, which include instructions. The processor 510 executes various functional applications and data processing of the mobile phone 500 by running the instructions stored in the internal memory 521. For example, in an embodiment of the present application, the processor 510 may execute the instructions stored in the internal memory 521, and the internal memory 521 may include a program storage area and a data storage area.
[0057] The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), a configuration file of the motor 591, etc. The data storage area may store data created during the use of the mobile phone 500 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 521 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0058] The charging management module 540 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 540 charges the battery 542, it can also power the mobile phone 500 through the power management module 541.
[0059] The power management module 541 is used to connect the battery 542, the charging management module 540 and the processor 510. The power management module 541 receives input from the battery 542 and / or the charging management module 540, and supplies power to the processor 510, the internal memory 521, the external memory, the display screen 594, the camera 593, and the wireless communication module 560. In some embodiments, the power management module 541 and the charging management module 540 can also be set in the same device.
[0060] The wireless communication function of the mobile phone 500 can be implemented through antenna 1, antenna 2, mobile communication module 550, wireless communication module 560, modem processor and baseband processor, etc. In some embodiments, the antenna 1 of the mobile phone 500 is coupled with the mobile communication module 550, and the antenna 2 is coupled with the wireless communication module 560, so that the mobile phone 500 can communicate with the network and other devices through wireless communication technology.
[0061] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 500 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0062] The mobile communication module 550 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 500. The mobile communication module 550 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 550 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0063] The mobile communication module 550 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 550 can be set in the processor 510. In some embodiments, at least some functional modules of the mobile communication module 550 can be set in the same device as at least some modules of the processor 510.
[0064] In the embodiment of the present application, the mobile phone 500 can communicate with the base station through the mobile communication module 550 to obtain the base station identifier of the base station where it is located.
[0065] The wireless communication module 560 can provide wireless communication solutions for application in the mobile phone 500, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0066] The wireless communication module 560 may be one or more devices integrating at least one communication processing module. The wireless communication module 560 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 510. The wireless communication module 560 may also receive a signal to be sent from the processor 510, modulate the signal, amplify the signal, and convert it into an electromagnetic wave for radiation via the antenna 2.
[0067] The mobile phone 500 can implement audio functions such as music playing and recording through the audio module 570, the speaker 570A, the receiver 570B, the microphone 570C, the earphone interface 570D, and the application processor.
[0068] The sensor module 580 may include sensors such as a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a Hall sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. The mobile phone 500 may collect various data through the sensor module 580 .
[0069] The mobile phone 500 implements the display function through a GPU, a display screen 594, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 594 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 510 may include one or more GPUs, which execute program instructions to generate or change display information.
[0070] The display screen 594 is used to display images, videos, etc. The display screen 594 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLED, MicroLED, Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0071] The mobile phone 500 can realize the shooting function through the ISP, the camera 593, the video codec, the GPU, the display screen 594 and the application processor. The ISP is used to process the data fed back by the camera 593. The camera 593 is used to capture a static image or a video. In some embodiments, the mobile phone 500 may include one or more cameras 593.
[0072] The button 590 includes a power button, a volume button, etc. The button 590 may be a mechanical button. It may also be a touch button. The motor 591 may generate a vibration prompt. The motor 591 may be used for an incoming call vibration prompt or for touch vibration feedback. The indicator 592 may be an indicator light, which may be used to indicate the charging status, the change in power, or may be used to indicate a message, a missed call, a notification, etc.
[0073] The SIM card interface 595 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 500 by inserting the SIM card interface 595 or pulling the SIM card interface 595 out. The mobile phone 500 can support one or more SIM card interfaces. The SIM card interface 595 can support Nano SIM card, Micro SIM card, SIM card, etc.
[0074] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the terminal device. In other embodiments, the terminal device may also include more or fewer modules than those provided in the above embodiment, and the modules may also adopt different interface connection methods in the above embodiment, or a combination of multiple interface connection methods.
[0075] An operating system runs on the above components, such as the Android open source operating system developed by Google.
[0076] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. In order to more clearly illustrate the touch operation recognition method provided in the embodiment of the present application, the embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software system of the electronic device.
[0077] Above Figure 5 This is just an example of the composition of an electronic device. Figure 6 , which is another composition example of an electronic device provided in an embodiment of the present application.
[0078] In this example, the software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the electronic device is illustrated.
[0079] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime (ART) and native C / C++ library, hardware abstraction layer (HAL) and kernel layer.
[0080] The application layer can include a series of application packages.
[0081] like Figure 6As shown, the electronic device may include a hardware layer and a software layer, wherein the layered Android system may include an application layer, an application framework layer, a system library layer, and a kernel layer. In some optional embodiments, the system of the electronic device may also include layers not mentioned in the above technical architecture, such as Android Runtime. The application layer may include a series of application packages, such as a system user interface (System UI), a video application, a chat application, and a vehicle identification application used for travel.
[0082] Video, chat and other applications are used to provide users with corresponding services. For example, users use video applications to watch videos, chat with other users using chat applications, listen to music using music applications, and use video synthesis to generate memory videos using existing images and videos. The vehicle identification application is used to identify the vehicle used by users in certain time intervals.
[0083] SystemUI is used to manage the human-computer interaction interface (user interface, UI) of the electronic device. In the embodiment of the present application, SystemUI is used to monitor the touch operation on the touch screen.
[0084] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. The application framework layer can include window management service module (window manage service, WMS), display rotation module (also known as DisplayRotation), application management service module (activity manage service, AMS), input management module (also known as Input) and image processing module, etc.
[0085] WMS is used to manage window programs. The window manager can obtain the screen size, determine whether there is a status bar, cut out the image on the screen, capture the screen, etc. In the embodiment of the present application, WMS can create and manage the window corresponding to the application.
[0086] The display rotation module is used to control the screen rotation so that the screen presents a vertical or horizontal layout. For example, when it is determined that the screen needs to be rotated, Surfaceflinger is notified to switch the horizontal and vertical screens of the application interface.
[0087] AMS is used to start specific applications based on user operations. For example, when the image is synthesized, the image is triggered to be displayed on the main screen. After the image is displayed, the image that needs to be cut out is triggered to perform a cutout operation, and an application stack corresponding to the video application is created so that the video application can run normally.
[0088] The system library layer can include multiple functional modules, such as sensor module (also known as sensor) and SurfaceFlinger.
[0089] The sensor module is used to obtain data collected by the sensor, such as collecting ambient light under the screen. Collecting the gravity direction information of the electronic device. Alternatively, the sensor module can also adjust the brightness of the screen according to the ambient light, and determine the horizontal or vertical screen state information of the electronic device according to the gravity direction information of the electronic device. The horizontal or vertical screen state information is used to indicate whether the electronic device is in the horizontal screen state or the vertical screen state.
[0090] Surfaceflinger is a system service used for layer creation, control, and management.
[0091] In addition, the system library layer can also include: surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0092] The kernel layer is a layer between hardware and software. In the embodiment of the present application, the kernel layer at least includes a touch driver module and a display driver module.
[0093] The display driver module is used to display the synthesized image on the screen according to the image data provided by the modules of the application framework layer and the application program of the application layer. For example, the video application passes the image data of a frame of the video to the display driver module, and the display driver module displays the image of a frame in the video on the touch screen according to the image data. SystemUI passes the image data to the display driver module, and the display driver module displays the synthesized image on the screen.
[0094] The touch driver module is used to monitor the capacitance data of each area of the touch screen. When the user clicks or slides on the touch screen, the capacitance value of the clicked or slid area will change. The touch driver module can monitor the change of the capacitance value of each area on the touch screen and send a capacitance value change message to the input management module. The capacitance value data change message carries information such as the change amplitude of the capacitance value of each area of the touch screen and the time of change.
[0095] The input management module can determine the touch operation based on the reported capacitance value change message, and then send the identified touch operation to other modules. The touch operation here can include: knuckle tapping operation, click operation, drag operation, and specific gesture operations (such as swipe gesture operation, swipe gesture operation, etc.).
[0096] The hardware layer includes: hole-punch screen, gesture sensor, ambient light sensor, acceleration sensor, etc.
[0097] The above technical architecture lists the modules and devices that may be involved in this application in the electronic device. In practical applications, the electronic device may include all or part of the modules and devices of the above technical architecture, as well as other modules and devices not mentioned in the above technical architecture. Of course, it may also include only the modules and devices of the above technical architecture, which is not limited in this embodiment.
[0098] The methods in the following embodiments can all be implemented in a terminal device having the above hardware structure. In the following embodiments, the terminal device is a mobile phone, and the method of the embodiment of the present application is introduced by identifying the means of transportation used for travel. Figure 1A As shown, the method provided in the embodiment of the present application may include steps 101 to 103. Among them,
[0099] 101. Identify the movement interval of the terminal device within a specified time interval.
[0100] In some possible implementations, the moving speed of the terminal device within a specified time obtained by MSDP may be used to identify the moving interval of the terminal device. For example, a time interval in which the moving speed is greater than 0.2 m / s may be determined as the moving interval.
[0101] 102. Filter out at least one target moving interval from the moving intervals, and determine the start and end time points of each target moving interval in the at least one target moving interval.
[0102] Among them, any target moving interval in at least one target moving interval corresponds to one of the specified multiple means of transportation. In some embodiments, the moving intervals corresponding to non-transportation tools such as walking and jogging can be screened out, and the moving intervals with speeds greater than a certain threshold can be determined as target moving intervals. The average speeds of different transportation tools are different, and the intervals with speeds greater than the threshold can be screened out from the moving intervals as target moving intervals based on the speed. The start and end time points of each target moving interval can be determined based on the matching of the specific speed with the average operating speeds of different transportation tools.
[0103] It should be noted that there are errors such as delay when using MSDP, which makes the start and end time points of the determined target moving interval deviate. Therefore, in order to improve the accuracy of recognition, the start and end time points of the target moving interval can be corrected, such as Figure 1B As shown, in some embodiments, step 1021 may also be included.
[0104] 1021. Use the preset transportation events that match the transportation corresponding to each target moving interval to correct the start and end time points.
[0105] In some possible implementations, when the transportation means is a subway, the preset transportation means event matching the subway may include: a subway card code scanning event.
[0106] In some possible implementations, when the transportation tool is a bus, the preset transportation tool event matching the bus may include: a bus card code scanning event.
[0107] In some possible implementations, when the vehicle is a taxi, the preset vehicle event that matches the taxi may include: a taxi order event.
[0108] 103. Use a preset travel mode identification model to identify at least one target movement interval and determine the means of transportation used for traveling in each target movement interval.
[0109] In some possible implementations, the travel mode identification model can be a Light Gradient Boosting Machine (LGB) model. The travel mode identification model can be obtained through training, and the samples used in the training can be samples obtained by manually annotating actual data, or samples constructed manually. With the use of the application, more and more actual data are generated, and the sample library can be continuously supplemented. Therefore, when training the model, more data is constructed by users in the early stage, and less data is constructed manually in the later stage. High-frequency travel modes can be under-sampled, and the samples constructed and annotated manually in the later stage mainly include samples corresponding to abnormal events and events with insufficient samples. When using samples for training, part of the samples can be used as a test set and the other part as a training set. For example, 30% of the samples can be used as a test set and 70% of the samples can be used as a training set.
[0110] In some possible implementations, the method may further include: constructing a preset travel mode recognition model according to the travel mode samples. The travel mode samples may include: at least one of: manually constructed samples, samples collected from the terminal device, and samples constructed through questionnaires.
[0111] When constructing samples, at least one of the following aspects can be considered: trajectory structuring results, speed / acceleration information, signal features, fence trigger information, travel-related software behavior, travel order identification, city characteristics, other events, etc.
[0112] The trajectory structure result may include: the motion state identified by the trajectory structure or the duration identified by the trajectory structure.
[0113] Speed / acceleration information may include: combining speed thresholds and acceleration thresholds corresponding to different travel modes to construct speed and / or acceleration values, for example, the speed threshold for buses is 34m / s, and the acceleration threshold is 2m / s 2 ; The speed threshold for cars (including taxis) is 50m / s, and the acceleration threshold is 10m / s 2 ; The speed threshold for cars (including taxis) is 50m / s, and the acceleration threshold is 10m / s 2 ; The speed threshold of the subway is 25m / s, and the acceleration threshold is 5m / s 2 ; The speed threshold of the train is 80m / s, and the acceleration threshold is 3m / s 2 wait.
[0114] Signal features may include at least one of the following features: connection with the vehicle-mounted Bluetooth, connection with the vehicle-mounted WiFi (distinguishing between the WiFi on buses and the WiFi on trains), the number of scans of the vehicle-mounted WiFi (or train WiFi, or bus WiFi), the proportion of the time interval between the first and last scans of the vehicle-mounted WiFi (or train WiFi) in the total moving trajectory time, the proportion of the time interval between the first and last scans of the vehicle-mounted WiFi (bus WiFi) in the total moving trajectory time), the proportion of time spent in cells along the subway, the mobile phone has no signal or is turned off, the mobile phone has no signal or is turned off for 20 minutes, etc.
[0115] Fence trigger information may include at least one of the following information: subway fence events (entry and exit), the number of entries and exits of subway stations, the first and last time of entries and exits of subway stations, train station fences (starting and ending points), the number of entries and exits of train stations, the time of entries and exits of train stations, the entry and exit and duration of triggering the gas station fence reaching 3 minutes, the number of entries and exits of bus stops, or the first and last time of entries and exits of bus stops.
[0116] Travel-related software behaviors may include at least one of the following information: perception of the immediate taxi-hailing page, use of taxi-hailing apps (Didi Taxi, Meihui Taxi), installation of car apps, parking apps or use of mini-programs on mobile phones, use of car apps, use of bus apps (Baidu Real-time Bus, Bus Coming, Palm Bus), driving navigation mode, etc.
[0117] Travel order identification may include at least one of the following information: ride events identified by the order (start time, mode of transportation), data donated by a third party (such as data donated by Baidu Taxi), payment behavior, ride code page identification (distinguishing between subway and bus rides), ride code page identification times (ordinary code scanning), subway code page identification times (subway code scanning), or shared bicycle code scanning page identification, etc.
[0118] The city characteristic information may include at least one of the following information: whether the city has a subway and supports subway fences, whether the starting and ending points are across cities, the starting and ending cities, or the ending city, etc.
[0119] Other events may include: wrist flip events, refueling text messages, traffic violation text messages, insurance text messages, etc.
[0120] In order to improve the accuracy of recognition, the samples can be further processed, such as data enhancement. The data enhancement methods can include: random feature deletion, sample scrambling, synonym replacement, proportional sampling, etc. For example, proportional sampling can determine the number of samples corresponding to a certain scene based on the proportion of the specific scene. For example, in the sample, payment behaviors appear randomly in scenes such as subways, buses, and trains. For some key features, such as the payment behavior of taking a taxi, there is a small probability that it will disappear.
[0121] like Figure 4A As shown, the travel mode samples can be Figure 4A The method shown in is obtained by training the samples.
[0122] In the early stage of model training, the actual sample data is relatively small, and samples can be constructed manually or through questionnaires. With the use of this method on the mobile phone, samples can be obtained through the mobile phone. Specifically, users can annotate the trajectories obtained through the mobile phone and collect the annotated samples. On the cloud side, the travel mode recognition model is obtained by training the samples, and then the cloud side synchronizes the trained travel mode recognition model to the mobile phone side. The mobile phone identifies the target moving interval according to the travel mode recognition model and determines the transportation used for each target moving interval.
[0123] When the technical solution provided in this embodiment is used to identify the means of transportation used for travel, the moving interval is first identified, and then at least one target moving interval is determined, as well as the start and end time points of each target moving interval. Then, the at least one target moving interval is identified using a preset travel mode identification model, and the means of transportation used for travel in each target moving interval is determined. This can improve the accuracy of the terminal device in identifying the means of transportation used by the user for travel.
[0124] In some other embodiments of the present application, a terminal device is provided, including: a memory and one or more processors. The memory is coupled to the processor. The memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the terminal device can execute each function or step in the above method embodiment. Of course, the terminal device can also include other hardware structures such as other antennas for receiving signals. For example, the terminal device also includes hardware structures such as sensors and display screens. The structure of the terminal can refer to Figure 5 The structure of the mobile phone 500 is shown.
[0125] The embodiment of the present application also provides a chip system, which is applied to a terminal device. The chip system includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as memories). For another example, the interface circuit can be used to send signals to other devices (such as processors). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the terminal device can execute the various steps in the above method embodiment. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.
[0126] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned terminal device, the terminal device executes each function or step in the above-mentioned method embodiment.
[0127] The present application also provides a computer program product, which, when executed on a computer, enables the computer to perform various functions or steps in the above method embodiment. For example, the computer may be the above terminal device.
[0128] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0129] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0133] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for identifying a means of transportation used for travel, It is characterized in that Applied to a terminal device, the method comprises: Identifying a movement interval of the terminal device within a specified time interval; At least one target moving interval is selected from the moving intervals, and a start and end time point of each target moving interval in the at least one target moving interval is determined; any target moving interval in the at least one target moving interval corresponds to one of the specified multiple transportation tools; and a speed in the at least one target moving interval is greater than a speed threshold; Based on the start and end time points of a preset transportation tool event, the start and end time points of the target movement interval are modified; the preset transportation tool event is an event that matches the transportation tool corresponding to the target movement interval; The at least one target moving interval after the corrected starting time point is identified using a preset travel mode identification model, and a transportation tool used for traveling in each target moving interval is determined.
2. The method according to claim 1, It is characterized in that Also includes: The preset travel mode recognition model is constructed according to the travel mode samples.
3. The method according to claim 2, It is characterized in that The travel mode samples include at least one of: manually constructed samples, samples collected from the terminal device, and samples constructed through questionnaires.
4. The method according to claim 1, It is characterized in that When the transportation means is a subway, the preset transportation means events matching the subway include: a subway card code scanning event.
5. The method according to claim 1, It is characterized in that When the transportation tool is a bus, the preset transportation tool events matching the bus include: a bus card code scanning event.
6. The method according to claim 1, It is characterized in that When the transportation tool is a taxi, the preset transportation tool event matching the taxi includes: a taxi order event.
7. The method according to any one of claims 1 to 6, It is characterized in that Before identifying the at least one target moving interval by using the preset travel mode identification model, the method further includes: When adjacent target movement intervals meet a preset merging condition, the adjacent target movement intervals are merged into one target movement interval; the preset merging condition is that the time interval between the adjacent target movement intervals is less than a preset time interval.
8. The method according to claim 7, It is characterized in that When adjacent target moving intervals correspond to the same means of transport, the preset merging condition is that the time interval between the adjacent target moving intervals is less than a preset first time interval; The merging of adjacent target movement intervals into one target movement interval when adjacent target movement intervals satisfy a preset merging condition includes: merging the adjacent target movement intervals into one target movement interval when the time interval between the adjacent target movement intervals is less than the preset first time interval.
9. The method according to claim 7, It is characterized in that When adjacent target moving intervals correspond to different means of transport, the preset merging condition is that the time interval between the adjacent target moving intervals is less than a preset second time interval; When the adjacent target movement intervals meet a preset merging condition, merging the adjacent target movement intervals into one target movement interval includes: When the time interval between the adjacent target movement intervals is less than the preset second time interval, the adjacent target movement intervals are merged into one target movement interval.
10. A terminal device, It is characterized in that include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the terminal device executes the method as described in any one of claims 1-9.
11. A computer-readable storage medium, It is characterized in that The method comprises computer instructions, and when the computer instructions are executed on a terminal device, the terminal device executes the method according to any one of claims 1 to 9.
