Application Running Terminal Switching Method, Device, Medium and Electronic Device
By collecting and analyzing the mobile data of the first terminal and the second terminal, determining their respective postures, and automatically switching the terminals when the target application switches the posture, the problem of manual operation of the device coordination linkage in the prior art is solved, and intelligent terminal switching is realized.
Patent Information
- Application Number
- CN202210259749.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-03-16
AI Technical Summary
In the prior art, device collaboration usually requires manual operation by users, and intelligent terminal switching cannot be achieved.
By collecting mobile data between the first terminal and the second terminal, the respective postures are determined, and when the target application switches, the application run terminal is automatically switched.
It realizes intelligent terminal switching between devices, reduces the complexity of user manual operations, and improves the intelligence of the linkage process.
Smart Images

Figure CN114722911B_ABST
Abstract
Description
Background Art
[0002] In recent years, with the rapid development of wearable devices, there have been more and more linkages for device collaboration between various wearable devices and devices such as mobile phones. For example, devices such as smart bracelets can directly collect users' motion data and send it to the mobile phone for motion data analysis; another example is that a smart watch, as a mobile phone accessory, can remotely control the mobile phone to take pictures, receive and reply to mobile phone messages, and select and control music playback. However, in the related art, the above-mentioned linkage methods usually require users to control through manual operations and cannot perform intelligent control. Summary of the Invention
[0003] The purpose of the present disclosure is to provide a method for switching an application running terminal, an apparatus for switching an application running terminal, a computer-readable medium, and an electronic device, so as to at least to a certain extent improve the intelligence of the switching process between linked terminals and avoid complex manual switching operations by users.
[0004] According to a first aspect of the present disclosure, there is provided a method for switching an application running terminal, which is applied to a first terminal and a second terminal that have established a communication connection, and includes: in response to the first terminal running a target application, obtaining first movement data of the first terminal and second movement data of the second terminal corresponding to the first movement data; determining a first terminal posture according to the first movement data, and determining a second terminal posture according to the second movement data; when the first terminal posture and the second terminal posture conform to a switching posture corresponding to the target application, switching the running terminal of the target application to the second terminal based on the communication connection.
[0005] According to a second aspect of the present disclosure, there is provided an apparatus for switching an application running terminal, which is applied to a first terminal and a second terminal that have established a communication connection, and includes: a data acquisition module, configured to obtain first movement data of the first terminal and second movement data of the second terminal corresponding to the first movement data in response to the first terminal running a target application; a posture determination module, configured to determine a first terminal posture according to the first movement data and determine a second terminal posture according to the second movement data; a terminal switching module, configured to switch the running terminal of the target application to the second terminal based on the communication connection when the first terminal posture and the second terminal posture conform to a switching posture corresponding to the target application.
[0006] According to a third aspect of the present disclosure, there is provided a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method is implemented.
[0007] According to a fourth aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the above-described method.
[0008] In the method for switching the running terminal of an application provided by an embodiment of the present disclosure, when the target application is running on the first terminal, by collecting the movement data of the first terminal and the second terminal, that is, the first movement data and the second movement data, and then respectively determining the postures of the first terminal and the second terminal according to the first movement data and the second movement data, and when the postures of the first terminal and the second terminal conform to the switching postures corresponding to the target application, the running terminal of the target application is switched to the second terminal based on the communication connection. By respectively collecting the movement data corresponding to the two terminals to determine the postures corresponding to the first terminal and the second terminal, and then when the postures of the first terminal and the second terminal conform to the switching postures corresponding to the target application, the running terminal of the target application is intelligently switched, avoiding the need for the user to perform complex manual switching operations.
[0009] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:
[0011] Figure 1 A schematic diagram showing an exemplary system architecture to which the embodiments of the present disclosure can be applied;
[0012] Figure 2 A schematic diagram showing an electronic device to which the embodiments of the present disclosure can be applied;
[0013] Figure 3 A flowchart schematically showing a method for switching the running terminal of an application in an exemplary embodiment of the present disclosure;
[0014] Figure 4 A flowchart schematically showing a method for determining the postures of the first terminal and the second terminal in an exemplary embodiment of the present disclosure;
[0015] Figure 5 A flowchart schematically showing a method for posture recognition in an exemplary embodiment of the present disclosure;
[0016] Figure 6 Schematically shows a flowchart of a method for training a pose recognition model in an exemplary embodiment of the present disclosure;
[0017] Figure 7 Schematically shows a flowchart of a method for performing moving endpoint positioning on sample data in an exemplary embodiment of the present disclosure;
[0018] Figure 8 Schematically shows a flowchart of another method for training a pose recognition model in an exemplary embodiment of the present disclosure;
[0019] Figure 9 Schematically shows a flowchart of another method for switching an application running terminal in an exemplary embodiment of the present disclosure;
[0020] Figure 10 Schematically shows a schematic diagram of the composition of an application running terminal switching device in an exemplary embodiment of the present disclosure. Detailed implementation manners
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0022] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0023] Figure 1 Shows a schematic diagram of the system architecture of an exemplary application environment to which the method and device for switching an application running terminal according to the embodiments of the present disclosure can be applied.
[0024] As Figure 1As shown, the system architecture 100 may include two or more of the terminal devices 101, 102, 103, the network 104, and the 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, wireless communication links, or fiber optic cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with mobile data collection and processing functions, including but not limited to desktop computers, portable computers, smartphones, tablets, and smart wearable devices, etc. It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in
[0025] The application running terminal switching method provided by the embodiments of the present disclosure is generally executed by the terminal devices 101, 102, 103. Correspondingly, the application running terminal switching device is generally set in the terminal devices 101, 102, 103. However, those skilled in the art can easily understand that the application running terminal switching method provided by the embodiments of the present disclosure can also be executed by the server 105. Correspondingly, the application running terminal switching device can also be set in the server 105. No special limitation is made in this exemplary embodiment. For example, in an exemplary embodiment, any two of the terminal devices 101, 102, 103 can be used as the first terminal and the second terminal respectively. When the first terminal runs the target application, the first terminal, the second terminal, or the server 105 acts as the main body, obtains the first mobile data and the second mobile data corresponding to the first mobile data through the network, and then determines the first terminal posture and the second terminal posture according to the first mobile data and the second mobile data respectively. When the first terminal posture and the second terminal posture meet the switching postures corresponding to the target application, the running terminal of the target application is switched to the second terminal based on the network 104, etc.
[0026] An exemplary embodiment of the present disclosure provides an electronic device for implementing the application running terminal switching method, which may be Figure 1 the terminal devices 101, 102, 103 or the server 105 in
[0027] Next, taking Figure 2 the mobile terminal 200 in Figure 2The structure in [the figure] can also be applied to fixed-type devices. In some other embodiments, the mobile terminal 200 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware. The interface connection relationships between the components are only schematically shown and do not constitute a structural limitation on the mobile terminal 200. In some other embodiments, the mobile terminal 200 may also adopt an interface connection method different from that of Figure 2 or a combination of multiple interface connection methods.
[0028] As Figure 2 shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, antenna 1, antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, a headphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a subscriber identification module (SIM) card interface 295, etc. Among them, the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, etc.
[0029] The processor 210 may include one or more processing units. For example, the processor 210 may include an Application Processor (AP), a modulation and demodulation processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-Network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0030] The NPU is a neural-network (NN) computing processor. By drawing on the structure of the biological neural network, such as the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously learn on its own. Through the NPU, applications such as intelligent cognition of the mobile terminal 200 can be realized, such as: image recognition, face recognition, voice recognition, text understanding, etc. In some embodiments, the NPU can be used to perform pose recognition on the first sampling segment and the second sampling segment based on a pose recognition model to obtain the first terminal pose and the second terminal pose.
[0031] The memory is provided in the processor 210. The memory can store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and is controlled by the processor 210 to execute.
[0032] The wireless communication function of the mobile terminal 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modulation and demodulation processor, and baseband processor, etc. Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals; the mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied to the mobile terminal 200; the modulation and demodulation processor can include a modulator and a demodulator; the wireless communication module 260 can provide solutions for wireless communications including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), etc. applied to the mobile terminal 200. In some embodiments, antenna 1 of the mobile terminal 200 is coupled to the mobile communication module 250, and antenna 2 is coupled to the wireless communication module 260, so that the mobile terminal 200 can communicate with the network and other devices through wireless communication technologies. In some embodiments, a communication connection between the first terminal and the second terminal can be established through the wireless communication function.
[0033] The internal memory 221 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 221 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the mobile terminal 200 (such as audio data, phone book, etc.). In addition, the internal memory 221 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a Universal Flash Storage (UFS), etc. The processor 210 executes various functional applications and data processing of the mobile terminal 200 by running the instructions stored in the internal memory 221 and / or the instructions stored in the memory provided in the processor. In some embodiments, various functional applications of the mobile terminal can be controlled by the processor 210, so as to achieve the purpose of running the terminal of the target application for cut flowers.
[0034] The gyroscope sensor 2801 can be used to determine the motion posture of the mobile terminal 200. In some embodiments, the angular velocity of the mobile terminal 200 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 2801. The gyroscope sensor 2801 can be used for anti-shake shooting, navigation, motion-sensing game scenarios, etc.
[0035] The acceleration sensor 2802 can detect the magnitude of the acceleration of the mobile terminal 200 in various directions (generally three axes). When the mobile terminal 200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0036] In some embodiments, the purpose of collecting the movement data of the mobile terminal can be achieved by sensors such as the gyroscope sensor 2801 and the acceleration sensor 2802 described above.
[0037] The depth sensor 2803 is used to obtain the depth information of the scene. In addition, other sensors with other functions can be set in the sensor module 280 according to actual needs, such as a pressure sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0038] In the related art, it is usually necessary to perform a manual operation on the target application page to achieve the switching of the target application running terminal. Taking the target application as a call application as an example, when answering a call through a terminal device such as a smart watch, it is usually necessary to perform a manual operation on the call page to switch the call to the mobile phone answering state.
[0039] Based on one or more of the above problems, the exemplary embodiment provides a method for switching an application running terminal. The method for switching an application running terminal can be applied to the above-mentioned server 105, or can be applied to one or more of the above-mentioned terminal devices 101, 102, 103. No special limitation is made in this exemplary embodiment. Refer to Figure 3 As shown, the method for switching an application running terminal may include the following steps S310 to S330:
[0040] In step S310, in response to the first terminal running the target application, obtain the first movement data of the first terminal and the second movement data of the second terminal corresponding to the first movement data.
[0041] Among them, the first movement data or the second movement data may include data collected based on sensors and used to characterize the movement attributes of the first terminal or the second terminal. This data may include multiple types of data characterizing movement attributes at the same time, or may only include one type of data characterizing movement attributes. For example, the first movement data or the second movement data may include the acceleration collected by the acceleration sensor set on the first terminal or the second terminal; for another example, the first movement data or the second movement data may include the angular velocity around three axes (i.e., the x, y, and z axes) collected by the gyroscope sensor set on the first terminal or the second terminal.
[0042] In an exemplary embodiment, a well-established communication connection exists between the first terminal and the second terminal. The communication connection may include a communication connection established based on communication methods such as Bluetooth, wireless network, eSIM card, etc. Through the communication connection, the transfer of running data related to the target application can be realized to achieve the switching of the running terminal. For example, the first terminal and the second terminal may establish communication based on Bluetooth; for another example, the first terminal and the second terminal may establish a communication connection by inserting a SIM card and embedding an eSIM card with the same SIM card number.
[0043] In step S320, determine the first terminal posture according to the first movement data, and determine the second terminal posture according to the second movement data.
[0044] Among them, the first terminal posture and the second terminal posture are respectively used to characterize the postures achieved by the movements of the first terminal or the second terminal. Taking the target application as a call application as an example, when the first terminal is a smart watch, the second terminal is a mobile phone, and the user makes a call with a remote terminal through the smart watch, if it is necessary to switch to the mobile phone to make a call with the remote terminal, the user can pick up the mobile phone with the hand wearing the smart watch to answer the call. At this time, the movement of the smart watch can be decomposed into a forward movement relative to the user + a lifting-up movement, or a lifting-up movement, while the movement of the mobile phone is manifested as a backward movement relative to the user + a lifting-up movement or a lifting-up movement. Therefore, the first terminal posture determined by the movement of the smart watch, that is, the posture of the user lifting the arm with the smart watch, and the second terminal posture determined by the movement of the mobile phone, that is, the posture of the user picking up the mobile phone to answer the call. By simultaneously acquiring the first movement data and the second movement data, the postures represented by the movements of the first terminal and the second terminal respectively can be determined more accurately, avoiding inaccurate posture recognition caused by the movement data of a single terminal, and further avoiding the situation of incorrect switching.
[0045] It should be noted that, in order to determine the first terminal posture and the second terminal posture, the corresponding relationship between the first movement data and the second movement data usually means that the two are movement data collected in the same time period. That is, assuming that the time when the first terminal runs the target application is the 1st second, the first movement data collected is the movement data of the first terminal collected starting from the 1st second, and the second movement data of the second terminal corresponding to the first movement data is the movement data of the second terminal collected starting from the 1st second.
[0046] It should be noted that, in some embodiments, different corresponding relationships can also be set according to the differences between the first terminal and the second terminal in different application scenarios. For example, a fixed delay can be set for the collection time periods of the first movement data and the second movement data. That is, assuming that the time when the first terminal runs the target application is the 1st second, the first movement data collected is the movement data of the first terminal collected starting from the 1st second, and assuming that the fixed delay is 2 seconds, then the second movement data of the second terminal corresponding to the first movement data is the movement data of the second terminal collected starting from the 3rd second.
[0047] In an exemplary embodiment, referring to Figure 4 as shown, when determining the first terminal posture according to the first movement data and determining the second terminal posture according to the second movement data, the following steps S410 and S420 may be included:
[0048] In step S410, when the first movement data meets the first change condition and the second movement data meets the second change condition, the first movement data and the second movement data are respectively sampled to obtain a first sampling segment and a second sampling segment.
[0049] Among them, the first change condition and the second change condition are respectively used to determine whether the first terminal or the second terminal moves relative to the user in the current state.
[0050] In an exemplary embodiment, the first change condition may include a first change threshold, and the second change condition may include a second change threshold. At this time, during process sampling, the first change amount at the t-th moment may be calculated based on the first movement data first, and the second change amount at the t-th moment may be calculated based on the second movement data; then when the first change amount is greater than or equal to the first change threshold and the second change amount is greater than or equal to the second change threshold, a first data segment after the t-th moment is collected from the first movement data, and a second data segment after the t-th moment is collected from the second movement data; then the first data segment and the second data segment are sampled respectively to obtain a first sampling segment and a second sampling segment.
[0051] Specifically, in order to accurately identify whether the first terminal and the second terminal move, after collecting the first movement data and the second movement data, the change amount of the movement data at the t-th moment may be calculated based on the first movement data and the second movement data respectively. For example, when the first movement data and the second movement data are data collected by a triaxial acceleration sensor, assuming that the triaxial acceleration data at the t-th moment is A(t)=[a x (t),a y (t),a z (t)], with the first n sampling points as the initial state, A(t) may be compared with the first n sampling points one by one, and the change amount ‖A(t)-A(t-n)‖ may be calculated.
[0052] Specifically, after obtaining the first change amount and the second change amount, it may be determined whether the data point of the first terminal or the second terminal at the t-th moment is a non-stationary data point through a preset change threshold, so as to determine whether to perform subsequent processing. When the first change amount is greater than or equal to the first change threshold and the second change amount is greater than or equal to the second change threshold, that is, when subsequent processing is required, a first data segment after the t-th moment is collected from the first movement data based on a preset data window, and then a second data segment after the t-th moment is collected from the second movement data based on the preset data window, so as to determine the postures of the first terminal and the second terminal based on the first data segment and the second data segment.
[0053] It should be noted that the first change threshold and the second change threshold can be set differently according to different application scenarios. Specifically, when the mobile data includes multiple types of data, the first change threshold and the second change threshold can be set separately for each type of data, and the specific set values can be the same or different. For example, when the first terminal and the second terminal are a smart watch and a mobile phone respectively, and the mobile data is the data collected by an acceleration sensor, the acceleration collected when the arm is relatively stationary with respect to the user can be used as a constant to set the first change threshold and the second change threshold.
[0054] In addition, the preset data window can also be set differently according to different application scenarios. Specifically, when the mobile data includes multiple types of data, the first data window and the second data window can be set separately for each type of data. It should be added that usually, in order to ensure the accuracy of the first terminal posture and the second terminal posture, the first data window and the second data window are usually set to the same size to ensure the correspondence of the first mobile data and the second mobile data. However, in specific scenarios, the first data window and the second data window can also be set to different sizes according to the application scenario.
[0055] By calculating the change amount and judging the relationship between the change amount and the change threshold, it is possible to avoid collecting excessive static data points, accurately detect the data segment containing motion data, and then more accurately determine the first terminal posture and the second terminal posture.
[0056] In addition, if it is necessary to process the first sampling segment and the second sampling segment through a model, when sampling the first data segment and the second data segment, it is necessary to ensure that the sampling frequency is consistent with the sampling frequency of the sample data input to the model during model training to ensure the normal operation of the model.
[0057] In step S420, the first terminal posture is determined according to the first sampling segment, and the second terminal posture is determined according to the second sampling segment.
[0058] Among them, when determining the first terminal posture and the second terminal posture, the posture can be determined in various ways. For example, it can be determined by means of a machine learning model, a deep learning model, etc.; for another example, it can be determined by means of preset data comparison. It should be noted that when determining the posture through a model, the first terminal posture and the second terminal posture can be output simultaneously based on the same model, or can be determined separately through different models. Among them, when the first terminal posture and the second terminal posture are output based on the same model, since it is necessary to judge whether the first terminal posture and the second terminal posture conform to the switching posture corresponding to the target application subsequently, the output result can be directly set to whether it conforms to the switching posture corresponding to the target application.
[0059] In an exemplary embodiment, attitude recognition can be performed on the first sampling segment and the second sampling segment based on an attitude recognition model to determine the first terminal attitude and the second terminal attitude. Among them, the attitude recognition model can include a classification algorithm model constructed based on classification algorithms such as LR (Logistic Regression), RF (Random Forest), and SVM (Support Vector Machine).
[0060] In an exemplary embodiment, referring to Figure 5 As shown, performing attitude recognition on the first sampling segment and the second sampling segment based on an attitude recognition model to determine the first terminal attitude and the second terminal attitude may include the following steps S510 to S520:
[0061] In step S510, extract the first feature of the first sampling segment and the second feature of the second sampling segment.
[0062] In an exemplary embodiment, the first feature and the second feature extracted for the first sampling segment and the second sampling segment may include time-domain features. Among them, the time-domain features may include a combination of one or more of the following features:
[0063] 1. Mean-based time-domain features:
[0064] The mean value of the acceleration sensor amplitude and each axis (x, y, z), and the mean value of the gyroscope sensor amplitude and each axis (x, y, z), with a total of 6 features;
[0065] Standard deviation / maximum-minimum value difference: The standard deviation and the maximum-minimum value difference corresponding to the acceleration sensor and the gyroscope sensor amplitude and each axis respectively, with a total of 6 features.
[0066] 2. Moving variance type:
[0067] The variance corresponding to the amplitude of sensors such as the acceleration sensor and the gyroscope and each axis, and the calculation formula is as shown in formula (1):
[0068]
[0069] Where a i represents the acceleration, and each column of the data contained in the data collected by sensors such as the gyroscope, and each column of data is calculated using the above calculation formula, with a total of 2 features.
[0070] 3. Simple moving average type:
[0071] The moving average value corresponding to the amplitude of sensors such as the acceleration sensor and the gyroscope and each axis, and the calculation formula:
[0072]
[0073] Among them, i x ,i y ,i z They represent acceleration and the data corresponding to the (x, y, z) axes contained in the data collected by the gyroscope, respectively, and the features are 2-dimensional in total.
[0074] 4. Energy average value:
[0075] The amplitude of sensors such as accelerometers and gyroscopes and the average energy corresponding to each axis are calculated using the formula:
[0076]
[0077] Among them, h i Corresponding to the data collected by sensors such as acceleration and gyroscope, each column of data in (x, y, z) is calculated using the above calculation formula, and the features have a total of 6 dimensions.
[0078] 5. Direction vector moving variance class:
[0079] The directional vector movement variance corresponding to sensors such as accelerometers and gyroscopes is calculated using the formula:
[0080]
[0081] in, p = {3, 4}, a represents acceleration, g represents gyroscope; p x , p y Indicates the corresponding values of the acceleration sensor and gyroscope sensor obtained by extracting the x and y axis data of the acceleration sensor and gyroscope sensor respectively. Value, the feature has 2 dimensions.
[0082] Among the above five types of features, the part involving N, N represents the data size of a single sampling data, and its value is related to the time window and the sampling frequency. Specifically, N = sampling frequency × time window. For example, when the sampling frequency is 125Hz, and the time windows are 1s, 3s, and 5s, respectively, the corresponding data sizes are 125, 375, and 625, respectively. It should be noted that the time window can be set according to the duration of the switching gesture corresponding to the target application. For example, the switching gesture corresponding to the target application is the user's arm raising up with a smart watch. At this time, the time window can be set according to the duration of the arm raising action, and then the data size of the single sampling data can be determined.
[0083] In addition, in addition to the above five features, the feature extraction process can also extract more types of features, which is not specifically limited in the present disclosure.
[0084] In step S520, the first feature and the second feature are input into the pose recognition model for pose recognition.
[0085] In an exemplary embodiment, after extracting the first feature of the first sampling segment and the second feature of the second sampling segment, the first feature and the second feature can be input into a pre-trained pose recognition model for pose recognition to determine the first terminal pose and the second terminal pose.
[0086] In an exemplary embodiment, referring to Figure 6 As shown, the training process of the above pose recognition model may include the following steps S610 to S640:
[0087] In step S610, sample data is collected and the sample data is sample-labeled.
[0088] Among them, the sample data may include first sample data and second sample data corresponding to the first sample data. The first sample data may include sample data collected by sensors provided on the first terminal; the second sample data may include sample data collected by sensors provided on the second terminal. It should be added that, in order to ensure the normal operation of the pose recognition model, the correspondence relationship between the first sample data and the second sample data is the same as the correspondence relationship between the first movement data and the second movement data.
[0089] Among them, the sample labeling of the sample data may include positive sample labeling and negative sample labeling. The specific labeling may adopt forms such as numbers and letters, and the present disclosure does not make special limitations on this. Among them, the positive sample label is a label indicating that the sample data belongs to the same switching pose as the target application; the negative sample label is a label indicating that the sample data belongs to a switching pose inconsistent with the target application. It should be noted that in some embodiments, when there are many types of negative sample data, further labeling can be performed for each negative sample label on the basis of the negative sample label, so that different types of negative sample labels can be used for training during subsequent training.
[0090] For example, in an application scenario where a call application needs to be switched from a smart watch to a mobile phone, the following data of the smart watch can be collected as the sample data of the smart watch:
[0091] Category 1: The arm wearing the smart watch picks up the mobile phone and places it next to the ear; —— positive sample, y = 1;
[0092] Category 2: The arm wearing the smart watch raises the arm but does not pick up the mobile phone; —— negative sample, y = 0;
[0093] Category 3: Pick up the mobile phone with the non-corresponding arm wearing the smartwatch and place it next to the ear; — Negative sample, y = 0;
[0094] Category 4: The arm is in other states; — Negative sample, y = 0.
[0095] The above feature extraction is carried out when the smartwatch is in a call state. Among them, only Category 1 is a positive sample, marked as y = 1, indicating that the first terminal posture and the second terminal posture conform to the switching posture; the remaining categories are all negative samples, marked as y = 0, indicating that the first terminal posture and the second terminal posture do not conform to the switching posture.
[0096] It should be noted that when collecting sample data, in order to avoid excessive or insufficient data volume, different sampling frequencies can be selected according to different application scenarios to sample the original data collected by the sensor. If the sample data collected based on a certain sampling frequency cannot reflect the key information for determining the first terminal posture or the second terminal posture, the sampling frequency can be changed for resampling to ensure that when training the posture recognition model, the feature pairs input to the model are extracted from the sample data collected at an appropriate sampling frequency. In addition, when applying the trained posture recognition model, the sampling frequency used in the process of sampling the data segment to obtain the sampling segment is the same as the sampling frequency corresponding to the feature pairs input to the model during training, to ensure the normal operation of the posture recognition model and the accuracy of the output results.
[0097] In step S620, positive sample data and negative sample data with a preset sampling ratio are obtained from the sample data based on the sample labels.
[0098] Among them, the preset sampling ratio can be set differently according to specific scenarios. For example, in the sampling methods of the above Categories 1 - 4, in order to ensure the balance of the number of positive sample data and negative sample data, as well as the balance of the number of different types of negative sample data, the ratio of Categories 1, 2, 3, and 4 can be set to 3:1:1:1.
[0099] In step S630, positive sample feature pairs of the first sample data and the second sample data in the positive sample data are extracted, and negative sample feature pairs of the first sample data and the second sample data in the negative sample data are extracted.
[0100] Since the sample data includes the first sample data and the second sample data, when performing feature extraction, it is necessary to extract the features of the first sample data and the second sample data in both the positive sample data and the negative sample data at the same time. Therefore, after performing feature extraction on the positive sample data and the negative sample data, positive sample feature pairs and negative sample feature pairs are obtained, and each feature pair includes a first feature and a second feature.
[0101] In step S640, a pose recognition model is obtained by training a preset model based on positive sample feature pairs and negative sample feature pairs.
[0102] In an exemplary embodiment, after obtaining the positive sample feature pairs and negative sample feature pairs, supervised model training can be performed on the preset model based on the positive sample feature pairs and negative sample feature pairs to obtain a pose recognition model. It should be noted that in some embodiments, unsupervised or semi-supervised modes can also be adopted for model training according to different application scenarios, and the present disclosure does not make special limitations on this.
[0103] It should be noted that in the above embodiments, when performing pose recognition for a switching pose corresponding to a target application, it is only necessary to confirm whether the first terminal pose and the second terminal pose conform to the switching pose. Therefore, for the labeling of sample data (supervised training), only positive sample labeling and negative sample labeling are required. In some other embodiments, however, pose recognition may need to be performed for multiple poses simultaneously. For example, for different target applications in the first terminal or the second terminal, different switching poses can be set. To avoid setting up too many models, it can be selected to use the same pose recognition model for pose recognition. At this time, when performing sample labeling on the sample data, each sample data can be labeled with the corresponding pose according to the number of switching poses, so as to ensure that the pose recognition model can determine the corresponding pose based on the first feature and the second feature.
[0104] In addition, in an exemplary embodiment, when performing terminal switching based on the pose recognition model, negative sample data for a certain application scenario or a certain user can be continuously collected, and then the pose recognition model can be further optimized based on the negative sample data to obtain a personalized pose recognition model.
[0105] In an exemplary embodiment, when collecting sample data, in order to obtain complete movement data, a period of time is usually left before and after the terminal moves to prevent incomplete collection of movement data. On this basis, mobile endpoint positioning can be performed on the sample data. Specifically, referring to Figure 7 as shown, the following steps S710 to S720 can be included:
[0106] In step S710, mobile endpoint positioning is performed on the sample data to determine the data start point and data end point of the terminal movement in the sample data.
[0107] In an exemplary embodiment, an algorithm can be used for mobile endpoint positioning to determine, in the sample data, the data start point and data end point corresponding to the movement performed by the first terminal or the second terminal when executing the first terminal posture and the second terminal posture. For example, the SWAB (Sliding Window And Bottom-up) algorithm can be used to determine the data start point and data end point of the movement of the first terminal or the second terminal in the sample data.
[0108] In step S720, the data in the sample data that is outside the data start point and the data end point is deleted to obtain the updated sample data.
[0109] In an exemplary embodiment, after obtaining the data start point and the data end point, the data in the sample data that is outside the data start point and the data end point is deleted, and the complete data corresponding to the movement performed by the first terminal or the second terminal when executing the first terminal posture and the second terminal posture is included, thereby achieving accurate segmentation of the complete data corresponding to the movement.
[0110] In addition, in step S410, before sampling the first data segment and the second data segment respectively, the first data segment and the second data segment can be filtered in advance to remove the noise in the first data segment and the second data segment. Specifically, a digital filter can be used to filter the first data segment and the second data segment. For example, a 4th-order Butterworth low-pass IIR digital filter can be used for filtering. Additionally, other methods can also be used to filter the first data segment and the second data segment, and the present disclosure does not make special limitations in this regard.
[0111] It should be noted that when the posture recognition model is trained, the sample data can also be filtered before feature extraction of the sample data to remove the noise in the sample data.
[0112] Meanwhile, in step S410, before sampling the first data segment and the second data segment respectively, the first data segment and the second data segment can be normalized in advance to avoid individual differences in the data. Among them, the methods of normalization processing can include Z-score 0-mean normalization, Min-Max linear function normalization, etc., and the present disclosure does not make special limitations in this regard either. Similarly, when the posture recognition model is trained, the sample data can also be normalized before feature extraction of the sample data.
[0113] In step S330, when the first terminal posture and the second terminal posture meet the switching postures corresponding to the target application, the running terminal of the target application is switched to the second terminal based on the communication connection.
[0114] In an exemplary embodiment, when the first terminal posture and the second terminal posture meet the switching posture corresponding to the target application, the running terminal of the target application can be switched to the second terminal based on the communication connection established between the first terminal and the second terminal. Wherein, switching the running terminal of the target application to the second terminal means that the first terminal sends data that enables the target application to complete the current function to the second terminal, so as to achieve the purpose that the target application can continue to complete the current function of the target application in the second terminal. Specifically, in some embodiments, there may be a situation where both the first terminal and the second terminal themselves have the data required for the target application to run, and at this time, only the data that can characterize the current state of the target application in the first terminal can be sent to the second terminal; in other embodiments, there may be a situation where the second terminal itself does not have the data required for the target application to run, and the second terminal supports the target application to run, and at this time, all data that supports the target application to complete the current function can be sent to the second terminal; in addition, there may be some situations where the second terminal does not support the target application to run, and the switching function cannot be realized. In addition, in different application scenarios, some auxiliary data can also be sent to the second terminal to better support the operation of the target application.
[0115] For example, if the target application is still a call application, the first terminal is a smart watch, and the second terminal is a mobile phone, and the user makes a call through the smart watch, when it is determined that the first terminal posture and the second terminal posture meet the switching posture corresponding to the call application, the call number extracted from the smart watch can be sent to the mobile phone to achieve the purpose of switching the call application to the mobile phone. In addition, in this application scenario, if there is contact information, in order to enable the user to more clearly understand the current call object, the contact information can also be sent to the mobile phone for corresponding display.
[0116] In addition, in an exemplary embodiment, in addition to the above-mentioned terminal switching, some specific postures can be set on the first terminal or the second terminal to be linked with other devices that have communication connections. Specifically, when the mobile data corresponding to the first terminal is set to be consistent with the specific posture on the first terminal, the second terminal or other terminals can be controlled to perform corresponding operations. For example, assuming that the first terminal is a smart watch and the other terminals are smart TVs, the set specific posture is that the smart watch circles counterclockwise, and the corresponding operation is to turn down the volume. At this time, if the user's arm wearing the smart watch draws a circle counterclockwise, causing the smart watch to circle counterclockwise, the smart TV is controlled to turn down the volume. Through this setting, the control of the device can be made more intelligent and linked, avoiding the need to control through specific remote controls and other devices.
[0117] The following uses LR as the classification algorithm and the above five types of 24-dimensional features as an example to explain in detail the training process and specific application process of the posture recognition model:
[0118] Training process:
[0119] Feature extraction is performed on the positive sample data and negative sample data. Set the value of q0 to 1, which is used to solve the bias parameter b, and form the training feature Q = [q0, q1, q2, …, q 24 T ; According to the feature pairs extracted from the positive sample data and negative sample data, a classification algorithm model is constructed. Input the training feature pair Q and the sample label y, y ∈ {0, 1}. The weights, bias parameter, and features are linearly added to obtain wq + B = w1q1 + w2q2 + … + w 24 q 24 + b q0 . It should be noted that the initial value of each element in the weight W = [w1, w2, …, w 24 T is 0, and the initial value of the bias parameter b is 1, B = bq0.
[0120] Then, wq + B is input into the preset model constructed based on the LR classification algorithm, and the parameter group that makes the likelihood function L(w) reach the maximum value, b and w1, w2, …, w 24 ;
[0121] The specific process is as follows:
[0122] A) Take the logarithm of L(w) (such as formula 5) and perform formula conversion to obtain formula (6):
[0123]
[0124]
[0125] B) Through the gradient descent method, take the partial derivative of the above likelihood function to obtain formula (7):
[0126]
[0127] where, w k is expressed as the following formula (8):
[0128]
[0129] where, m represents the number of samples; α represents the learning rate, which is used to control the step size, with an initial value of 0.01 and adjusted according to needs later; i represents the i-th sample; q ik represents the k-th column feature in the i-th sample; w k represents the parameter corresponding to the k-th column feature; the value range of k is [0, 24].
[0130] According to the above formula, initialize the weights W = [w1, w2, …, w 24 to 0 and b = 1 for iteration until the specified accuracy is reached, and solve for the weights W = [w1, w2, …, w 24 and the bias parameter b to obtain the pose recognition model.
[0131] Application process:
[0132] Based on the weights W and bias parameter b obtained from the above training process, and the features Q = [q0, q1, q2, …, q 24 T , form wq + B = w1q1 + w2q2 + … + w 24 q 24 + bq0 as the parameter input of the following formula, and output the probability y, y ∈ {0, 1}, which is used to determine whether the poses of the first terminal and the second terminal conform to the switching pose of the target application:
[0133] Among them, y = 1 indicates that the poses of the first terminal and the second terminal conform to the switching pose, and its corresponding probability is calculated as the following formula (9):
[0134]
[0135] y = 0 indicates that the poses of the first terminal and the second terminal do not conform to the switching pose, and its corresponding probability is calculated as the following formula (10):
[0136]
[0137] Among them, represents converting the data into the sigmoid function, and approximating the log-odds of the true label through the prediction result of the linear regression model; when it is greater than 0.5, the probability is 1, and when it is less than 0.5, the probability is 0.
[0138] Through the above formula, the probabilities of y = 1 and y = 0 can be calculated respectively. By comparing the probabilities of y = 1 and y = 0, the categories to which the poses of the first terminal and the second terminal belong can be output, that is, whether the poses of the first terminal and the second terminal conform to the switching pose.
[0139] When the application scenario is switching between a call application on a smart watch and a mobile phone, the actual training process can refer to Figure 8 as shown, and includes the following steps:
[0140] Step S801, perform analog-to-digital conversion on the collected original movement data of the smart watch and the mobile phone, and perform sampling. Each sampling obtains a pair of sample data (including the sample data corresponding to the smart watch and the sample data corresponding to the mobile phone) and the sample label corresponding to the sample data;
[0141] Among them, the main sources of the collected original movement data may include data from the three-axis acceleration sensors and gyro sensors of mobile phones and smart watches, with a sampling frequency of 125 Hz. It should be noted that the three-axis acceleration sensor is used to mark the movement behavior of the terminal and does not have the ability to accurately detect changes in the angle of an object, while the gyro sensor is used to detect the state of horizontal changes but cannot calculate the intensity of object movement. Therefore, the data of the two sensors need to be combined;
[0142] Step S803: Locate the movement endpoints through an algorithm, determine the start point and end point of the data corresponding to the movement executed by the first terminal or the second terminal when performing the first terminal posture or the second terminal posture in the sample data, and update the sample data;
[0143] Step S805: Perform filtering processing on the sample data to remove noise in the sample data;
[0144] Step S807: Perform normalization processing on the sample data to avoid individual differences in the data;
[0145] Step S809: Resample the sample data; In some embodiments, the situation of too fast movement may occur during the acquisition process of the original movement data. At this time, if the sampling frequency is too low, problems such as missing sample data or insufficient sampling of sample data may occur. Therefore, resampling of the sample data is required. For example, sampling the data stream of the acceleration sensor of a smart watch can obtain a time series ai(k), i = x, y, z, and the sampling frequency of a i (k) can be transformed, changing the original sampling frequency of 125 HZ to 100 HZ to increase the sampling rate; In addition, after data resampling, the processes of movement endpoint location, filtering, and normalization processing can also be re-executed;
[0146] Step S811: Extract features from the sample data;
[0147] Step S813: Train the LR model based on the extracted features;
[0148] Step S815: Output the posture recognition model.
[0149] When the application scenario is the switching between a call application on a smart watch and a mobile phone, the actual application process can refer to Figure 9 as shown, including the following steps:
[0150] Step S901: Determine whether the smart watch or the mobile phone is used for the first time, or whether the smart watch and the mobile phone have been reset;
[0151] It should be noted that, to ensure the realization of terminal switching, it is usually required that the systems of the smart watch and the mobile phone are mutually compatible (for example, both are Android systems), there is a communication connection between the smart watch and the mobile phone (such as the Bluetooth connection status), and the mobile phone or the smart watch is set by the user to allow the running terminal of the application to switch between the smart watch and the mobile phone. At the same time, to ensure the accurate identification of the target application, it is necessary to default to detect whether the mobile phone and the smart watch are in the call mode here.
[0152] Step S903, when the smart watch or the mobile phone is used for the first time, or when the smart watch and the mobile phone are reset, directly load the original gesture recognition model stored in the smart watch or the mobile phone;
[0153] It should be noted that at this time, there is no user usage data, so the gesture recognition model is not personalized and is the original gesture recognition model stored by the developer;
[0154] Step S905, when it is not the first time to use the mobile phone or the smart watch, and the smart watch and the mobile phone are not reset, load the optimized gesture recognition model stored in the smart watch and the mobile phone;
[0155] At this time, due to the existence of user usage data, the gesture recognition model can be further optimized based on the negative sample data collected from the user usage data and is a personalized optimized gesture recognition model.
[0156] Step S907, respectively obtain the change thresholds corresponding to the smart watch and the mobile phone;
[0157] The first change threshold corresponding to the smart watch and the second change threshold corresponding to the mobile phone are both set in advance and stored locally, so just directly obtain the first change threshold and the second change threshold here. In addition, in the current application scenario, the first change threshold and the second change threshold can be set to the same value;
[0158] Step S909, determine whether the smart watch or the mobile phone is in the call state and whether a Bluetooth connection is established between the smart watch and the mobile phone;
[0159] Step S911, when the smart watch or the mobile phone is in the call state and a Bluetooth connection is established between the smart watch and the mobile phone, determine whether the first change amount corresponding to the smart watch and the second change amount corresponding to the mobile phone are both greater than or equal to the change threshold;
[0160] Step S913, when the change amounts generated by the smart watch and the mobile phone are both greater than or equal to the change threshold, extract the smart watch data segment and the mobile phone data segment corresponding to the smart watch and the mobile phone, and perform gesture recognition on the smart watch data segment and the mobile phone data segment based on the previously loaded original gesture recognition model or optimized gesture recognition model to determine the first terminal gesture and the second terminal gesture;
[0161] Step S915: Determine whether the first terminal posture and the second terminal posture conform to the switching posture corresponding to the call application.
[0162] Step S917: When the first terminal posture and the second terminal posture conform to the switching posture corresponding to the call application, extract the current call number and switch the call application to the other terminal.
[0163] Wherein, the other terminal refers to the terminal in the smart watch and the mobile phone where the call application is not currently running. For example, if the call is currently answered through the smart watch, the other terminal is the mobile phone; if the call is currently answered through the mobile phone, the other terminal is the smart watch.
[0164] Step S919: Collect negative sample data according to the user usage data, and further optimize the locally stored posture recognition model to obtain a more personalized posture recognition model.
[0165] In summary, in this exemplary embodiment, a method is proposed to achieve the purpose of intelligent terminal switching by recognizing the first terminal posture and the second terminal posture. Through the technical solution of the present disclosure, the recognition of multi-terminal data can be utilized to reduce unnecessary operations for users, make terminal switching more convenient, and simplify the steps that require users to manually switch. At the same time, some human misoperation situations during the operation are also avoided. In addition, the technical solution of the present disclosure can also improve the intelligence of terminal switching and enhance the user experience.
[0166] In addition, the technical solution of the present disclosure uses methods such as machine learning to avoid problems such as insufficient memory, increased power consumption, and slow response time caused by using relatively large computing methods on the terminal. At the same time, it can also optimize the posture recognition model according to the user usage data, making the posture recognition model more personalized and more suitable for each application scenario or user.
[0167] It should be noted that the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously in, for example, multiple modules.
[0168] Further, as shown in Figure 10 In the embodiment of this example, an application running terminal switching device 1000 is further provided, which is applied to the first terminal and the second terminal establishing a communication connection; it includes a data acquisition module 1010, a posture determination module 1020, and a terminal switching module 1030. Wherein:
[0169] The data acquisition module 1010 can be used to obtain the first mobile data of the first terminal and the second mobile data of the second terminal corresponding to the first mobile data in response to the first terminal running the target application.
[0170] The attitude determination module 1020 can be used to determine the first terminal attitude according to the first mobile data and determine the second terminal attitude according to the second mobile data.
[0171] The terminal switching module 1030 can be used to switch the running terminal of the target application to the second terminal based on the communication connection when the first terminal attitude and the second terminal attitude meet the switching attitudes corresponding to the target application.
[0172] In an exemplary embodiment, the attitude determination module 1020 can be used to sample the first mobile data and the second mobile data respectively to obtain a first sampling segment and a second sampling segment when the first mobile data meets a first change condition and the second mobile data meets a second change condition; determine the first terminal attitude according to the first sampling segment and determine the second terminal attitude according to the second sampling segment.
[0173] In an exemplary embodiment, the attitude determination module 1020 can be used to calculate a first change amount at the t-th moment based on the first mobile data and calculate a second change amount at the t-th moment based on the second mobile data; when the first change amount is greater than or equal to a first change threshold and the second change amount is greater than or equal to a second change threshold, collect a first data segment after the t-th moment in the first mobile data and collect a second data segment after the t-th moment in the second mobile data; sample the first data segment and the second data segment respectively to obtain a first sampling segment and a second sampling segment.
[0174] In an exemplary embodiment, the data acquisition module 1010 can be used to perform filtering and denoising on the first data segment and the second data segment respectively.
[0175] In an exemplary embodiment, the data acquisition module 1010 can be used to perform normalization processing on the first data segment and the second data segment.
[0176] In an exemplary embodiment, the attitude determination module 1020 can be used to perform attitude recognition on the first sampling segment and the second sampling segment based on an attitude recognition model to determine the first terminal attitude and the second terminal attitude.
[0177] In an exemplary embodiment, the attitude determination module 1020 can be used to extract a first feature of the first sampling segment and a second feature of the second sampling segment; input the first feature and the second feature into an attitude recognition model for attitude recognition.
[0178] In an exemplary embodiment, the attitude determination module 1020 may be configured to collect sample data and perform sample labeling on the sample data; the sample data includes first sample data collected by a first terminal and second sample data corresponding to the first sample data collected by a second terminal; the sample labeling includes positive sample labeling and negative sample labeling; based on the sample labeling, positive sample data and negative sample data with a preset sampling ratio are obtained from the sample data; positive sample feature pairs of the first sample data and the second sample data are extracted from the positive sample data, and negative sample feature pairs of the first sample data and the second sample data are extracted from the negative sample data; based on the positive sample feature pairs and the negative sample feature pairs, a preset model is trained to obtain an attitude recognition model.
[0179] In an exemplary embodiment, the data acquisition module 1010 may be configured to perform moving endpoint positioning on the sample data to determine a data start point and a data end point of the data where the terminal moves in the sample data; data outside the data start point and the data end point in the sample data is deleted to obtain updated sample data.
[0180] The specific details of each module in the above device have been described in detail in the implementation manner of the method part. The undisclosed detailed content can be referred to the implementation manner content of the method part, and thus will not be repeated.
[0181] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation manner, a complete software implementation manner (including firmware, microcode, etc.), or an implementation manner combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "system" here.
[0182] The exemplary embodiment of the present disclosure also provides a computer-readable storage medium, on which a program product capable of implementing the above method of this specification is stored. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "exemplary method" part of this specification, for example, it can execute Figures 3 to 9 any one or more of the steps.
[0183] It should be noted that the computer-readable medium shown in this disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0184] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. And in this disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.
[0185] In addition, the program code for performing the operations of this disclosure can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's 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, by using an Internet service provider to connect through the Internet).
[0186] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known or customary technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
[0187] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A method for switching an application running terminal, characterized in that, A first terminal and a second terminal applied to establish a communication connection; the method includes: In response to the first terminal running a target application, obtaining first mobile data of the first terminal and second mobile data of the second terminal corresponding to the first mobile data; the first mobile data and the second mobile data are mobile data collected in the same time period; Determining a first terminal posture according to the first mobile data, and determining a second terminal posture according to the second mobile data; When the first terminal posture and the second terminal posture conform to the switching posture corresponding to the target application, switching the running terminal of the target application to the second terminal based on the communication connection; The determining the first terminal posture according to the first mobile data and determining the second terminal posture according to the second mobile data includes: When the first mobile data meets a first change condition and the second mobile data meets a second change condition, respectively sampling the first mobile data and the second mobile data to obtain a first sampling segment and a second sampling segment; the first change condition is a first change threshold, and the second change condition is a second change threshold; Determining the first terminal posture according to the first sampling segment and determining the second terminal posture according to the second sampling segment.
2. The method according to claim 1, wherein The first change condition includes a first change threshold, and the second change condition includes a second change threshold; The when the first mobile data meets a first change condition and the second mobile data meets a second change condition, respectively sampling the first mobile data and the second mobile data to obtain a first sampling segment and a second sampling segment includes: Calculating a first change amount at the t-th moment based on the first mobile data, and calculating a second change amount at the t-th moment based on the second mobile data; When the first change amount is greater than or equal to the first change threshold and the second change amount is greater than or equal to the second change threshold, collecting a first data segment after the t-th moment in the first mobile data and collecting a second data segment after the t-th moment in the second mobile data; Respectively sampling the first data segment and the second data segment to obtain a first sampling segment and a second sampling segment.
3. The method according to claim 2, wherein Before the respectively sampling the first data segment and the second data segment, the method further includes: Performing filtering and denoising on the first data segment and the second data segment respectively.
4. The method according to claim 2, wherein Before the respectively sampling the first data segment and the second data segment, the method further includes: Performing normalization processing on the first data segment and the second data segment.
5. The method according to claim 1, characterized in that, The determining the first terminal posture based on the first sampling segment and determining the second terminal posture according to the second sampling segment includes: Performing posture recognition on the first sampling segment and the second sampling segment based on a posture recognition model to determine the first terminal posture and the second terminal posture.
6. The method according to claim 5, wherein The performing posture recognition on the first sampling segment and the second sampling segment based on the posture recognition model includes: Extracting a first feature of the first sampling segment and a second feature of the second sampling segment; Input the first feature and the second feature into the pose recognition model for pose recognition.
7. The method according to claim 5, wherein The method further includes: Collect sample data and perform sample labeling on the sample data; the sample data includes first sample data collected by the first terminal and second sample data corresponding to the first sample data collected by the second terminal; the sample labeling includes positive sample labeling and negative sample labeling; Based on the sample labeling, obtain positive sample data and negative sample data with a preset sampling ratio from the sample data; Extract positive sample feature pairs of the first sample data and the second sample data from the positive sample data, and extract negative sample feature pairs of the first sample data and the second sample data from the negative sample data; Train a preset model based on the positive sample feature pairs and negative sample feature pairs to obtain a pose recognition model.
8. The method according to claim 7, wherein The method further includes: Perform moving endpoint positioning on the sample data to determine the data start point and data end point of the terminal movement in the sample data; Delete the data in the sample data that is outside the data start point and data end point to obtain updated sample data.
9. An application running terminal switching device, characterized in that Applied to the first terminal and the second terminal for establishing a communication connection; the device includes: A data acquisition module, configured to, in response to the first terminal running a target application, acquire first movement data of the first terminal and second movement data of the second terminal corresponding to the first movement data; the first movement data and the second movement data are movement data collected in the same time period; A pose determination module, configured to determine the pose of the first terminal according to the first movement data and determine the pose of the second terminal according to the second movement data; A terminal switching module, configured to, when the pose of the first terminal and the pose of the second terminal meet the switching pose corresponding to the target application, switch the running terminal of the target application to the second terminal based on the communication connection; The determining the pose of the first terminal according to the first movement data and determining the pose of the second terminal according to the second movement data is configured as: When the first movement data meets a first change condition and the second movement data meets a second change condition, sample the first movement data and the second movement data respectively to obtain a first sampled segment and a second sampled segment; the first change condition is a first change threshold, and the second change condition is a second change threshold; Determine the pose of the first terminal according to the first sampled segment and determine the pose of the second terminal according to the second sampled segment.
10. A computer-readable medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the method according to any one of claims 1 to 8.
11. An electronic device, characterized in that, Includes: A processor; And A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method according to any one of claims 1 to 8 by executing the executable instructions.
Citation Information
Patent Citations
Voice control method and device, electronic equipment and medium
CN112908329A
Screen switching method and device, computer readable medium and electronic equipment
CN113238727A