Commuting data determination method and device, electronic equipment and storage medium
By obtaining and analyzing the sensor data of the user terminal, combined with the historical status sequence, determine the current commuting time and space data of the user, solve the problem of accurate determination of different user commute data, and improve the accuracy of data determination.
Patent Information
- Application Number
- CN202310931593.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
AI Technical Summary
How to accurately determine the commuting data of different users, taking into account the differences in user behavioral habits.
By obtaining the sensor data sequence of the user terminal in multiple setting periods, generate the user's commuting status sequence in each set period, and match the similarity of the historical state sequence to determine the user's current target status sequence, so as to accurately determine the user’s which Time and space data.
The similarity between the historical state sequence of the user and the current status sequence is realized, accurately determines the user's current commute space -time data, and improves the accuracy of the determination of commute data.
Smart Images

Figure CN119383562A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for determining commuting data. Background Art
[0002] Commuting is an important part of urban residents' lives. With the development of mobile networks, people often use mobile terminals to carry out corresponding work, study, entertainment and other activities while commuting.
[0003] Different users have different behavioral habits and corresponding commuting data. How to accurately determine the commuting data of different users is a technical problem that needs to be solved. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the present application proposes a commuting data determination method, device, electronic device and storage medium to accurately determine the user's commuting time and space data.
[0006] In one aspect, an embodiment of the present application provides a method for determining commuting data, including:
[0007] Acquire sensor data sequences of a user terminal in multiple set time periods;
[0008] Generate a first state sequence of the user commuting in each of the set time periods according to the sensor data sequence in each of the set time periods;
[0009] Query the historical state sequence; the historical state sequence contains the historically learned commuting time and space data;
[0010] In response to querying the historical state sequence, determining the current target state sequence of the user according to the similarity between the plurality of first state sequences and the historical state sequence;
[0011] According to the target state sequence, the user's current commuting time-space data is determined.
[0012] Another aspect of the present application provides a commuting data determination device, including:
[0013] An acquisition module, used to acquire sensor data sequences of a user terminal in multiple set time periods;
[0014] A generating module, configured to generate a first state sequence of the user commuting in each of the set time periods according to the sensor data sequence in each of the set time periods;
[0015] A query module is used to query the historical state sequence; wherein the historical state sequence contains the historically learned commuting spatiotemporal data;
[0016] A first determination module, configured to determine, in response to querying the historical state sequence, the current target state sequence of the user according to the similarity between the plurality of first state sequences and the historical state sequence;
[0017] The second determination module is used to determine the user's current commuting time-space data according to the target state sequence.
[0018] Another aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the above aspect is implemented.
[0019] Another aspect of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in the aforementioned aspect is implemented.
[0020] Another aspect of the present application provides a computer program product on which a computer program is stored. When the program is executed by a processor, the method described in the above aspect is implemented.
[0021] The commuting data determination method, device, electronic device and storage medium proposed in the present application obtain sensor data sequences of a user terminal in multiple set time periods, generate a first state sequence of the user's commuting in each set time period based on the sensor data sequence of each set time period, and query the historical state sequence, wherein the historical state sequence includes historically learned commuting spatiotemporal data. In response to querying the historical state sequence, the user's current target state sequence is determined based on the similarity between multiple first state sequences and the historical state sequence, and the user's current commuting spatiotemporal data is determined based on the target state sequence, thereby achieving the user's current target state sequence based on the similarity between the user's historical state sequence and the current first state sequence, thereby improving the accuracy of determining the user's current commuting data.
[0022] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0024] Figure 1 A flowchart of a method for determining commuting data provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of another method for determining commuting data provided in an embodiment of the present application;
[0026] Figure 3A A flowchart of another method for determining commuting data provided in an embodiment of the present application;
[0027] Figure 3B A schematic diagram of another target state sequence determination provided by an embodiment of the present application;
[0028] Figure 4 A flowchart of another method for determining commuting data provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the structure of a commuting data determination device provided in an embodiment of the present application;
[0030] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0032] The following describes the commuting data determination method, device, electronic device and storage medium of the embodiments of the present application with reference to the accompanying drawings.
[0033] Figure 1 A flowchart of a method for determining commuting data provided in an embodiment of the present application.
[0034] The executor of the commuting data determination method of the embodiment of the present application is a commuting data determination device, which can be set in an electronic device. The electronic device can be a mobile terminal, such as a smart phone, a smart bracelet, a PAD, etc., which is not limited in this embodiment.
[0035] like Figure 1 As shown, the method may include the following steps:
[0036] Step 101: Acquire sensor data sequences of a user terminal in multiple set time periods.
[0037] The sensor may be a variety of sensors built into the user terminal, including an acceleration sensor, a gyroscope sensor, a geomagnetic sensor, a barometer, an ambient light sensor, etc., which are not listed one by one in this embodiment. The sampling rates of different sensors may be the same or different. In one scenario, the sampling rates of the acceleration sensor and the gyroscope sensor are at least 25 Hz, and the sampling rates of other sensors are at least 5 Hz.
[0038] A set time period, for example, 24 hours a day, if the user's attendance is determined, for example, the user works the day shift, or usually goes out during the day and does not go out at night, the set time period can also be set to the time period when the user goes out, that is, the set time period can also be set based on demand.
[0039] Step 102: Generate a first state sequence of the user commuting in each set time period according to the sensor data sequence in each set time period.
[0040] In an embodiment of the present application, the sensor data sequence includes data of the user collected by multiple sensors, which can be used to indicate the user's running status. The user's commuting status can be predicted based on the user's running status. As a first implementation method, the first state sequence of the user's commuting in each set time period can be determined based on prior experience. For example, the sensor data sequence of each set time period to be identified and the sensor data sequences of multiple historical set time periods in which the first state sequences have been identified are matched for similarity, and the first state sequence corresponding to the sensor data sequence of the historical set time period that has the highest similarity with the sensor data sequence of the set time period is used as the first state sequence corresponding to the set time period.
[0041] As a second implementation method, multiple sub-set time periods are obtained, and for each set time period, the sensor data sequence of the set time period is divided into sub-sensor data sequences corresponding to multiple sub-set time periods, and the sub-sensor data sequence corresponding to each sub-set time period is predicted. Optionally, a trained multi-classification convolutional neural network model is used for prediction and classification to obtain the user's commuting status in the sub-set time period, and then, according to the user's commuting status in each sub-set time period, a first state sequence of the user's commuting in the set time period is generated.
[0042] Among them, the multi-classification convolutional neural network model is, for example, a feedforward neural network model. The training samples of the multi-classification convolutional neural network model are the sensor data sequence corresponding to the user in a sub-set period and the annotated true commuting status. The training samples are input into the multi-classification convolutional neural network model, and the predicted user commuting status is output. According to the difference between the predicted commuting status and the annotated true commuting status, a loss function is determined, such as the mean absolute error (L1 loss) or the mean square error (L2 loss). According to the loss function, the parameters of the multi-classification convolutional neural network model, that is, the weight coefficients and bias parameters of each layer in the network, are corrected until the error between the predicted user commuting status and the annotated actual user commuting status meets the preset conditions, and the training of the multi-classification convolutional neural network model is completed.
[0043] As an example, the duration corresponding to the set period is 24 hours, the interval of the sub-set period is 30 seconds, and there are a total of 2880 sampling moments within 24 hours. For each sub-set period, the sensor data sequence of the set period is divided into 2880 sub-sensor data sequences corresponding to the sub-set period, and the duration of the sub-set time corresponding to the sub-sensor data sequence is 10 seconds, that is, the sub-sensor data sequence includes the data of each sensor collected within 10 seconds. For each sub-sensor data sequence, the sub-sensor data sequence is input into the multi-classification convolutional neural network model to output the predicted type of user commuting status, including: subway, bus, driving, cycling, walking and not commuting. The output prediction result is One-Hot encoding, such as output [1 0 0 0 0 0], indicating that the predicted commuting status is subway; output [0 1 0 0 0 0], indicating that the predicted commuting status is bus, which are not listed here one by one. Similarly, the commuting status of the user corresponding to each sub-sensor data sequence can be obtained, and then, according to the sub-sensor data sequence corresponding to each sub-set period, the first state sequence of the user's commuting within a 24-hour period is generated. As an example, each commuting state is identified by a number, where non-commuting: 0 subway: 1 bus: 2 driving: 3 cycling: 4 walking: 5. The timestamp of the sub-set period uses the starting time of each sub-set period, and the first state sequence is shown in Table 1 below:
[0044] Table 1
[0045] Serial number The timestamp corresponding to the sub-set period Commute status 0 0:00:00 0 1 0:00:30 0 … … … 960 8:00:30 0 961 8:01:00 5 … … … 980 8:10:30 5 981 8:11:00 1 … … … 1100 9:10:30 1 1101 9:11:00 1 … … … 2779 11:59:30 0
[0046] The timestamp corresponding to each sub-set time period may be a start time or an end time, and the timestamp corresponding to each sub-set time period may be selected in accordance with the same principle.
[0047] Step 103, querying the historical state sequence, wherein the historical state sequence includes the historically learned commuting spatiotemporal data.
[0048] In an embodiment of the present application, the historical state sequence includes historically learned commuting spatiotemporal data, that is, the commuting spatiotemporal data of the user's commuting during a set time period, wherein the historical state sequence is similar to the first state sequence obtained in the above steps, and includes multiple commuting states of the user during the set time period. Since the user's commuting habits may change, the commuting states corresponding to the user in each sub-set time period in the historical state sequence and the commuting states corresponding to the user in each sub-set time period in the current first state sequence may be different.
[0049] Step 104 , in response to querying the historical state sequence, determine the user's current target state sequence according to the similarities between the plurality of first state sequences and the historical state sequence.
[0050] In an embodiment of the present application, the user's commuting habits may change with changes in time or space. If a query finds that there is a learned historical state sequence, and the user's commuting habits may have actually changed, the user's commuting spatiotemporal data indicated by the historical state sequence cannot accurately reflect the user's current and future commuting habits. It is necessary to learn based on the similarity between the first state sequence and the historical state sequence to obtain a new state sequence, namely the target state sequence, so as to update the state sequence based on historical data and current data, thereby improving the accuracy of the updated target state sequence.
[0051] Step 105: Determine the user's current commuting time-space data according to the target state sequence.
[0052] The target state sequence includes the user's current commuting time and space data, which includes: commuting state, the time period corresponding to the commuting state (start time and end time), and the duration corresponding to the commuting state. The user reflects the user's habits in time and space, that is, the user's commuting habits. According to the user's commuting habits, the user's personalized smart service can be customized to meet the user's needs in different scenarios and improve the user's satisfaction.
[0053] In the commuting data determination method of the embodiment of the present application, sensor data sequences of the user terminal in multiple set time periods are obtained, and based on the sensor data sequences of each set time period, a first state sequence of the user's commuting in each set time period is generated, and a historical state sequence is queried, wherein the historical state sequence includes historically learned commuting spatiotemporal data. In response to the query of the historical state sequence, the user's current target state sequence is determined based on the similarity between the multiple first state sequences and the historical state sequence, and the user's current commuting spatiotemporal data is determined based on the target state sequence, thereby achieving the user's current target state sequence based on the similarity between the user's historical state sequence and the current first state sequence, thereby improving the accuracy of determining the user's current commuting data.
[0054] Based on the above embodiments, Figure 2 A flowchart of another method for determining commuting data provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0055] Step 201: Acquire sensor data sequences of a user terminal in multiple set time periods.
[0056] Among them, the sensor data can be collected by the user terminal.
[0057] Step 202: Generate a first state sequence of the user commuting in each set time period according to the sensor data sequence in each set time period.
[0058] Step 203, querying the historical state sequence, wherein the historical state sequence includes the historically learned commuting spatiotemporal data.
[0059] Among them, steps 201 to 203 can refer to the explanations in the aforementioned embodiments, and the principles are the same, so they will not be repeated here.
[0060] Step 204: in response to querying the historical state sequence, respectively calculate the similarity between the historical state sequence and each first state sequence.
[0061] As an example, since the user's commuting has a certain periodicity, the period is usually one week, that is, 7 days. Therefore, the sensor data sequences of multiple set time periods acquired in step 201 can be sensor data sequences for 7 days, wherein the duration of the set time period is 1 day, that is, 24 hours.
[0062] Step 205: In response to the existence of at least one similarity greater than a set threshold, determine at least one second state sequence having a similarity greater than the threshold.
[0063] The second state sequence belongs to one of the multiple first state sequences, and the second state sequence is a first state sequence in the multiple first state sequences whose similarity with the historical state sequence is greater than a set threshold. The commuting habits of the user in multiple set time periods are usually not greatly changed relative to the commuting habits learned in the historical time period. Therefore, finding at least one second state sequence that is relatively similar to the historical state sequence from the multiple first state sequences, and then subsequently generating a target state sequence based on the at least one second state sequence and the historical state sequence can improve the accuracy of the learned target state sequence.
[0064] Step 206: Generate a target state sequence according to at least one second state sequence and the historical state sequence.
[0065] In one scenario, if the second state sequence is one, the second state sequence is compared with the historical state sequence to obtain a first common sub-state sequence. Optionally, the first common sub-state sequence can be determined based on a longest common subsequence (LCS) algorithm, and the first target sub-public state sequence is determined based on the first common sub-state sequence, that is, the first common sub-state sequence is used as the first target sub-public state sequence. Furthermore, as an implementation method, the timestamps and corresponding commuting states contained in the first target sub-public state sequence are used to replace the commuting states corresponding to the same timestamps in the historical state sequence to update the target state sequence. As another implementation method, the part other than the first target sub-public state sequence in the historical state sequence is used as the first target non-public sub-state sequence, and the target state sequence is generated according to the first target public sub-state sequence and the first target non-public sub-state sequence. Specifically, the corresponding target state sequence is generated according to the order of timestamps corresponding to each commuting state in the first target public sub-state sequence and the first target non-public sub-state sequence. The target time state sequence contains the user's commuting state at each timestamp, that is, the user's current commuting time and space state, which indicates the user's current commuting habits. The update is implemented based on the historical state sequence and the second state sequence to obtain a new target state sequence, thereby improving the accuracy of the determined target state sequence.
[0066] In another scenario, there are multiple second state sequences, and multiple second state sequences are compared with historical state sequences. As an implementation method, multiple second state sequences and historical state sequences are numbered to obtain sequences 1, 2, and up to n, where n is the number of sequences. Any two sequences in the n sequences are used as the previous comparison sequences to perform the comparison process to obtain the longest first common sub-state sequence 1. Optionally, the first common sub-state sequence 1 can be determined based on the longest common subsequence (LCS) algorithm, and then any remaining sequence in the n sequences and the first common sub-state sequence are updated as the previous comparison sequence, and the above comparison process is repeated until there are no remaining sequences in the n sequences, then the comparison process is stopped, and the first common sub-state sequence obtained by the last comparison is used as the first target common sub-state sequence. Furthermore, the part of the historical state sequence other than the first target common sub-state sequence is used as the first target non-common sub-state sequence, and the target state sequence is generated according to the first target common sub-state sequence and the first target non-common sub-state sequence. Specifically, the corresponding target state sequence is generated according to the timestamp sequence corresponding to each commuting state in the first target common sub-state sequence and the first target non-common sub-state sequence. The target time state sequence contains the user's current commuting time and space state, indicating the user's current commuting habits. It realizes updating based on the historical state sequence and the second state sequence to obtain a new target state sequence, thereby improving the accuracy of the determined target state sequence.
[0067] The target state sequence may refer to Table 1 in the aforementioned embodiment.
[0068] Step 207, determining the user's current commuting time-space data according to the target state sequence.
[0069] Among them, step 207 can refer to the explanation in the above-mentioned embodiment, and the principle is the same, which will not be repeated here.
[0070] In the commuting data determination method of the embodiment of the present application, sensor data sequences of the user terminal in multiple set time periods are obtained, and based on the sensor data sequences of each set time period, a first state sequence of the user's commuting in each set time period is generated, and a historical state sequence is queried, wherein the historical state sequence includes historically learned commuting spatiotemporal data. In response to the query of the historical state sequence, the user's current target state sequence is determined based on the similarity between the multiple first state sequences and the historical state sequence, and the user's current commuting spatiotemporal data is determined based on the target state sequence, thereby achieving the user's current target state sequence based on the similarity between the user's historical state sequence and the current first state sequence, thereby improving the accuracy of determining the user's current commuting data.
[0071] Based on the above embodiment, the present application embodiment provides another method for determining commuting data. Figure 3A A flowchart of another method for determining commuting data provided in an embodiment of the present application is shown in FIG. Figure 3A As shown, the method comprises the following steps:
[0072] Step 301: Acquire sensor data sequences of a user terminal in multiple set time periods.
[0073] Step 302: Generate a first state sequence of the user commuting in each set time period according to the sensor data sequence in each set time period.
[0074] Step 303: query the historical state sequence, wherein the historical state sequence contains the historically learned commuting spatiotemporal data.
[0075] Among them, steps 301 to 303 can refer to the explanations in the aforementioned embodiments, and the principles are the same, so they will not be repeated here.
[0076] Step 304, in response to not finding the historical state sequence, calculate the similarity between the first state sequences in pairs to obtain a plurality of similarity results.
[0077] In an embodiment of the present application, in response to the failure to find a historical state sequence, it means that the user has not previously generated a historical state sequence indicating the user's historical commuting habits, and it is necessary to determine based on the multiple first state sequences currently obtained. Then, similarity calculations are performed based on multiple first state sequences to obtain multiple similarity results. As an example, since the user's commuting has a certain periodicity, the period is usually one week, that is, 7 days. Therefore, the sensor data sequences of the multiple set time periods obtained in step 301 can be 7-day sensor data sequences, in which the duration of the set time period is 1 day, that is, 24 hours.
[0078] Step 305 , sorting the multiple similarity results, and in response to determining that there are at least three third state sequences based on the sorting results, generating a target state sequence according to the at least three third state sequences.
[0079] The similarity between any two third state sequences is greater than a set threshold.
[0080] In one implementation of the embodiment of the present application, multiple third state sequences are numbered to obtain sequences 1, 2, to n, where n is the number of third state sequences, and any two third state sequences among the n third state sequences are used as prior comparison sequences to perform a comparison process to obtain the longest second common sub-state sequence. Optionally, the second common sub-state sequence can be determined based on a longest common subsequence (LCS) algorithm, and then any remaining third state sequence among the n third state sequences and the aforementioned second common sub-state sequence are updated as prior comparison sequences, and the above-mentioned comparison process is repeated until there are no remaining third state sequences in the n sequences, then the comparison process is stopped, and the second common sub-state sequence obtained from the last comparison is used as the second target common sub-state sequence. Furthermore, the unexpected part of the second target common sub-state sequence in each third state sequence is obtained to obtain the corresponding multiple second non-public sub-state sequences, and the corresponding target commuting state is determined based on the voting principle for each commuting state corresponding to the timestamp in the multiple second non-public sub-state sequences, thereby determining the second target non-public sub-state sequence, and then, according to the second target common sub-state sequence and the second target non-public sub-state sequence, determining the target state sequence. In the embodiment of the present application, based on multiple first state sequences generated by sensor data of the user in multiple set time periods, the target state sequence is determined by self-learning, without the need to obtain the user's geographic location information, nor the need to calculate the user's commuting trajectory, thereby improving security and privacy, and can identify multiple commuting methods.
[0081] It should be understood that the voting principle means that when there are at least 3 data, taking 3 data as an example, if the 3 data are 1, 1, and 2, and there are 2 identical data 1s, then the result of the voting is to choose 1.
[0082] As an example, Figure 3B One of the schematic diagrams determined for the target state sequence, such as Figure 3B As shown, for the sake of convenience, the sequence is simplified, and the third state sequence is taken as an example, which is 3, and is respectively called sequence 1, sequence 2 and sequence 3.
[0083] As an implementation method, first, the LCS algorithm is used to determine the second common sub-state sequence of sequence 1 and sequence 2, that is, the second common sub-state sequence [00 01 1 1 0 0] composed of the identifiers of the commuting states corresponding to the times t0, t1, t2, t3, t4, t5, t7 and t8. Then, the second common sub-state sequence is compared with sequence 3 based on the identifiers of the commuting states corresponding to the times t0, t1, t2, t3, t4, t5, t7 and t8, and the obtained second common sub-state sequence is updated to the identifiers of the commuting states corresponding to the times t0, t1, t3, t4, t5, t7 and t8 [0 0 1 1 1 0 0], that is Figure 3B The numbers on the light grey background are Figure 3B The identification of the commuting state corresponding to the dark gray background part and the colorless background part in sequence 1, sequence 2 and sequence 3, that is, the identification of the commuting state corresponding to time t2, t6 and t9, constitute three second non-common sub-state sequences. The voting method is used to determine the target commuting state corresponding to each time for the three second non-common sub-state sequences. Among them, the identification of the commuting state in the three sequences corresponding to time t2 is 0, 0 and 1 respectively. Based on the voting principle, the identification of the target commuting state corresponding to time t2 is determined to be 0. Similarly, the identification of the target commuting state corresponding to time t6 is determined to be 1. For the target commuting state corresponding to t9, since the identification of the commuting state in the three sequences corresponding to t9 is 0, 1 and 2 respectively, that is, the three commuting states are different, the commuting state corresponding to t9 cannot be determined. Then, the commuting state of t8 adjacent to t9 is used as the target commuting state corresponding to t9, that is, the commuting state identified as 0, so the target state sequence obtained is: Figure 3B As shown in , the generation of accurate target state sequence is achieved.
[0084] As a second implementation method, the three sequences can also be directly compared to determine the second target common sub-state sequence part and the second non-common sub-state sequence part shared by the three sequences, and then the second non-common sub-state sequence part can be used to determine the corresponding second target non-common sub-state sequence part based on the voting principle and the proximity principle, and then the second target common sub-state sequence part and the second target non-common sub-state sequence part can be spliced into a target state sequence.
[0085] It should be noted that if at least three third state sequences are not found by querying again based on the sorting result, the target state sequence is not generated based on the multiple first state sequences to avoid low accuracy of the generated target state sequence.
[0086] Step 306, determining the user's current commuting time-space data according to the target state sequence.
[0087] Among them, step 306 can refer to the explanation in the above-mentioned embodiment, and the principle is the same, which will not be repeated here.
[0088] In the commuting data determination method of an embodiment of the present application, in response to no historical state sequence being found, the similarity between each pair of first state sequences is calculated to obtain multiple similarity results, which are sorted based on the multiple similarity results, and based on the sorting, it is determined whether there are at least three third state sequences whose similarities are greater than a set threshold, thereby achieving determination of multiple third state sequences with the highest similarity from multiple first state sequences, and then determining a target state sequence through the LCS algorithm based on the third state sequence. The user's commuting spatiotemporal data contained in the target state sequence can accurately indicate the user's current commuting state or commuting habits, thereby improving the accuracy of determining the target state sequence.
[0089] Based on the above embodiment, the present application embodiment provides another method for determining commuting data. Figure 4 A flowchart of another method for determining commuting data provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the method comprises the following steps:
[0090] Step 401: Acquire sensor data sequences of a user terminal in multiple set time periods.
[0091] Step 402: Generate a first state sequence of the user commuting in each set time period according to the sensor data sequence in each set time period.
[0092] Step 403, querying the historical state sequence, wherein the historical state sequence includes the historically learned commuting spatiotemporal data.
[0093] Step 404: in response to querying the historical state sequence, determine the user's current target state sequence according to the similarities between the plurality of first state sequences and the historical state sequence.
[0094] Step 405: Determine the user's current commuting time-space data based on the target state sequence.
[0095] Among them, steps 401 to 405 can refer to the explanations in the aforementioned embodiments, and the principles are the same, so they will not be repeated here.
[0096] Step 406, determining a personalized service strategy for the user based on the user's commuting time and space data.
[0097] In one scenario, the charging strategy of the user's mobile terminal is adjusted. As an implementation method, the user's daily commuting habits can be determined based on the user's commuting time and space data, so as to determine the time when the user is about to enter the commute. Before entering the commuting process, for example, at least half an hour and less than two hours before entering the commuting process, and the power of the mobile terminal does not meet the user's usage requirements during the commuting process, at this time it is detected that the user connects to the power supply to start charging, then the charging speed will be adjusted to improve the charging efficiency to ensure that the user can use it normally after entering the commuting process.
[0098] In the second scenario, the user's mobile terminal battery level is reminded as an implementation method. Based on the user's commuting time and space data, the user's commuting habits for the day can be determined, and thus the time when the user is about to start commuting can be determined. Before entering the commuting process, for example, at least half an hour and less than two hours before entering the commuting process, if the mobile terminal's battery level does not meet the user's usage needs during the commuting process, the user is reminded and charged through the mobile terminal's interactive interface through display notifications, voice notifications, alarm notifications, etc.
[0099] In the third scenario, the signal of the user's mobile terminal is optimized. As an implementation method, according to the user's commuting time and space data, when it is determined that the user has entered the commuting process and the commuting state is the subway, as an implementation method, the current network search strategy is adjusted to optimize the network signal. In one scenario, when the network state is poor, the antenna power is enhanced to obtain a better network signal. In another scenario, when it is detected that the mobile terminal frequently switches networks, cells with poor signals are skipped, the network search range is narrowed, and it is avoided to be in cells with poor signals all the time. As another implementation method, the web browsing or video preloading strategy is adjusted. In one scenario, when the network signal is good, the content of the cached data is increased; in another scenario, when the network signal is poor, the picture quality of the picture and video is reduced, or the number of short video preloaded videos is increased to avoid the impact of poor network signals.
[0100] In the commuting data determination method of the embodiment of the present application, the user's current commuting time-space data is determined according to the target state sequence, and the user's personalized service strategy is determined according to the user's commuting time-space data. This enables customization of user personalized strategies based on the user's personalized commuting characteristics, including charging reminders, signal optimization, charging strategy optimization, etc., provides intelligent services, and improves user satisfaction.
[0101] It should be understood that after the above step 306, step 406 can also be executed. The principle is the same and will not be repeated here.
[0102] In order to implement the above embodiment, the embodiment of the present application also proposes a commuting data determination device.
[0103] Figure 5 A schematic diagram of the structure of a commuting data determination device provided in an embodiment of the present application.
[0104] like Figure 5 As shown, the device may include:
[0105] The acquisition module 51 is used to acquire sensor data sequences of the user terminal in multiple set time periods.
[0106] The generating module 52 is used to generate a first state sequence of the user commuting in each of the set time periods according to the sensor data sequence in each of the set time periods.
[0107] The query module 53 is used to query the historical state sequence; wherein the historical state sequence includes the commuting time and space data learned historically.
[0108] The first determination module 54 is configured to determine the user's current target state sequence in response to querying the historical state sequence according to the similarity between the plurality of first state sequences and the historical state sequence.
[0109] The second determination module 55 is used to determine the user's current commuting time-space data according to the target state sequence.
[0110] Further, in an implementation of the embodiment of the present application, the first determining module 54 is specifically configured to:
[0111] respectively calculating the similarity between the historical state sequence and each of the first state sequences;
[0112] In response to the existence of at least one similarity greater than a set threshold, determining at least one second state sequence having a similarity greater than the threshold;
[0113] A target state sequence is generated according to the at least one second state sequence and the historical state sequence.
[0114] In an implementation of the embodiment of the present application, the first determining module 54 is specifically configured to:
[0115] Compare the at least one second state sequence with the historical state sequence to obtain a first target sub-public state sequence;
[0116] Taking the part of the historical state sequence other than the first target sub-public state sequence as the first target non-public sub-state sequence;
[0117] The target state sequence is generated according to the first target common sub-state sequence and the first target non-common sub-state sequence.
[0118] In one implementation of the embodiment of the present application, the device further includes:
[0119] A processing module is used for, in response to not finding a historical state sequence, calculating the similarity between two first state sequences to obtain a plurality of similarity results; sorting the plurality of similarity results, and in response to determining that there are at least three third state sequences based on the sorting results, generating the target state sequence according to the at least three third state sequences; wherein the similarity between any two third state sequences is greater than a set threshold.
[0120] In one implementation of the embodiment of the present application, the generating module 52 is specifically configured to:
[0121] For each sensor data sequence of a set period, dividing the sensor data sequence of the set period into sub-sensor data sequences corresponding to a plurality of sub-set period;
[0122] Predicting each sub-sensor data sequence to obtain the commuting status of the user in the sub-set time period;
[0123] According to the commuting status of the user in each sub-set time period, a first state sequence of the user commuting in the set time period is generated.
[0124] In one implementation of the embodiment of the present application, the device further includes:
[0125] The strategy adjustment module is used to determine the personalized service strategy of the user according to the commuting time and space data of the user.
[0126] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment and will not be repeated here.
[0127] In the commuting data determination device of the embodiment of the present application, sensor data sequences of the user terminal in multiple set time periods are obtained, and based on the sensor data sequences of each set time period, a first state sequence of the user's commuting in each set time period is generated, and a historical state sequence is queried, wherein the historical state sequence includes historically learned commuting spatiotemporal data. In response to the query of the historical state sequence, the user's current target state sequence is determined based on the similarity between the multiple first state sequences and the historical state sequence, and the user's current commuting spatiotemporal data is determined based on the target state sequence, thereby achieving the user's current target state sequence based on the similarity between the user's historical state sequence and the current first state sequence, thereby improving the accuracy of determining the user's current commuting data.
[0128] In order to implement the above embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the above method embodiments is implemented.
[0129] In order to implement the above embodiments, the present application also proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the above method embodiments is implemented.
[0130] In order to implement the above embodiments, the present application also proposes a computer program product on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiments is implemented.
[0131] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0132] Reference Figure 6 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0133] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0134] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0135] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0136] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0137] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0138] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0139] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0140] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0141] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0143] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0144] In addition, the terms "first" and "second" 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 at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0145] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0146] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0147] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0148] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0149] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0150] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for determining commuting data, characterized in that: include: Acquire sensor data sequences of a user terminal in multiple set time periods; Generate a first state sequence of the user commuting in each of the set time periods according to the sensor data sequence in each of the set time periods; Query the historical state sequence; the historical state sequence contains the historically learned commuting time and space data; In response to querying the historical state sequence, determining the current target state sequence of the user according to the similarity between the plurality of first state sequences and the historical state sequence; According to the target state sequence, the user's current commuting time-space data is determined.
2. The method according to claim 1, characterized in that The determining, according to the similarities between the plurality of first state sequences and the historical state sequences, the current target state sequence of the user comprises: respectively calculating the similarity between the historical state sequence and each of the first state sequences; In response to the existence of at least one similarity greater than a set threshold, determining at least one second state sequence having a similarity greater than the threshold; A target state sequence is generated according to the at least one second state sequence and the historical state sequence.
3. The method according to claim 2, characterized in that The step of generating a target state sequence according to the at least one second state sequence and the historical state sequence comprises: Compare the at least one second state sequence with the historical state sequence to obtain a first target sub-public state sequence; Taking the part of the historical state sequence other than the first target sub-public state sequence as the first target non-public sub-state sequence; The target state sequence is generated according to the first target common sub-state sequence and the first target non-common sub-state sequence.
4. The method according to claim 1, characterized in that The method further comprises: In response to not finding the historical state sequence, calculating similarities between the first state sequences, and obtaining a plurality of similarity results; The multiple similarity results are sorted, and in response to determining that there are at least three third state sequences based on the sorting results, the target state sequence is generated according to the at least three third state sequences; wherein the similarity between any two third state sequences is greater than a set threshold.
5. The method according to claim 1, characterized in that The step of generating a first state sequence of the user commuting in each of the set time periods according to the sensor data sequence in each of the set time periods comprises: For each sensor data sequence of a set period, dividing the sensor data sequence of the set period into sub-sensor data sequences corresponding to a plurality of sub-set period; Predicting each sub-sensor data sequence to obtain the commuting status of the user in the sub-set time period; According to the commuting status of the user in each sub-set time period, a first state sequence of the user commuting in the set time period is generated.
6. The method according to claim 1, characterized in that After determining the commuting time-space data of the user, the method further includes: A personalized service strategy for the user is determined according to the user's commuting time-space data.
7. A commuting data determination device, characterized in that: include: An acquisition module, used to acquire sensor data sequences of a user terminal in multiple set time periods; A generating module, configured to generate a first state sequence of the user commuting in each of the set time periods according to the sensor data sequence in each of the set time periods; A query module is used to query the historical state sequence; wherein the historical state sequence contains the historically learned commuting spatiotemporal data; A first determination module, configured to determine, in response to querying the historical state sequence, the current target state sequence of the user according to the similarity between the plurality of first state sequences and the historical state sequence; The second determination module is used to determine the user's current commuting time-space data according to the target state sequence.
8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
