為了更好的理解上述技術方案,下面透過圖式以及具體實施例對本說明書實施例的技術方案做詳細的說明,應當理解本說明書實施例以及實施例中的具體特徵是對本說明書實施例技術方案的詳細的說明,而不是對本說明書技術方案的限定,在不衝突的情況下,本說明書實施例以及實施例中的技術特徵可以相互組合。
本說明書實施例廣泛應用於掃碼、拍攝等場景。
以掃碼為例,如圖1所示,使用者使用行動終端掃碼或拍照時行動終端的姿勢與使用者平時使用行動終端或者剛拿出行動終端時的姿勢不同,行動終端從拿出來,到行動終端對準識別碼開始掃碼,這個過程中行動終端在空間中的運動軌跡是有規律可尋的。假設識別碼張貼在牆壁上,使用者首先拿出並舉起行動終端,進而對準識別碼,這一過程中行動終端在與地面的垂直方向上有一個加速,減速最後幾乎停止(加速結果體現在垂直行動距離),且行動終端還會有旋轉(旋轉結果體現在與水平線的夾角角度。這些資料都是可以透過行動終端內置的運動感測器獲取並計算出來。因此可以獲取行動終端在掃碼或拍攝過程的運動特徵(即目標功能運動軌跡),一旦檢測到使用者使用的行動終端的運動軌跡符合目標功能運動軌跡,那麼就可以判斷出使用者想要打開攝影機開始掃碼或拍攝,而直接進入掃碼頁面或拍攝頁面,無需使用者點擊掃碼按鈕,從而減少使用者操作路徑,快速呼叫目標功能。
本說明書實施例中,行動終端的運動感測器可以是陀螺儀、加速度計等等。
其中,如圖2所示,陀螺儀是基於角動量守恆的原理,沿著某個特定的座標軸(X軸、Y軸、Z軸)測量旋轉速率。在使用中,陀螺儀的轉子在高速旋轉時,始終指向一個固定的方向,當運動物體的運動方向偏離預定方向時,陀螺儀就可以感受出來。
其中,加速度計是一種能夠測量加速度的感測器。如圖3所示,加速度計的參考座標系是基於行動終端建立的,其X軸和Y軸所在平面與行動終端共面,Z軸始終垂直於行動終端的平面。加速度計檢測在三個軸上的受力情況,其中重力不可忽略,以圖3為例,行動終端垂直時,Y軸負方向指向底薪,加速度計獲得的值為(0,-1,0),即行動終端在X軸和Z軸方向受力為0,在Y軸方向受到重力,其加速度為重力加速度;以圖4為例,若行動終端傾斜,可以透過加速度計獲取的重力在Y軸和Z軸的分量,透過幾何原理計算出在X軸的傾斜角度。
綜上,行動終端在X軸、Y軸或Z軸的旋轉角度可以透過加速度計計算得到,行動終端在X軸、Y軸或Z軸上的旋轉速率可以透過陀螺儀獲得,行動終端在X軸、Y軸(地面的垂直方向)、Z軸的運動速度和距離可以透過陀螺儀和加速度計獲取的資料綜合計算得出。
第一態樣,本說明書實施例提供一種呼叫目標功能的方法,請參考圖5,包括:
步驟501、當滿足檢測觸發條件時,檢測行動終端的運動軌跡。
其中,運動軌跡的檢測時間可以是預先設定的固定時長,也可以是可變時長。
其中,運動軌跡是透過運動感測器檢測的,例如,可以透過陀螺儀和加速度計檢測,還可以僅透過陀螺儀或僅透過加速度計檢測。
步驟503、將檢測到的上述運動軌跡與目標功能運動軌跡匹配,目標功能運動軌跡為行動終端呼叫目標功能所產生的運動軌跡。
其中,既可以將檢測到的全部運動軌跡與目標運動軌跡進行匹配,也可以將檢測到的部分運動軌跡與目標運動軌跡進行匹配。
以固定檢測時長為例,假設目標運動軌跡是時間長度為2秒,檢測時長也為2秒,則將檢測到的2秒運動軌跡與目標運動軌跡進行匹配;以不固定檢測時長為例,假設目標運動軌跡的時間長度為2秒,檢測了5秒的行動終端運動軌跡,那麼,較佳地使用其中2秒運動軌跡與目標功能運動軌跡進行匹配。運動軌跡的擷取方式有多種,例如,取最後2秒運動軌跡,又例如,擷取從運動資料滿足設定臨限值起的2秒的運動軌跡,運動資料可以是在某個方向的行動距離、行動速度、行動加速度、在某個方向上的旋轉角度、角速度、角加速度。
步驟505、在確認匹配後,呼叫行動終端的目標功能。
本說明書實施例提供的方法,行動終端的目標功能可以但不僅限於包括掃碼功能或拍攝功能。
本說明書實施例提供的方法,當滿足檢測觸發條件時,檢測行動終端的運動軌跡,並將檢測到的運動軌跡與目標功能運動軌跡匹配,若匹配,則意味著使用者有呼叫目標功能的需求,因此,呼叫所述行動終端的目標功能。採用本說明書實施例提供的方法,使用者不需要手動觸發對目標功能的呼叫,只需要作出使用目標功能的動作(例如拿起行動終端作出掃碼的動作),本說明書實施例提供的方法即可自動識別使用者的意圖,進而呼叫目標功能,其實現方式快速、便捷。
本說明書實施例中,若目標功能是掃碼功能,上述檢測觸發條件可以但不僅限於包括以下至少一條:行動終端的目標應用程式被呼叫;行動終端的運動資料達到設定臨限值等等。若目標功能是拍攝功能,上述檢測觸發條件可以但不僅限於包括以下至少一條:行動終端被喚醒;行動終端的運動資料達到設定臨限值。
在應用過程中,可以設置單一觸發條件,也可以設置多個觸發條件。
本說明書實施例中,上述步驟503的實現方式有多種,例如,可以透過臨限值匹配的方式實現,也可以透過模型匹配的方式實現。若採用模型匹配的方式實現,具體的,將檢測到的運動軌跡輸入目標功能運動軌跡模型,目標功能運動軌跡模型是使用目標功能運動軌跡樣本訓練得到的,目標功能運動軌跡樣本是對目標功能運動軌跡進行處理得到的。
本說明書實施例中,可以但不僅限於採用深度學習模型,例如CNN和RNN(LSTM)。其中,模型深度可以為4或者5層,以CNN為例,可以使用幾層卷積、幾層池化,使用tanh或relu作為活化函數。
本說明書實施例中,可以使用多個使用者的歷史使用目標功能過程的目標功能運動軌跡樣本訓練目標功能運動軌跡模型。
每個人在掃碼過程中,行動終端運動特徵是不盡相同的,比如有的人的手臂長,那麼在垂直方向的運動距離就長一些,這些資料可以透過使用者的歷史掃碼過程的資料提取,進而提升識別率。較佳地,使用上述行動終端的歷史目標功能運動軌跡樣本訓練得到目標功能運動軌跡。即使用使用者自己的歷史掃碼過程得到的目標功能運動軌跡樣本訓練目標功能運動軌跡模型,從而提高匹配的準確度。
其中,所述行動終端的歷史目標功能運動軌跡樣本的獲取方式可以但不僅限於是:在滿足記錄觸發條件時,記錄所述行動終端的運動軌跡;當確認目標功能被呼叫,根據記錄的運動軌跡產生歷史目標功能運動軌跡樣本。
以掃碼為例,當行動終端的目標應用程式被呼叫,意味著使用者有可能需要呼叫掃碼功能,因此,行動終端的目標應用程式被呼叫即滿足了記錄觸發條件。但目標應用程式被呼叫,不意味著一定呼叫了目標功能,以支付寶為例,使用者打開了支付寶,雖然意味著使用者有可能使用其掃碼功能,但不意味著使用者必然使用掃碼功能,因此,在滿足觸發條件時,雖然記錄運動終端的運動軌跡,但並不意味著該運動軌跡一定是目標功能的運動軌跡,只有在確定目標功能被呼叫後,才能將記錄的運動軌跡產生歷史目標功能運動軌跡樣本。
其中,運動軌跡的記錄可以是即時的,即在動態檢測到觸發條件滿足時,即時記錄運動軌跡;運動軌跡的記錄也可以是非即時的,例如透過呼叫行動終端的日誌或者目標應用程式的日誌,根據日誌中記錄的資訊確定目標應用程式是否被呼叫,每次呼叫後的運動軌跡,以及本次呼叫是否為了呼叫目標功能。
應當指出的是,記錄觸發條件不僅限於行動終端的目標應用程式被呼叫,還可以是其他觸發條件,例如,行動終端的運動資料達到設定臨限值即開始記錄,且在確定目標功能被呼叫後產生樣本。
以拍攝為例,當行動終端被喚醒,意味著使用者有可能需要呼叫攝影機的拍攝功能,因此,行動終端的行動終端被喚醒即滿足了記錄觸發條件。但行動終端被喚醒,不意味著一定呼叫了目標功能,因此,在滿足觸發條件時,雖然記錄運動終端的運動軌跡,但並不意味著該運動軌跡一定是目標功能的運動軌跡,只有在確定目標功能被呼叫後,才能將記錄的運動軌跡產生歷史目標功能運動軌跡樣本。
其中,運動軌跡的記錄可以是即時的,即在動態檢測到觸發條件滿足時,即時記錄運動軌跡;運動軌跡的記錄也可以是非即時的,例如透過呼叫行動終端的日誌,根據日誌中記錄的資訊確定攝影機是否被呼叫,每次呼叫後的運動軌跡,以及本次呼叫是否為了呼叫目標功能。
應當指出的是,記錄觸發條件不僅限於行動終端的行動終端被喚醒,還可以是其他觸發條件,例如,行動終端的運動資料達到設定臨限值即開始記錄,且在確定目標功能被呼叫後產生樣本。
發明人在實現本發明的過程中注意到,使用行動終端掃碼功能和拍攝功能的時候,都需要呼叫攝影機,且拍攝軌跡很相似,因此,本說明書實施例中,掃碼功能和拍攝功能可以使用相同的運動軌跡模型,相應的,歷史掃碼功能運動軌跡樣本和歷史拍攝功能運動軌跡樣本均可以用來訓練共同的運動軌跡模型。相應的,記錄觸發條件可以是以下至少一個條件:目標應用程式被呼叫、行動終端被喚醒、運動資料達到設定臨限值等等。
本說明書實施例中,運動軌跡包括行動終端的運動資料的集合,運動資料是根據運動感測器按照設定的採樣頻率採集的資料得到的。
第二態樣,基於同一發明構思,本說明書實施例提供一種呼叫目標功能的裝置,請參考圖6,包括:
運動軌跡檢測模組601,用於當滿足檢測觸發條件時,檢測行動終端的運動軌跡;
運動軌跡匹配模組602,用於將檢測到的所述運動軌跡與目標功能運動軌跡匹配,所述目標功能運動軌跡為行動終端呼叫目標功能所產生的運動軌跡;
目標功能呼叫模組603,用於在確認匹配後,呼叫所述行動終端的目標功能。
本說明書實施例提供的裝置,當滿足檢測觸發條件時,檢測行動終端的運動軌跡,並將檢測到的運動軌跡與目標功能運動軌跡匹配,若匹配,則意味著使用者有呼叫目標功能的需求,因此,呼叫所述行動終端的目標功能。採用本說明書實施例提供的技術方案,使用者不需要手動觸發對目標功能的呼叫,只需要作出使用目標功能的動作(例如拿起行動終端作出掃碼的動作),本說明書實施例提供的技術方案即可自動識別使用者的意圖,進而呼叫目標功能,其實現方式快速、便捷。
可選的,所述運動軌跡匹配模組具體用於:
將檢測到的所述運動軌跡輸入目標功能運動軌跡模型,所述目標功能運動軌跡模型是使用目標功能運動軌跡樣本訓練得到的。
可選的,所述目標功能運動軌跡是使用所述行動終端的歷史目標功能運動軌跡樣本訓練得到的。
可選的,還包括歷史運動軌跡樣本獲取模組,用於:
在滿足記錄觸發條件時,記錄所述行動終端的運動軌跡;當確認目標功能被呼叫,根據記錄的運動軌跡產生歷史目標功能運動軌跡樣本。
可選的,所述行動終端的目標功能包括掃碼功能,所述記錄觸發條件包括:
所述行動終端的目標應用程式被呼叫;
可選的,所述行動終端的目標功能包括拍攝功能,所述記錄觸發條件包括:所述行動終端被喚醒。
可選的,所述運動軌跡包括所述行動終端的運動資料的集合,所述運動資料是根據所述行動終端的運動感測器按照設定的採樣頻率採集到的資料得到的。
可選的,所述行動終端的目標功能包括掃碼功能,所述檢測觸發條件包括以下至少一條:所述行動終端的目標應用程式被呼叫;所述行動終端的運動資料達到設定臨限值。
可選的,所述行動終端的目標功能包括拍攝功能,所述檢測觸發條件包括以下至少一條:所述行動終端被喚醒;所述行動終端的運動資料達到設定臨限值。
本說明書實施例提供的裝置,其實現方式可以參照上述方法實施例的描述,重複之處不再贅述。
第三態樣,本說明書實施例提供一種行動終端,包括:記憶體,用於儲存電腦程式;處理器,用於執行所述電腦程式時實現上述任意方法實施例的步驟。
第四態樣,本說明書實施例提供一種電腦可讀儲存媒體,其上儲存有電腦程式,所述電腦程式被處理器執行時實現上述任意方法實施例的步驟。
本說明書是參照根據本說明書實施例的方法、設備(系統)、和電腦程式產品的流程圖及/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖及/或方塊圖中的每一流程及/或方塊、以及流程圖及/或方塊圖中的流程及/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式化資料處理設備的處理器以產生一個機器,使得透過電腦或其他可程式化資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程及/或方塊圖一個方塊或多個方塊中指定的功能的設備。
這些電腦程式指令也可儲存在能引導電腦或其他可程式化資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令設備的製造品,該指令設備實現在流程圖一個流程或多個流程及/或方塊圖一個方塊或多個方塊中指定的功能。
這些電腦程式指令也可裝載到電腦或其他可程式化資料處理設備上,使得在電腦或其他可程式化設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式化設備上執行的指令提供用於實現在流程圖一個流程或多個流程及/或方塊圖一個方塊或多個方塊中指定的功能的步驟。
儘管已描述了本說明書的優選實施例,但本領域內的技術人員一旦得知了基本進步性概念,則可對這些實施例作出另外的變更和修改。所以,所附申請專利範圍意欲解釋為包括優選實施例以及落入本說明書範圍的所有變更和修改。
顯然,本領域的技術人員可以對本說明書進行各種改動和變形而不脫離本說明書的精神和範圍。這樣,倘若本說明書的這些修改和變形屬本說明書申請專利範圍及其等同技術的範圍之內,則本說明書也意圖包含這些改動和變形在內。In order to better understand the above technical solutions, the following describes the technical solutions of the embodiments of this specification in detail through the drawings and specific embodiments. It should be understood that the embodiments of this specification and the specific features in the embodiments are the technical solutions of the embodiments of this specification. The detailed description is not a limitation on the technical solution of this specification. The embodiments of this specification and the technical features in the embodiments can be combined with each other if there is no conflict.
The embodiments of this specification are widely used in scenes such as scanning codes and shooting.
Take scanning code as an example. As shown in Figure 1, the posture of the mobile terminal when the user uses the mobile terminal to scan or take a photo is different from the posture when the user uses the mobile terminal or just took out the mobile terminal. Go to the mobile terminal to align the identification code and start to scan the code. During this process, the mobile terminal's motion trajectory in the space can be found regularly. Assuming that the identification code is posted on the wall, the user first takes out and lifts the mobile terminal, and then aligns the identification code. During this process, the mobile terminal accelerates in the vertical direction to the ground, and the deceleration almost stops (the result of acceleration is reflected in Vertical movement distance), and the mobile terminal will also rotate (the result of rotation is reflected in the angle of the horizontal line. These data can be obtained and calculated through the built-in motion sensor of the mobile terminal. So you can get the scan code of the mobile terminal Or the motion characteristics of the shooting process (that is, the target function motion trajectory). Once it is detected that the motion trajectory of the mobile terminal used by the user matches the target function motion trajectory, it can be determined that the user wants to turn on the camera to start scanning or shooting. Directly enter the scan code page or shooting page, without the user clicking the scan code button, thereby reducing the user's operation path and quickly calling the target function.
In the embodiment of this specification, the motion sensor of the mobile terminal may be a gyroscope, an accelerometer, and so on.
Among them, as shown in Figure 2, the gyroscope is based on the principle of conservation of angular momentum, and measures the rotation rate along a specific coordinate axis (X axis, Y axis, Z axis). In use, the rotor of the gyroscope always points to a fixed direction when it rotates at a high speed. When the direction of movement of the moving object deviates from the predetermined direction, the gyroscope can feel it.
Among them, the accelerometer is a sensor that can measure acceleration. As shown in Figure 3, the reference coordinate system of the accelerometer is established based on the mobile terminal. The X-axis and Y-axis are coplanar with the mobile terminal, and the Z-axis is always perpendicular to the plane of the mobile terminal. The accelerometer detects the force on the three axes, among which gravity cannot be ignored. Take Figure 3 as an example. When the mobile terminal is vertical, the negative direction of the Y axis points to the basic salary, and the accelerometer obtains the value (0, -1, 0) , That is, the mobile terminal receives 0 force in the X-axis and Z-axis directions, and when it receives gravity in the Y-axis direction, its acceleration is gravitational acceleration; taking Figure 4 as an example, if the mobile terminal is tilted, the gravity can be obtained through the accelerometer on the Y-axis Calculate the inclination angle on the X axis through the geometrical principle and the components of the Z axis.
In summary, the rotation angle of the mobile terminal on the X-axis, Y-axis or Z-axis can be calculated through the accelerometer, and the rotation rate of the mobile terminal on the X-axis, Y-axis or Z-axis can be obtained through the gyroscope. , Y-axis (the vertical direction of the ground), Z-axis movement speed and distance can be comprehensively calculated through the data obtained by the gyroscope and accelerometer.
In the first aspect, an embodiment of this specification provides a method for calling a target function. Please refer to FIG. 5, which includes:
Step 501: When the detection trigger condition is met, detect the motion track of the mobile terminal.
Wherein, the detection time of the motion trajectory may be a preset fixed time period or a variable time period.
Among them, the motion trajectory is detected through a motion sensor, for example, it can be detected through a gyroscope and an accelerometer, and it can also be detected only through a gyroscope or only an accelerometer.
Step 503: Match the detected motion trajectory with the target function motion trajectory, and the target function motion trajectory is the motion trajectory generated by the mobile terminal calling the target function.
Among them, all the detected motion trajectories can be matched with the target motion trajectory, or part of the detected motion trajectories can be matched with the target motion trajectory.
Taking fixed detection duration as an example, assuming that the target motion trajectory has a time length of 2 seconds and the detection time length is also 2 seconds, then the detected 2-second motion trajectory is matched with the target motion trajectory; taking the non-fixed detection time length as For example, suppose the time length of the target motion trajectory is 2 seconds, and the mobile terminal motion trajectory of 5 seconds is detected, then it is better to use the 2-second motion trajectory to match the target function motion trajectory. There are many ways to capture motion trajectory. For example, take the last 2 seconds of motion trajectory. For example, capture the 2-second motion trajectory from the time the motion data meets the set threshold. The motion data can be the distance of the movement in a certain direction. , Action speed, action acceleration, rotation angle in a certain direction, angular velocity, angular acceleration.
Step 505: After confirming the match, call the target function of the mobile terminal.
In the method provided in the embodiment of this specification, the target function of the mobile terminal may include, but is not limited to, a code scanning function or a shooting function.
The method provided in the embodiment of this specification detects the movement trajectory of the mobile terminal when the detection trigger condition is met, and matches the detected movement trajectory with the movement trajectory of the target function. If it matches, it means that the user has a need to call the target function. , Therefore, call the target function of the mobile terminal. Using the method provided by the embodiment of this specification, the user does not need to manually trigger a call to the target function, but only needs to make an action to use the target function (for example, pick up the mobile terminal to scan the code). The method provided in the embodiment of this specification is It can automatically recognize the user's intention, and then call the target function, which is fast and convenient.
In the embodiment of this specification, if the target function is a code scanning function, the above detection trigger condition may include but is not limited to at least one of the following: the target application of the mobile terminal is called; the exercise data of the mobile terminal reaches the set threshold, and so on. If the target function is a shooting function, the aforementioned detection trigger condition may include but is not limited to at least one of the following: the mobile terminal is awakened; and the motion data of the mobile terminal reaches the set threshold.
In the application process, you can set a single trigger condition or multiple trigger conditions.
In the embodiment of this specification, there are many ways to implement the above step 503, for example, it can be implemented through threshold matching, or through model matching. If it is achieved by model matching, specifically, the detected motion trajectory is input into the target function motion trajectory model. The target function motion trajectory model is obtained by training using the target function motion trajectory sample, and the target function motion trajectory sample is the target function motion The trajectory is processed.
In the embodiments of this specification, deep learning models such as CNN and RNN (LSTM) can be used but not limited to. Among them, the model depth can be 4 or 5 layers. Taking CNN as an example, several layers of convolution and several layers of pooling can be used, and tanh or relu can be used as the activation function.
In the embodiment of the present specification, the target function motion trajectory samples of multiple users' historical use of the target function may be used to train the target function motion trajectory model.
In the process of scanning the code, the mobile terminal movement characteristics are different for each person. For example, some people have longer arms, and the distance of movement in the vertical direction is longer. These data can be obtained through the data of the user's historical scanning process. Extract to improve the recognition rate. Preferably, the target function motion trajectory is obtained by training using the historical target function motion trajectory sample of the mobile terminal. That is, the target function motion trajectory samples obtained by the user's own historical code scanning process are used to train the target function motion trajectory model, thereby improving the accuracy of matching.
Wherein, the method of acquiring the movement trajectory samples of the historical target function of the mobile terminal may be, but not limited to: recording the movement trajectory of the mobile terminal when the recording trigger condition is met; when the target function is confirmed to be called, according to the recorded movement trajectory Generate historical target function motion trajectory samples.
Taking code scanning as an example, when the target application of the mobile terminal is called, it means that the user may need to call the scanning function. Therefore, the target application of the mobile terminal is called to meet the record trigger condition. However, when the target application is called, it does not mean that the target function must be called. Take Alipay as an example. The user opens Alipay. Although it means that the user may use its scan code function, it does not mean that the user must use the scan code. Therefore, when the trigger condition is met, although the motion trajectory of the motion terminal is recorded, it does not mean that the motion trajectory must be the motion trajectory of the target function. Only after the target function is called can the recorded motion trajectory be generated Samples of movement trajectories of historical target functions.
Among them, the recording of the motion trajectory can be real-time, that is, when the trigger condition is met dynamically detected, the motion trajectory is recorded in real time; the recording of the motion trajectory can also be non-real-time, such as by calling the log of the mobile terminal or the log of the target application. According to the information recorded in the log, determine whether the target application is called, the movement track after each call, and whether the call is for calling the target function.
It should be noted that the recording trigger condition is not limited to the target application of the mobile terminal being called, but can also be other trigger conditions. For example, the mobile terminal's exercise data reaches the set threshold and the recording starts, and after the target function is determined to be called Generate samples.
Taking shooting as an example, when the mobile terminal is awakened, it means that the user may need to call the camera's shooting function. Therefore, the mobile terminal of the mobile terminal is awakened to meet the recording trigger condition. However, if the mobile terminal is awakened, it does not mean that the target function must be called. Therefore, although the motion trajectory of the mobile terminal is recorded when the trigger condition is met, it does not mean that the motion trajectory must be the motion trajectory of the target function. After the target function is called, the recorded motion track can be generated as a historical target function motion track sample.
Among them, the recording of the motion trajectory can be real-time, that is, when the trigger condition is met dynamically detected, the motion trajectory is recorded in real time; the recording of the motion trajectory can also be non-real-time, for example, by calling the log of the mobile terminal, based on the information recorded in the log Determine whether the camera is called, the movement track after each call, and whether this call is for calling the target function.
It should be noted that the recording trigger condition is not limited to the mobile terminal of the mobile terminal being awakened, but can also be other trigger conditions. For example, the movement data of the mobile terminal reaches the set threshold and the recording starts, and it is generated after the target function is determined to be called. sample.
In the process of implementing the present invention, the inventor noticed that when using the scan code function and shooting function of the mobile terminal, the camera needs to be called, and the shooting track is very similar. Therefore, in the embodiment of this specification, the scan code function and the shooting function can be Using the same motion trajectory model, correspondingly, the motion trajectory samples of the historical scanning code function and the motion trajectory samples of the historical shooting function can be used to train a common motion trajectory model. Correspondingly, the recording trigger condition may be at least one of the following conditions: the target application is called, the mobile terminal is awakened, the exercise data reaches the set threshold, and so on.
In the embodiment of this specification, the motion track includes a collection of motion data of the mobile terminal, and the motion data is obtained based on the data collected by the motion sensor according to the set sampling frequency.
In the second aspect, based on the same inventive concept, an embodiment of this specification provides a device for calling a target function. Please refer to FIG. 6, including:
The motion track detection module 601 is used to detect the motion track of the mobile terminal when the detection trigger condition is met;
The motion trajectory matching module 602 is configured to match the detected motion trajectory with the target function motion trajectory, and the target function motion trajectory is the motion trajectory generated by the mobile terminal calling the target function;
The target function call module 603 is configured to call the target function of the mobile terminal after confirming the match.
The device provided by the embodiment of this specification detects the movement trajectory of the mobile terminal when the detection trigger condition is met, and matches the detected movement trajectory with the movement trajectory of the target function. If it matches, it means that the user needs to call the target function. , Therefore, call the target function of the mobile terminal. Using the technical solution provided by the embodiment of this specification, the user does not need to manually trigger a call to the target function, but only needs to make an action to use the target function (for example, pick up the mobile terminal to scan the code). The technology provided by the embodiment of this specification The solution can automatically recognize the user's intention, and then call the target function, and its implementation is fast and convenient.
Optionally, the motion trajectory matching module is specifically used for:
The detected motion trajectory is input into a target function motion trajectory model, and the target function motion trajectory model is obtained by training using target function motion trajectory samples.
Optionally, the target function motion trajectory is obtained by training using a historical target function motion trajectory sample of the mobile terminal.
Optionally, it also includes a historical motion trajectory sample acquisition module for:
When the recording trigger condition is met, the movement track of the mobile terminal is recorded; when it is confirmed that the target function is called, a historical target function movement track sample is generated according to the recorded movement track.
Optionally, the target function of the mobile terminal includes a code scanning function, and the recording trigger condition includes:
The target application of the mobile terminal is called;
Optionally, the target function of the mobile terminal includes a shooting function, and the recording trigger condition includes: the mobile terminal is awakened.
Optionally, the motion trajectory includes a collection of motion data of the mobile terminal, and the motion data is obtained based on data collected by a motion sensor of the mobile terminal according to a set sampling frequency.
Optionally, the target function of the mobile terminal includes a code scanning function, and the detection trigger condition includes at least one of the following: the target application of the mobile terminal is called; and the exercise data of the mobile terminal reaches a set threshold.
Optionally, the target function of the mobile terminal includes a shooting function, and the detection trigger condition includes at least one of the following: the mobile terminal is awakened; and the exercise data of the mobile terminal reaches a set threshold.
For the implementation of the device provided in the embodiment of this specification, reference may be made to the description of the above method embodiment, and the repetition is not repeated here.
In a third aspect, an embodiment of this specification provides a mobile terminal, which includes: a memory for storing a computer program; and a processor for implementing the steps of any of the foregoing method embodiments when the computer program is executed.
In a fourth aspect, an embodiment of this specification provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the foregoing method embodiments are implemented.
This specification is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, dedicated computers, embedded processors, or other programmable data processing equipment to generate a machine that can be executed by the processors of the computer or other programmable data processing equipment Produce equipment for realizing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including the instruction device , The instruction device realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to generate computer-implemented processing, so that the computer or other programmable equipment The instructions executed above provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
Although the preferred embodiments of this specification have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic progressive concepts. Therefore, the scope of the attached patent application is intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of this specification.
Obviously, those skilled in the art can make various changes and modifications to this specification without departing from the spirit and scope of this specification. In this way, if these modifications and variations of this specification fall within the scope of the patent application for this specification and its equivalent technology, this specification is also intended to include these modifications and variations.