A trajectory generation method, device, equipment and medium

By obtaining and analyzing the user's scan code data, the problem of being unable to generate a trajectory when the GPS function is turned off is solved, and the effect of generating a user's trajectory without relying on the GPS function is achieved.

CN113535845BActive Publication Date: 2025-01-24NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110832496.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-22
Publication Date
2025-01-24
Estimated Expiration
2041-07-22

AI Technical Summary

Technical Problem

The prior art requires relying on the GPS function of the handheld terminal to generate the user's trajectory, resulting in the inability to generate the trajectory when the GPS function is turned off.

Method used

By obtaining multiple code scanning data of the user, including scanning time, scanning location and location type, it is divided into the first type of data and the second type of data. Missing data is found and supplemented. Finally, the scanning location is connected based on the scanning time. Generate user trajectories.

Benefits of technology

With the GPS function that does not rely on handheld terminals, it can generate the trajectory of the user and expand the scope of the method of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535845B_ABST
    Figure CN113535845B_ABST
Patent Text Reader

Abstract

The present application discloses a trajectory generation method, device, equipment and medium. The method includes: obtaining multiple code scanning data of a user, the code scanning data includes a code scanning time, a code scanning position and a position type; according to the code scanning time and a preset time, the multiple code scanning data are divided into a first type of data and a second type of data; searching for a second code scanning data consistent with the position type of the first code scanning data in the first type of data from the second type of data; using the position type and the code scanning position of the second code scanning data as the position type and the code scanning position of the first missing data; supplementing the first missing data in the first type of data, the code scanning time of the first missing data is later than the preset time period of the code scanning time of the first code scanning data; based on the code scanning time in the first type of data, connecting the code scanning position in the first type of data to generate the user's trajectory. Therefore, the method can also generate the user's trajectory without relying on the GPS function of the handheld terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a trajectory generation method, device, equipment and medium. Background Art

[0002] Trajectory refers to the path that the target object takes from the starting point to the end point. For example, the target object can be a user, and the trajectory can be the path that the user takes from the starting point to the end point. By analyzing the user's trajectory, effective information can be obtained to help the planning of urban transportation. For example, based on the user's trajectory, add or cancel bus routes, add or cancel bus stops, etc.

[0003] The industry provides a user trajectory generation solution. Specifically, based on the global positioning system (GPS) function provided by the user's handheld terminal (such as a mobile phone), the user's real-time location data is obtained, and then the real-time location data is processed to generate the user's trajectory.

[0004] In the above scheme, the user's handheld terminal needs to turn on the GPS function in real time to obtain real-time location data. However, in some cases, when the power of the handheld terminal is low, the GPS function of the handheld terminal will be automatically turned off to reduce power consumption. When the GPS function of the handheld terminal is turned off, the handheld terminal will not be able to obtain real-time location data, and thus lose the data source of the real-time location data and cannot generate the user's trajectory. Summary of the invention

[0005] The purpose of the present application is to provide a trajectory generation method, apparatus, device and medium, which can generate a user's trajectory without relying on the GPS function of a handheld terminal.

[0006] In a first aspect, the present application provides a trajectory generation method, the method comprising:

[0007] Obtain multiple code scanning data of the user, wherein the code scanning data includes the code scanning time, the code scanning location and the location type;

[0008] According to the scanning time and the preset time, the plurality of scanning data are divided into the first category of data and the second category of data;

[0009] Searching the second scanned code data from the second category of data for the second scanned code data having the same location type as the first scanned code data in the first category of data;

[0010] Using the position type and the scanning position of the second scanning data as the position type and the scanning position of the first missing data;

[0011] Supplementing the first missing data in the first category of data, where the scanning time of the first missing data is later than the scanning time of the first scanning data by a preset time period;

[0012] Based on the scanning time in the first category of data, the scanning positions in the first category of data are connected to generate the trajectory of the user.

[0013] In some possible implementations, the method further includes:

[0014] Searching for third code scanning data from the second category of data, wherein the scanning time of the third code scanning data is later than the scanning time of any code scanning data in the second category of data;

[0015] Using the location type and the scanning location of the third code scanning data as the location type and the scanning location of the second missing data;

[0016] The second missing data is supplemented in the first category of data, and a scanning time of the second missing data is earlier than a scanning time of any scanning data in the first category of data.

[0017] In some possible implementations, the location type of the third scan code data is a residential type or a company type.

[0018] In some possible implementations, the method further includes:

[0019] Obtaining the time difference between the scanning moments of adjacent first scanning data in the first category of data;

[0020] If the time difference is less than a preset difference, determining that the adjacent first scanned code data are mutually exclusive scanned code data;

[0021] The connecting to the scanned code position in the first type of data includes:

[0022] Connecting the scanning position of the first first scanning data and the scanning position of the first first missing data in the mutually exclusive scanning data to obtain a first track; the first first missing data is the first missing data corresponding to the first first scanning data;

[0023] The scanning position of the second first scanning data and the scanning position of the second first missing data in the mutually exclusive scanning data are connected to obtain a second trajectory; the second first missing data is the first missing data corresponding to the second scanning data.

[0024] In some possible implementations, the method further includes:

[0025] Obtain the first number of occurrences of the first first code scanning data and the second number of occurrences of the second first code scanning data in the mutually exclusive code scanning data of the user within the target time period;

[0026] Obtaining a probability of the first trajectory according to the sum of the first number of times and the second number of times and the first number of times;

[0027] The probability of the second trajectory is obtained according to the sum of the first number of times and the second number of times and the second number of times.

[0028] In some possible implementations, the dividing the plurality of code scanning data into the first category of data and the second category of data according to the code scanning time and the preset time includes:

[0029] The scanned code data whose scanning time is earlier than the preset time is determined as the first type of data; the scanned code data whose scanning time is later than the preset time is determined as the second type of data;

[0030] or,

[0031] The scanned code data whose scanning time is earlier than the preset time is determined as the second type of data; the scanned code data whose scanning time is later than the preset time is determined as the first type of data.

[0032] In some possible implementations, the step of obtaining multiple scan code data of a user includes:

[0033] Get multiple pending scan code data of the user;

