A control method for device functions and an electronic device
By using gyroscope sensors in electronic devices to determine the movement status and deviation rate, and automatically control the on and off of the V2X communication function, the battery life and experience problems caused by the normal opening of the V2X communication function in the prior art are solved, and higher usage rate and serviceability are achieved.
Patent Information
- Application Number
- CN202110410059.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-15
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-04-15
AI Technical Summary
When existing electronic devices use the V2X communication function, the normal opening status will affect the battery life and user experience, and it is difficult for users to accurately trigger the V2X communication function to turn on or off, resulting in a decrease in the usage rate and serviceability of V2X-related smart scenarios.
By implementing a control method for device functions in an electronic device, the gyroscope sensor is used to determine whether the device is in a moving state, and the V2X communication function is automatically turned on or off based on the accumulated sum of the movement mode and the deviation rate.
It realizes the V2X communication function to turn on or off instantly, intelligently and accurately when the device needs it, improves the usage rate and serviceability of V2X-related smart scenarios, extends the battery life of the device and improves the user experience.
Smart Images

Figure CN115226184B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and particularly to a method for controlling device functions and an electronic device. Background Art
[0002] Vehicle-to-everything (V2X) communication is an important key technology for environmental perception and information interaction in the Internet of Vehicles. With the popularization of V2X communication technology, in addition to vehicles being able to perform V2X communication with each other, in the vehicle-to-pedestrian (V2P) scenario, Internet of Things (IoT) devices and electronic devices such as mobile phones can also use their supported V2X communication functions to communicate with other devices (such as devices related to the intelligent transportation system) through V2X communication, thereby achieving integrated perception and the interconnection of all things. In relevant intelligent scenarios of the interconnection of all things, for example, when a person walks to a certain place, by performing V2X communication with the wearable device (such as a smart bracelet, smart watch, etc.) worn by the person, the intelligent transportation system can identify the person in the first time and trigger the re-planning of traffic content behavior strategies.
[0003] When a user needs to use an electronic device supporting V2X communication function to communicate with other devices through V2X, the V2X communication function of the electronic device needs to be in an on state. Although the V2X communication function of the electronic device can be set to be always on (constantly on) in order to use the electronic device for V2X communication, the electronic device does not need to communicate with other devices through V2X all the time. In addition, V2X communication requires a relatively large amount of current (a load of independent baseband power supply and a series of related power amplifications and restorations), and the battery capacity of the electronic device is limited. Therefore, when the V2X communication function of the electronic device is always on, it will affect the battery life and significantly reduce the overall user experience. In addition, if the user triggers the electronic device to turn on or off the V2X communication function according to their own needs, the user may not be able to accurately trigger the electronic device to turn on or off the V2X communication function immediately every time it is needed, which will significantly reduce the usage rate and serviceability of V2X-related intelligent scenario functions and significantly affect or restrict the service experience. Therefore, in an electronic device, how to effectively control the switch of the V2X communication function has a great impact on the use of this function and the user experience. Summary of the Invention
[0004] To solve the above technical problems, the present application provides a method for controlling device functions and an electronic device. The technical solution provided by the present application can achieve instant, intelligent, and accurate opening / closing of the V2X communication function of the electronic device in the scenarios required by the device, so as to improve the usage rate and serviceability of this function in V2X-related intelligent scenarios.
[0005] To achieve the above object, the embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, a method for controlling device functions is provided, which is applied to an electronic device (such as a mobile phone, a smart bracelet, a smart watch). The electronic device has a first communication function (such as, a V2X communication function), and the first communication function is used to implement communication between the electronic device and other electronic devices on a sidelink. The method includes: the electronic device determines whether the electronic device is in a moving state. When the electronic device is in a moving state, the electronic device determines the moving mode of the electronic device according to the first movement parameter during the movement of the electronic device. The electronic device determines whether the electronic device is in an effective moving mode according to the moving mode. When the electronic device is in an effective moving mode, the electronic device determines the cumulative sum of the yaw rates of the electronic device within a preset distance. The electronic device turns on or off the first communication function according to the relationship between the cumulative sum of the yaw rates and a reference value.
[0007] It should be noted that since the yaw angle is determined by the yaw rate and the period. The period can be of various time lengths. For example, the period is 1 millisecond. When the period is 1 millisecond, the cumulative sum of the yaw rates of the electronic device within a preset distance is the cumulative sum of the yaw angles of the electronic device within a preset distance. When the period is greater than 1 millisecond, the cumulative sum of the yaw rates of the electronic device within a preset distance can be replaced by the cumulative sum of the yaw angles of the electronic device within a preset distance.
[0008] An embodiment of the present application provides a method for controlling the functions of a device. In this method, an electronic device can obtain the accumulated sum of the heading deviation rates of the electronic device within a preset distance based on whether it is in an effective movement mode. Then, according to the relationship between the accumulated sum of the heading deviation rates and a reference value, it is determined whether to turn on or off the first communication function. This is because if the accumulated sum of the heading deviation rates of the electronic device within the preset distance is less than or equal to the reference value, it indicates that the user carrying the electronic device is in a mobile travel state; and the first communication function of the electronic device is generally turned on when needed (such as when walking on the street, in an outdoor mobile travel state, etc.); therefore, this solution can turn on the first communication function when the electronic device needs to perform service transmission (such as in a mobile travel state, etc.). If the accumulated sum of the heading deviation rates is greater than the reference value, it indicates that there is no need to turn on the first communication function to perform sidelink service transmission at this time; and when the conditions are not met, the first communication function continues to be kept in the off state, which is not only beneficial for the device to maintain battery life and control heat generation, but also beneficial for the first communication function to provide services in an accurate and appropriate scenario, improving the product experience.
[0009] In a possible implementation of the present application, for the electronic device to determine whether it is in an effective movement mode according to the movement mode, it includes: if the electronic device determines that the movement mode of the electronic device is the first movement mode, then it determines that the electronic device is in an effective movement mode. Among them, the first movement mode is one or more of the walking mode and the running mode. If the electronic device determines that the movement mode of the electronic device is the second movement mode, then it determines that the electronic device is not in an effective movement mode. For example, the second movement mode is the up and down stairs mode.
[0010] In a possible implementation of the present application, if the electronic device determines that the movement mode of the electronic device is the first movement mode and the duration in the first movement mode exceeds a preset duration (such as 30 seconds or 10 seconds), then the electronic device determines that it is in an effective movement mode.
[0011] In a possible implementation of the present application, when the electronic device is in a moving state, the method provided by the embodiment of the present application further includes: the electronic device determines whether it is located outdoors. For the electronic device to determine whether it is in an effective movement mode according to the movement mode, it includes: when the electronic device is located outdoors, determining whether the electronic device is in an effective movement mode according to the movement mode. By adding the judgment condition that the electronic device is located outdoors, it is possible to more accurately determine when to turn on the first communication function.
[0012] In a possible implementation of the present application, for the electronic device to determine whether it is located outdoors, it includes: the electronic device determines the ambient brightness of the location where the electronic device is located. The electronic device determines whether it is located outdoors according to the ambient brightness.
[0013] In a possible implementation of the present application, the electronic device determines whether the electronic device is located outdoors based on the ambient brightness, including: if the ambient brightness is greater than or equal to the reference ambient brightness, it is determined that the electronic device is located outdoors; or, if the duration for which the ambient brightness is greater than or equal to the reference ambient brightness exceeds a first preset duration, it is determined that the electronic device is located outdoors. The reference ambient brightness can be set preset, or obtained by the electronic device from the server; the embodiments of the present application do not limit this.
[0014] In a possible implementation of the present application, the electronic device determines the ambient brightness information of the location where the electronic device is located, including: the electronic device uses the ambient sensor of the electronic device to collect the ambient brightness information of the location where the electronic device is located.
[0015] In a possible implementation of the present application, the electronic device determines the cumulative sum of the yaw rates within a preset distance, including: the electronic device determines the yaw angle corresponding to each period within the time period corresponding to the preset distance according to a preset period. The electronic device accumulates the yaw angles corresponding to each period to obtain the cumulative sum of the yaw rates.
[0016] In a possible implementation of the present application, for the first period, where the first period is any one of each period, the yaw angle corresponding to the first period is determined by the angular velocity information corresponding to the first period and the duration of the first period. For example, the yaw angle corresponding to the first period is obtained by multiplying the angular velocity information corresponding to the first period by the duration of the first period. The angular velocity information corresponding to the first period can be the angular velocity information collected by the gyroscope sensor inside the electronic device within the first period, or the average value of the angular velocity information collected at each moment within the first period.
[0017] In a possible implementation of the present application, in a scenario where the first communication function is enabled, the preset distance is a first preset distance, and in a scenario where the first communication function is disabled, the preset distance is a second preset distance. Among them, the first preset distance and the second preset distance can be equal, or the first preset distance is greater than the second preset distance, or the first preset distance is less than the second preset distance.
[0018] In a possible implementation of the present application, the reference value is a first reference value. When the first communication function is in the off state, the electronic device turns on the first communication function according to the relationship between the cumulative sum of the yaw rates and the reference value, including: when the cumulative sum of the yaw rates is less than or equal to the first reference value, the electronic device turns on the first communication function.
[0019] In a possible implementation of the present application, the electronic device turns on the first communication function, including: the electronic device automatically turns on the first communication function.
[0020] In a possible implementation of the present application, enabling the first communication function of the electronic device includes: Before the electronic device enables the first communication function, the method further includes: The electronic device outputs a first prompt message for prompting to enable the first communication function. Enabling the first communication function of the electronic device includes: When the electronic device detects an operation indicating to enable the first communication function, it enables the first communication function.
[0021] In a possible implementation of the present application, the reference value is the second reference value. When the first communication function is in an enabled state, the electronic device closes the first communication function according to the relationship between the accumulated sum of the course deviation rate and the reference value, including: When the accumulated sum of the course deviation rate is greater than the second reference value, the electronic device closes the first communication function.
[0022] In a possible implementation of the present application, the electronic device closes the first communication function, including: The electronic device automatically closes the first communication function. This solution can enable the electronic device to automatically perform the action of closing the first communication function when it determines that the condition for closing the first communication function is met.
[0023] In a possible implementation of the present application, the electronic device closes the first communication function, including: Before the electronic device closes the first communication function, the method provided in the embodiments of the present application further includes: The electronic device outputs a second prompt message for prompting to close the first communication function. Correspondingly, the electronic device closes the first communication function, including: When the electronic device detects an operation indicating to close the first communication function, it closes the first communication function. By outputting the second prompt message before closing the first communication function and then closing the first communication function based on the user's response to the second prompt message, accidental closing can be prevented, improving the user experience.
[0024] In a possible implementation of the present application, when the electronic device starts to move, if the second movement parameter during the movement of the electronic device meets a preset condition, the electronic device determines that the electronic device is in a moving state. The second movement parameter is one or more of the movement duration, movement distance, or movement steps.
[0025] In a second aspect, a communication device is provided. The communication device includes: at least one processor. Wherein, when the communication device runs, the at least one processor executes the computer-executable instructions or programs stored in the memory, so that the communication device executes the methods in the first aspect or various possible implementations of the first aspect as described above. For example, the communication device can be an electronic device or a chip applied to an electronic device.
[0026] In a third aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (which may also be referred to as an instruction or code). When the computer program is executed by an electronic device, the electronic device is caused to execute the methods in the first aspect and all possible implementations of the first aspect.
[0027] For the technical effects corresponding to the third aspect, reference may be made to the technical effects corresponding to the first aspect and all possible implementations of the first aspect above, which will not be elaborated here.
[0028] In a fourth aspect, a chip is provided. The chip includes a processor and a memory. The processor is configured to read and execute the computer program stored in the memory to execute the methods in the first aspect and all possible implementations of the first aspect. It should be noted that the chip can be applied to the electronic devices involved in the embodiments of the present application, and the memory can be an internal memory of the chip or an external memory of the chip. The embodiments of the present application do not make any limitations in this regard.
[0029] For the technical effects corresponding to the fourth aspect, reference may be made to the technical effects corresponding to the first aspect and all possible implementations of the first aspect above, which will not be elaborated here.
[0030] In a fifth aspect, a computer program product is provided. The computer program product includes a computer program (which may also be referred to as an instruction or code). When the computer program is executed by an electronic device, the electronic device is caused to execute the methods in the first aspect and all possible implementations of the first aspect.
[0031] For the technical effects corresponding to the fifth aspect, reference may be made to the technical effects corresponding to the first aspect and all possible implementations of the first aspect above, which will not be elaborated here.
[0032] In a sixth aspect, an electronic device is provided. The electronic device has a first communication function. The first communication function is used to enable communication between the electronic device and other electronic devices on a sidelink. The electronic device includes: a processor; and a computer program, where the computer program is stored in a memory. When the computer program is executed by the processor, the electronic device is caused to execute the methods in the first aspect and all possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic flowchart of the process for providing the function of closing V2X communication;
[0034] Figure 2 It is a schematic diagram of a scenario provided by an embodiment of the present application;
[0035] Figure 3 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application;
[0036] Figure 4 Schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;
[0037] Figure 5 Schematic diagram of a course deviation angle provided by an embodiment of the present application;
[0038] Figure 6A and Figure 6B Schematic flowcharts of a control method for device functions provided by embodiments of the present application respectively;
[0039] Figure 7 Schematic diagram of acceleration vectors in different movement modes provided by an embodiment of the present application;
[0040] Figure 8 Schematic diagram of detecting and calculating the number of steps provided by an embodiment of the present application;
[0041] Figure 9 Schematic diagram of angular velocity conditions collected in different scenarios provided by an embodiment of the present application;
[0042] Figure 10 Schematic diagram of the interaction interface of an electronic device provided by an embodiment of the present application;
[0043] Figure 11 Schematic diagram of the interface of another electronic device provided by an embodiment of the present application;
[0044] Figure 12 Schematic flowchart of another control method for device functions provided by an embodiment of the present application. Detailed implementation manners
[0045] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "the", "above-mentioned", "this" and "such" are also intended to include, for example, the expression form of "one or more", unless there is a clear indication to the contrary in the context. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" mean one or more than two (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0046] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc., which appear in different places in this specification, are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants mean "including but not limited to", unless otherwise specifically emphasized. The term "connection" includes direct connection and indirect connection, unless otherwise stated. "First" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features.
[0047] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.
[0048] Before introducing the embodiments of the present application, the relevant terms involved in the embodiments of the present application are first introduced:
[0049] The first communication function can be regarded as a function of an electronic device. When the first communication function is in an enabled state, the electronic device can communicate with other devices having the first communication function based on a sidelink (SL). In this communication mode, two electronic devices can communicate directly without passing through a network device (such as a base station) or a core network. Without passing through a base station, data is directly transmitted from one electronic device to another through a unified air interface (for example, the PC5 interface). In the context of a vehicle-to-everything (V2X) scenario, the first communication function can be referred to as the V2X communication function. For example, taking an electronic device as a smart bracelet, when the V2X communication function of the smart bracelet is enabled, the smart bracelet can send its own location information to surrounding vehicles through the sidelink. In this way, after receiving the location information of the smart bracelet, the vehicle can determine the location of the user wearing the smart bracelet; thus, the vehicle can make a safety response according to its own situation. For a cyclist, the smart bracelet worn by him can also obtain information such as street congestion from a roadside unit (RSU) device or other devices.
[0050] In order to achieve V2X communication, existing electronic devices usually have V2X communication capabilities. If the V2X communication function of the electronic device is kept turned on all the time, the battery life of the electronic device will be greatly reduced, and the overall user experience of the product will be significantly degraded. If relying on users to manually trigger the opening or closing of the V2X communication function of the electronic device, since users may not be able to accurately trigger the electronic device to turn on the V2X communication function every time it is needed immediately, or users may not be able to accurately trigger the electronic device to turn off the V2X communication function every time it is not needed immediately, this will cause a significant decrease in the usage rate and serviceability of V2X-related intelligent scenario functions, which significantly restricts the service experience.
[0051] Currently in the vehicle-mounted field, for products of the vehicle-mounted communication terminal (telematics box, T-box) type, the methods for turning on or off the V2X communication function are as Figure 1 shown in (A) in Figure 1 and (B) in Figure 1 shown in (B) in
[0052] Figure 1 The methods for turning on the V2X communication function described may not be suitable for IoT devices or mobile devices for the following reasons:
[0053] If electronic devices such as mobile devices or IoT devices adopt the method of default turning on (always on) the V2X communication function, there will be the following obvious defects:
[0054] 1. Since most mobile devices or IoT devices are powered by batteries, compared with long term evolution (LTE), for V2X communication, the radio frequency requires an additional baseband chip and related operational amplifier units and radio frequency units. Therefore, the power consumption per unit time will increase significantly. Moreover, currently, most V2X communications are in broadcast mode (MODE) 4, and the device is in a state of continuous listening and sending, without a low-power state. This will lead to a significant reduction in the battery life of mobile devices or IoT devices and a degradation of the user experience.
[0055] 2. When a user carries an IoT device or a mobile device and enables the V2X communication service function when not in the street movement scenario, since the coverage range of V2X radio frequency communication is generally 300 - 1000 meters, users who are not in the street movement scenario at this time may cause serious radio frequency resource squeezing and computing interference to the V2X electronic control unit (ECU) (also known as "vehicle computer", "in-vehicle computer") on the street road, resulting in a high ineffective computing load of the intelligent vehicle networking system, causing serious negative impacts on its service latency and computing load, greatly reducing and dragging down the service experience of intelligent vehicle networking-related applications, and even possibly triggering related false alarms and security hazards.
[0056] Based on this, the embodiments of the present application provide a control method for device functions. In this method, when the V2X communication function of an electronic device is off, if the electronic device determines that it is in a moving state and the movement mode is an effective movement mode, and in addition, the cumulative sum of the course deviation rates within a preset distance in the movement plane is less than or equal to a first reference value, then the electronic device enables its own V2X communication function, that is, the electronic device updates its V2X communication function from the off state to the on state. This is because if the cumulative sum of the course deviation rates of the electronic device within the preset distance in the movement plane is less than or equal to the first reference value, it indicates that the user carrying the electronic device is in a mobile travel state, and the V2X communication function of the electronic device is generally turned on when needed (such as when walking on the street, in an outdoor mobile travel state, etc.). In this way, this solution can turn on the V2X communication function when the electronic device needs to perform V2X service transmission (such as in a mobile travel state, etc.), and continue to maintain the V2X communication function in the off state when the conditions are not met. In this way, it is not only beneficial for the device to maintain battery life and control heat generation, but also beneficial for the V2X communication function to provide services in an accurate and appropriate scenario, improving the user experience.
[0057] In addition, in order to overcome the above-mentioned defect 2, in the embodiments of the present application, when the electronic device determines that it is in a moving state and is located outdoors, the movement mode of the electronic device is an effective movement mode, and the cumulative sum of the course deviation rates within the preset distance is less than or equal to the first reference value, then the electronic device enables the V2X communication function of the electronic device. This is because if the electronic device is located outdoors and is in a mobile travel state, the possibility that the electronic device needs to perform V2X service transmission is higher.
[0058] Exemplarily, Figure 2 shows a schematic diagram of a V2X communication scenario provided by the embodiments of the present application. As Figure 2As shown in the figure, V2X communication can be divided into: vehicle-to-vehicle (V2V) communication, or vehicle-to-infrastructure (V2I) communication, or vehicle-to-pedestrian (V2P) communication, or vehicle-to-network (V2N) communication to obtain various traffic-related information in a timely manner; these communication methods can be collectively referred to as V2X communication. X is a collective term for vehicles, roadside infrastructure, pedestrians, and networks.
[0059] V2P communication between a vehicle and a pedestrian usually refers to the communication between the vehicle and the electronic devices used by the pedestrian. The electronic devices involved in the embodiments of this application include but are not limited to: electronic devices such as smartphones, smart bracelets, smart watches, and wearable devices. The electronic devices can not only perform V2X communication with vehicles but also perform V2X communication with other electronic devices (such as smartphones).
[0060] Exemplarily, Figure 3 The schematic structural diagram of an electronic device provided by the embodiments of this application is shown. The electronic device includes: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a position conduction sensor 180M, etc.
[0061] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figures, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, 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.
[0063] Among them, the controller may be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0064] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. For example, the processor in the embodiments of the present application is used to execute Figure 6A 、 Figure 6B as well as Figure 12 each step in the illustrated embodiments.
[0065] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0066] The I2C interface is a two-way synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). The I2S interface can be used for audio communication. The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. The UART interface is a universal serial data bus for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 to the wireless communication module 160. The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The processor 110 and the display screen 194 communicate through a display serial interface (DSI) to implement the display function of the electronic device. The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.
[0067] The USB interface 130 is an interface that complies with the USB standard specification. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used for data transmission between the electronic device and peripheral devices. The USB interface 130 can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices, etc.
[0068] It can be understood that the interface connection relationships shown in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0069] The charging management module 140 is used to receive a charging input from a charger. The power management module 141 is used to connect to the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives inputs from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery charge cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0070] The wireless communication function of the electronic device can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0071] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: The antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0072] The mobile communication module 150 may provide solutions for various wireless communications including 2G / 3G / 4G / 5G, etc., which are applied to the electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through antenna 1, filter, amplify, and process the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device. For example, when the V2X communication function of the electronic device is turned on, the electronic device may use the mobile communication module 150 to perform V2X communication with other devices.
[0073] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
[0074] The wireless communication module 160 may provide solutions for wireless communications including wireless local area network (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to the electronic device. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves through antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 may also receive the signal to be transmitted from the processor 110, perform frequency modulation and amplification on it, and convert it into electromagnetic waves through antenna 2 and radiate it out.
[0075] In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 150, and antenna 2 is coupled to the wireless communication module 160, enabling the electronic device to communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0076] The electronic device implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0077] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1.
[0078] The electronic device can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0079] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image through algorithms. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0080] The camera 193 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV, etc. formats. In some embodiments, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.
[0081] The digital signal processor is used to process digital signals. Besides processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos. The electronic device can support one or more video codecs. In this way, the electronic device can play or record videos in multiple encoding formats. For example: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0082] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0083] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device (such as audio data, phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory and can also include non-volatile memory. For example: at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0084] The electronic device can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.
[0085] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or a hands-free call through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device answers a call or a voice message, the voice can be listened to by placing the receiver 170B close to the ear. The microphone 170C, also known as the "microphone", "transmitter", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak by placing the mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device can be provided with at least one microphone 170C. In some other embodiments, the electronic device can be provided with two microphones 170C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the electronic device can also be provided with three, four or more microphones 170C to implement functions such as collecting sound signals, noise reduction, identifying the sound source, and implementing a directional recording function, etc.
[0086] The headphone jack 170D is used to connect a wired headphone. The headphone jack 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0087] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. The barometric pressure sensor 180C is used to measure barometric pressure. In some embodiments, the electronic device calculates the altitude based on the barometric pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). The distance sensor 180F is used to measure distance. The electronic device can measure the distance by infrared or laser. The proximity light sensor 180G can include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. In the embodiments of the present application, the electronic device can determine whether the position of the electronic device is outdoors according to different ranges of the ambient light brightness sensed by the ambient light sensor 180L. The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, the gyroscope sensor 180B can include a multi-axis angular velocity sensor and an acceleration sensor. Among them, the multi-axis angular velocity sensor is used to collect multi-axis angular velocity data of the electronic device during movement; the acceleration sensor is used to collect acceleration data of the electronic device during movement.
[0088] The fingerprint sensor 180H is used to collect fingerprints. The electronic device can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering of incoming calls, etc. The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194.
[0089] In an embodiment of the present application, the position conduction sensor 180M can obtain the position information of the electronic device and convert it into an available output signal. For example, for an electronic device, the position sensor 180M can be a global positioning system (GPS) sensor, which can determine the longitude and latitude coordinates of the electronic device, etc. The embodiments of the present application do not limit this. For example, taking the electronic device as a smart watch, the smart watch in the embodiments of the present application can use the conduction sensor 180M to obtain the position of the smart watch, and then determine whether the smart watch is outdoors or indoors according to the position of the smart watch.
[0090] The button 190 includes a power-on button, a volume button, etc. The button 190 can be a mechanical button or a touch button. The electronic device can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device.
[0091] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts or touch vibration feedback. For example, touch operations on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. For touch operations on different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0092] The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, etc.
[0093] The SIM card interface 195 is used to connect the SIM card.
[0094] It should be noted that the electronic device may include more or fewer components than Figure 3 shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0095] It should be understood that a mobile phone, a smart watch, and a smart bracelet, as electronic devices, may include all the above-introduced hardware structures, or include some of the above hardware structures, or, have more other hardware structures not listed above. The embodiments of the present application do not limit this.
[0096] It should also be understood that the electronic device can adopt software systems such as a layered architecture, a Harmony OS architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture.
[0097] Exemplarily, Figure 4 is the logical architecture of another electronic device provided by the embodiments of the present application. As Figure 4 shown, the architecture includes the following modules: a battery 401, a gyroscope sensor 402, a logic calculation processing unit 403, a V2X access layer communication processing unit 404, a radio frequency drive communication processing unit 405, a power supply switch 406, and a V2X communication antenna connected to the radio frequency drive communication processing unit 405.
[0098] Optionally, the architecture may further include: a light intensity detection unit 407, a volatile storage medium 408, and a non-volatile storage medium 409.
[0099] Among them, the battery 401 is responsible for supplying power to each hardware device inside the electronic device through various voltage divisions to support the normal operation of each hardware device inside the system.
[0100] The gyroscope sensor 402 is responsible for periodically collecting the angular velocity and acceleration of the XYZ three axes of the electronic device and periodically delivering the data to the logic calculation unit 403.
[0101] The logic calculation processing unit 403 (corresponding to Figure 3 the processor 110 shown) is responsible for performing data calculation analysis and recognition on the multi-axis acceleration data and multi-axis angular velocity data of the gyroscope sensor 402 collected, so as to recognize the current effective movement mode and movement steps, etc., and determine the output signal of the light intensity detection unit 407 to determine the current outdoor situation, and implement the calculation logic required by the present application.
[0102] The V2X access layer communication processing unit 404 implements V2X access data format processing and related management plane control and data plane communication based on the 3GPP protocol.
[0103] The radio frequency drive communication processing unit 405 mainly completes the driving work of radio frequency related devices, processes the radio interface transceiver drive according to the 3GPP protocol, and realizes the transmission, acquisition, amplification, and restoration of radio interface data.
[0104] The power supply switch 406 completes the on-off control of the power supply to the V2X communication device according to the instruction of the logic calculation processing unit 403. For example, if the logic calculation processing unit 403 of the electronic device in the embodiments of the present application detects that the V2X communication function needs to be turned off based on the method of the present application, the logic calculation processing unit 403 turns off the power supply switch. If the logic calculation processing unit 403 of the electronic device in the embodiments of the present application detects that the V2X communication function needs to be turned on based on the method of the present application, the logic calculation processing unit 403 turns on the power supply switch.
[0105] The light intensity detection unit 407 is responsible for input conversion of environmental photosensing and outputs the relevant output signals representing the light brightness to the logic calculation and processing unit 403.
[0106] The volatile storage medium 408 is used to store temporary operation data required by this application, etc.
[0107] The non-volatile storage medium 409 is used to store long-term recorded data required by this application, etc. For example, the first reference value and the second reference value involved in this application.
[0108] The V2X communication antenna receives and transmits V2X wireless communication signals to realize the necessary collection elements for V2X communication.
[0109] As an example, the light intensity detection unit 407 corresponds to Figure 3 the environmental light sensor 180L shown. The non-volatile storage medium 409 and the volatile storage medium 408 correspond to Figure 3 the internal memory 121 shown. The logic calculation and processing unit 403 corresponds to Figure 3 the processor 110 shown. The gyroscope sensor 402 corresponds to Figure 3 the gyroscope sensor 180B shown. The power supply switch 406 corresponds to Figure 3 the power management module 141 shown. The RF drive communication processing unit 405, the V2X access layer communication processing unit 404, and the V2X access layer communication processing unit 404 are used to realize the wireless communication of the electronic device and correspond to Figure 3 the wireless communication module 160 shown.
[0110] Generally speaking, the V2X communication function of the electronic device is generally turned on when needed (such as when walking on the street, in an outdoor mobile travel state, etc.), and in scenarios where V2X services are not required, such as indoor places or stationary states, it is in the off state. In this way, it not only helps the device maintain battery life and control heat generation, but also helps to provide V2X communication services immediately and accurately in appropriate scenarios, improving the user experience.
[0111] As Figure 5 shown, the heading angle (also known as: yaw angle) involved in the embodiment of this application refers to: when the user carries the electronic device and moves on the movement plane, the angle deviating from the target direction (OY coordinate axis). When rotating counterclockwise from the OY axis to the projection line of the longitudinal axis of the movement plane, the heading angle is positive, and vice versa, the heading angle is negative.
[0112] The heading angle can also be called the angle change amount, which can be determined by the angular velocity information (also called the heading rate) of the electronic device during movement and the unit time consumed.
[0113] For example, if the gyroscope sensor of an electronic device periodically collects angular velocity information according to a preset period, then the yaw angle corresponding to each period can be calculated. Taking the first period in each period as an example, the first period is any one of each period; the angle change amount corresponding to the first period is determined by the angular velocity information corresponding to the first period and the duration of the first period. For example, within a period of time, the angle change amount of the gyroscope sensor collected based on the walking plane can be expressed as: Δω = Δθ * Δt. Where θ is the angular velocity information of the Yaw (yaw angle) in a certain period collected within a period, and t is the duration of a period (such as 10 milliseconds). This application can also regard the angular velocity of the electronic device along the movement plane as the yaw rate of the electronic device (that is, the yaw rate is the angular velocity of the yaw angle). Since the walking frequency of the user's movement is inconsistent at different times, the angular velocities of the gyroscope sensor collected based on the walking plane in different periods can be the same or different.
[0114] Since outdoor street movement has more typical characteristics when moving according to the world coordinate system compared to other irregular (high-curvature) movements: for irregular movement (high-curvature) and street movement, when both move the same distance, the absolute change amount of Yaw (yaw angle) in the world coordinate system is likely to be greater for the former than the latter. The principle is: the designed extension curvature of street roads on the earth's plane is much smaller than that of indoor paths or non-street paths. The data formula can be expressed as: ω1 = Σ|Δω(k)| > ω″ > ω′ > ω2 = Σ|Δω(k)|. Where ω1 represents the curvature during indoor or irregular movement. ω2 represents the curvature during street movement. Σ|Δω(k)| represents the cumulative sum of the yaw rate of the electronic device within a preset distance. ω″ represents the second reference value. ω′ represents the first reference value.
[0115] Based on the above principle, an electronic device in a moving state collects angular velocity information through a gyroscope sensor in real time or at regular intervals. The electronic device performs data transformation according to the world coordinate system. According to the earth coordinate system, the angle change of the moving direction of an object on the movement plane (i.e., the XY plane) is reflected in the angle of rotation around the Z axis, that is, the Yaw (yaw angle) information. And the electronic device is carried on a moving individual. At any moment, it may be in different postures. Therefore, first calculate the specific posture information of the gyroscope sensor at that moment, and then based on the three-axis angular velocity information sampled in the random posture according to the posture information, restore it to the angular velocity information in the world coordinate system, so as to obtain the Yaw (some electronic device processors come with a decision processing unit (decide marking uint, DMU) unit, which can automatically complete the posture stage and coordinate system conversion to directly read the Yaw change rate, and this step then becomes directly obtaining the angle change amount ΔYaw of the Z axis in the world coordinate system) conversion scheme is as follows:
[0116] The electronic device can calculate three attitude angles: α, β, and γ according to the readings of the projections of the gravity angular velocity readings on the three axes of X, Y, and Z (a x , a y , a z ). Among them, as Figure 5 shown, pitch is the rotation around the X-axis, also called the pitch angle. Yaw is the rotation around the Y-axis, also called the yaw angle. Roll is the rotation around the Z-axis, also called the roll angle.
[0117] α = arcsin(a x / g) β = arcsin(a y / g) γ = arcsin(a z / g)
[0118]
[0119]
[0120]
[0121]
[0122] The electronic device calculates according to the obtained attitude angle of the electronic device at the current moment and the triaxial angular velocity information d r , d p , d y using the following equation: The final w is the solution of the world coordinate system to be solved w = [d r d p d y ; d y is the Yaw angular velocity in the world coordinate system. Among them, d r represents the angular velocity measurement value of the gyroscope sensor in the Y-axis direction. d p represents the angular velocity measurement value of the gyroscope sensor in the X-axis direction. d y represents the angular velocity measurement value of the gyroscope sensor in the Z-axis direction.
[0123]
[0124]
[0125] Among them, p corresponds to the calculated roll angle of the electronic device. y is the calculated pitch angle of the electronic device.
[0126] After the electronic device obtains the Yaw angular velocity information at each moment, it performs integration to statistically accumulate the absolute values at each moment. The electronic device can use the Σ|Δω(k)| generated when counting continuously for n steps (for example, 150) as the accumulated sum of the yaw rate of the electronic device.
[0127] For example, in an actual process, if the frequency of the gyroscope sensor of the electronic device for collecting angular velocity information is 100 Hertz (Hz), that is, the angular velocity information is collected once every 1 millisecond, then the angular velocity information statistically obtained every 1 millisecond can be regarded as instantaneous angular velocity information. If it is necessary to calculate the accumulated sum of the yaw rate of the electronic device within 1 second, the electronic device can accumulate the absolute values of the angular velocity information collected each time among 1000 times.
[0128] Referring to the above scenario, Figure 6A A control method for a device function provided by an embodiment of the present application. This method is applied to an electronic device with a first communication function. The first communication function is used to implement communication between the electronic device and other electronic devices on a sidelink. As Figure 6A shown, this method includes:
[0129] Step 601, the electronic device determines whether the electronic device is in a moving state.
[0130] Generally, the electronic device has a gyroscope sensor, and the gyroscope sensor may include an acceleration sensor (corresponding to a multi-axis acceleration detection unit) and a multi-axis angular velocity sensor (corresponding to a multi-axis angular velocity detection unit). The acceleration sensor can collect acceleration data during the movement of the electronic device. In this way, when the user carries the electronic device and moves on the road (such as walking / running), the electronic device can use the acceleration sensor to periodically collect acceleration information, and use the multi-axis angular velocity sensor of the electronic device to collect angular velocity information. For example, the electronic device analyzes the Z-axis acceleration data of the gyroscope sensor to identify whether the electronic device is currently in a moving state. For example, as Figure 4 shown, the multi-axis acceleration detection unit can periodically collect the acceleration information generated by the user during the movement. The multi-axis angular velocity detection unit can periodically collect the multi-axis angular velocity information of the electronic device.
[0131] In a possible implementation manner of the present application, step 601 can be implemented in the following manner: The electronic device determines whether it starts to move. When the electronic device determines that it starts to move, the electronic device determines that it is in a moving state.
[0132] In the actual process, when the electronic device determines that the electronic device starts to move (it can be considered that the user carrying the electronic device starts to move), it is possible that the moving duration is too short or the moving distance (the number of steps taken can be used as a reference) is too small. For example, although the electronic device detects that it starts to move, it only moves two or three meters, only moves for dozens of seconds, or only takes two or three steps, and then remains stationary for a long time. At this time, it is not reasonable for the electronic device to determine that it is in a moving state. Based on this, in another possible implementation of the present application, step 601 can be implemented in the following way: when the electronic device determines that it starts to move, the electronic device determines whether the electronic device is in a moving state according to the relationship between the second moving parameter during the movement of the electronic device and the preset condition.
[0133] For example, if the electronic device determines that the second moving parameter during the movement of the electronic device meets the preset condition, the electronic device determines that the electronic device is in a moving state.
[0134] For example, taking the second moving parameter as the moving duration, if the electronic device determines that the moving duration is greater than or equal to the preset moving duration (such as 30 seconds, 2 minutes, etc.), the electronic device determines that the electronic device is in a moving state. Taking the second moving parameter as the number of steps, if the electronic device determines that the number of steps is greater than or equal to the preset number of steps (such as 100 steps, etc.), the electronic device determines that the electronic device is in a moving state. Taking the second moving parameter as the moving distance, if the electronic device determines that the moving distance is greater than or equal to the preset moving distance (such as 20 meters, 50 meters, etc.), the electronic device determines that the electronic device is in a moving state.
[0135] In other words, when the electronic device determines that the electronic device starts to move, if the electronic device determines that the second moving parameter during the movement of the electronic device does not meet the preset condition, the electronic device determines that the electronic device is not in a moving state. Taking the second moving parameter as the number of steps, the second moving parameter not meeting the preset condition means that the number of steps is less than or equal to the preset number of steps. Taking the second moving parameter as the moving duration, the second moving parameter not meeting the preset condition means that the moving duration is less than or equal to the preset moving duration. Taking the second moving parameter as the moving distance, the second moving parameter not meeting the preset condition means that the moving distance is less than or equal to the preset moving distance.
[0136] By comparing the second moving parameter collected by the electronic device during the user's movement with the preset condition, the accuracy of the electronic device determining that it is in a moving state can be improved.
[0137] The above-mentioned movement duration, movement steps, and movement distance can be used alone or in combination. For example, if any two or three of the movement duration, movement distance, and movement steps meet the conditions, it is determined that the electronic device is in a moving state.
[0138] In an embodiment of the present application, the above-mentioned preset movement duration, preset movement steps, and preset movement distance can be the default settings in the electronic device, that is, the electronic device is configured with the preset movement duration, preset movement steps, and preset movement distance when it leaves the factory. Alternatively, the user can trigger the electronic device by himself to update the above-mentioned preset movement duration, preset movement steps, and preset movement distance. After the above-mentioned preset movement duration, preset movement steps, and preset movement distance are updated, the subsequent electronic device uses the updated parameters as the standard. Alternatively, the above-mentioned preset movement steps and preset movement distance can be determined by parameters such as the height of the wearer. For example, the preset movement steps corresponding to users with different heights are different; the preset movement distances corresponding to users with different heights are different. This is because people with different heights usually have different step sizes. For example, user A with a height of 160 cm takes about 30 cm per step. Therefore, the preset movement steps corresponding to user A can be set to 50 steps. User B with a height of 180 cm takes about 50 cm per step. Therefore, the preset movement steps corresponding to user B can be set to 30 steps. Setting different preset movement steps based on the heights of different users can make the determination of the moving state of the electronic device more accurate.
[0139] In an embodiment of the present application, when the V2X communication function of the electronic device is in the off state and the electronic device determines that the electronic device is not in a moving state, the electronic device does not turn on the V2X communication function of the electronic device. This is because when the electronic device is not in a moving state, it means that the user carrying the electronic device is not exercising (for example, the user is in a sleeping state or a sitting state). Therefore, the acceleration data collected by the gyroscope sensor of the electronic device is small, or although the user has exercised, the second movement parameter during the movement does not meet the preset conditions. At this time, not turning on the V2X communication function of the electronic device can not only save the power of the electronic device, but also avoid the radio frequency resource squeezing and calculation interference caused by the V2X radio frequency communication of the electronic device to the V2X ECU unit on the street. Alternatively, in an embodiment of the present application, when the V2X communication function of the electronic device is in the on state, if the electronic device determines that the electronic device is not in a moving state, or the duration of not being in a moving state is greater than the specified duration, the electronic device turns off the V2X communication function of the electronic device. For example, when the V2X communication function of the electronic device is in the on state, and the movement steps of the user in a certain period are 0, or the duration of the movement steps being 0 is greater than the preset duration, the electronic device turns off the V2X communication function of the electronic device.
[0140] Step 602: When the electronic device is in a moving state, the electronic device determines the moving mode of the electronic device according to the first movement parameter during the movement of the electronic device.
[0141] As an example, the moving mode may include a walking mode, a running mode, a cycling mode, an upstairs mode, or a downstairs mode.
[0142] As an example, since the amplitude thresholds of the acceleration data presented during the user's movement are different in different moving scenarios. Therefore, the electronic device can determine the moving mode of the electronic device according to the amplitude threshold of the acceleration data collected by the gyroscope sensor of the electronic device during the user's movement.
[0143] Specifically, as Figure 7 shown, the electronic device analyzes the Z-axis acceleration data of the gyroscope sensor to identify whether it has entered a moving state currently. If the waveform meets the threshold jump to start step counting, the moving mode is determined as the running mode, walking mode, upstairs mode, or downstairs mode according to the frequency of the waveform data. If it is the walking mode or the running mode, proceed to the next step (such as step 603). If not, the V2X communication function is not enabled.
[0144] Regarding the electronic device determining that the user is in the walking mode, running mode, or upstairs and downstairs modes according to the user's movement parameters, reference can be made to the descriptions of related technologies in this field, which will not be elaborated here.
[0145] As Figure 7 shown, the acceleration data corresponding to the upstairs mode and the downstairs mode is greater than the acceleration data corresponding to the walking mode. Therefore, different moving modes can be identified according to the average variance range presented by the acceleration data. In addition, the acceleration data corresponding to the downstairs mode is greater than the acceleration data corresponding to the upstairs mode.
[0146] A specific implementation: The electronic device makes a judgment based on the Z-axis acceleration data collected by the gyroscope sensor. The data can be subjected to mean filtering or Kalman filtering to obtain a relatively stable waveform. Secondly, the wave peak and wave valley method is used for data analysis to determine the number of moving steps. The moving mode of the electronic device is determined as the upstairs mode, downstairs mode, or other modes according to the amplitude of each wave peak - wave valley. The electronic device can determine whether it is running or walking according to the cycle time of each wave peak - wave valley. If the data does not present regular wave peaks - wave valleys (the time range from one wave peak to the next wave peak is not within the threshold range), it is determined that the electronic device is in the first moving mode at this time. According to the above method, if there are continuous step counts and the moving mode is the walking mode or the running mode, it is considered that an effective next determination can be made. The related technologies for implementing this step belong to the well-known technologies in this field and will not be elaborated here.
[0147] As shown Figure 8 in the figure, the electronic device can analyze the acceleration data collected by the gyroscope sensor using the peak-valley method, and can effectively detect the number of moving steps. Specifically, when the peak-valley amplitude of the acceleration data collected by the gyroscope sensor meets the threshold and the time span is within the effective time range, it can be regarded as an effective step of movement.
[0148] Step 603: The electronic device determines whether the electronic device is in an effective movement mode according to the movement mode.
[0149] In a possible implementation manner of the present application, if the electronic device determines that the movement mode of the electronic device is any one of the walking mode, running mode, and cycling mode, the electronic device determines that the electronic device is in an effective movement mode. Optionally, if the duration of the electronic device in any one of the walking mode, running mode, and cycling mode exceeds a preset duration, the electronic device determines that the electronic device is in an effective movement mode.
[0150] In a possible implementation manner of the present application, if the electronic device determines that the movement mode of the electronic device is the upstairs mode or the downstairs mode, the electronic device determines that the electronic device is not in an effective movement mode.
[0151] It should be noted that when the movement mode of the electronic device is in an effective movement mode, if the first communication function of the electronic device is not turned on at this time, the electronic device considers turning on the first communication function. When the movement mode of the electronic device is not in an effective movement mode, if the first communication function of the electronic device is not turned on at this time, the electronic device does not consider turning on the first communication function.
[0152] Step 604: When the electronic device is in an effective movement mode, the electronic device determines the accumulated sum of the yaw rates of the electronic device within a preset distance.
[0153] The yaw rate in the embodiments of the present application may refer to: the angular velocity information of the electronic device along the movement plane within a preset distance.
[0154] It should be noted that the movement plane in the embodiments of the present application refers to the plane on which the user carrying the electronic device moves on the road. For example, if the movement mode of the user carrying the electronic device is the walking mode, the movement plane is the plane where the user walks on the road. For example, if the movement mode of the user carrying the electronic device is the running mode, the movement plane is the plane where the user runs along the road.
[0155] In a possible implementation of the present application, step 604 can be implemented in the following manner: The electronic device determines, according to a preset period, the angular change amount (i.e., the course deviation angle) corresponding to each period within the time period corresponding to the preset distance of the electronic device. The electronic device accumulates the angular change amounts corresponding to each period to obtain the cumulative sum of the course deviation rates.
[0156] Wherein, the preset period is the period for the gyroscope sensor of the electronic device to collect multi-axis angular velocity information. For example, the preset period can be 10 milliseconds.
[0157] Assume that the time taken for the user to walk the preset distance is T. The T consists of time period 1, time period 2, and time period 3. Among them, the lengths of time period 1, time period 2, and time period 3 are equal and are all the preset period. Then the electronic device can accumulate the angular change amount corresponding to time period 1, the angular change amount corresponding to time period 2, and the angular change amount corresponding to time period 3 to obtain the cumulative sum of the course deviation rate of the electronic device along the movement plane within the preset distance.
[0158] It should be noted that the angular velocity information within each period can be the same or different. The embodiments of the present application do not make any limitations in this regard.
[0159] Taking the electronic device as a smart watch as an example, the user wears the smart watch device and walks on the road. When the smart watch is in an operating state, the gyroscope sensor of the smart watch can periodically collect multi-axis angular velocity information and acceleration information. Taking continuously counting that the user walks 100 meters as an example, with each step being 50 centimeters, then continuously counting 200 steps, and setting the sampling frequency of the gyroscope sensor to 100 Hz.
[0160] Assume that the time taken for the user to walk 100 meters is 80 seconds. Taking the preset period as 10 milliseconds and the sampling frequency as 100 Hz as an example, then the electronic device collects 100 times of multi-axis angular velocity information within 1 second. Then the electronic device can first determine the angular change amount corresponding to each 10 milliseconds in 80 seconds, and then accumulate the angular change amounts corresponding to each 10 milliseconds in 80 seconds to obtain the cumulative sum of the course deviation rate of the electronic device when the user walks 100 meters.
[0161] In a possible implementation of the present application, in the scenario where the first communication function is enabled, the preset distance is the first preset distance, and in the scenario where the first communication function is disabled, the preset distance is the second preset distance. Among them, the first preset distance is greater than the second preset distance, or the first preset distance is less than or equal to the second preset distance. The embodiments of the present application do not make any limitations in this regard.
[0162] Step 605: The electronic device turns on or off the first communication function according to the relationship between the cumulative sum of the course deviation rate and the reference value.
[0163] Among them, the reference value is a calibration value set according to the length of the moving distance.
[0164] As an example, the reference value can be the default setting in the electronic device, that is, the electronic device is configured with the reference value when it leaves the factory, or the reference value can be set by the user triggering the electronic device by himself / herself. The embodiments of the present application do not limit this.
[0165] It should be noted that when the cumulative sum of the yaw rate is less than or equal to the reference value, the electronic device determines that the user carrying the electronic device is in the state of moving on an outdoor street (low-curvature movement).
[0166] As Figure 9 shown, taking a 100-meter statistical interval, a step length of 50 centimeters, and the gyroscope sensor continuously collecting 200 steps of the user carrying the electronic device as an example. Figure 9 In (A) of , taking the scenario where the user moves along the street (Scenario 1) as an example, the angular velocity change around the Z axis is shown. Figure 9 In (B) of , taking the scenario where the user moves along the residential community (Scenario 2) as an example, the angular velocity change around the Z axis is shown. The sampling frequency of the gyroscope sensor in different scenarios is 100Hz. Through integral cumulative analysis: in Scenario 1, the cumulative sum of ωA when the electronic device moves along the street scenario = 365.54. In Scenario 2, the cumulative sum of ωB when the electronic device moves along the residential community = 2398.22. It can be concluded that in different scenarios, the cumulative sum of the angular change amount ω of the electronic device is significantly different.
[0167] The following will separately describe the methods for the electronic device to turn on or off the first communication function of the electronic device in different situations.
[0168] Case 1): Turn on the first communication function of the electronic device
[0169] As an example, the reference value can be the first reference value. For example, the first reference value can be set to 700 to determine that the user is in the state of moving on an outdoor street (low-curvature movement).
[0170] In a possible implementation manner of the present application, when the first communication function of the electronic device is in the off state, as Figure 6B shown, step 605 in the embodiments of the present application can be implemented in the following manner:
[0171] Step 6051: If the cumulative sum of the yaw rate is less than or equal to the first reference value, the electronic device turns on the first communication function.
[0172] It can be understood that after the electronic device turns on the first communication function of the electronic device, the first communication function of the electronic device is in the on state.
[0173] As an example, the electronic device enabling the first communication function of the electronic device includes the electronic device turning on the power supply of the V2X-related communication device and software enabling the related drivers and communication protocol stacks. For example, the V2X-related communication device can be a V2X baseband processor, a V2X baseband (BB) chip, or a communication module chip, a radio frequency switch device, a PA (power) amplifier device, etc.
[0174] Combined with Figure 4 , a specific implementation: If the logical calculation processing unit 403 determines that the cumulative sum of the course deviation rate is less than or equal to the first reference value, the logical calculation processing unit 403 sends an instruction to the power supply switch 406, and this instruction is used to trigger the power supply switch 406 to turn on the power supply of the V2X-related communication device. In response to this instruction, the power supply switch 406 turns on the power supply of the V2X-related communication device.
[0175] In the actual process, although the electronic device determines that the first communication function of the electronic device should be enabled according to the above steps 601 to 605, the user may not wish to enable the first communication function of the electronic device. Therefore, in order to improve the user experience, in an optional embodiment of the present application, before the electronic device enables the first communication function of the electronic device, the electronic device can also output a first prompt message. Wherein, the first prompt message prompts whether to enable the first communication function of the electronic device.
[0176] The first prompt message in the embodiments of the present application can be any one or any combination of two or more of voice prompt, display prompt, and vibration prompt. The embodiments of the present application do not make any limitations in this regard. The display prompt can be any one or more of picture display prompt, text display prompt, etc. The combination of the picture display prompt and the text display prompt can be a pop-up window. Below combined with Figure 10 , taking the pop-up window with the first prompt message as the display prompt as an example for description.
[0177] Such as Figure 10As shown, taking the electronic device as a smart watch as an example, before the electronic device decides to turn on the first communication function according to the above steps 601 to 6051, the smart watch displays a prompt box 1001 on its display interface. The prompt box 1001 is used to prompt whether to turn on the V2X communication function of the smart watch. In addition, a control 1003 and a control 1002 are also displayed on this display interface. Among them, the control 1003 is used to indicate turning on the V2X communication function of the smart watch. The control 1002 is used to indicate not turning on the V2X communication function of the smart watch. If the user determines that they need to turn on the V2X communication function of the smart watch according to their own needs, they can click on the control 1003, so that the smart watch can detect an operation indicating to turn on the V2X communication function of the smart watch (hereinafter referred to as: the first operation). In response to the first operation, the smart watch turns on the V2X communication function of the smart watch. If the user determines that they do not need to turn on the V2X communication function of the smart watch at present (for example, the user finds that the battery power of the smart watch is too low, or the user finds that there is no need to perform V2X communication with other electronic devices at present), they can click on the control 1002, so that the smart watch can detect an operation indicating not to turn on the V2X communication function of the smart watch (hereinafter referred to as the second operation). In response to the second operation, the smart watch will not start the V2X communication function of the smart watch.
[0178] Alternatively, when the electronic device in the embodiment of the present application receives a decision to turn on the first communication function according to the above steps 601 to 6051, the electronic device can directly turn on the first communication function without displaying an interface as Figure 10 shown, that is, neither the prompt box 1001 nor the controls 1003 and 1002 are displayed.
[0179] In the actual process, if the user is currently in a motion state (such as walking or running), at this time, if the user is prompted whether to turn on the first communication function of the smart watch in the form of a pop-up window, the user may hardly notice the prompt box 1001. Therefore, in addition to displaying the prompt box 1001, the smart watch can also remind the user by vibration. Or, in combination with Figure 10 , if the smart watch detects that the user does not respond to the first prompt message within a specified duration (such as within 5 seconds or 10 seconds since the start of the prompt), the smart watch performs an operation to turn on the first communication function of the smart watch, that is, the smart watch defaults to detecting an operation indicating to turn on the first communication function of the smart watch. Or, if the smart watch detects that the user does not respond to the first prompt message within a specified duration (such as within 5 seconds or 10 seconds since the start of the prompt), the smart watch determines not to turn on the first communication function of the smart watch, that is, the smart watch defaults to detecting an operation indicating not to turn on the first communication function of the smart watch.
[0180] In an embodiment of the present application, for an electronic device, if the electronic device detects that the user is looking at the electronic device, the way for the electronic device to remind the user can be in text form. For the electronic device, when the user is not looking at the electronic device, the way for the electronic device to remind the user can be vibration reminder and / or voice reminder, and even a display reminder can be integrated. In other words, in the scenarios where the user is looking at or not looking at the electronic device, the electronic device can use different reminder methods to remind the user. This can improve the user experience. The method for the electronic device to determine whether the user is looking at the electronic device can refer to relevant technologies in the art, and the embodiments of the present application do not limit this.
[0181] In an embodiment of the present application, the electronic device can decide whether to output a first reminder message in combination with the power of the electronic device. For example, if the electronic device determines that the power of the electronic device is lower than a preset power threshold, the electronic device outputs the first reminder message. When the electronic device determines that the power of the electronic device is greater than or equal to the preset power threshold, if the electronic device determines that the conditions for enabling the first communication function of the electronic device are met through the above steps 601 to 6051, the electronic device performs the action of enabling the first communication function of the electronic device. This solution can achieve that when the power of the electronic device is sufficient and the conditions for enabling the first communication function of the electronic device are met, the electronic device automatically enables the first communication function of the electronic device.
[0182] In an embodiment of the present application, the way for the electronic device to remind the user can be default, or can be triggered by the user to reset the electronic device, and the embodiments of the present application do not limit this.
[0183] In an alternative implementation of the present application, in case 1), before the electronic device enables the first communication function of the electronic device, the first communication function of the electronic device is in a closed state.
[0184] On the one hand, the electronic device can, based on the user's operation, close the first communication function of the electronic device (for example, there is a first control on the electronic device, and the user can operate the first control to trigger the opening or closing of the first communication function of the electronic device).
[0185] As a possible implementation: the electronic device closing the first communication function of the electronic device can include: when the electronic device detects an operation on the first control, the electronic device closes the first communication function of the electronic device.
[0186] As an example, taking the electronic device as a mobile phone, the display interface of the mobile phone shows as Figure 11For the first control shown, when the user needs to turn off the first communication function of the electronic device, the user can click on the first control, so that the electronic device can detect the operation on the first control and then turn off the first communication function. The first control can be a virtual button or a physical button on the electronic device. When the physical button is triggered, the electronic device can detect the operation to trigger the closing of the first communication function of the electronic device. The physical button can be a button specifically used on the electronic device to trigger the closing of the first communication function of the electronic device, or it can be multiple existing buttons on the electronic device. For example, the electronic device includes Button 1 and Button 2. If Button 1 and Button 2 are pressed together, the electronic device detects the operation to trigger the closing of the first communication function of the electronic device.
[0187] On the other hand, the electronic device can turn off the V2X communication function of the electronic device in the manner described in case 2) below. That is, before turning on the first communication function of the electronic device, the electronic device can update the first communication function of the electronic device from the on state to the off state when the cumulative sum of the yaw rates is greater than or equal to the second reference value, so as to achieve the purpose of turning off the first communication function. Of course, turning off the first communication function is not limited to the content described in the embodiments of the present application, and can also be other ways that can trigger the electronic device to turn off the first communication function.
[0188] Case 2), turning off the first communication function of the electronic device
[0189] As an example, the reference value can be the second reference value. As an example, the above-mentioned second reference value is greater than or equal to the first reference value. The second reference value can be set by default in the electronic device, that is, the electronic device is configured with the second reference value when it leaves the factory, or the second reference value is set by the user triggering the electronic device.
[0190] It should be noted that when the cumulative sum of the yaw rates is greater than or equal to the second reference value, the electronic device determines that the user carrying the electronic device enters an irregular (or high-curvature) movement state. The second reference value and the first reference value are calibration values set according to the length of the movement distance.
[0191] As an example, the second reference value can be set to 800 to determine that the user is in an irregular (or high-curvature) movement state.
[0192] In a possible implementation manner of the present application, when the first communication function of the electronic device is on, as Figure 6B shown, step 605 provided in the embodiments of the present application can be implemented in the following manner:
[0193] Step 6052, if the cumulative sum of the yaw rates is greater than or equal to the second reference value, the electronic device turns off the first communication function.
[0194] Correspondingly, the electronic device turning off the first communication function of the electronic device may refer to: the electronic device turning off the power supply of the V2X-related communication device of the electronic device and enabling the relevant drivers and communication protocol stacks through software.
[0195] Combined with Figure 4 , as a specific implementation: when the accumulative sum of the yaw rate determined by the logic calculation processing unit 403 is greater than or equal to the second reference value, the logic calculation processing unit 403 sends an instruction to the power supply switch 406, and this instruction is used to trigger the power supply switch 406 to turn off the power supply of the V2X-related communication device. In response to this instruction, the power supply switch 406 turns off the power supply of the V2X-related communication device.
[0196] In an optional embodiment of the present application, before the electronic device performs the action of turning off the first communication function of the electronic device, the electronic device may further output a second prompt message. The second prompt message is used to prompt whether to turn off the first communication function of the electronic device. If the electronic device detects an operation indicating to turn off the first communication function of the electronic device, it performs the operation of turning off the first communication function. If the electronic device detects an operation indicating not to turn off the first communication function of the electronic device, the electronic device continues to maintain the first communication function of the electronic device in the on state.
[0197] Optionally, if the electronic device does not detect an operation indicating to turn off the first communication function of the electronic device within a specified duration (for example, 10 seconds), the electronic device performs the operation of turning off the first communication function. In a possible implementation, the starting moment of this specified duration is the moment when the electronic device outputs the second prompt message.
[0198] In a possible implementation manner of the present application, when the accumulative sum of the yaw rate determined by the electronic device is greater than or equal to the second reference value, after a preset duration (for example, 1 minute or 40 seconds since it is determined to be greater than or equal to the second reference value), the electronic device turns off the first communication function. By delaying the turning off of the first communication function of the electronic device, misjudgment can be avoided. Or, if the duration for which the electronic device determines that the accumulative sum of the yaw rate is greater than or equal to the second reference value exceeds the specified duration, it immediately turns off the first communication function, or turns off the first communication function after a preset duration (for example, 1 minute or 40 seconds since it is determined to exceed the specified duration).
[0199] As another possible implementation: when the electronic device determines that the user carrying the electronic device is in a state of no continuous valid step counting, it immediately or automatically turns off the first communication function of the device after a preset time (such as 30 seconds). Or, if the electronic device determines that the duration of being in a state of no continuous valid step counting exceeds a first preset duration, it immediately or automatically turns off the first communication function of the device after a second preset duration (such as 30 seconds) starting from the time when it is determined that the first preset duration is exceeded. In this way, misoperations of the electronic device can be prevented.
[0200] This is because there may be scenarios as follows. The user is currently at an intersection, but the user is in a state of waiting for a traffic light or viewing the navigation in the electronic device. In this behavior, the electronic device cannot temporarily detect the user's steps, so it will consider that the user is in a state of no continuous valid step counting. However, usually the user still continues to move after the above behavior. Therefore, if the first communication function of the electronic device is immediately turned off, then when it is detected that the user's movement meets the opening condition later, the electronic device has to execute the above Figure 6A or Figure 6B steps to turn on the first communication function, which will cause the electronic device to turn on or off the first communication function back and forth, resulting in a decline in the user experience. Therefore, automatically turning off the first communication function of the device after a second preset duration (such as 30 seconds) starting from the time when it is determined that the first preset duration is exceeded can avoid the occurrence of the above problems. For example, if the electronic device determines that the duration of being in a state of no continuous valid step counting exceeds the first preset duration, but it detects that the electronic device is in a state of moving on an outdoor street (low-curvature movement) within the second preset duration starting from the time when it is determined that the first preset duration is exceeded, then the action of turning off the first communication function will not be executed after the second preset duration arrives, but the first communication function will continue to be maintained in the on state.
[0201] The so-called state of no continuous valid step counting can refer to a non-effective movement mode or no effective step counting at all.
[0202] As another possible implementation: If the electronic device still has continuous movement steps but the movement pattern changes, such as from a walking mode / running mode to an up - stair mode or a down - stair mode, after maintaining a second preset duration (for example, 30 seconds) in the up - stair mode or the down - stair mode, the electronic device automatically turns off the first communication function of the electronic device. The second preset duration in the embodiments of the present application can be set as needed. The reason for automatically turning off the first communication function of the electronic device after maintaining the second preset duration (for example, 30 seconds) in the up - stair mode or the down - stair mode is as follows. When a user walks on the street, the following scenario may also occur. The user first walks on a flat road, then passes a step and continues to walk on the flat road. If the electronic device detects that the user of the electronic device passes a step and immediately turns off the first communication function of the electronic device, then after the user passes the step and continues to walk on the flat road, if the electronic device finds that the conditions for turning on the first communication function of the electronic device are still met, it has to perform the action of turning on the first communication function of the electronic device again. In this way, the electronic device will switch back and forth between turning on and off the first communication function. Therefore, in the up - stair mode or the down - stair mode, after maintaining the second preset duration (for example, 30 seconds), automatically turning off the V2X communication function of the electronic device can avoid the above - mentioned situation. Additionally, if the electronic device determines that the duration of the electronic device in the up - stair mode or the down - stair mode is less than the second preset duration and switches from the up - stair mode or the down - stair mode to the walking mode / running mode, the electronic device does not perform the operation of turning off the first communication function of the electronic device.
[0203] In the embodiment shown in case 2), it should be noted that the first communication function of the electronic device is in the on state. On the one hand, the electronic device can trigger the on state of the first communication function of the electronic device in the manner shown in case 1) above. Or, the first communication function of the electronic device is manually turned on by the user or started in other ways described in the relevant technologies in this field. The embodiments of the present application do not make limitations in this regard.
[0204] The main purpose of enabling the first communication function of the electronic device is to achieve V2X communication between the electronic device and other electronic devices (such as mobile phones, smart bracelets, intelligent transportation systems, RSU). Therefore, there may also be a need to enable the first communication function in indoor scenarios. However, since the coverage range of V2X radio communication is generally 300 - 1000 meters, if the user has not entered the street mobile scenario (such as an outdoor scenario), when the V2X communication function of the electronic device is in the on state, the V2X radio communication of the electronic device may cause serious radio resource squeezing and computing interference to the V2X ECU unit on the street road, resulting in a high ineffective computing load of the intelligent vehicle networking system, causing serious negative impacts on its service delay and computing load, greatly reducing and dragging down the service experience of applications related to the intelligent vehicle networking, and even possibly triggering related false alarms and safety hazards.
[0205] Based on this, the present application also provides an optional embodiment. As Figure 12 shown, a control method for device functions provided by an embodiment of the present application includes:
[0206] Steps 1201 to 1202: Are the same as steps 601 to 602 respectively. Please refer to the descriptions of steps 601 to 602, and details will not be repeated here.
[0207] Step 1203, the electronic device determines whether the location where the electronic device is currently located is outdoors.
[0208] Optionally, in the embodiment of the present application, the electronic device can determine that it is located outdoors in the following ways: The electronic device determines whether it is located outdoors or indoors according to the location information of the electronic device and the indoor / outdoor scene classification model. The electronic device can obtain the location of the electronic device through built-in positioning sensors (such as GPS sensors, Beidou sensors, etc.) in the electronic device.
[0209] Optionally, in the embodiment of the present application, the electronic device can determine that it is located outdoors in the following ways: The electronic device determines the ambient brightness of the location where the electronic device is located. When the ambient brightness is greater than or equal to the reference ambient brightness, the electronic device determines that it is located outdoors. The reference ambient brightness can be stored in the electronic device. For example, the electronic device is configured with the reference ambient brightness when it leaves the factory. Or, the reference ambient brightness can also be obtained by the electronic device from the server.
[0210] In one implementation, the light sensor is used to periodically collect analog-to-digital converter (ADC) information, determine the photosensitive voltage intensity, perform conversion, and compare it with the outdoor reference voltage. If it continuously exceeds the voltage and maintains for a period of time, it is considered to be outdoors.
[0211] In addition, even on the same day, the ambient brightness at the same location is different at different time periods. For example, there is a difference in the ambient brightness at location A at 12:00 noon and at location A at 6:00 pm. Therefore, the reference ambient brightness corresponding to different time periods is different. For example, the reference ambient brightness corresponding to 12:00 noon to 1:00 pm is reference ambient brightness 1, and the reference ambient brightness corresponding to 6:00 pm to 7:00 pm is reference ambient brightness 2.
[0212] It should be noted that the electronic device can also combine time information when determining whether the electronic device is indoors or outdoors. For example, if the current time is 8:00 pm, then if the user is walking or running with the electronic device, the ambient light is relatively dim at this time. If the electronic device determines that it is outdoors based on the ambient brightness collected by the ambient light sensor and meets the conditions for enabling the V2X communication function, the electronic device enables the first communication function.
[0213] As an example, as Figure 3 shown, the electronic device has an ambient light sensor. The electronic device can determine the ambient brightness of the location where the electronic device is located in the following way: The electronic device periodically collects the ambient brightness parameters of the location where the electronic device is located by using the ambient light sensor. The electronic device determines the ambient brightness of the location where the electronic device is located according to the periodically collected ambient brightness parameters. For example, the electronic device can obtain the ambient brightness of the location where the electronic device is located by taking the average of multiple ambient brightness parameters collected within a period of time.
[0214] In an embodiment of the present application, when the mobile mode is the first mobile mode, if the electronic device determines that the electronic device is located outdoors, the electronic device automatically enables the first communication function of the electronic device. The first mobile mode can be one or more of a walking mode, a running mode, or a cycling mode.
[0215] In an embodiment of the present application, when the mobile mode is the first mobile mode, if the electronic device determines that the electronic device is located indoors, before enabling the first communication function of the electronic device, the electronic device can also output a first prompt message to prompt the user whether to enable the first communication function of the electronic device.
[0216] In an embodiment of the present application, when the mobile mode is one or more of a walking mode and a running mode, if the electronic device determines that the electronic device is located indoors, the electronic device turns off the first communication function.
[0217] In an embodiment of the present application, the execution of step 1203 and the execution of step 1202 may not distinguish the order, or the electronic device first executes step 1203 and then executes step 1202. Of course, the electronic device may also first execute step 1202 and then execute step 1203. The embodiments of the present application do not limit this.
[0218] In an alternative embodiment of the present application, when the electronic device is currently located outdoors, the electronic device can execute steps 1204 to 1206. Among them, steps 1204 to 1206 are the same as steps 603 to 605 respectively, and will not be elaborated here.
[0219] The method provided by the embodiments of the present application enables the electronic device to determine that the electronic device has entered the external street and road mobile mode according to the multi-axis angular velocity data collected by the gyroscope sensor, thereby automatically starting the V2X communication function and realizing the intelligent interaction scenario of the electronic device with the V2X communication function. When in a non-external street mobile mode, the V2X communication function is automatically turned off, so that the V2X communication can be automatically started in a scenario where there is a real practical need for V2X communication. This can not only significantly reduce the power consumption impact of V2X communication on the device, but also play a basic and effective role in promoting the popularization of V2X communication technology in the mobile field, thus accelerating the application of V2X technology.
[0220] The embodiments of the present application further provide an electronic device, which may include: a judgment unit, a determination unit, a processing unit, etc. These units can execute each step in the above embodiments to implement the steps executed by the electronic device in the control method of the device functions provided by the above embodiments.
[0221] The embodiments of the present application further provide an electronic device, including: a processor; a memory; and a computer program. The computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device executes the control method of the device functions provided by the above embodiments.
[0222] The embodiments of the present application further provide a computer-readable storage medium, in which computer instructions are stored. When the computer instructions run on the electronic device, the electronic device executes the control method of the device functions provided by the above embodiments.
[0223] The embodiments of the present application further provide a computer program product, which when running on a computer, enables the computer to execute the control method of the device functions provided by the above embodiments.
[0224] In addition, an embodiment of the present application further provides a device, which may specifically be a chip system. The chip system is applied to an electronic device. The chip system includes one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected by lines; the interface circuits are configured to receive signals from the memory of the electronic device and send the signals to the processors, and the signals include computer instructions stored in the memory; when the processors execute the computer instructions, the electronic device executes the control method for the device functions provided in the above embodiments.
[0225] Among them, the electronic device, chip, computer storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0226] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0227] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces. The indirect coupling or communication connection of the devices or units may be in an electrical, mechanical or other form.
[0228] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0229] In addition, each functional unit in the various embodiments of the present application may be integrated in one processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0230] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, all or part of the technical solutions of the embodiments of this application can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0231] The above content is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A control method for device functions, applied to an electronic device; characterized in that, The electronic device has a first communication function, and the first communication function is used to implement communication between the electronic device and other electronic devices on a sidelink; The method includes: Determine whether the electronic device is in a moving state; After the electronic device is in a moving state, determine the moving mode of the electronic device according to the first movement parameter during the movement of the electronic device; Determine whether the electronic device is in an effective moving mode according to the moving mode; If the moving mode is the first moving mode, determine that the electronic device is in the effective moving mode; wherein, the first moving mode is any one of a running mode, a walking mode, and a cycling mode; After the electronic device is in the effective moving mode, determine the accumulated sum of the yaw rates of the electronic device within a preset distance; Turn on or off the first communication function according to the relationship between the accumulated sum of the yaw rates and a reference value.
2. The method according to claim 1, wherein After the electronic device is in a moving state, the method further includes: determining whether the position of the electronic device is outdoors.
3. The method according to claim 2, characterized in that, Determining whether the electronic device is in an effective moving mode according to the moving mode includes: after the electronic device is located outdoors, determining whether the electronic device is in the effective moving mode according to the moving mode.
4. The method according to claim 2, wherein Determining whether the position of the electronic device is outdoors includes: Determine the ambient brightness of the location where the electronic device is located; If the ambient brightness is greater than or equal to a reference ambient brightness, or the duration for which the ambient brightness is greater than or equal to the reference ambient brightness exceeds a first preset duration, determine that the electronic device is located outdoors.
5. The method according to any one of claims 1 to 4, characterized in that The determining whether the electronic device is in the effective moving mode according to the moving mode further includes: If the moving mode is not the first moving mode, determine that the electronic device is not in the effective moving mode.
6. The method according to any one of claims 1 to 4, characterized in that The determining the accumulated sum of the yaw rates of the electronic device within a preset distance includes: According to a preset period, determine the yaw angle corresponding to each period within the duration corresponding to the preset distance of the electronic device; Accumulate the yaw angles corresponding to each period to obtain the accumulated sum of the yaw rates.
7. The method according to any one of claims 1 to 4, characterized in that, The reference value is a first reference value. When the first communication function is in the off state, turning on the first communication function according to the relationship between the accumulated sum of the yaw rates and the reference value includes: After the accumulated sum of the yaw rates is less than or equal to the first reference value, turn on the first communication function; Turning on the first communication function includes: automatically turning on the first communication function; or, after detecting an operation indicating to turn on the first communication function, turning on the first communication function.
8. The method according to claim 7, characterized in that Before turning on the first communication function, the method further includes: outputting a first prompt message, and the first prompt message is used to prompt to turn on the first communication function.
9. The method according to any one of claims 1 to 4, characterized in that The reference value is a second reference value. When the first communication function is in the on state, turning off the first communication function according to the relationship between the accumulated sum of the yaw rates and the reference value includes: After the accumulated sum of the yaw rates is greater than the second reference value, turn off the first communication function; Said closing the first communication function includes: automatically closing the first communication function; or, closing the first communication function after detecting an operation indicating to close the first communication function.
10. The method according to any one of claims 1 to 4, characterized in that After the electronic device starts to move, if a second movement parameter during the movement of the electronic device meets a preset condition, it is determined that the electronic device is in the moving state, and the second movement parameter is one or more of a movement duration, a movement distance, or a movement step count.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program runs on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 10.
12. An electronic device, characterized in that, The electronic device has a first communication function, and the first communication function is used to implement communication between the electronic device and other electronic devices on a sidelink. The electronic device includes: a processor; and a computer program; wherein the computer program is stored in a memory, and when the computer program is executed by the processor, the electronic device is caused to execute the method according to any one of claims 1 to 10.