Method, device, computer system and readable storage medium for automatically displaying boarding code
By automatically displaying the ride code using sensor data and ride behavior recognition model, the problem of multiple users' operations and delayed response during peak hours in the existing technology is solved, and faster and more convenient ride code presentation is achieved, improving the user experience.
Patent Information
- Application Number
- CN202110421273.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-04-19
AI Technical Summary
The existing method of showing the ride code has the disadvantages of too many users and too slow code display, especially the problem of weak communication signals during peak periods, resulting in untimely response.
By obtaining a sequence of sensor data used to characterize the user's motion status, input it into the user's riding behavior recognition model, output the recognition result, and sending an automatic display request to the riding code application to automatically display the riding code application.
It realizes perception and prediction of users' ride behavior, and pushes ride codes in advance when users are approaching rides, solving the problems of numerous operations and delayed responses, and improving the user experience of ride code products.
Smart Images

Figure CN113112264B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of artificial intelligence and Internet of Things technology, and more specifically, to a method for automatically displaying a boarding code, an automatic display device for displaying a boarding code, a computer system, a computer-readable storage medium, and a computer program product. Background Art
[0002] The ride code is a QR code used for taking public transportation, which is applicable to a variety of transportation scenarios, such as subways and buses. At present, a large number of passengers (especially young people) have developed the habit of using mobile phone ride codes to take buses and subways, and the operators of ride code products include bus companies, subway companies, third-party payment institutions and one-card companies. They usually adopt the "ride first, pay later" method, first generate a QR code as a ride certificate through the APP, and then calculate the ride fare after the user finishes the ride, and connect with the bank system to complete the deduction of the ride fare.
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: the existing method of presenting the boarding code has the disadvantages of too many user operations and too slow code presentation. Summary of the invention
[0004] In view of this, the present disclosure provides a method, device, computer system and readable storage medium for automatically displaying a boarding code.
[0005] One aspect of the present disclosure provides a method for automatically displaying a boarding code, which may include: acquiring a sensor data sequence for characterizing a user's motion state; inputting the sensor data sequence into a user boarding behavior recognition model and outputting a recognition result; and when it is determined that the recognition result requires automatic display of the boarding code, sending a request for automatic display of the boarding code to a boarding code application, so that the boarding code application automatically displays the boarding code.
[0006] According to an embodiment of the present disclosure, a user riding behavior recognition model is obtained by training in the following manner: obtaining a first model training set, wherein the first model training set includes multiple sensor data sequence samples collected by different sensors in different time periods with the same duration, wherein each sensor data sequence sample has a true value label for characterizing the automatic display of the boarding code or the non-display of the boarding code; each sensor data sequence sample includes multiple point data corresponding to different moments in a time period, and each point data includes: a first target value determined based on N collected values collected by multiple sensors at a first moment; a second target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a moment before the first moment; and a third target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a moment after the first moment; obtaining a first target classification algorithm; and training the first target classification algorithm using the first model training set to obtain a user riding behavior recognition model.
[0007] According to an embodiment of the present disclosure, the sensor data sequence is input into a user riding behavior recognition model, and outputting a recognition result includes: obtaining a first target sensor data sequence collected within a first target time period with the current moment as the end moment, wherein the first target time period is the same as the length of a time period corresponding to a sensor data sequence sample; obtaining a plurality of first target point data obtained according to the first target sensor data sequence; and inputting the plurality of first target point data into the user riding behavior recognition model, so that the user riding behavior recognition model outputs a recognition result.
[0008] According to an embodiment of the present disclosure, a sensor data sequence sample is determined in the following manner: when a target recognition result for a plurality of first target point data is automatic display of a boarding code, user feedback information on the target recognition result is obtained; when the feedback information is positive feedback, a truth value label for automatically displaying the boarding code is configured for the first target sensor data sequence; when the feedback information is negative feedback, a truth value label for not displaying the boarding code is configured for the first target sensor data sequence; and the first target sensor data sequence configured with the truth value label is used as a sensor data sequence sample.
[0009] According to an embodiment of the present disclosure, a user riding behavior recognition model is trained in the following manner: obtaining a second model training set, wherein the second model training set includes multiple time samples, each time sample includes time information for characterizing a second moment, and each time sample has a true value label for characterizing automatic display of a boarding code or non-display of a boarding code; obtaining a second target classification algorithm; and using the second model training set to train the second target classification algorithm to obtain a user riding behavior recognition model.
[0010] According to an embodiment of the present disclosure, the sensor data sequence is input into the user riding behavior recognition model, and the output recognition result includes: obtaining the time information of the current moment; and inputting the time information into the user riding behavior recognition model so that the user riding behavior recognition model outputs the recognition result.
[0011] According to an embodiment of the present disclosure, there are multiple sensors for providing sensor data sequences, each sensor collects one or more collected values at a time, and multiple riding sequences are preset in the user riding behavior recognition model. The method for determining each riding sequence includes: obtaining multiple second target point data collected within a second target time period before the user starts the riding code, each second target point data includes: a first target value determined based on N collected values collected by multiple sensors at a third time; a second target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a time before the third time; and a third target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a time after the third time; clustering the multiple second target point data collected by multiple sensors within the second target time period using a clustering algorithm to obtain multiple clusters; calculating the target motion state of the user represented by each cluster to obtain a first target state sequence within the second target time period; and determining the riding sequence based on the first target state sequence.
[0012] According to an embodiment of the present disclosure, wherein the first target state sequence includes multiple ones, determining the riding sequence according to the first target state sequence includes: when the occurrence frequency of the first target state sequence is greater than a first preset threshold, determining the first target state sequence as a riding sequence preset in the user riding behavior recognition model.
[0013] According to an embodiment of the present disclosure, the sensor data sequence is input into a user riding behavior recognition model, and the output recognition result includes: obtaining a second target sensor data sequence collected within a third target time period with the current moment as the end moment, wherein the third target time period and the second target time period have the same duration; obtaining a second target state sequence calculated based on the second target sensor data sequence; calculating the similarity between the second target state sequence and the first target sequence; and outputting the recognition result when the similarity is greater than a second preset threshold.
[0014] According to an embodiment of the present disclosure, the user riding behavior recognition model is deployed in a client or a server capable of communicating with the client.
[0015] According to an embodiment of the present disclosure, acquiring a sensor data sequence for characterizing a user's motion state includes: determining a preset collection time period; and collecting the sensor data sequence for characterizing the user's motion state within the preset collection time period.
[0016] Another aspect of the present disclosure provides an automatic display device for a boarding code, which may include: an acquisition module for acquiring a sensor data sequence for characterizing a user's motion state; an identification module for inputting the sensor data sequence into a user's boarding behavior identification model and outputting an identification result; and a sending module for sending a request for automatic display of the boarding code to a boarding code application when it is determined that the identification result indicates that the boarding code needs to be automatically displayed, so that the boarding code application automatically displays the boarding code.
[0017] Another aspect of the present disclosure provides a computer system, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method for automatic display of boarding codes.
[0018] Another aspect of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed, are used to implement the above-mentioned method for automatically displaying a boarding code.
[0019] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and the instructions are used to implement the above-mentioned method for automatically displaying the boarding code when executed.
[0020] Through the embodiments of the present disclosure, by acquiring a sensor data sequence for characterizing the user's motion state; inputting the sensor data sequence into a user's riding behavior recognition model, and outputting a recognition result; and when it is determined that the recognition result requires automatic display of the boarding code, sending a request for automatic display of the boarding code to the boarding code application, so that the boarding code application automatically displays the boarding code, senses and predicts the user's riding behavior, and pushes the boarding code to the user's mobile phone in advance when the user is about to board the bus, thereby solving technical problems such as too many operations by the user when presenting the boarding code, weak communication signals during peak hours, etc., which lead to slow presentation of the boarding code and untimely response, thereby better improving the user experience of the boarding code product. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0022] Figure 1The following schematically shows an exemplary system architecture to which a method, device, computer system and readable storage medium for automatically displaying a boarding code can be applied according to an embodiment of the present disclosure;
[0023] Figure 2 A flowchart of a method for automatically displaying a boarding code according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 3 A schematic diagram showing a classification prediction principle diagram of automatic display of a boarding code according to an embodiment of the present invention is shown;
[0025] Figure 4 A flowchart schematically shows a method for determining each riding sequence preset in a user riding behavior recognition model according to an embodiment of the present disclosure;
[0026] Figure 5 The schematic diagram of the automatic display system of the boarding code predicted by the front end according to the embodiment of the present disclosure is shown schematically;
[0027] Figure 6 The schematic diagram of the automatic display system of the boarding code predicted by the background according to the embodiment of the present disclosure is schematically shown;
[0028] Figure 7 A block diagram schematically shows a device for automatically displaying a boarding code according to an embodiment of the present disclosure; and
[0029] Figure 8 A block diagram of a computer system suitable for implementing the method and device for automatically displaying a boarding code described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0031] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0032] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0033] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0034] As for the way to show the boarding code, currently users need to open their mobile phones in advance to call up the boarding code when taking public transportation. During this period, users need to complete multiple steps of manual operations, including ① entering the mobile phone password (fingerprint / s gesture password), ② opening the boarding code APP, ③ logging into the boarding code APP, ④ selecting the boarding code column, etc., and then the APP will generate a boarding QR code based on user identity, request time and other factors.
[0035] In some technologies, considering that public transportation is a small payment scenario with low risk and less loss, some apps can omit the third step of app login based on token automatic login technology. At the same time, only a very small number of single-function, dedicated ride code apps (such as the latest version of Beijing Subway Yitongxing) realize the display of QR codes upon login, removing the fourth step of selecting the ride code column.
[0036] In the process of realizing the concept of the present disclosure, the inventor discovered that in addition to the many operating steps in the existing method of presenting the boarding code, factors such as weak communication signals during peak hours make it take a long time for users to request the boarding code. At present, almost all APPs use online requests to obtain boarding codes. In some hot stations (especially subway stations where industrial parks are concentrated) due to the excessively dense passenger flow during peak hours in the morning and evening, weak mobile phone signals lead to untimely response to the boarding code. In addition, users often forget to take out their mobile phones in time to open the boarding code, so that the boarding code is still unavailable when they arrive at the ticket gate, which not only affects the passengers' own experience, but also easily leads to congestion at the ticket gate during peak hours in the morning and evening.
[0037] The embodiments of the present disclosure provide a method, device, computer system and readable storage medium for automatically displaying a boarding code. The automatic display method includes acquiring a sensor data sequence for characterizing a user's motion state; inputting the sensor data sequence into a user boarding behavior recognition model and outputting a recognition result; and, when it is determined that the recognition result indicates that the boarding code needs to be automatically displayed, sending a request for automatically displaying the boarding code to a boarding code application, so that the boarding code application automatically displays the boarding code.
[0038] Figure 1 The exemplary system architecture 100 to which the automatic display method of the boarding code can be applied according to the embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0039] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0040] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).
[0041] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0042] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0043] It should be noted that the automatic display method of the boarding code provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the automatic display device of the boarding code provided in the embodiment of the present disclosure can generally be set in the server 105. The automatic display method of the boarding code provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the automatic display device of the boarding code provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Alternatively, the automatic display method of the boarding code provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Correspondingly, the automatic display device for the boarding code provided in the embodiment of the present disclosure can also be set in the terminal device 101, 102, or 103, or in other terminal devices different from the terminal device 101, 102, or 103.
[0044] For example, the sensor data sequence may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored on an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the sensor data sequence provided by the embodiment of the present disclosure, or send the sensor data sequence to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the sensor data sequence may execute the automatic display method of the boarding code provided by the embodiment of the present disclosure.
[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0046] Figure 2 A flowchart of a method for automatically displaying a boarding code according to an embodiment of the present disclosure is schematically shown.
[0047] like Figure 2 As shown, the method includes operations S201 to S203.
[0048] In operation S201 , a sensor data sequence for representing a motion state of a user is acquired.
[0049] According to an embodiment of the present disclosure, the user's motion state may include turning left, turning right, going up stairs, going down stairs, taking an elevator up, taking an elevator down, running, walking slowly, walking fast, etc. All motion actions that can reflect the user's motion state can be represented by the sensor data sequence.
[0050] According to an embodiment of the present disclosure, a sensor data sequence can be obtained by collecting different types of sensors built into a mobile phone, and the sensor data sequence can be expressed as a collection of sensor data sorted by time. Among them, different types of sensors may include, for example: acceleration sensor, gravity sensor, magnetic sensor, GPS position sensor, direction sensor, gyroscope sensor, distance sensor, pressure sensor, temperature sensor, rotation vector sensor, sound sensor, light sensor, etc.
[0051] According to the embodiments of the present disclosure, the acceleration sensor measures the acceleration values in the three directions of x, y and z, mainly senses some instantaneous acceleration or deceleration actions, and can usually be used for step counting, judging the orientation of the mobile phone, etc.; the internal structure of the gravity sensor is composed of a weight and a piezoelectric sheet, and the horizontal direction is calculated by the voltage generated in two orthogonal directions, which can be used to judge the switching direction between landscape and vertical screen; the magnetic sensor uses magnetic resistance to measure the plane magnetic field, detects the magnetic field strength and direction position, and can obtain the magnetic field strength of the mobile phone in the three directions of x, y and z. It is generally used in compass or map navigation to help achieve accurate positioning; the gyroscope sensor can measure the angular velocity along one or several axes. As an ideal technology to supplement the acceleration sensor function, the standard mobile phone is usually equipped with a three-axis gyroscope, which can track the displacement changes in 6 directions and obtain the angular acceleration in the three directions of x, y and z to detect the rotation direction of the mobile phone.
[0052] According to an embodiment of the present disclosure, Table 1 shows, for example, data collection examples of some sensors built into a mobile phone.
[0053] According to an embodiment of the present disclosure, the frequency of data collection can be set when the simulation prediction effect is optimal, for example, it can be set to 5 times per second.
[0054] According to the embodiments of the present disclosure, the collected data can be transmitted to the model mining background in real time or at a fixed time. At the same time, the data of the corresponding length can be retained on the mobile phone according to the sequence analysis length set by the algorithm. The above-mentioned sensor data sequence can, for example, also be a collection of one or more sensor data with the set sequence analysis length.
[0055] Table 1
[0056]
[0057] In operation S202, the sensor data sequence is input into a user riding behavior recognition model, and a recognition result is output.
[0058] According to an embodiment of the present disclosure, the user riding behavior recognition model can, for example, perform real-time analysis on the above-mentioned sensor data sequence to predict whether the user needs to display the riding code. For example, as long as the sensor data sequence received by the user riding behavior recognition model represents the occurrence of certain specific behavior patterns, the model can predict whether it is necessary to display the riding code through the riding code application in the next step. Among them, the specific behavior pattern can, for example, include the usual change state of sensor data experienced in a period of time before each means of opening the riding code when the user did not use the model in the early stage.
[0059] According to the embodiments of the present disclosure, when a new user uses the system, for example, an initial collection phase is required, and the length of time can be set by the user through the system. As the user uses the system, the training data gradually increases, and there is also user feedback information. The system can support iterative optimization of the model based on the user feedback information of these training data sets.
[0060] In operation S203, when it is determined that the recognition result requires automatic display of the boarding code, a request for automatic display of the boarding code is sent to the boarding code application so that the boarding code application automatically displays the boarding code.
[0061] According to an embodiment of the present disclosure, the boarding code application may include various types of boarding code APPs used by users to board and exit the station.
[0062] Through the embodiments of the present disclosure, by acquiring a sensor data sequence for characterizing the user's motion state; inputting the sensor data sequence into a user riding behavior recognition model to output a recognition result; and when it is determined that the recognition result requires automatic display of the boarding code, sending a request for automatic display of the boarding code to the boarding code application, so that the boarding code application automatically displays the boarding code, the technical problems of too many operations by the user when presenting the boarding code, weak communication signals during peak hours, etc., which lead to slow presentation of the boarding code and untimely response, are solved, thereby better improving the user experience of the boarding code product.
[0063] The following is a detailed description of the embodiments of the present invention. Figure 2 The method of automatic display of the boarding code shown is further explained.
[0064] According to the first embodiment of the present disclosure, the training method of the above-mentioned user riding behavior recognition model may, for example, include: obtaining a first model training set, wherein the first model training set includes multiple sensor data sequence samples collected by different sensors in different time periods with the same duration, wherein each sensor data sequence sample has a true value label for characterizing the automatic display of the boarding code or the non-display of the boarding code; each sensor data sequence sample includes multiple point data corresponding to different moments in a time period, and each point data includes: a first target value determined according to N collected values collected by multiple sensors at a first moment, a second target value determined according to the difference between the first target value and the N collected values collected by the multiple sensors at a moment before the first moment, and a third target value determined according to the difference between the first target value and the N collected values collected by the multiple sensors at a moment after the first moment; obtaining a first target classification algorithm; and training the first target classification algorithm using the first model training set to obtain a user riding behavior recognition model.
[0065] According to an embodiment of the present disclosure, for example, all sensor data in the initially collected sensor data set may be divided into several subsequences of fixed length (ie, the same duration as above), such as t, to obtain the above sensor data sequence samples).
[0066] According to an embodiment of the present disclosure, the above-mentioned truth value label can be represented by 0 or 1. For example, when a certain sensor data sequence sample can represent that the boarding code needs to be displayed at the next moment, for example, the truth value label configured for the sensor data sequence sample can be determined to be 1. When a certain sensor data sequence sample cannot represent that the boarding code needs to be displayed at the next moment or can represent that the boarding code does not need to be displayed at the next moment, for example, the truth value label configured for the sensor data sequence sample can be determined to be 0.
[0067] According to an embodiment of the present disclosure, each of the above-mentioned point data may be a vector set of multiple sensor data collected at different times within a time period and the difference between the current moment data and the data collected at the previous and next moments.
[0068] According to an embodiment of the present disclosure, for example, a total of N items of data are collected from M sensors, and the value of N can be, for example, M≤N≤3M (because some sensor data contain data in three directions of x, y, and z, and other sensors may also contain one or two data).
[0069] In conjunction with the above Table 1, each point data is specifically described. Table 1 exemplifies an example of data collection of some sensors built into a mobile phone. Taking the first three rows of data in Table 1 as an example, the first three rows can also be considered to represent the data of each type of sensor collected at three different moments in a time period. For example, the second row of data represents the data of each type of sensor collected at the first moment, the first row of data can represent the sensor collection data at the moment before the first moment, and the third row of data can represent the sensor collection data at the moment after the first moment.
[0070] According to the embodiments of the present disclosure, in combination with Table 1, each point data may include a first target value determined by the 9 data values collected by the 3 sensors at the first moment (the second row in Table 1), a difference between the first target value and the 9 data collected by the 3 sensors at the moment before the current first moment (the first row in Table 1) as a second target value, and a difference between the first target value and the 9 data collected by the 3 sensors at the moment after the current first moment (the third row in Table 1) as a third target value. It should be noted that the first moment may be any moment in a time period.
[0071] According to an embodiment of the present disclosure, each point data may be represented as a 3×N dimensional vector set consisting of a first target value, a second target value, and a third target value.
[0072] According to an embodiment of the present disclosure, each sensor data sequence sample may include point data of a plurality of the above-mentioned 3×N dimensional vector sets.
[0073] According to an embodiment of the present disclosure, the first model training set may include a plurality of the sensor data sequence samples, which may be obtained by collecting data from different sensors in different time periods with the same duration. For example, different sensor data in different time periods of 10 seconds may be collected, such as the 1st to 10th seconds, the 11th to 20th seconds, the 21st to 30th seconds, etc. at 8:00; and each time period contains point data at multiple different times, such as the 1st second, the 2nd second...the 10th second in the time period of 1 to 10 seconds. According to the point data collection method, point data of multiple 3×N dimensional vector sets are obtained to form the sensor data sequence samples.
[0074] According to an embodiment of the present disclosure, the above-mentioned first target classification algorithm may include but is not limited to a decision tree, a neural network, a support vector machine, a Bayesian classifier, a deep neural network, etc.
[0075] According to the first embodiment of the present disclosure, the above-mentioned operation S202 may include: obtaining a first target sensor data sequence collected within a first target time period with the current moment as the end moment, wherein the first target time period is the same as the length of a time period corresponding to a sensor data sequence sample; obtaining multiple first target point data obtained according to the first target sensor data sequence; and inputting the multiple first target point data into a user riding behavior recognition model so that the user riding behavior recognition model outputs a recognition result.
[0076] According to an embodiment of the present disclosure, based on the above-mentioned user riding behavior recognition model, for example, the question of whether the boarding code should be automatically displayed at a certain moment can be converted into the features corresponding to the moment (such as sensor data collected within a time period of t before the moment) as input, and the classification result is calculated by the user riding behavior recognition model to determine whether the boarding code needs to be displayed. For example, a classification result of 1 can indicate that the code is displayed, and a classification result of 0 can indicate that the code is not displayed.
[0077] According to an embodiment of the present invention, for example, t=10s, that is, 10s is a fixed duration, and 8:00 is the current time. Then, the above-mentioned first target time period is, for example, the time period of 7:59:50-8:00:00. By collecting data from multiple sensors within this time period, the above-mentioned first target sensor data sequence can be obtained.
[0078] According to an embodiment of the present invention, the above-mentioned first target sensor data sequence includes multiple point data at different times within the above-mentioned time period. For example, multiple sensor data at different times such as the 1st second (7:59:51), the 2nd second (7:59:52)... the 10th second (8:00:00) within the above-mentioned time period of 7:59:50-8:00:00 can be collected, and the sensor data collected at any time (such as 7:59:52) is expanded and processed, including subtracting the multiple sensor data at the 2nd second from each sensor data at the two times of the 1st second and the 3rd second, to form the first target point data of a 3×N-dimensional vector set at different times within the above-mentioned time period.
[0079] According to an embodiment of the present disclosure, the point data at the above-mentioned multiple different times are identified through the user riding behavior recognition model. For example, a classification result can be obtained, 1 can represent the code, and 0 can represent the code not being displayed, so as to determine whether to display the riding code.
[0080] Figure 3 The following schematically shows the classification prediction principle diagram of the automatic display method of the boarding code according to an embodiment of the present invention.
[0081] like Figure 3As shown, at t1, t2, t3, and t4, for example, the extracted features such as sensor data collected in the time periods of sequences S1, S2, S3, and S4 can be used as the sensor data sequence for inputting the user riding behavior recognition model. After calculation by the user riding behavior recognition model, for example, the classification result at t3 is "1-code output", and it can be determined that the boarding code should be automatically displayed, while the classification results at other times are "0-no code output", and it can be determined that the boarding code does not need to be displayed at other times.
[0082] According to an embodiment of the present disclosure, the above-mentioned sensor data sequence sample can be determined in the following manner: when the target recognition result for multiple first target point data is automatic display of the boarding code, obtaining the user's feedback information on the target recognition result; when the feedback information is positive feedback, configuring the first target sensor data sequence with a truth value label for characterizing the automatic display of the boarding code; when the feedback information is negative feedback, configuring the first target sensor data sequence with a truth value label for characterizing the non-display of the boarding code; and taking the first target sensor data sequence configured with the truth value label as a sensor data sequence sample.
[0083] According to an embodiment of the present disclosure, the above feedback information may include a response from the user whether the boarding code needs to be used after the boarding code is automatically displayed on the mobile phone. For example, if the user needs to use the boarding code, the user can interact with the subway or bus gate and the code scanning system (i.e., the above positive feedback) to determine the starting and ending stations where the user uses the boarding code, calculate the fare, and initiate the deduction and settlement. If the user does not need to use the boarding code temporarily, the user can give feedback such as "not boarding for the time being" or "delaying the code issuance" (i.e., the above negative feedback).
[0084] According to an embodiment of the present disclosure, the sensor data sequence corresponding to the above feedback information may be used as a sensor data sequence sample in the training data collection phase.
[0085] According to the embodiments of the present disclosure, a method for predicting the issuance of a boarding code based on machine learning classification is designed, using sensor data as the main feature and weakening the excessive processing of behavior sequences. As long as certain behavior patterns appear, it can be determined that the next behavior is to display the technical effect of the boarding code, thereby realizing a faster response to the issuance of the boarding code.
[0086] According to the second embodiment of the present disclosure, the above-mentioned user riding behavior recognition model training method may also include, for example: obtaining a second model training set, wherein the second model training set includes multiple time samples, each time sample includes time information for characterizing the second moment, and each time sample has a true value label for characterizing the automatic display of the boarding code or the non-display of the boarding code; obtaining a second target classification algorithm; and training the second target classification algorithm using the second model training set to obtain a user riding behavior recognition model.
[0087] According to an embodiment of the present disclosure, the above-mentioned multiple time samples may include time samples in units of year, month, day, hour, minute, and second, or time samples combined with information such as statutory holidays and user commuting time, etc., wherein the user commuting time may, for example, be expressed as 7:00:00-7:30:00 in the morning and 17:30:00-18:00:00 in the evening.
[0088] According to an embodiment of the present disclosure, the above-mentioned second target classification algorithm may include but is not limited to a decision tree, a neural network, a support vector machine, a Bayesian classifier, a deep neural network, etc.
[0089] According to the second embodiment of the present disclosure, the above operation S202 may include: acquiring time information of the current moment; and inputting the time information into a user riding behavior recognition model so that the user riding behavior recognition model outputs a recognition result.
[0090] According to the embodiments of the present disclosure, the current time may be any time of the day, for example, the time information of the current time may be 9:30:00 in the morning, and the classification result is calculated by the user riding behavior recognition model, 1 may indicate a code, and 0 may indicate no code, to determine whether the time information of the current time requires the presentation of the riding code. It should be noted that the current time may also be, for example, the user's commuting time.
[0091] According to the embodiments of the present disclosure, a method for predicting the issuance of a boarding code based on machine learning classification is designed, taking the user's work and rest time as the main feature, weakening the excessive processing of behavior sequences, and achieving the technical effect of displaying the boarding code as long as certain behavior patterns appear, thereby achieving a faster response to the issuance of the boarding code.
[0092] According to the third embodiment of the present disclosure, there may be multiple sensors for providing the above-mentioned sensor data sequence, each sensor may collect one or more collected values at a time, and multiple riding sequences may be preset in the user riding behavior recognition model.
[0093] Figure 4 The flowchart schematically shows the method for determining each riding sequence preset in the user riding behavior recognition model according to an embodiment of the present disclosure.
[0094] like Figure 4 As shown, the method for determining each riding sequence includes operations S401 to S404.
[0095] In operation 401, multiple second target point data collected within the second target time period before the user initiates the boarding code are obtained, and each second target point data includes: a first target value determined based on N collected values collected by multiple sensors at a third moment; a second target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a moment before the third moment; and a third target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a moment after the third moment.
[0096] According to an embodiment of the present disclosure, the above-mentioned second target point data can be a vector set of multiple sensor data collected at different times within a time period (such as the above-mentioned first target value) and the difference between the current moment data and the data collected at the previous and next moments (such as the above-mentioned second target value and the third target value).
[0097] According to an embodiment of the present disclosure, for example, each point data is specifically described in conjunction with the above Table 1. Taking the first three rows of data in Table 1 as an example, it can also be considered that the first three rows represent the data of each type of sensor collected at three different moments in a time period. For example, the second row of data represents the data of each type of sensor collected at the third moment, the first row of data represents the sensor collected data at the moment before the third moment, and the third row of data represents the sensor collected data at the moment after the third moment.
[0098] According to the embodiments of the present disclosure, in combination with Table 1, each point data may include a first target value determined by the 9 data values collected by the 3 sensors at the third moment (taking the second row in Table 1 as an example), a difference between the first target value and the 9 data collected by the 3 sensors at the moment before the current third moment (the first row in Table 1) as the second target value, and a difference between the first target value and the 9 data collected by the 3 sensors at the moment after the current third moment (the third row in Table 1) as the third target value. It should be noted that the third moment may be any moment in a time period.
[0099] According to an embodiment of the present disclosure, each second target point data may be represented as a 3×N dimensional vector set consisting of a first target value, a second target value, and a third target value.
[0100] In operation S402, a clustering algorithm is used to cluster a plurality of second target point data collected by a plurality of sensors within a second target time period to obtain a plurality of clusters.
[0101] According to an embodiment of the present disclosure, the above clustering algorithm may include but is not limited to: a prototype clustering algorithm k-means, a density clustering algorithm.
[0102] According to an embodiment of the present disclosure, clustering can be performed by dividing a data set into different classes or clusters according to a specific standard, such as a speed criterion, a distance criterion, etc., so that the similarity of data objects in the same cluster is as large as possible, and the difference of data objects not in the same cluster is as large as possible. In other words, after clustering, data of the same class are clustered together as much as possible, and data of different classes are separated as much as possible. In this way, for example, the above-mentioned multiple second target point data can be clustered to obtain multiple clusters.
[0103] According to an embodiment of the present disclosure, for example, if the differences in behaviors represented by 10 second target point data among multiple second target point data are similar, such as similar differences in walking speeds, these 10 second target point data can be regarded as a cluster, or, for example, if the differences in behaviors represented by 15 second target point data among multiple second target point data are similar, such as there is not much difference in the time required to climb a 2-meter-high staircase, these 15 second target point data can be regarded as a cluster.
[0104] In operation S403, the target motion state of the user represented by each cluster is calculated to obtain a first target state sequence within a second target time period.
[0105] According to an embodiment of the present disclosure, the above-mentioned clustering process to form clusters can, for example, be implemented in combination with cluster centers. Specifically, for example, for the collected multiple second target point data, multiple cluster centers can be first selected, and the distance between each second target point data and the above-mentioned multiple cluster centers can be calculated respectively, and the second target point data with the smallest distance from each cluster center can be assigned to the cluster represented by the cluster center. After the multiple second target point data are allocated, several clusters are formed, and each cluster serves as its corresponding motion state.
[0106] According to an embodiment of the present disclosure, for example, A, F, C, G, and B respectively represent the motion state corresponding to one of the several clusters formed above, where A can be represented as walking, F can be represented as going up stairs, C can be represented as turning left, G can be represented as turning right, and B can be represented as running. The first target state sequence thus obtained can be in the form of {AFFCGGGFAABFAF}, for example.
[0107] According to an embodiment of the present disclosure, the above distance calculation method may include but is not limited to: Euclidean distance and Manhattan distance.
[0108] In operation S404, a ride sequence is determined according to the first target state sequence.
[0109] According to an embodiment of the present disclosure, the ride sequence may include a sequence that can characterize the user's behavioral patterns within a period of time before the user takes the ride.
[0110] According to an embodiment of the present disclosure, the first target state sequence may include multiple ones, and the above operation S404 may include: when the occurrence frequency of the first target state sequence is greater than a first preset threshold, determining that the first target state sequence is a riding sequence preset in the user riding behavior recognition model.
[0111] According to the embodiments of the present disclosure, frequent sequences can be used as target patterns to mine the first target state sequence. For example, if there are n ride sequence data records in the training library, the frequent sequences can be 1 to n, and the specific number can be adjusted according to the judgment effect. By measuring the frequency of the data records in the training library, the ride sequence can be determined according to the frequency. For example, if there are multiple records in the training library with the occurrence frequencies of 40%, 30%, 20% and 10% respectively, when the first preset threshold is 30%, for example, the sequence corresponding to the records with the occurrence frequencies of 40% and 30% can be determined as the final ride sequence (i.e., the ride sequence preset in the user ride behavior recognition model).
[0112] According to a third embodiment of the present disclosure, the above-mentioned operation S202 may include: obtaining a second target sensor data sequence collected within a third target time period with the current moment as the end moment, wherein the third target time period and the second target time period have the same length; obtaining a second target state sequence calculated based on the second target sensor data sequence; calculating the similarity between the second target state sequence and the first target sequence; and outputting the recognition result when the similarity is greater than a second preset threshold.
[0113] According to an embodiment of the present disclosure, the above method for calculating the similarity between the second target sequence and the first target sequence includes, but is not limited to, sequence edit distance and cosine similarity.
[0114] According to the embodiments of the present disclosure, the sequence edit distance is suitable for the distance calculation of two sequences of unequal lengths. The edit distance is also called the Levenshtein distance, which refers to the minimum number of atomic edit operations required to convert one string into another. Atomic edit operations include three operations: replacing one character with another, inserting a character, and deleting a character. For example, for two sequences S1 (ABCDEFGH) and S2 (ABCLMDEFGH), the edit distance between ABCDEFGH and ABCLMDEFGH is 2 (LM is added in the middle). For these two sequences, for example, the similarity can be calculated by the sequence edit distance.
[0115] According to an embodiment of the present disclosure, cosine similarity may include measuring the similarity between two vectors by measuring the cosine value of the angle between them. The cosine value of an angle of 0 degrees is 1, while the cosine value of any other angle is not greater than 1; and its minimum value is -1. Thus, the cosine value of the angle between two vectors determines whether the two vectors point roughly in the same direction. When two vectors have the same direction, the value of cosine similarity is 1; when the angle between the two vectors is 90°, the value of cosine similarity is 0; when the two vectors point in completely opposite directions, the value of cosine similarity is -1. This result is independent of the length of the vector and is only related to the direction in which the vector points. Cosine similarity is usually used in positive space, so the value given is between 0 and 1.
[0116] According to the embodiments of the present disclosure, for example, taking the above two sequences S1 and S2 as an example, if it is identified that the data set has k motion states, each state value can be transformed into a k-bit vector, and the corresponding dimension of the vector is set to 1 according to the state sequence number, and for a sequence of length l, it can be represented as a k×l matrix. Then the similarity of the two sequences can be calculated as:
[0117]
[0118] According to the embodiments of the present disclosure, the problem of judging whether the boarding code should be automatically displayed at a certain time can be converted into, for example, calculating the similarity between the state sequence (i.e., the second target state sequence) corresponding to the sensor data sequence (i.e., the second target sensor data sequence) within a period of time before that moment (i.e., the third target time period) and the finally determined boarding sequence (i.e., the first target state sequence). Calculate the similarity between the current sequence and the pattern sequence one by one in descending order of frequency. When the similarity appears to be greater than a threshold (i.e., the second preset threshold), it is determined that the boarding code can be displayed; when all pattern matching calculations are completed, if they are all less than the threshold, it is determined that the user is not currently in a boarding behavior, and there is no need to display the boarding code.
[0119] For example, combined with Table 2, the above method is further used to predict whether the user's next step will be to scan the code to enter or exit the station. Table 2 is an example of the refinement of the user's behavior in taking public transportation. For example, if the home is at A and the station where the work is at B, the commuting pattern of the user is refined.
[0120] Table 2
[0121]
[0122] According to the embodiments of the present disclosure, the underlined behavior sequences in Table 2 are fixed and repetitive behavior features of the user. By mining sensor data using the above method, it is possible to characterize a user boarding behavior recognition pattern of "climbing 2-meter-high steps (walking) → passing through the curved diversion fence passage → climbing half-meter-high steps → short pause for security check → walking 20 meters in a straight line [showing the boarding code]". When a similar sequence arrives, it is possible to judge and predict whether the user uses the boarding code. Similarly, the user boarding behavior recognition pattern of off-get off work users can also be characterized to judge and predict whether the user uses the boarding code.
[0123] According to an embodiment of the present disclosure, a plurality of second target point data collected within a second target time period before the user starts the boarding code is obtained through a method based on sequence mining, and a clustering algorithm is used to cluster the plurality of second target point data collected by multiple sensors within the second target time period to obtain a plurality of clusters; the target motion state of the user represented by each cluster is calculated to obtain a first target state sequence within the second target time period; and a boarding sequence is determined according to the first target state sequence, thereby determining a user boarding behavior recognition model according to the plurality of boarding sequences, thereby solving technical problems such as too many operations by the user when presenting the boarding code, weak communication signals during peak hours, etc., which result in the boarding code being presented too slowly and responding in an untimely manner, thereby better improving the user experience of the boarding code product.
[0124] In an embodiment of the present disclosure, the user riding behavior recognition model can be deployed in a client or a server that can communicate with the client.
[0125] According to the embodiments of the present disclosure, when the user's riding behavior recognition model is deployed on the client, it can be understood that the prediction of the code is determined by the mobile phone front end; when the user's riding behavior recognition model is deployed in a server that can communicate with the client, it can be understood that the prediction of the code is determined by the server background.
[0126] Figure 5 The schematic diagram shows the structure of the automatic display system of the boarding code predicted by the front-end according to the embodiment of the present disclosure.
[0127] Figure 6 The schematic diagram shows the composition of the system for automatically displaying the boarding code based on the background prediction according to the embodiment of the present disclosure.
[0128] Combination Figure 5 and Figure 6 As shown, Figure 5 The prediction of the boarding code is determined by the collection and interaction front end (mobile phone front end); Figure 6 The prediction of the QR code is determined by the model mining background (server background). Figure 6 The system design shown is Figure 5The functional modules are basically the same, the main difference is that the "rider prediction and control" simulation is split into "rider behavior prediction" and "prediction response", which run on the background server and mobile phone respectively.
[0129] According to an embodiment of the present disclosure, Figure 5 It needs to occupy some computing and storage resources on the front end of the mobile phone to store the user's riding model, perform data preprocessing and predictive analysis. The advantage is that it avoids multiple interactions in the background and can achieve faster response to the boarding code.
[0130] According to the embodiments of the present disclosure, in terms of user usage habits, the boarding code should be automatically displayed slightly in advance, rather than being presented when the user arrives at the ticket checking point. Therefore, it is feasible to deploy both the training and prediction of the model on the background server, which will not affect user use due to untimely response, and the background server has better computing and storage performance.
[0131] Combine the following Figure 5 and Figure 6 The automatic display system of the boarding code is further explained in the above-mentioned automatic display method of the boarding code.
[0132] Sensor data collection: Collect data from various types of sensors built into the mobile phone. The sensor type can be adjusted according to the needs of the mobile phone model and modeling algorithm.
[0133] Data preprocessing: For the data stored in the mobile phone, real-time preprocessing is performed according to the requirements of the model algorithm (which can be achieved by the processing method for the collected sensor data sequence in any implementation process described in the first to third embodiments above). Similarly, the data transmitted to the background can also be added to the model training set after real-time or scheduled preprocessing according to the same method.
[0134] Model construction: Using the training set data, a user riding behavior recognition model is constructed according to the selected algorithm (which can be implemented through any of the implementation processes described in the first to third embodiments above), and the resulting model is transmitted to the mobile phone for storage and use.
[0135] Ride prediction and control: Based on the model trained by the model building module, the data provided by the data preprocessing module is analyzed in real time to predict whether the user will need to use the ride code soon, and if so, the ride code application is notified. In order to promote the continuous learning and optimization of the model, users are supported to interact during the use of the product, such as feedback "don't ride for now" when the prediction is wrong, feedback "delay the code" when it is early, feedback "early code" when it is delayed, etc., and it can also be enriched with the specific time of advance or delay.
[0136] Ride code application: After receiving the instruction to predict the ride code, the ride code application sends a code request to the background order generation and management platform, and displays the ride code on the mobile phone after receiving it. To ensure transaction security, the user can be prompted to perform identity authentication (such as fingerprint) before displaying the ride code; at the same time, to improve the product user experience, the mobile phone vibrates or voice prompts the user simultaneously. During the training data collection stage (that is, before the automatic display function of the ride code is officially used), when the user uses the ride code, the transaction data will be transmitted back to the model mining background through the ride prediction and control module.
[0137] Model optimization: For example, after receiving user feedback, the ride prediction and control module supplements or corrects the training data and stimulates the model building module to iteratively optimize and improve the model.
[0138] Order generation and management platform: It is the background for generating and managing ride code orders. It interacts with subway or bus gates and code scanning systems to determine the starting and ending stations where users use ride codes, calculate the ride fare, and initiate fee deduction and settlement. This platform is usually built by subway companies, all-in-one card companies, etc.
[0139] Settlement platform: This platform is usually a financial service system of a banking institution, which realizes the deduction of users' ride fares and the account settlement of ride code product operators.
[0140] According to the embodiments of the present disclosure, considering the need for iterative optimization of models as user data increases, both model construction and optimization design are processed in the background.
[0141] In an embodiment of the present disclosure, acquiring a sensor data sequence for characterizing a user's motion state includes: determining a preset collection time period; and collecting the sensor data sequence for characterizing the user's motion state within the preset collection time period.
[0142] According to an embodiment of the present disclosure, the preset collection time period may include, for example, morning and evening commuting time intervals: users set the morning and evening commuting time periods (such as 7:30-8:00, 17:30-21:00), which helps to generate high-quality training data sets and reduce energy consumption for data collection in unnecessary time periods.
[0143] According to the embodiments of the present disclosure, for example, the advance display time of the boarding code can be set in the point review (such as a mobile phone), and the advance display time of the boarding code can be set according to personal habits, such as displaying the code when arriving at the ticket gate, displaying the code immediately when the subway arrives at the station, etc.
[0144] According to an embodiment of the present disclosure, in order to ensure the security of the boarding code, for example, the user can also set whether identity authentication is required before presenting the boarding code. The user can set fingerprint verification after receiving the code prompt, and then the mobile phone will display the boarding code.
[0145] According to the embodiments of the present disclosure, by acquiring a sensor data sequence for characterizing the user's motion state; inputting the sensor data sequence into a user's riding behavior recognition model and outputting a recognition result; and in the case where it is determined that the recognition result requires automatic display of the boarding code, sending a request for automatic display of the boarding code to the boarding code application, so that the boarding code application automatically displays the boarding code, senses and predicts the user's riding behavior, and pushes the boarding code to the user's mobile phone in advance when the user is about to board the bus, technical problems such as too many operations by the user when presenting the boarding code, weak communication signals during peak hours, etc., which lead to slow presentation of the boarding code and untimely response, are solved, thereby better improving the user experience of the boarding code product.
[0146] Figure 7 A block diagram of an automatic display device for boarding codes according to an embodiment of the present disclosure is schematically shown.
[0147] like Figure 7 As shown, the automatic display device for boarding code 700 includes an acquisition module 710, an identification module 720, and a sending module 730.
[0148] An acquisition module 710 is used to acquire a sensor data sequence for representing a user's motion state;
[0149] The recognition module 720 is used to input the sensor data sequence into the user riding behavior recognition model and output the recognition result.
[0150] The sending module 730 is used to send a request for automatic display of the boarding code to the boarding code application when it is determined that the recognition result requires automatic display of the boarding code, so that the boarding code application automatically displays the boarding code.
[0151] According to the embodiments of the present disclosure, by acquiring a sensor data sequence for characterizing the user's motion state; inputting the sensor data sequence into a user's riding behavior recognition model and outputting a recognition result; and in the case where it is determined that the recognition result requires automatic display of the boarding code, sending a request for automatic display of the boarding code to the boarding code application, so that the boarding code application automatically displays the boarding code, senses and predicts the user's riding behavior, and pushes the boarding code to the user's mobile phone in advance when the user is about to board the bus, technical problems such as too many operations by the user when presenting the boarding code, weak communication signals during peak hours, etc., which lead to slow presentation of the boarding code and untimely response, are solved, thereby better improving the user experience of the boarding code product.
[0152] According to an embodiment of the present disclosure, a user riding behavior recognition model can be trained in the following manner: obtain a first model training set, wherein the first model training set includes multiple sensor data sequence samples collected by different sensors in different time periods with the same duration, wherein each sensor data sequence sample has a true value label for characterizing the automatic display of the boarding code or the non-display of the boarding code; each sensor data sequence sample includes multiple point data corresponding to different moments in a time period, and each point data includes: a first target value determined based on N collected values collected by multiple sensors at a first moment; a second target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a moment before the first moment; and a third target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a moment after the first moment; obtain a first target classification algorithm; and train the first target classification algorithm using the first model training set to obtain a user riding behavior recognition model.
[0153] According to an embodiment of the present disclosure, the identification module 720 includes a first acquisition unit, a second acquisition unit, and a first input unit.
[0154] The first acquisition unit is used to acquire a first target sensor data sequence collected within a first target time period with the current time as the end time, and the first target time period is the same as the time period corresponding to a sensor data sequence sample.
[0155] The second acquisition unit is used to acquire a plurality of first target point data obtained according to the first target sensor data sequence.
[0156] The first input unit is used to input a plurality of first target point data into the user riding behavior recognition model so that the user riding behavior recognition model outputs a recognition result.
[0157] According to an embodiment of the present disclosure, the above-mentioned sensor data sequence samples are determined in the following manner: when the target recognition result for multiple first target point data is automatic display of the boarding code, obtaining user feedback information on the target recognition result; when the feedback information is positive feedback, configuring a truth value label for the first target sensor data sequence to characterize the automatic display of the boarding code; when the feedback information is negative feedback, configuring a truth value label for the first target sensor data sequence to characterize the non-display of the boarding code; and taking the first target sensor data sequence configured with the truth value label as a sensor data sequence sample.
[0158] According to the embodiments of the present disclosure, a method for predicting the issuance of a boarding code based on machine learning classification is designed, using sensor data as the main feature and weakening the excessive processing of behavior sequences. As long as certain behavior patterns appear, it can be determined that the next behavior is to display the technical effect of the boarding code, thereby realizing a faster response to the issuance of the boarding code.
[0159] According to an embodiment of the present disclosure, the above-mentioned user riding behavior recognition model training method also includes: obtaining a second model training set, wherein the second model training set includes multiple time samples, each time sample includes time information for characterizing the second moment, and each time sample has a true value label for characterizing the automatic display of the boarding code or the non-display of the boarding code; obtaining a second target classification algorithm; and using the second model training set to train the second target classification algorithm to obtain a user riding behavior recognition model.
[0160] According to an embodiment of the present disclosure, the identification module 720 further includes: a second acquisition unit and a second input unit.
[0161] The second acquisition unit is used to acquire the time information of the current moment.
[0162] The second input unit is used to input time information into the user riding behavior recognition model so that the user riding behavior recognition model outputs a recognition result.
[0163] According to the embodiments of the present disclosure, a method for predicting the issuance of a boarding code based on machine learning classification is designed, taking the user's work and rest time as the main feature, weakening the excessive processing of behavior sequences, and achieving the technical effect of displaying the boarding code as long as certain behavior patterns appear, thereby achieving a faster response to the issuance of the boarding code.
[0164] According to an embodiment of the present disclosure, there are multiple sensors for providing sensor data sequences, each sensor collects one or more collected values at a time, and multiple riding sequences are preset in the user riding behavior recognition model. The method for determining each riding sequence includes: obtaining multiple second target point data collected within the second target time period before the user starts the riding code, each second target point data includes: a first target value determined based on N collected values collected by multiple sensors at a third time; a second target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a time before the third time; and a third target value determined based on the difference between the first target value and N collected values collected by multiple sensors at a time after the third time; clustering the multiple second target point data collected by multiple sensors within the second target time period using a clustering algorithm to obtain multiple clusters; calculating the target motion state of the user represented by each cluster to obtain a first target state sequence within the second target time period; and determining the riding sequence based on the first target state sequence.
[0165] According to an embodiment of the present disclosure, the first target state sequence includes multiple ones, and determining the riding sequence according to the first target state sequence includes: when the occurrence frequency of the first target state sequence is greater than a first preset threshold, determining the first target state sequence as a riding sequence preset in the user riding behavior recognition model.
[0166] According to an embodiment of the present disclosure, the above-mentioned identification module 720 further includes: a third acquisition unit, a fourth acquisition unit, a calculation unit, and an output unit.
[0167] The third acquisition unit is used to acquire a second target sensor data sequence collected within a third target time period with the current time as the end time, wherein the third target time period and the second target time period have the same duration.
[0168] The fourth acquisition unit is used to acquire a second target state sequence calculated according to the second target sensor data sequence.
[0169] The calculation unit is used to calculate the similarity between the second target state sequence and the first target sequence.
[0170] The output unit is used to output the recognition result when the similarity is greater than a second preset threshold.
[0171] According to an embodiment of the present disclosure, the above-mentioned user riding behavior recognition model is deployed in a client or a server capable of communicating with the client.
[0172] According to an embodiment of the present disclosure, the acquisition module 710 includes: a determination unit and a collection unit.
[0173] The determination unit is used to determine a preset collection time period.
[0174] The acquisition unit is used to acquire a sensor data sequence for representing the motion state of the user within a preset acquisition time period.
[0175] According to the modules and units of the embodiments of the present disclosure, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules and units of the embodiments of the present disclosure, any one or more can be split into multiple modules for implementation. According to the modules and units of the embodiments of the present disclosure, any one or more can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, according to the modules and units of the embodiments of the present disclosure, one or more can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0176] For example, any multiple of the acquisition module 710, the identification module 720, and the sending module 730 can be combined in one module / unit for implementation, or any one of the modules / units can be split into multiple modules / units. Alternatively, at least part of the functions of one or more of these modules / units can be combined with at least part of the functions of other modules / units and implemented in one module / unit. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the identification module 720, and the sending module 730 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 710, the identification module 720, and the sending module 730 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0177] It should be noted that the automatic display device part of the boarding code in the embodiment of the present disclosure corresponds to the automatic display method part of the boarding code in the embodiment of the present disclosure. The description of the automatic display device part of the boarding code specifically refers to the automatic display method part of the boarding code, which will not be repeated here.
[0178] Another aspect of the present disclosure provides a computer system, including: one or more processors; and a memory for storing one or more programs, wherein when one or more instructions are executed by the one or more processors, the one or more processors implement the above method.
[0179] Figure 8 A block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 8 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0180] like Figure 8 As shown, the computer system 800 according to the embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0181] In RAM 803, various programs and data required for the operation of system 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other through bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0182] According to an embodiment of the present disclosure, the system 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The system 800 may further include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0183] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0184] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0185] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0186] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .
[0187] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, which contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product is running on an electronic device, the program code is used to enable the electronic device to implement the method for automatic display of the boarding code provided by the embodiment of the present disclosure.
[0188] When the computer program is executed by the processor 801, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0189] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0190] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0192] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for automatically displaying a ride code, comprising: Acquire a sensor data sequence for characterizing a motion state of a user, wherein the sensor data sequence is a collection of sensor data ordered by time; Inputting the sensor data sequence into a user riding behavior recognition model and outputting a recognition result; as well as When it is determined that the recognition result requires automatic display of the boarding code, a request for automatic display of the boarding code is sent to the boarding code application, so that the boarding code application automatically displays the boarding code; The user riding behavior recognition model is trained in the following way: A first model training set is obtained, wherein the first model training set includes a plurality of sensor data sequence samples collected by different sensors in different time periods with the same duration, wherein each of the sensor data sequence samples has a true value label for characterizing whether the boarding code is automatically displayed or not displayed; each of the sensor data sequence samples includes a plurality of point data corresponding to different moments in one of the time periods, and each of the point data includes: A first target value determined according to N collected values collected by the plurality of sensors at a first moment; a second target value determined according to a difference between the first target value and N collected values collected by the plurality of sensors at a moment before the first moment; and A third target value determined according to a difference between the first target value and N collected values collected by the plurality of sensors at a moment after the first moment; Each of the point data is represented as a 3×N dimensional vector set consisting of the first target value, the second target value and the third target value; obtaining a first target classification algorithm; and The first target classification algorithm is trained using the first model training set to obtain the user riding behavior recognition model.
2. The method according to claim 1, wherein: The sensor data sequence is input into the user riding behavior recognition model, and the output recognition result includes: Acquire a first target sensor data sequence collected within a first target time period with the current time as the end time, wherein the first target time period is the same in length as a time period corresponding to a sample of the sensor data sequence; Acquire a plurality of first target point data obtained according to the first target sensor data sequence; and The plurality of first target point data are input into the user riding behavior recognition model so that the user riding behavior recognition model outputs the recognition result.
3. The method according to claim 2, wherein: The sensor data sequence samples are determined in the following manner: When the target recognition result for the plurality of first target point data is to automatically display the boarding code, obtaining feedback information from the user for the target recognition result; In the case where the feedback information is positive feedback, configuring a true value label for characterizing the automatic display of the boarding code for the first target sensor data sequence; In the case where the feedback information is negative feedback, configuring a true value label for the first target sensor data sequence to represent that the boarding code is not displayed; as well as The first target sensor data sequence configured with a true value label is taken as a sensor data sequence sample.
4. The method according to claim 1, wherein: The user riding behavior recognition model is trained in the following way: Obtain a second model training set, wherein the second model training set includes a plurality of time samples, each of the time samples includes time information for characterizing a second moment, and each of the time samples has a true value label for characterizing whether the boarding code is automatically displayed or not displayed; obtaining a second target classification algorithm; and The second target classification algorithm is trained using the second model training set to obtain the user riding behavior recognition model.
5. The method according to claim 4, wherein: The sensor data sequence is input into the user riding behavior recognition model, and the output recognition result includes: Get the current time information; and The time information is input into the user riding behavior recognition model so that the user riding behavior recognition model outputs the recognition result.
6. The method according to claim 1, wherein: There are multiple sensors for providing the sensor data sequence, each of which collects one or more collected values at a time. There are multiple riding sequences preset in the user riding behavior recognition model, and the determination method of each riding sequence includes: Acquire multiple second target point data collected within the second target time period before the user starts the boarding code, each of the second target point data includes: A first target value determined according to N collected values collected by the plurality of sensors at a third moment; a second target value determined according to a difference between the first target value and N collected values collected by the plurality of sensors at a moment before the third moment; and A third target value determined according to a difference between the first target value and N collected values collected by the plurality of sensors at a moment after the third moment; Clustering a plurality of the second target point data collected by the plurality of the sensors within the second target time period using a clustering algorithm to obtain a plurality of clusters; Calculating the target motion state of the user represented by each of the clusters to obtain a first target state sequence within the second target time period; and The boarding sequence is determined according to the first target state sequence.
7. The method according to claim 6, wherein: The first target state sequence includes a plurality of sequences, and determining the boarding sequence according to the first target state sequence includes: When the occurrence frequency of the first target state sequence is greater than a first preset threshold, the first target state sequence is determined to be a riding sequence preset in the user riding behavior recognition model.
8. The method according to claim 6, wherein: The sensor data sequence is input into the user riding behavior recognition model, and the output recognition result includes: Acquire a second target sensor data sequence collected within a third target time period with the current time as the end time, wherein the third target time period and the second target time period have the same length; Acquire a second target state sequence calculated according to the second target sensor data sequence; Calculating the similarity between the second target state sequence and the first target sequence; and When the similarity is greater than a second preset threshold, the recognition result is output.
9. The method according to claim 1, wherein: The user riding behavior recognition model is deployed in a client or a server capable of communicating with the client.
10. The method according to claim 1, wherein: The sensor data sequence for characterizing the user's motion state is obtained by: Determine a preset collection time period; and A sensor data sequence for characterizing the motion state of the user is collected within the preset collection time period.
11. A device for automatically displaying a boarding code, comprising: An acquisition module, used to acquire a sensor data sequence for representing a motion state of a user, wherein the sensor data sequence is a collection of sensor data sorted by time; A recognition module, used for inputting the sensor data sequence into a user riding behavior recognition model and outputting a recognition result; as well as A sending module, configured to send a request for automatically displaying the boarding code to the boarding code application when it is determined that the recognition result requires automatic display of the boarding code, so that the boarding code application automatically displays the boarding code; The user riding behavior recognition model is trained in the following way: A first model training set is obtained, wherein the first model training set includes a plurality of sensor data sequence samples collected by different sensors in different time periods with the same duration, wherein each of the sensor data sequence samples has a true value label for characterizing whether the boarding code is automatically displayed or not displayed; each of the sensor data sequence samples includes a plurality of point data corresponding to different moments in one of the time periods, and each of the point data includes: A first target value determined according to N collected values collected by the plurality of sensors at a first moment; a second target value determined according to a difference between the first target value and N collected values collected by the plurality of sensors at a moment before the first moment; and A third target value determined according to a difference between the first target value and N collected values collected by the plurality of sensors at a moment after the first moment; Each of the point data is represented as a 3×N dimensional vector set consisting of the first target value, the second target value and the third target value; obtaining a first target classification algorithm; and The first target classification algorithm is trained using the first model training set to obtain the user riding behavior recognition model.
12. A computer system comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 10.
14. A computer program product comprising computer executable instructions, which when executed are used to implement the method of any one of claims 1 to 10.
Citation Information
Patent Citations
Terminal control method and mobile terminal
CN110022409A
Travel prediction method, apparatus and device, and storage medium
CN111427932A
Behavior pattern analysis method and system based on Internet of Things
CN111695426A