[0034] Searching for multiple groups of target code scanning data from the multiple code scanning data to be processed, wherein the position type and the code scanning position in each group of target code scanning data are consistent;

[0035] The scanning moments of each group of target scanning data are clustered by density clustering to obtain a plurality of scanning data of the user.

[0036] In a second aspect, an embodiment of the present application provides a trajectory generation device, including:

[0037] An acquisition unit, used to acquire multiple code scanning data of the user, wherein the code scanning data includes a code scanning time, a code scanning location, and a location type;

[0038] A division unit, configured to divide the plurality of scanned code data into first category data and second category data according to the scanned code moment and the preset moment;

[0039] A searching unit, used for searching the second type of data for second scanned code data having the same position type as the first scanned code data in the first type of data;

[0040] A prediction unit, configured to use the position type and the scanning position of the second scanning data as the position type and the scanning position of the first missing data;

[0041] A supplementing unit, configured to supplement the first missing data in the first category of data, wherein a scanning time of the first missing data is later than a scanning time of the first scanning data by a preset time period;

[0042] A generating unit is used to connect the scanning positions in the first category of data based on the scanning time in the first category of data to generate the trajectory of the user.

[0043] In some possible implementations, the search unit is further configured to search for third code scanning data from the second category of data, wherein a scanning time of the third code scanning data is later than a scanning time of any code scanning data in the second category of data;

[0044] The prediction unit is further configured to use the position type and the scanning position of the third code scanning data as the position type and the scanning position of the second missing data;

[0045] The supplementing unit is further used to supplement the second missing data in the first category of data, and the scanning time of the second missing data is earlier than the scanning time of any scanned data in the first category of data.

[0046] In some possible implementations, the location type of the third scan code data is a residential type or a company type.

[0047] In some possible implementations, the acquisition unit is further used to acquire a time difference between scanning moments of adjacent first scanning data in the first category of data; if the time difference is less than a preset difference, determining that the adjacent first scanning data are mutually exclusive scanning data;

[0048] The generating unit is specifically used to connect the scanning position of the first first scanning data and the scanning position of the first first missing data in the mutually exclusive scanning data to obtain a first trajectory; and connect the scanning position of the second first scanning data and the scanning position of the second first missing data in the mutually exclusive scanning data to obtain a second trajectory.

[0049] In some possible implementations, the acquisition unit is further used to obtain the first number of occurrences of the first first scan data and the second number of occurrences of the second first scan data in the mutually exclusive scan data of the user within the target time period; obtain the probability of the first trajectory based on the sum of the first number and the second number and the first number; obtain the probability of the second trajectory based on the sum of the first number and the second number and the second number.

[0050] In some possible implementations, the division unit is specifically used to determine the scanned code data whose scanning time is earlier than the preset time as the first category of data; determine the scanned code data whose scanning time is later than the preset time as the second category of data; or, determine the scanned code data whose scanning time is earlier than the preset time as the second category of data; and determine the scanned code data whose scanning time is later than the preset time as the first category of data.

[0051] In some possible implementations, the acquisition unit is specifically used to acquire multiple unprocessed scan data of the user; search for multiple groups of target scan data from the multiple unprocessed scan data, wherein the location type and scan position in each group of target scan data are consistent; and cluster the scan time of each group of target scan data separately by density clustering to obtain multiple scan data of the user.

[0052] In a third aspect, the present application provides a device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the device executes any one of the optional trajectory generation methods in the first aspect.

[0053] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes any optional trajectory generation method as in the first aspect.

[0054] It can be seen that this application has the following beneficial effects:

[0055] The present application provides a trajectory generation method, which is based on the analysis of the user's code scanning data, and can obtain the user's trajectory without relying on the GPS function of the user's handheld terminal. Specifically, the method first obtains the code scanning data of the user at a preset position, and the code scanning data includes the code scanning time, the code scanning position and the position type; then, according to the code scanning time and the preset time, it is determined that the code scanning data is divided into the first type of data or the second type of data; then, the second code scanning data consistent with the position type of the first code scanning data in the first type of data is found from the second type of data, and the position type and the code scanning position of the second code scanning data are used as the position type and the code scanning position of the first missing data, and the first missing data is supplemented in the first type of data, and the code scanning time of the first missing data is later than the first preset time period of the code scanning time of the first code scanning data; finally, based on the code scanning time in the first type of data, the code scanning position in the first type of data is connected to generate the user's first trajectory. The method generates the user's trajectory by supplementing the missing data, connecting the code scanning position in the original code scanning data and the code scanning position in the missing data. It can be seen that the user's trajectory can also be obtained when the GPS function of the user's handheld terminal is turned off. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A flow chart of a trajectory generation method provided in an embodiment of the present application;

[0057] Figure 2A A schematic diagram of a user's commuting trajectory provided in an embodiment of the present application;

[0058] Figure 2B A schematic diagram of a user's commuting trajectory provided in an embodiment of the present application;

[0059] Figure 3 A schematic diagram of a commuting trajectory including mutually exclusive routes provided in an embodiment of the present application;

[0060] Figure 4 A schematic diagram of a commuting trajectory including probability information provided in an embodiment of the present application;

[0061] Figure 5 A schematic diagram of a trajectory generating device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0063] First, some technical terms involved in the embodiments of the present application are introduced.

[0064] The trajectory refers to the path that the target object takes from the starting point to the end point. For example, the starting point may be the user's home address, the end point may be the user's company address, and the user's trajectory may be the path that the user takes from the home address to the company address. The path that the user takes from the home address to the company address can reflect the user's commuting trajectory. By analyzing the user's commuting trajectory, effective information that optimizes urban transportation can be obtained. In some examples, for optimizing public transportation in urban transportation, by analyzing the user's commuting trajectory, inefficient bus stops are obtained, and then the inefficient bus stops are optimized, such as merging the inefficient bus stops with other bus stops.

[0065] In the process of obtaining the user's trajectory, the industry needs to rely on the GPS function provided by the user's handheld terminal, obtain the user's real-time location data through the GPS function, and generate the user's trajectory based on the real-time location data. However, in some cases, the user's handheld terminal will automatically turn off the GPS function, and thus the user's real-time location data cannot be obtained. Without the data source, the user's trajectory cannot be generated. It can be seen that this solution is highly dependent on the GPS function of the user's handheld terminal and has a limited scope of application.

[0066] In view of this, an embodiment of the present application provides a trajectory generation method. The method includes obtaining multiple code scanning data of a user, the code scanning data including the code scanning time, the code scanning position and the position type, and dividing the multiple code scanning data into a first type of data and a second type of data according to the code scanning time and the preset time; then searching for the second code scanning data consistent with the position type of the first code scanning data in the first type of data from the second type of data, and using the position type and the code scanning position of the second code scanning data as the position type and the code scanning position of the first missing data; then supplementing the first missing data in the first type of data, the code scanning time of the first missing data is later than the code scanning time of the first scan data by a preset time period; finally, based on the code scanning time in the first type of data, connecting the code scanning positions in the first type of data to generate the user's trajectory.

[0067] This method is based on the analysis of the user's code scanning data, which includes the code scanning location. Without relying on the GPS function of the user's handheld terminal, the method can also obtain the discrete location points that the user has passed through, and then connect the above discrete location points according to the temporal sequence of the code scanning moments of the code scanning data to generate the user's trajectory. In addition, this method does not need to rely on the GPS function of the user's handheld terminal. For users whose handheld terminal's GPS function is turned off, the user's trajectory can also be obtained. It can be seen that the scope of application of this method is relatively wide.

[0068] The trajectory generation method provided in the embodiment of the present application can be executed by a processing device. The processing device can be a terminal or a server. Among them, the terminal includes but is not limited to a desktop, a laptop, a tablet computer and a smart phone. The server can be a cloud server in a cloud environment, such as a central server in a central cloud computing cluster, or an edge server in an edge cloud computing cluster. Of course, the server can also be a server in a local data center, and the so-called local data center refers to the data center to which the user belongs. It should also be noted that the server can be a single server or a server cluster formed by multiple servers. The embodiment of the present application does not specifically limit the processing device, and those skilled in the art can make a choice according to actual needs.

[0069] The trajectory generation method provided in the embodiments of the present application can be applied to scenarios where users commute via public transportation (e.g., buses, subways, etc.). For example, a user sets out from the residential area where his home is located in the morning, scans a QR code at the A1 stop of bus No. 10 at 07:50 (the QR code may be the QR code corresponding to the A1 stop of bus No. 10), and takes bus No. 10. At 08:15, the user scans a QR code at the B1 stop of subway Line 3 (the QR code may be the QR code corresponding to the B1 stop of subway Line 3), and takes subway Line 3. At 08:30, the user scans a QR code at the entrance of the building where the company is located (the QR code may be the QR code corresponding to the location of the building where the company is located) and enters Company; the user sets out from the company's building in the afternoon, scans the QR code at the B2 station of Metro Line 3 at 17:50 (the QR code may be the QR code corresponding to the B2 station of Metro Line 3), and takes Metro Line 3. At 18:15, the user scans the QR code at the A2 station of Bus No. 10 (the QR code may be the QR code corresponding to the A2 station of Bus No. 10), and takes Bus No. 10. At 19:00, the user scans the QR code at the gate of the residential community where the user lives (the QR code may be the QR code corresponding to the location of the residential community where the user lives) to enter the residential community.

[0070] In the above scenario, the code scanning data only includes the corresponding code scanning data when the user scans on the bus, scans on the subway, scans when entering the community, and scans when entering the company building, and does not include the corresponding code scanning data when the user scans when getting off the bus, scans when getting off the subway, scans when leaving the community, and scans when leaving the company building. The processing device can classify the code scanning data based on the scanning time of the above multiple code scanning data to obtain morning data and afternoon data, and then based on the up and down pairs of buses and subways taken by the user in the morning and afternoon, supplement the user's bus getting off location (such as the code scanning data corresponding to getting off the bus) and subway getting off location (such as the code scanning data corresponding to getting off the subway) in the morning data and afternoon data respectively, and further supplement the morning departure location (such as the code scanning data corresponding to leaving the community) and the afternoon departure location (such as the code scanning data corresponding to leaving the company building), and then connect the above locations in order according to the time sequence of the user passing through the above locations, so as to obtain the user's trajectory. In some examples, the user's trajectory can be "community-No. 10 bus A1 stop-No. 10 bus A2 stop-Line 3 B1 stop-Line 3 B2 stop-Company", or "Company-Line 3 B2 stop-Line 3 B1 stop-No. 10 bus A2 stop-No. 10 bus A1 stop-Community", or "Community-No. 10 bus A1 stop-No. 10 bus A2 stop-Line 3 B1 stop-Line 3 B2 stop-Company-Line 3 B2 stop-Line 3 B1 stop-No. 10 bus A2 stop-No. 10 bus A1 stop-Community". In other examples, the user's trajectory may also include the time of scanning the code. For example, the user's trajectory may be "community (07:10) - Bus No. 10 A1 stop (07:50) - Bus No. 10 A2 stop (08:05) - Line 3 B1 stop (08:15) - Line 3 B2 stop (08:25) - Company (08:30)". The embodiments of the present application do not specifically limit the user's trajectory, and those skilled in the art may make a selection based on actual needs.

[0071] In order to make the technical solution of the present application clearer and easier to understand, the trajectory generation method provided in the embodiment of the present application is introduced below with reference to the accompanying drawings.

[0072] See also Figure 1 , which is a flowchart of a trajectory generation method provided in an embodiment of the present application, the method comprising:

[0073] S101: Obtain multiple scan code data of the user.

[0074] The code scanning data refers to the data obtained after the user scans the code through the handheld terminal at the preset location. For example, the code scanning data can be the data obtained by the user at 07:50 at the A1 stop of bus No. 10, by scanning the QR code corresponding to the A1 stop of bus No. 10 through the mobile phone. The code scanning data includes the time of scanning, the location of scanning and the location type. Among them, the time of scanning refers to the time when the user scans the QR code, for example, the time of scanning can be "07:50" in the above example, the location of scanning refers to the location of the user when scanning the QR code, for example, the location of scanning can be "A1 stop" in the above example, and the location type refers to the type of the location of scanning, for example, the location type can be "Bus No. 10" in the above example, and the location type can also be "Line 3 Subway", "Residential Type" and "Company Type".

[0075] In some examples, the processing device may obtain the user's scanned code data in response to the user's scan operation. For example, there are multiple bus routes at the A1 station, such as bus routes 10 and 11. The QR code 1 corresponding to bus route 10 and the QR code 2 corresponding to bus route 11 may be set on the bus stop sign of the A1 station. In this way, when the user scans the above QR code 1 through the mobile phone at 07:50, the processing device obtains the user's scanned code data in response to the user's scan operation, and the scanned code data may be "07:50-10 bus-A1 station". For another example, a QR code 3 is set in the bus route 10. In this way, when the user scans the above QR code 3 through the mobile phone at 07:50, the processing device may obtain the location indicated by the on-board GPS on the bus route 10 in response to the user's scan operation, and then generate the location where the user performs the scan operation based on the location, and then obtain the scanned code data, and the scanned code data may be "07:50-10 bus-A1 station".

[0076] This application does not limit the way in which the processing device obtains the user's scanned code data. Those skilled in the art can choose the way to obtain the scanned code data according to actual needs. In a possible implementation, the embodiment of this application also provides a specific implementation method for the processing device to obtain the user's scanned code data, please see below.

[0077] In some examples, the multiple code scanning data acquired by the processing device are shown in Table 1 below.

[0078] Table 1:

[0079]

[0080]

[0081] It should be noted that the scanned code data shown in Table 1 is only an example.

[0082] S102: Divide the plurality of scanned code data into first category data and second category data according to the scanned code time and the preset time.

[0083] In some examples, the processing device may determine the scanned code data whose scanning time is earlier than the preset time as the first category of data (such as the scanned code data marked as "1-1", "1-2" and "1-3" in Table 1), and determine the scanned code data whose scanning time is later than the preset time as the second category of data (such as the scanned code data marked as "1-4", "1-5" and "1-6" in Table 1). In other examples, the processing device may also determine the scanned code data whose scanning time is later than the preset time as the first category of data, and determine the scanned code data whose scanning time is earlier than the preset time as the second category of data. Among them, the preset time can be "12:00", "11:00" or "13:00". The embodiments of the present application do not specifically limit the preset time, and those skilled in the art may select the specific value of the preset time according to actual needs.

[0084] For ease of understanding, the following description will be made by taking the example that the scanning time of the first type of data is earlier than the scanning time of the second type of data.

[0085] S103: Searching for second scanned code data in the second category of data that has the same location type as the first scanned code data in the first category of data.

[0086] Continuing with the above example, the first scanned code data in the first category of data may be scanned code data identified as "1-1", "1-2" and "1-3". Taking the first scanned code data identified as "1-1" as an example, the second scanned code data in the second category of data that is consistent with the position type of the first scanned code data may be scanned code data identified as "1-5". Similarly, when the first scanned code data is scanned code data identified as "1-2", the second scanned code data in the second category of data that is consistent with the position type of the first scanned code data may be scanned code data identified as "1-4". In this way, the processing device can find the second scanned code data that is consistent with the position type of the first scanned code data in the first category of data from the second category of data.

[0087] In other embodiments, the processing device may also search in the first category of data for first scanned code data having the same location type as the second scanned code data in the second category of data. The specific implementation process is similar to the above example and will not be repeated here.

[0088] S104: Using the location type and the scanning location of the second scanned code data as the location type and the scanning location of the first missing data.

[0089] Among them, the first missing data refers to the scanned code data of the missing part in the user's complete trajectory. For example, the first missing data can be the scanned code data corresponding to the user getting off the bus, or it can be the scanned code data corresponding to the user getting off the subway. The complete trajectory refers to the trajectory that includes the boarding location and the next location of the transportation tool (such as bus, subway). As can be seen from Table 1 above, the scanned code data only records the user getting on the bus, getting on the subway, entering the company, and entering the community. Therefore, the processing equipment needs to predict the corresponding data when the user gets off the bus, such as predicting the time and location of the user getting off the bus, the time and location of the user getting off the subway, etc.

[0090] In some embodiments, the processing device can predict the location type and scanning location of the first missing data based on the location type and scanning location of the second scanning data. For example, the processing device can predict the first missing data when the user gets off Bus No. 10 in the morning after getting on Bus No. 10 at the A1 station. After the processing device finds the scanning data identified as "1-5" in the second category of data, it uses the location type and scanning location of the scanning data identified as "1-5" as the location type and scanning location of the first missing data when getting off Bus No. 10. Similarly, the processing device can also use the location type and scanning location of the scanning data identified as "1-4" as the location type and scanning location of the first missing data when getting off Metro Line 3 in the morning.

[0091] In some embodiments, the processing device can also use the location type and scanning location of the first scanning data to predict the location type and scanning location of the missing data when getting off the bus and / or subway in the afternoon (for the sake of ease of description, the missing data is recorded as the third missing data). The specific implementation process is similar to the above example and will not be repeated here.

[0092] S105: Supplement the first missing data in the first category of data.

[0093] The scanning time of the first missing data is later than the preset time period of the scanning time of the first scanning data. The preset time period may be 5 minutes or 8 minutes. The present application does not specifically limit the preset time period, and those skilled in the art may select the specific length of the preset time period according to actual needs.

[0094] Continuing with the above example, the first missing data when getting off bus No. 10 in the morning may be "07:53-bus No. 10-stop A2", and the first missing data when getting off subway Line 3 in the morning may be "08:20-subway Line 3-stop B2". The processing device may supplement the first missing data in the first category of data to obtain the supplemented first category of data as shown in Table 2 below.

[0095] Table 2:

[0096] Logo Scan code time Scan code location Location Type 2-1 07:45 A1 Site Bus No. 10 2-2 07:53 A2 Site Bus No. 10 2-3 08:15 B1 Station Subway Line 3 2-4 08:28 B2 Site Subway Line 3 2-5 08:40 XX Company Company Type

[0097] Among them, the scanned code data marked as "2-2" is the first missing data marked when getting off bus No. 10 in the morning, and the first missing data indicates that the user got off the bus at the A2 stop of bus No. 10 at 07:53. The scanned code data marked as "2-4" is the first missing data when getting off subway line 3 in the morning, and the first missing data indicates that the user got off the subway at the B2 stop of subway line 3 at 08:20.

[0098] In other embodiments, the processing device may also supplement the third missing data in the second category of data to obtain supplemented second category data. The specific implementation process is similar to the above example and will not be repeated here.

[0099] S106: Based on the scanning time in the first category of data, connect the scanning positions in the first category of data to generate a user trajectory.

[0100] As shown in Table 2 above, the processing device can sort the scanned code data in the first category of data based on the temporal order of the scanned code moments in the first category of data. The sorting result can be represented by the identifier of the scanned code data, for example, the sorting result can be "'2-1', '2-2', '2-3', '2-4', '2-5'". Then, based on the sorting result, the processing device connects the scanned code positions in the first category of data to generate the user's trajectory. In some examples, the user's trajectory can be "Bus No. 10 A1 Station-Bus No. 10 A2 Station-Metro Line 3 B1 Station-Metro Line 3 B2 Station-XX Company"; in other examples, the user's trajectory can also include the scanned code moment, for example, the user's trajectory can be "Bus No. 10 A1 Station (07:45)-Bus No. 10 A2 Station (07:53)-Metro Line 3 B1 Station (08:15)-Metro Line 3 B2 Station (08:28)-XX Company (08:40)".

[0101] Based on the above description, the embodiment of the present application provides a trajectory generation method, which is based on the analysis of the user's scanned code data, which includes the scanned code location. It does not need to rely on the GPS function of the user's handheld terminal, and can also obtain the discrete location points passed by the user, and then connect the above discrete location points according to the temporal sequence of the scanned code data, thereby generating the user's trajectory. Moreover, this method does not need to rely on the GPS function of the user's handheld terminal. For users whose handheld terminal's GPS function is turned off, the user's trajectory can also be obtained. It can be seen that the scope of application of this method is relatively wide.

[0102] In some embodiments, the processing device may obtain multiple code scanning data of the user in a historical time period, and then perform data analysis on the multiple code scanning data in the historical time period to obtain the code scanning data shown in Table 1 above. The present application embodiment provides a specific implementation method for a processing device to obtain multiple code scanning data of a user, which may include the following steps:

[0103] A1: Get multiple QR code scan data to be processed by the user.

[0104] The scanned code data to be processed may be scanned code data acquired by the processing device in response to the scanned code operation after the user performs the scanned code operation at the preset position in the historical time period. For ease of understanding, the following Table 3 shows a plurality of scanned code data to be processed.

[0105] Table 3:

[0106] Logo Scan code time Scan code location Location Type 3-1 07:50 A1 Site Bus No. 10 3-2 07:48 A1 Site Bus No. 10 3-3 07:53 A1 Site Bus No. 10 3-4 07:15 A1 Site Bus No. 10 3-5 08:18 B1 Station Subway Line 3 3-6 08:20 B1 Station Subway Line 3 3-7 08:14 B1 Station Subway Line 3 3-8 16:30 XX Kindergarten School Type …… …… …… ……

[0107] After the processing device obtains the multiple scanned code data to be processed shown in the above Table 3, it can process the multiple scanned code data to be processed to obtain the scanned code data shown in the above Table 1.

[0108] A2: Find multiple sets of target scanned code data from multiple scanned code data to be processed.

[0109] Among them, the position type and scanning position in each group of target code scanning data are consistent. For ease of understanding, taking the example of a processing device searching for two groups of target code scanning data from multiple code scanning data to be processed, the first group of target code scanning data can be the code scanning data to be processed marked as "3-1", "3-2", "3-3" and "3-4" in Table 3, and the second group of target code scanning data can be the code scanning data to be processed marked as "3-5", "3-6" and "3-7" in Table 3. In this way, the processing device can search for multiple groups of target code scanning data from multiple code scanning data to be processed.

[0110] A3: Cluster the scanning moments of each group of target scanning data by density clustering to obtain multiple scanning data of the user.

[0111] In some examples, in order to make the scanned data clustered based on the scanned time closer to the actual scanned situation of the user and reduce the error of the scanned data, the processing device can cluster the scanned time of each group of target scanned data by density clustering to obtain multiple scanned data of the user. Taking the density clustering of the scanned time of the first group of target scanned data by the processing device as an example, the scanned time in the first group of target scanned data is close to 07:50, and the scanned time of the scanned data to be processed marked as "3-4" is 07:15, which is greatly deviated from the scanned time of other scanned data to be processed in the first group of target scanned data. The processing device can discard the scanned data to be processed marked as "3-4" and obtain the scanned data marked as "1-1" in Table 1 above.

[0112] In some implementations, a deviation threshold of the scanning time may be preset. For example, the deviation threshold may be 20 minutes. Continuing with the above example, if the time difference between 07:15 and 07:50 exceeds 20 minutes, the processing device determines that the scanning time of the scanned data to be processed identified as "3-4" is significantly deviated from the scanning time of other scanned data to be processed in the first group of target scanned data.

[0113] In some embodiments, before clustering the scanning moments of each group of target scanning data, the processing device may further remove the accidentally-appearing scanning data from the multiple scanning data to be processed. The accidentally-appearing scanning data to be processed may be the scanning data to be processed whose scanning location appears less than a preset frequency threshold in the multiple scanning data to be processed, such as the scanning data to be processed marked as "3-8" in Table 3 above. In this way, in the scenario where the processing device generates the user's commuting trajectory, the locations that the user does not need to pass during the commuting process are removed, so that the obtained commuting trajectory is more in line with the actual situation of the user's commuting.

[0114] In some embodiments, the processing device may also predict the user's departure location, thereby obtaining a trajectory from home to the company or from the company to home. The present application embodiment provides a specific implementation method for predicting the user's departure location, including the following steps:

[0115] B1: Search the third scanned code data from the second type of data.

[0116] Among them, the scanning time of the third scanning data is later than the scanning time of any scanning data in the second category of data. For ease of understanding, taking the scanning time of the first category of data as an example, which is earlier than the scanning time of the second category of data, refer to the above Table 1, the second category of data includes scanning data identified as "1-4", "1-5" and "1-6", and the scanning time of the scanning data identified as "1-6" is later than the scanning time of any scanning data in the second category of data. In this way, the processing device can find the third scanning data from Table 1, that is, the scanning data identified as "1-6". It can be seen from Table 1 that the location type of the third scanning data is residential type.

[0117] B2: Use the location type and scanning position of the third scanned code data as the location type and scanning position of the second missing data.

[0118] The first category of data includes scanned code data identified as "1-1", "1-2" and "1-3". The scanned code data identified as "1-3" is scanned later than any scanned code data in the first category of data. The scanned code data identified as "1-3" can be recorded as the fourth scanned code data. As can be seen from Table 1, the location type of the fourth scanned code data is the company type. The processing device can predict the user's departure location to obtain the user's trajectory from home to company.

[0119] In some examples, the processing device may predict the second missing data when the user leaves the community in the morning. For example, the processing device uses the location type and the scanning location of the third code scanning data as the location type and the scanning location of the second missing data.

[0120] B3: Supplement the second missing data in the first category of data.

[0121] The scanning time of the second missing data is earlier than the scanning time of any scanning data in the first category of data. For example, the scanning time of the second missing data may be "07:15", and the processing device may obtain the second missing data as "07:15-residential type-XX community", and then the processing device may supplement the second missing data to the first category of data. In this way, the processing device can generate the user's trajectory from home to company based on the scanning time of the first category of data and the scanning location.

[0122] Similarly, the processing device can also search for the fourth code scanning data from the first category of data, and then predict the missing data when the user leaves the company building in the afternoon based on the location type and scanning location of the fourth code scanning data (for the convenience of description, the missing data is recorded as the fourth missing data), and then supplement the fourth missing data in the second category of data. The scanning time of the fourth missing data is earlier than the scanning time of any code scanning data in the second category of data. In this way, the processing device can generate the user's trajectory from the company to home based on the scanning time of the second category of data and the scanning location.

[0123] In some embodiments, the processing device may connect the user's trajectory from home to work with the user's trajectory from work to home, thereby obtaining a commuting trajectory that is more consistent with the user. In some implementations, the processing device may present the user's commuting trajectory on a display. Figure 2A As shown, this figure is a schematic diagram of a user's commuting trajectory provided in an embodiment of the present application.

[0124] In some scenarios, the user may work the night shift, and the processing device may obtain multiple scan code data of the user as shown in Table 4 below.

[0125] Table 4:

[0126] Logo Scan code time Scan code location Location Type 4-1 07:45 B1 Station Subway Line 3 4-2 08:15 A1 Site Bus No. 10 4-3 08:40 XX Community Housing Type 4-4 18:10 A2 Site Bus No. 10 4-5 18:30 B2 Site Subway Line 3 4-6 18:45 XX Company Company Type

[0127] Taking the example that the scanning time of the first type of data is earlier than the scanning time of the second type of data, it can be seen from Table 4 that the location type of the third scanned data is the company type, and the location type of the fourth scanned data is the residential type. Accordingly, the processing device can obtain the first missing data and the second missing data in the first type of scanned data, and then obtain the user's trajectory from the company to the home; the processing device can also supplement the third missing data and the fourth missing data in the second type of data, and then obtain the user's trajectory from the home to the company.

[0128] In some embodiments, the processing device may connect the user's trajectory from work to home with the user's trajectory from home to work, thereby obtaining a commuting trajectory that is more consistent with the user. In some implementations, the processing device may present the user's commuting trajectory on a display. Figure 2B As shown, this figure is a schematic diagram of a user's commuting trajectory provided in an embodiment of the present application.

[0129] In some scenarios, users can choose one of multiple public transportation modes for commuting. For example, users can choose bus No. 10 and subway Line 3 for commuting, or they can choose bus No. 12 and subway Line 3 for commuting. In this scenario, the processing device obtains multiple scanned code data of the user as shown in Table 5 below.

[0130] Table 5:

[0131]

[0132]

[0133] For ease of understanding, the example of the scanning time of the first type of data being earlier than the scanning time of the second type of data is used for introduction. The first type of data includes scanning data identified as "5-1", "5-2", "5-3" and "5-4". The processing device can obtain the time difference between the scanning times of adjacent first scanning data in the first type of data. If the time difference is less than the preset difference, it is determined that the adjacent first scanning data are mutually exclusive scanning data.

[0134] Among them, adjacent first scan code data are two first scan code data that are adjacent in time at the scan time. For example, adjacent first scan code data can be scan code data marked as "5-1" and scan code data marked as "5-2". For another example, adjacent first scan code data can also be scan code data marked as "5-2" and scan code data marked as "5-3". The preset difference can be 5 minutes, 4 minutes, etc. The embodiment of the present application does not specifically limit the preset difference, and those skilled in the art can select it according to actual needs.

[0135] In some possible implementations, the processing device may obtain the scanning time of the scanning data identified as "5-1" and the scanning time of the scanning data identified as "5-2", and then calculate the time difference between the two scanning times, that is, the time difference between 07:45 and 07:48 is 3 minutes, and then compare the time difference with the preset difference value. Taking the preset difference value of 4 minutes as an example, the time difference is less than the preset difference value, and then the processing device determines that the scanning data identified as "5-1" and the scanning data identified as "5-2" are mutually exclusive scanning data.

[0136] In some examples, the embodiments of the present application provide a specific implementation method in which a processing device generates a user's trajectory when mutually exclusive scan code data exists in multiple scan code data, which may include the following steps:

[0137] C1: Connect the scanning position of the first first scanning data and the scanning position of the first first missing data in the mutually exclusive scanning data to obtain the first trajectory.

[0138] Among them, the first missing data is the first missing data corresponding to the first first scanned data. Continuing with the above example, the first first scanned data in the mutually exclusive scanned data can be the scanned data marked as "5-1". The process of the processing device obtaining the first first missing data can refer to the introduction in the above embodiment, which will not be repeated here. The first trajectory can refer to the trajectory of the user from the scanning position of the first first scanned data to the scanning position of the first first missing data.

[0139] In some possible implementations, the processing device may further connect the first trajectory with the location of the residential area where the home is located and the location of the building where the company is located, thereby obtaining the trajectory of the user from home to the company.

[0140] C2: Connect the scanning position of the second first scanning data and the scanning position of the second first missing data in the mutually exclusive scanning data to obtain the second trajectory.

[0141] The second first missing data is the first missing data corresponding to the second scanned data. Continuing with the above example, the second first scanned data in the mutually exclusive scanned data may be the scanned data identified as "5-2". The process of the processing device obtaining the second first missing data may refer to the introduction in the above embodiment, which will not be repeated here. The second trajectory may refer to the trajectory of the user from the scanned position of the second first scanned data to the scanned position of the second first missing data.

[0142] In some possible implementations, the processing device may further connect the second trajectory with the location of the residential area where the home is located and the location of the building where the company is located, thereby obtaining the trajectory of the user from home to the company.

[0143] It should be noted that the embodiments of the present application do not limit the execution order of C1 and C2. In other examples, the processing device may execute C2 first and then execute C1, or the processing device may execute C1 and C2 simultaneously.

[0144] In other examples, the processing device may also obtain the time difference between the scanning moments of the adjacent second scanning data in the second type of data, and if the time difference is less than a preset difference, the adjacent second scanning data is determined to be mutually exclusive scanning data. Then the processing device connects the scanning position of the first second scanning data and the scanning position of the first third missing data in the mutually exclusive scanning data to obtain the third track; and connects the scanning position of the second second scanning data and the scanning position of the second third missing data in the mutually exclusive scanning data to obtain the fourth track.

[0145] In some possible implementations, the processing device may modify the user's commuting trajectory based on the first trajectory, the second trajectory, the third trajectory, and the fourth trajectory, thereby obtaining a commuting trajectory including mutually exclusive routes. The processing device may then present the commuting trajectory including mutually exclusive routes through a display. Figure 3 As shown, the figure is a schematic diagram of a commuting trajectory including mutually exclusive routes provided in an embodiment of the present application.

[0146] In some embodiments, the processing device can calculate the probability of users choosing different routes, thereby providing a reference basis for optimizing public transportation. The embodiment of the present application provides a specific implementation method for calculating the probability of users choosing different routes, which may include the following steps:

[0147] D1: Obtain the first occurrence count of the first scan code data and the second occurrence count of the second scan code data in the mutually exclusive scan code data of the user within the target time period.

[0148] Among them, the target time period can be 1 month or 2 months. The embodiment of the present application does not specifically limit the time length of the target time period, and those skilled in the art can choose according to actual needs. Taking the target time period of 1 month as an example, the first first scan data in the mutually exclusive scan data can be the scan data marked as "5-1" in Table 5, and the first number is the number of times the scan data marked as "5-1" in Table 5 appears within 1 month, for example, the first number can be 8 times; the second first scan data in the mutually exclusive scan data can be the scan data marked as "5-2" in Table 5, and the second number is the number of times the scan data marked as "5-2" in Table 5 appears within 1 month, for example, the second number can be 12 times. In this way, the processing device can obtain the above-mentioned first number and second number.

[0149] D2: Get the probability of the first trajectory based on the sum of the first and second times and the first time.

[0150] Continuing with the above example, the sum of the first number and the second number is 20, and the first number is 8. The processing device can calculate the probability of the first trajectory using the following formula:

[0151]

[0152] Wherein, P1 is the probability of the first trajectory, N1 is the first number, and N2 is the second number. Thus, the processing device can calculate P1=40% through the above formula (1).

[0153] D3: Get the probability of the second trajectory based on the sum of the first and second times and the second time.

[0154] Continuing with the above example, the sum of the first and second times is 20, and the second time is 12. The processing device can calculate the probability of the second trajectory using the following formula:

[0155]

[0156] Wherein, P2 is the probability of the second trajectory, N1 is the first number, and N2 is the second number. Thus, the processing device can calculate P2=60% through the above formula (2).

[0157] It should be noted that the embodiments of the present application do not limit the execution order of D2 and D3. In other examples, the processing device may execute D3 first and then D2, or the processing device may execute D2 and D3 simultaneously.

[0158] In some possible implementations, the processing device may present the commuting trajectory including the probability information via a display, such as Figure 4As shown in FIG. 1 , a commuting trajectory including probability information provided by an embodiment of the present application is provided. The processing device can further contribute to the optimization of public transportation, such as the merging of bus stops, by calculating and presenting the probabilities of different routes.

[0159] Based on the trajectory generation method provided by the above method embodiment, the embodiment of the present application further provides a trajectory generation device, and the trajectory generation device is described below in conjunction with the accompanying drawings.

[0160] See also Figure 5 , which is a schematic diagram of a trajectory generation device provided in an embodiment of the present application. Figure 5 As shown, the trajectory generating device comprises:

[0161] The acquisition unit 501 is used to acquire multiple code scanning data of the user, wherein the code scanning data includes the code scanning time, the code scanning location and the location type;

[0162] A division unit 502 is used to divide the plurality of scanned code data into first category data and second category data according to the scanned code time and the preset time;

[0163] A searching unit 503 is used to search the second type of data for second scanned code data having the same position type as the first scanned code data in the first type of data;

[0164] A prediction unit 504, configured to use the position type and the scanning position of the second scanning data as the position type and the scanning position of the first missing data;

[0165] A supplementing unit 505 is used to supplement the first missing data in the first category of data, where the scanning time of the first missing data is later than the scanning time of the first scanning data by a preset time period;

[0166] The generating unit 506 is configured to connect the scanning positions in the first category of data based on the scanning moments in the first category of data to generate a trajectory of the user.

[0167] In some possible implementations, the searching unit 503 is further configured to search for third code scanning data from the second category of data, wherein a scanning time of the third code scanning data is later than a scanning time of any code scanning data in the second category of data;

[0168] The prediction unit 504 is further configured to use the position type and the scanning position of the third code scanning data as the position type and the scanning position of the second missing data;

[0169] The supplementing unit 505 is further configured to supplement the second missing data in the first category of data, wherein a scanning time of the second missing data is earlier than a scanning time of any scanning data in the first category of data.

[0170] In some possible implementations, the location type of the third scan code data is a residential type or a company type.

[0171] In some possible implementations, the acquisition unit 501 is further configured to acquire a time difference between scanning moments of adjacent first scanning data in the first category of data; if the time difference is less than a preset difference, determining that the adjacent first scanning data are mutually exclusive scanning data;

[0172] The generating unit 506 is specifically used to connect the scanning position of the first first scanning data and the scanning position of the first first missing data in the mutually exclusive scanning data to obtain a first trajectory; and connect the scanning position of the second first scanning data and the scanning position of the second first missing data in the mutually exclusive scanning data to obtain a second trajectory.

[0173] In some possible implementations, the acquisition unit 501 is further used to obtain the first number of occurrences of the first first scan data and the second number of occurrences of the second first scan data in the mutually exclusive scan data of the user within the target time period; obtain the probability of the first trajectory based on the sum of the first number of times and the second number of times and the first number of times; obtain the probability of the second trajectory based on the sum of the first number of times and the second number of times and the second number of times.

[0174] In some possible implementations, the division unit 502 is specifically used to determine the scanned code data whose scanning time is earlier than the preset time as the first category of data; determine the scanned code data whose scanning time is later than the preset time as the second category of data; or, determine the scanned code data whose scanning time is earlier than the preset time as the second category of data; and determine the scanned code data whose scanning time is later than the preset time as the first category of data.

[0175] In some possible implementations, the acquisition unit 501 is specifically used to obtain multiple unprocessed scan data of the user; search for multiple groups of target scan data from the multiple unprocessed scan data, wherein the location type and scan position in each group of target scan data are consistent; and cluster the scan time of each group of target scan data separately by density clustering to obtain multiple scan data of the user.

[0176] In addition, an embodiment of the present application further provides a computing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the trajectory generation method as described in any one of the above embodiments is implemented.

[0177] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the trajectory generation method as described in any of the above embodiments.

[0178] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0179] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0180] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0181] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0182] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A trajectory generation method, characterized in that: include: Obtain multiple code scanning data of the user, wherein the code scanning data includes the code scanning time, the code scanning location and the location type; According to the scanning time and the preset time, the multiple scanning data are divided into the first category of data and the second category of data; the multiple scanning data are divided into the first category of data and the second category of data according to the scanning time and the preset time, including: determining the scanning data with a scanning time earlier than the preset time as the first category of data; determining the scanning data with a scanning time later than the preset time as the second category of data; or determining the scanning data with a scanning time earlier than the preset time as the second category of data; determining the scanning data with a scanning time later than the preset time as the first category of data; Searching the second scanned code data from the second category of data for the second scanned code data having the same location type as the first scanned code data in the first category of data; Using the position type and the scanning position of the second scanning data as the position type and the scanning position of the first missing data; Supplementing the first missing data in the first category of data, where the scanning time of the first missing data is later than the scanning time of the first scanning data by a preset time period; Based on the scanning time in the first category of data, connecting the scanning positions in the first category of data to generate a trajectory of the user; Obtaining the time difference between the scanning moments of adjacent first scanning data in the first category of data; If the time difference is less than a preset difference, determining that the adjacent first scanned code data are mutually exclusive scanned code data; The connecting to the scanned code position in the first type of data includes: Connecting the scanning position of the first first scanning data and the scanning position of the first first missing data in the mutually exclusive scanning data to obtain a first trajectory; The scanning position of the second first scanning data and the scanning position of the second first missing data in the mutually exclusive scanning data are connected to obtain a second trajectory.

2. The method according to claim 1, characterized in that The method further comprises: Searching for third code scanning data from the second category of data, wherein the scanning time of the third code scanning data is later than the scanning time of any code scanning data in the second category of data; Using the location type and the scanning location of the third scanned code data as the location type and the scanning location of the second missing data; The second missing data is supplemented in the first category of data, and a scanning time of the second missing data is earlier than a scanning time of any scanning data in the first category of data.

3. The method according to claim 2, characterized in that The location type of the third scan code data is a residential type or a company type.

4. The method according to claim 1, characterized in that: The method further comprises: Obtain the first number of occurrences of the first first code scanning data and the second number of occurrences of the second first code scanning data in the mutually exclusive code scanning data of the user within the target time period; Obtaining a probability of the first trajectory according to the sum of the first number of times and the second number of times and the first number of times; The probability of the second trajectory is obtained according to the sum of the first number of times and the second number of times and the second number of times.

5. The method according to claim 1, characterized in that The obtaining of multiple scan code data of the user includes: Get multiple pending scan code data of the user; Searching for multiple groups of target code scanning data from the multiple code scanning data to be processed, wherein the position type and the code scanning position in each group of target code scanning data are consistent; The scanning moments of each group of target scanning data are clustered by density clustering to obtain a plurality of scanning data of the user.

6. A trajectory generating device, characterized in that: include: An acquisition unit, used to acquire multiple code scanning data of the user, wherein the code scanning data includes a code scanning time, a code scanning location, and a location type; A division unit, configured to divide the plurality of scanned code data into first category data and second category data according to the scanned code moment and the preset moment; A searching unit, used for searching the second type of data for second scanned code data having the same position type as the first scanned code data in the first type of data; A prediction unit, configured to use the position type and the scanning position of the second scanning data as the position type and the scanning position of the first missing data; A supplementing unit, configured to supplement the first missing data in the first category of data, wherein a scanning time of the first missing data is later than a scanning time of the first scanning data by a preset time period; a generating unit, configured to connect the scanning positions in the first category of data based on the scanning moments in the first category of data, so as to generate a trajectory of the user; The classification unit is specifically used to determine the scanned code data whose scanning time is earlier than the preset time as the first type of data; determine the scanned code data whose scanning time is later than the preset time as the second type of data; or determine the scanned code data whose scanning time is earlier than the preset time as the second type of data; determine the scanned code data whose scanning time is later than the preset time as the first type of data; The acquisition unit is further used to acquire a time difference between scanning moments of adjacent first scanning data in the first category of data; if the time difference is less than a preset difference value, it is determined that the adjacent first scanning data are mutually exclusive scanning data; The generating unit is specifically used to connect the scanning position of the first first scanning data and the scanning position of the first first missing data in the mutually exclusive scanning data to obtain a first trajectory; and connect the scanning position of the second first scanning data and the scanning position of the second first missing data in the mutually exclusive scanning data to obtain a second trajectory.

7. A device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for determining traffic travel, server and storage medium

    CN111104990A

  • Travel track adjusting method and device based on riding records

    CN112597189A