CN116684524A - Site marking method, electronic equipment and storage medium - Google Patents

Site marking method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116684524A
CN116684524A CN202211214452.0A CN202211214452A CN116684524A CN 116684524 A CN116684524 A CN 116684524A CN 202211214452 A CN202211214452 A CN 202211214452A CN 116684524 A CN116684524 A CN 116684524A
Authority
CN
China
Prior art keywords
screen
time
time period
period
day
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211214452.0A
Other languages
Chinese (zh)
Other versions
CN116684524B (en
Inventor
陈天辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211214452.0A priority Critical patent/CN116684524B/en
Publication of CN116684524A publication Critical patent/CN116684524A/en
Application granted granted Critical
Publication of CN116684524B publication Critical patent/CN116684524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72457User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to geographic location
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a place marking method, electronic equipment and a storage medium, and relates to the technical field of electronics.

Description

Site marking method, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a location labeling method, an electronic device, and a storage medium.
Background
When a user goes out in daily life, the user can usually get through a plurality of places, so that the user can live more conveniently, different services can be provided for the user at different places by the electronic equipment, for example, at home, and express reminding services can be provided for the user by the electronic equipment; at the company, the electronic device may provide take-away recommendation services for the user, and so on. Therefore, the electronic device needs to make labels on different places so that the electronic device provides corresponding services on different places.
At present, a method for marking a lodging place divides the time of day into fixed sleeping time and working time, marks the place according to the stay time of a user at a certain place, but the sleeping time of the user and the lodging place may not be fixed, so the method has lower accuracy.
Disclosure of Invention
The application provides a place marking method, electronic equipment and a storage medium, which can improve the accuracy of housing place marking, and the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a location labeling method, where the method includes:
acquiring m geographic positions where a user stays in n days, a time period where the user stays in each geographic position, a plurality of screen-on moments and a plurality of screen-off moments of electronic equipment, wherein n is more than or equal to 1, and m is more than or equal to 1;
Determining the longest screen-off time period of the ith day as the sleep time period of the ith day according to a plurality of screen-on moments of the ith day, a plurality of screen-off moments of the ith day and a first relational expression, wherein i traverses from 1 to n, the first relational expression is used for determining allowable screen-on time between the first screen-on moment and the first screen-off moment according to the first screen-on moment of the ith day, the first screen-off moment in the plurality of screen-off moments of the ith day and the adjacent first screen-off moment after the first screen-on moment, and when the allowable screen-on time accords with preset conditions, the starting moment of the screen-off time period corresponding to the allowable screen-on time is the adjacent screen-off moment before the first screen-on moment, and the cut-off moment is the adjacent screen-on moment after the first screen-off moment;
determining total overlapping time lengths between the n sleeping time periods and the time period in which the user stays in each geographic position according to the n sleeping time periods and the time period in which the user stays in each geographic position for the m geographic positions, and determining geographic positions corresponding to the maximum overlapping time lengths corresponding to each sleeping time period according to the time period in which the user stays in a plurality of geographic positions for the n sleeping time periods;
and marking the geographic position corresponding to the maximum total combined duration in the m total combined durations and the geographic position with the repeated occurrence ratio of the geographic position corresponding to the maximum combined duration corresponding to each sleeping time period being larger than a threshold value as an accommodation place.
In the embodiment of the application, whether the user is currently using the mobile phone can be identified according to the on-off state of the screen. For example, a cell phone screen may be lit up to consider a user using a cell phone; the mobile phone screen is extinguished, and the user can be considered to not use the mobile phone. For the bright screen time and the off screen time of the mobile phone, the time period between one bright screen time and the next adjacent off screen time is called as a bright screen time period, and the time period between one off screen time and the next adjacent bright screen time is called as an off screen time period. The bright screen time period can be used as the time period when the user uses the mobile phone, and the off-screen time period can be used as the time period when the user does not use the mobile phone. Therefore, according to a plurality of screen-on moments and a plurality of screen-off moments in a day, the longest screen-off time period in the day is determined, and the longest screen-off time period can be used as a sleep time period during which a user is in sleep.
Considering that during sleep, a mobile phone may generate a bright screen event due to receiving information and notification information, in the embodiment of the present application, a permissible bright screen duration is provided, that is, the mobile phone is allowed to be bright screen for a period of time, but the bright screen event does not represent the actual use of the mobile phone by the user. For a bright screen time period, calculating an allowable bright screen time length corresponding to the bright screen time period according to a first relation, wherein the allowable bright screen time length accords with a preset condition to indicate that a user does not use a mobile phone in the bright screen time period, and then the starting time of the bright screen time period corresponding to the allowable bright screen time length is the adjacent bright screen time before the first bright screen time, and the stopping time is the adjacent bright screen time after the first bright screen time, that is, the bright screen time period is combined with two adjacent bright screen time periods to form a bright screen time period. Based on the method, the screen-on event generated by the real use behavior of the non-user can be eliminated, so that the longest screen-off time period in one day can be more accurately determined, and the sleep time period can be more accurately determined.
And then, the mobile phone analyzes whether the user stays in the sleeping time period when staying in the geographic position according to the overlapping time between the sleeping time period and the time period when the user stays in the geographic position, and further marks the accommodation place of the user.
Two rules are set considering that the user may have multiple accommodations or scenes of business trips, one is to determine the accommodations based on the total duration between n sleep periods and the user's stay period at each geographic location.
In another rule, for n sleep time periods, according to the time period of each sleep time period and the residence time period of the user in a plurality of geographic positions, determining the overlapping duration of each sleep time period and each residence time period of the geographic positions, and determining the geographic position corresponding to the maximum overlapping duration corresponding to each sleep time period, that is, the geographic position of the user in the sleep time period every day, so as to obtain n geographic positions, where n geographic positions include repetition, that is, the geographic positions of the user in the sleep time period every day may be the same or different. And determining accommodation sites according to the repeated occurrence proportion of the geographic positions corresponding to the maximum overlapping duration corresponding to each sleeping time period, when the proportion is large, indicating that users often stay in the geographic positions, and when the proportion is large, marking the geographic positions as accommodation sites. Therefore, the application can label a plurality of accommodation places, cover the scenes of single accommodation places, a plurality of accommodation places/business trips and the like of users, avoid missing the geographic positions of some users which go to fewer but belong to the accommodation places, and further lead the labeled accommodation places to be more accurate.
The proportion of repeated occurrence of the geographic position corresponding to the maximum overlapping duration corresponding to each sleep time period is as follows: the number of times that the geographic position corresponding to the maximum overlap period corresponding to each sleep period repeatedly appears, the ratio of the number of days that the geographic position corresponding to the maximum overlap period corresponding to each sleep period appears within n days.
With reference to the first aspect, in certain implementation manners of the first aspect, the preset condition is that an allowable screen-on duration between the first screen-on time and the first screen-off time is greater than or equal to a duration between the first screen-on time and the first screen-off time.
With reference to the first aspect, in certain implementations of the first aspect, the first relation includes:
Duration=m*d min(|x-c|,c-x+24) *60+t
wherein x represents a central time between the first screen-on time and the first screen-off time, x takes a value of [0, 24], duration represents an allowable screen-on time corresponding to x, m represents a maximum allowable screen-on time, c represents a central time of a longest screen-off time period on the ith day, d represents a speed of decay of the allowable screen-on time with time, and t represents a minimum allowable screen-on time.
With reference to the first aspect, in certain implementation manners of the first aspect, determining, according to the plurality of screen-on moments on the i th day, the plurality of screen-off moments on the i th day, and the first relational expression, the longest screen-off period on the i th day as the sleep period on the i th day includes: determining the longest screen-off time period of the ith day according to the multiple screen-on moments of the ith day and the multiple screen-off moments of the ith day; updating the longest screen-off time period of the ith day according to the plurality of screen-on moments of the ith day, the plurality of screen-off moments of the ith day and the first relation; judging whether the longest screen-off time period of the i th day before updating is consistent with the longest screen-off time period of the i th day after updating; and determining the longest off-screen period of the updated ith day as the sleep period of the ith day when the longest off-screen period of the ith day before updating is consistent with the longest off-screen period of the updated ith day.
Wherein, the longest off-screen time period of the i th day before updating is consistent with the longest off-screen time period of the i th day after updating, includes: the center time of the longest off-screen period of the i-th day before updating is the same as the center time of the longest off-screen period of the i-th day after updating.
In the case that the longest off-screen period of the i th day before updating is inconsistent with the longest off-screen period of the i th day after updating, the method further comprises: updating the first relation according to the updated longest off-screen time period of the i day; and updating the longest screen-off time period of the ith day again according to the plurality of screen-on moments of the ith day, the plurality of screen-off moments of the ith day and the updated first relational expression.
The method further comprises the following steps: after updating the longest off-screen time period of the i day, recording the updating times; and when the updating times reach a preset threshold value, determining the longest screen-off time period of the current ith day as the sleep time period of the ith day.
In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform any of the possible methods of the first aspect described above.
In a third aspect, an embodiment of the present application provides an apparatus, where the apparatus is included in an electronic device, and the apparatus has a function of implementing the foregoing aspects and a behavior of the electronic device in a possible implementation manner of the foregoing aspects. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a display module or unit, a detection module or unit, a processing module or unit, etc.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the method of the first aspect described above.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
The technical effects obtained by the second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described in detail herein.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application;
FIG. 2 is a block diagram of an exemplary software architecture provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of an example of track points of a user traveling according to an embodiment of the present application;
FIG. 4 shows an illustrative schematic diagram of an on-screen period and an off-screen period according to an embodiment of the present application;
FIG. 5 is a schematic diagram showing an example of a time-dependent allowable bright screen period according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of determining a sleep period according to an embodiment of the present application;
FIG. 7 shows an illustrative schematic of still another example of a bright screen period and an off screen period provided by an embodiment of the present application;
fig. 8 is a flowchart illustrating an example of a location labeling method according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
The method provided by the embodiment of the application can be applied to electronic equipment with display screens such as mobile phones, intelligent watches, intelligent bracelets, vehicle-mounted equipment and the like, and the type of the electronic equipment is not limited. Fig. 1 shows a schematic diagram of a hardware architecture of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge 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, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
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. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
It should be understood that the structure illustrated in the embodiments of the present application is not limited to the specific embodiment of the mobile phone 100. In other embodiments of the application, the handset 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes a method provided by the embodiment of the present application in detail with reference to fig. 3 to 7 by taking a mobile phone as an example.
The track points will be described first with reference to fig. 3.
The signaling data is trace point data with time information. The user carries the mobile phone when going out, the track data of the user are substantially track data of the mobile phone, and the track data of the user are equivalent to the track data of the mobile phone, so that the space-time track of the user, namely the space positions of the user at different time points, can be obtained through the signaling data of the mobile phone. The signaling data can be obtained through GPS positioning, information exchange between base stations through mobile phones, signaling data can be recorded during switching on and off, calling, short messages, position updating and base station switching actions, and the signaling data can be obtained through other modes.
Taking the GPS positioning to acquire signaling data as an example, the mobile phone periodically acquires longitude and latitude information according to a first time interval. For example, the first time interval is 1 minute, and the mobile phone obtains the longitude and latitude of the current geographic position once every 1 minute, so as to obtain the track point of the user every day, wherein the track point data is shown in table 1, and the track point data of 7 months and 1 days is exemplarily shown in the table. Wherein, a track point data comprises a time point information and a space point information expressed by longitude and latitude, for example, track point 11 represents 7 months 1 day 00:00 points, and the longitude and latitude of the geographic position where the user is located is (116.671 degrees 39.856 degrees). Fig. 3 shows a user trajectory constituted by part of the trajectory points T1-T22 of the user, T3-T8 may constitute one dwell point and T12-T19 may constitute another dwell point.
Table 1 signalling data table for mobile phone
Track point Time point Spatial point
11 2022.07.01 00:00 116.671°,39.856°
12 2022.07.01 00:01 116.672°,39.857°
13 2022.07.01 00:02 116.672°,39.857°
1n 2022.07.01 23:59 116.78°,39.157°
The following description of the dwell point is provided.
The stay point characterizes the user stay within a certain time period and the location of the stay within a certain geographical location, i.e. the stay point characterizes in which time period the user is located in which geographical location (referring to a geographical location point, or a spatial area, which may also be referred to as spatial range). In other words, the stay point includes two attribute information of a time period and a geographic position. The geographic position is characterized by two pieces of information, namely a longitude and latitude center point and a space radius (radius), when the geographic position is a space region.
The mobile phone analyzes the track points, and when a plurality of track points are positioned at the same geographic position, the geographic position is counted as a stay point. Illustratively, as shown in table 2, the dwell point data obtained in table 1 includes a time period and a spatial region information, for example, the spatial region of the dwell point 21 in table 2 has the meaning of: a space region is formed with a radius of 100 meters centered on a space point with a longitude of 116.600 ° and a latitude of 40 °. (116.600 DEG, 40 DEG) is the longitude and latitude center point of the stay point 21, and 100 meters is the space radius of the stay point 21.
Table 2 dwell point data table
Stay point Time period Spatial region
21 2022.07.01 00:00-2022.07.01 06:00 (116.600 DEG, 40 DEG), radius:100 m
22 2022.07.01 07:00-2022.07.01 12:00 (116.700 DEG, 40 DEG), radius 130 m
23 2022.07.01 13:00-2022.07.01 14:00 (116.601 DEG, 40 DEG), radius:100 m
24 2022.07.01 14:30-2022.07.01 18:00 (116.701 DEG, 40 DEG), radius 120 m
25 2022.07.01 18:30-2022.07.01 23:59 (116.602 DEG, 40 DEG), radius 90 m
The point clusters are described below.
A cluster of points is a collection of points whose density meets the requirements. The mobile phone clusters the stay points, and sets the stay points with similar geographic positions together, and the set formed by the stay points can be called a stay point cluster. The dwell point cluster characterizes that the user stays in a similar geographic location for a plurality of time periods. That is, a cluster of points includes a geographic location information and a time period for the user to stay at the geographic location. In a specific embodiment, the clusters of dwell points obtained from the dwell point clusters shown in Table 2 may be as shown in Table 3 below.
TABLE 3 Cluster information Table
Dot cluster Stay point
31 Dwell point 21, dwell point 23, dwell point 25
32 Dwell point 22, dwell point 24
The following describes the on-screen and off-screen of the mobile phone with reference to fig. 4.
The user clicks a screen or a key, or the mobile phone receives information, incoming calls and the like and can lighten the screen, when the screen is detected to lighten, the mobile phone generates a screen lightening event once, and a screen lightening moment is recorded. When the screen is extinguished, the mobile phone generates a screen-extinguishing event once, and records a screen-extinguishing moment. The mobile phone records the on-screen time and the off-screen time of each day, obtains a plurality of on-screen time and a plurality of off-screen time of a plurality of days, and table 4 exemplarily gives on-screen or off-screen records of 7 months and 1 day.
Table 4 recording table for bright screen or off screen
Numbering device Time of day Bright or off screen
41 2022.07.01 00:00 Bright screen
42 2022.07.01 00:04 Screen-extinguishing device
43 2022.07.01 06:00 Bright screen
4n 2022.07.01 23:59 Screen-extinguishing device
Whether the user is currently using the mobile phone can be identified according to the on-off state of the screen. For example, a cell phone screen may be lit up to consider a user using a cell phone; the mobile phone screen is extinguished, and the user can be considered to not use the mobile phone. According to the on-screen time and the off-screen time of the mobile phone, the time period of using the mobile phone and the time period of not using the mobile phone can be determined.
For example, as shown in fig. 4, in 24 hours, 00:00 is a bright screen time, 00:04 is a bright screen time, 06:00 is a bright screen time, 07:30 is a bright screen time, 08:00 is a bright screen time, 10:00 is a bright screen time, 12:00 is a bright screen time, 21:00 is a bright screen time, a time period between one bright screen time and a bright screen time adjacent to the bright screen time after the bright screen time is called a bright screen time period, and a time period between one bright screen time and a bright screen time adjacent to the bright screen time after the bright screen time is called a bright screen time period. For example, 00:00-00:04 is a bright screen time period, 00:01-06:00 is a dead screen time period, the bright screen time period can be used as a time period when a user uses the mobile phone, and the dead screen time period can be used as a time period when the user does not use the mobile phone. In the embodiment of the application, the longest off-screen time period in one day is recorded as a sleep time period.
The first relation and the allowable screen-on period are explained below with reference to fig. 5.
Considering that during sleep, a mobile phone may generate a screen-on event due to receiving information and notification information, in the embodiment of the present application, each screen-on time period is analyzed by a first relation to determine whether the screen-on time period can be combined into a screen-off time period, so as to more accurately determine the longest screen-off time period in one day.
The allowable bright screen time period refers to a time period when the mobile phone is bright screen, but the behavior that the user actually uses the mobile phone is not represented by considering that the bright screen event is caused by information, notification and other events, and the mobile phone is not used by the user in the allowable bright screen time period.
Aiming at a screen-on time period, the screen-on time and the screen-off time are respectively recorded as a first screen-on time and a first screen-off time, and the first relation calculates the allowable screen-on time corresponding to the screen-on time period according to the first screen-on time and the first screen-off time. Under the condition that the allowable screen-on duration accords with the preset condition, the screen-on time period and two screen-off time periods adjacent to the front screen-on time period and the rear screen-off time period can be combined into one screen-off time period, namely, the first screen-on time and the starting time of the screen-off time period corresponding to the first screen-off time are adjacent screen-off time before the first screen-on time, and the cut-off time is adjacent screen-on time after the first screen-off time. The preset condition is a duration that allows the bright screen time period to be greater than or equal to the bright screen time period.
Wherein, the first relation is: duration=m×d min(|x-c|,c-x+24) *60+t。
Where x represents a central time of the bright screen period, the number of hours corresponding to the central time is taken, x takes a value of [0, 24], duration represents an allowable bright screen Duration corresponding to a point x, the unit is seconds(s), m represents a maximum allowable bright screen Duration, c is a maximum allowable bright screen Duration point (the point is a central time of the longest bright screen period in one day and may also be referred to as a central sleep time point), d represents a speed of decay of the allowable bright screen Duration with time and may be referred to as a decay base, t represents a minimum allowable bright screen Duration, and may be referred to as a minimum decay time.
Firstly, initializing parameters, wherein the parameters in the first relation can be set according to actual conditions, and in an initialization state, taking 00:00 to 06:00 as a sleep time period of a user, namely a longest off-screen time period in one day, and taking the hour number of the central moment of the longest off-screen time period, namely c=3. Take d=0.3, m=5 minutes, t=3 s. Fig. 5 shows the allowable screen lighting period corresponding to each full-point time in the initialized state, as shown in fig. 5, the user is generally in deep sleep at the central sleep time point, so the allowable screen lighting period at the central sleep time point is maximum, that is, when x=3, duration=303. The allowable bright screen duration gradually decays from the central sleep time point to the left and right sides, which means that the longer the central sleep time point is, the larger the possibility that the user uses the mobile phone is, the smaller the allowable bright screen duration is, and the minimum allowable bright screen duration is 3 seconds, namely, the bright screen duration is considered to be the bright screen caused by notification information under 3 seconds, and the behavior that the user actually uses the mobile phone is not indicated.
The process of determining the sleep period will be described with reference to fig. 6 and 7, and fig. 6 shows a schematic flow chart of determining the sleep period, including S601-S605.
S601, aiming at each day, the mobile phone acquires a plurality of screen-on moments and a plurality of screen-off moments in one day.
Wherein, one day refers to 00:00-24:00, and at least one screen-on time period and at least one screen-off time period can be determined according to a plurality of screen-on time points and a plurality of screen-off time points. At this time, a longest off-screen period in an initial state may be determined.
S602, calculating the allowable screen-lighting time according to the first screen-lighting time, the first screen-lighting time and the first relation for a screen-lighting time period.
In the embodiment of the application, the central moment of the first screen-on moment and the first screen-off moment is determined according to the first screen-on moment and the first screen-off moment, namely, the central moment x of the screen-on time period 1 corresponding to the first screen-on moment and the first screen-off moment, x is substituted into a first relational expression, and the allowable screen-on time length 1 corresponding to x is calculated. When a plurality of bright screen time periods exist, the permissible bright screen duration of each bright screen time period is calculated in sequence.
S603, updating the longest off-screen time period in one day according to the allowable on-screen time.
After calculating the allowable bright screen period 1 for each allowable bright screen period, it is determined whether the allowable bright screen period 1 is greater than or equal to the period of the bright screen period 1. If the allowable bright screen duration 1 is greater than or equal to the duration of the bright screen duration 1, the bright screen duration 1 does not indicate the actual mobile phone use behavior of the user, and can be combined with the adjacent off-screen duration.
For example, fig. 7 shows a combination of a bright screen period and an adjacent off-screen period. As shown in FIG. 7, the bright screen period of a day has [00:00, 00:04], [06:00, 07:30], [08:00, 10:00].
The center moment of the bright screen period [00:00, 00:04] is 00:02, and x=0. Substituting x=0 into the first relation gives duration=11. The permissible bright screen duration of 11s at x=0 can also be seen intuitively in fig. 6. The duration of [00:00, 00:04] is 4s,11s >4s, so that a bright-screen event of a bright-screen period [00:00, 00:04] is allowed during sleep, the bright-screen period [00:00, 00:04] can be combined with an off-screen period [00:04, 06:00] to form a new off-screen period [00:00, 06:00].
The center moment of the bright screen period [06:00, 07:30] is 06:45, x=6. Substituting x=6 into the first relation gives duration=11. The center instant of the bright screen period [08:00, 10:00] is 09:00, then x=9. Substituting x=9 into the first relation gives duration=3. The duration of each of the two bright screen time periods is longer than the allowable bright screen duration, and the bright screen time periods represent bright screen events caused by the action of the user for actually using the mobile phone and are not combined with the adjacent bright screen time periods.
S604, determining whether the maximum allowable bright screen time point corresponding to the updated longest bright screen time period is consistent with the maximum allowable bright screen time point corresponding to the longest bright screen time period before updating.
After the bright screen period 1 is combined with the adjacent off-screen period, the longest off-screen period in one day may be changed. Marking the maximum allowable bright screen time length point corresponding to the longest off screen time period before updating as c 1 The maximum allowable bright screen time point corresponding to the updated longest off-screen time period is marked as c 2 In the example of FIG. 7, the longest off-screen period before update is [00:04, 06:00 ]],c 1 =3, the longest off-screen period before update is [00:00, 06:00],c 2 =3, at this time, c 1 =c 2 Indicating that the longest off-screen period of 7 months 1 day no longer changes. The current longest off-screen time period [00:00, 06:00 ]]As a "sleep period" of 7 months and 1 day.
S605, if the maximum allowable bright screen time points corresponding to the longest bright screen time periods before and after updating are consistent, taking the current longest bright screen time period as a sleeping time period of one day.
If the maximum allowable bright screen time points corresponding to the longest bright screen time periods before and after updating are inconsistent, substituting the maximum allowable bright screen time points corresponding to the longest bright screen time periods after updating into the first relational expression, repeating S601-S604 until the maximum allowable bright screen time points corresponding to the longest bright screen time periods before and after updating are consistent, and reaching the maximum iteration times. The maximum number of iterations may be set according to the actual situation, for example, the maximum number of iterations may be 100.
In some implementations, the handset calculates the sleep period of the previous day after the preset event of each day occurs, which may be reaching a specified time (e.g., 10:00), the first charging of the handset, etc., e.g., calculates the sleep period of 7 months 1 day in 10:00 morning of 2 days of 7 months, saves the sleep period of 7 months 1 day. In some implementations, the handset calculates the sleep time period in real-time as the accommodation is annotated.
In some implementations, considering that the user sleep period may span the date, the mobile calculates the sleep period of the previous day according to the on-screen time and the off-screen time of the previous two days, for example, the mobile calculates the sleep period of 7 months 1 day at 7 months 2 days according to the on-screen time and the off-screen time of 6 months 30 days and 7 months 1 day, in this implementation, one on-screen period or off-screen period may span two days, for example, 23:50 on 6 months 30 days is the on-screen time, and the next off-screen time is 00:04 on 7 months 1 day, and x of the on-screen period is 23.
After the sleep time period is determined, the mobile phone analyzes whether the user stays in the sleep time period when staying in the geographic position according to the overlapping time between the sleep time period and the time period when the user stays in the geographic position, and further marks the accommodation place of the user.
The following describes a process of housing floor labeling with reference to fig. 8, and fig. 8 shows a flow chart of a location labeling method according to an embodiment of the present application, including S801-S804.
S801, m geographic positions where a user stays in n days, a time period where the user stays in each geographic position, a plurality of screen-on moments and a plurality of screen-off moments of electronic equipment are acquired, n is more than or equal to 1, and m is more than or equal to 1.
Taking n=7 as an example, according to the signaling data in 7 days of the mobile phone and the above-mentioned process of obtaining the point cluster, the mobile phone can obtain the geographic positions where the user stays in 7 days, and the time period where the user stays in each geographic position, for example, m=4, and the 4 geographic positions are respectively recorded as A, B, C, D. It should be noted that, the mobile phone may mark the accommodation land according to the data of the previous 7 days after the preset event of each day occurs, but the time interval between the current mark and the last mark should be greater than 24 hours.
S802, determining the longest screen-off time period of the ith day as the sleep time period of the ith day according to a plurality of screen-on moments of the ith day, a plurality of screen-off moments of the ith day and the first relational expression, wherein i traverses from 1 to n.
This step is described in detail with reference to fig. 6, and will not be described again here. i can get 7 sleep periods from 1 traversal to 7.
S803, for m geographic locations, determining a total duration between the n sleep time periods and the time period in which the user stays at each geographic location according to the n sleep time periods and the time period in which the user stays at each geographic location.
S804, marking the geographic position corresponding to the maximum total combined duration in the m total combined durations as the accommodation land.
The user may stay in the same geographic location throughout the day. Thus, the time period in which the user stays at each geographic location may include multiple time periods of different dates. In the embodiment of the application, the overlapping time length of each sleeping time period and the time period of the user staying at the same geographic position is sequentially determined, the overlapping time lengths of 7 sleeping time periods are added to obtain the total overlapping time length of one geographic position, the total overlapping time length corresponding to 4 geographic positions is compared, and the geographic position corresponding to the maximum total overlapping time length is marked as a lodging place.
Specifically, the sleep period from day 1 to day 7 is sequentially denoted as sleep period 1, sleep periods 2, … …, and sleep period 7.
The overlapping duration of the sleep time period 1 and the time period of the user staying at the geographic position A is sequentially determined, the overlapping duration of the sleep time period 2 and the time period of the user staying at the geographic position A is … …, the overlapping duration of the sleep time period 7 and the time period of the user staying at the geographic position A is added, and the overlapping duration is added to obtain the total overlapping duration corresponding to the geographic position A.
Sequentially determining the overlapping duration of the sleep time period 1 and the time period of the user staying at the geographic position B, … … the overlapping duration of the sleep time period 2 and the time period of the user staying at the geographic position B, and adding the overlapping duration to obtain the total overlapping duration corresponding to the geographic position B.
Sequentially determining the overlapping duration of the sleep time period 1 and the time period of the user staying at the geographic position C, the overlapping duration of the sleep time period 2 and the time period of the user staying at the geographic position C, … …, and the overlapping duration of the sleep time period 7 and the time period of the user staying at the geographic position C, and adding the overlapping durations to obtain the total overlapping duration corresponding to the geographic position C.
Sequentially determining the overlapping duration of the sleep time period 1 and the time period of the user staying at the geographic position D, … … the overlapping duration of the sleep time period 2 and the time period of the user staying at the geographic position D, and adding the overlapping duration to obtain the total overlapping duration corresponding to the geographic position D.
For example, table 5 shows the overlapping relationship of multiple sleep time periods with a single geographic location dwell time period. Table 5 the first horizontal row indicates the geographic location and the first vertical row indicates the sleep time period, and the cross-over position indicates the overlap duration of the sleep time period and the time period the user is staying at the geographic location. The overlap period is in hours h. As can be seen from table 5, the total duration corresponding to the geographic position a is the largest, and the geographic position a is marked as one accommodation of the user.
Table 5 table of overlapping durations of multiple sleep time periods and single geographic location dwell time period
S805, for n sleep time periods, determining a geographic position corresponding to the maximum overlapping duration corresponding to each sleep time period according to the time period of each sleep time period and the stay time period of the user at a plurality of geographic positions.
And S806, marking the geographic position with the repeated occurrence proportion of the geographic position corresponding to the maximum overlapping time length corresponding to each sleep time period being larger than a threshold value as a lodging place.
For the sleep time period 1, the overlapping time length a between the sleep time period 1 and the time period where the user stays at the geographic position A, the overlapping time length B between the sleep time period 1 and the time period where the user stays at the geographic position B, the overlapping time length C between the sleep time period 1 and the time period where the user stays at the geographic position C, the overlapping time length D between the sleep time period 1 and the time period where the user stays at the geographic position D are sequentially determined, and the geographic position corresponding to the maximum overlapping time length corresponding to the sleep time period 1 is determined by comparing the overlapping time length a, the overlapping time length B, the overlapping time length C and the overlapping time length D. I.e. determining the geographical location where the user stays during the sleep period on day 1.
Similarly, for the sleep time period 2, determining the geographic position corresponding to the maximum overlapping duration corresponding to the sleep time period 2. And for the sleep time period 3, determining the geographic position corresponding to the maximum overlapping duration corresponding to the sleep time period 3. … …, for the sleep period 7, determining the geographic position corresponding to the maximum overlapping duration corresponding to the sleep period 7.
For example, table 6 shows the overlapping relationship of a single sleep period with periods of stay at multiple geographic locations. Table 6 the first horizontal row indicates the geographic location and the first vertical row indicates the sleep time period, and the cross position indicates the overlap duration of the sleep time period and the time period in which the user stays at the geographic location. The overlap period is in hours h. As can be seen from table 6, the geographic position corresponding to the maximum overlapping time period is a, and the number of repeated occurrences is 4 on days 1 to 4. And on days 5 to 7, the geographic position corresponding to the maximum overlapping time length is B, and the repeated occurrence number is 3.
TABLE 6 overlap duration Table for Single sleep time period and multiple geographic location dwell time periods
And then, determining the repeated occurrence proportion of the geographic position corresponding to the maximum overlapping duration according to the repeated occurrence times of the geographic position corresponding to the maximum overlapping duration in 7 days and the number of days of occurrence of the geographic position corresponding to the maximum overlapping duration in 7 days. And when the proportion is larger than a preset threshold value, marking the geographic position corresponding to the maximum overlapping time length as another accommodation place of the user. By this rule, missing fewer geographical locations for some users can be avoided, i.e. the time period for which the user stays in a certain geographical location coincides highly with the sleeping time period, although the stay time period for that geographical location is shorter.
Proportion = number of times the geographical position corresponding to the maximum overlap period repeatedly appears within n days/number of days the geographical position corresponding to the maximum overlap period appears within n days.
The aforementioned statistical period of time that the user remains in the geographic location is dated, so the number of days the user remains in the geographic location can be determined. For example, the time period for a user to stay in a geographic location includes 07.01:00-06:00, 07.01:00-12:00, 07.02:00-06:00, … …, wherein 07.01:00-06:00, 07.01:00-12:00 all belong to 7 months 1 day, for 1 day.
The handset determines the number of days the user stayed in geographic location a for 7 days and the number of days the user stayed in geographic location B for 7 days. For example, the user has stayed at geographic location a for a period of time on days 1 through 7 and at geographic location B for a period of time on days 5 through 7, the number of days at geographic location a is 7 and the number of days at geographic location B is 5. The proportion of the geographic position A is 4/7, the proportion of the geographic position B is 3/5, and assuming that the preset threshold value is 50%, the geographic position A and the geographic position B can be determined to be lodging places of users.
S803 to S804 and S805 to S806 are juxtaposed, and are two rules for determining accommodation sites, and thus, there may be a plurality of accommodation sites or one accommodation site.
In summary, the embodiment of the application determines the sleep time period of the user according to the on-off time of the mobile phone. In addition, considering that the mobile phone may automatically lighten during sleeping of the user, the embodiment of the application analyzes each bright screen time period according to the first relation so as to reduce bright screen events generated by non-user real behaviors and ensure that the sleeping time period of the user is determined more accurately. When determining the accommodation according to the overlapping time between the sleeping time period and the time period where the user stays in the geographic position, two rules are set in consideration of the scene that the user may have a plurality of accommodation or go on business, one is to determine the accommodation according to the overlapping time period between the plurality of sleeping time periods and the time period where the geographic position stays, and the other is to determine the accommodation according to the proportion of the geographic position where the user stays in the sleeping time period every day to the number of days where the user stays in the geographic position, so that the marked accommodation is more accurate.
The electronic device provided in this embodiment is configured to perform the above method, so that the same effects as those of the implementation method can be achieved. In case an integrated unit is employed, the electronic device may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage actions of the electronic device, for example, may be configured to support the electronic device to execute steps executed by the processing unit. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product enabling an electronic device to carry out the steps of the various method embodiments described above when the computer program product is run on a mobile terminal.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is configured to store computer-executable instructions, and when the device is operated, the processor may execute the computer-executable instructions stored in the memory, so that the chip performs the methods in the above method embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above-described embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of the method embodiments described above when executed by a processor. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer memory, read-only memory (ROM), random access memory (random access memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In the description above, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that reference to "a plurality" in the present specification and appended claims means two or more. In the description of the present application, "/" means or, unless otherwise indicated, for example, A/B may represent A or B; "and/or" herein is merely an association describing an associated object, and refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations, e.g., a and/or B, which may represent: a exists alone, A and B exist together, and B exists alone.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in order to facilitate the clear description of the technical solution of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and function. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, are not to be construed as indicating or implying any particular importance, and that the words "first," "second," and the like do not necessarily differ.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of labeling a location, the method comprising:
acquiring m geographic positions where a user stays in n days, a time period where the user stays in each geographic position, a plurality of screen-on moments and a plurality of screen-off moments of electronic equipment, wherein n is more than or equal to 1, and m is more than or equal to 1;
determining the longest screen-off time period of the ith day as the sleep time period of the ith day according to a plurality of screen-on moments of the ith day, a plurality of screen-off moments of the ith day and a first relational expression, wherein i traverses from 1 to n, the first relational expression is used for determining allowable screen-on time periods between the first screen-on moments and the first screen-off moments according to the plurality of screen-on moments of the ith day, a first screen-on moment of the plurality of screen-off moments of the ith day and adjacent first screen-off moments after the first screen-off moment, and when the allowable screen-on time periods meet preset conditions, the starting moment of the screen-off time period corresponding to the allowable screen-on time periods is the adjacent screen-off moment before the first screen-on moment, and the cut-off moment is the adjacent screen-on moment after the first screen-off moment;
determining total overlapping duration between n sleep time periods and the time period in which the user stays in each geographic position according to the n sleep time periods and the time period in which the user stays in each geographic position for m geographic positions, and determining geographic positions corresponding to the maximum overlapping duration corresponding to each sleep time period according to the time period in which the user stays in a plurality of geographic positions for the n sleep time periods;
And marking the geographic position corresponding to the maximum total overlapping duration in the m total overlapping durations as the accommodation land, wherein the repeated occurrence ratio of the geographic position corresponding to the maximum overlapping duration in each sleeping time period is larger than a threshold value.
2. The method of claim 1, wherein the preset condition is an allowable on-screen duration between the first on-screen time and the first off-screen time that is greater than or equal to a duration between the first on-screen time and the first off-screen time.
3. The method of claim 1 or 2, wherein the first relationship comprises:
Duration=m*d min(|x-c|,c-x+24) *60+t
wherein x represents a central time between the first screen-on time and the first screen-off time, x takes a value of [0, 24], duration represents an allowable screen-on time corresponding to x, m represents a maximum allowable screen-on time, c represents a central time of the longest screen-off time period of the ith day, d represents a speed of decay of the allowable screen-on time with time, and t represents a minimum allowable screen-on time.
4. The method of claim 3, wherein the determining the longest off-screen period of the i-th day as the sleep period of the i-th day according to the plurality of on-screen moments of the i-th day, the plurality of off-screen moments of the i-th day, and the first relation comprises:
Determining the longest screen-off time period of the ith day according to the screen-on moments of the ith day and the screen-off moments of the ith day;
updating the longest screen-off time period of the ith day according to the plurality of screen-on moments of the ith day, the plurality of screen-off moments of the ith day and the first relation;
judging whether the longest screen-off time period of the ith day before updating is consistent with the longest screen-off time period of the ith day after updating;
and determining the updated longest off-screen period of the ith day as the sleep period of the ith day when the longest off-screen period of the ith day before updating is consistent with the updated longest off-screen period of the ith day.
5. The method of claim 4, wherein in the event that the longest off-screen period of the i-th day before updating does not coincide with the longest off-screen period of the i-th day after updating, the method further comprises:
updating a first relation according to the updated longest screen-off time period of the ith day;
and updating the longest screen-off time period of the ith day again according to the plurality of screen-on moments of the ith day, the plurality of screen-off moments of the ith day and the updated first relation.
6. The method of claim 5, wherein the method further comprises:
recording the number of updates after updating the longest off-screen period of the ith day;
and when the updating times reach a preset threshold, determining the longest screen-off time period of the current ith day as the sleep time period of the ith day.
7. The method of any of claims 4 to 6, wherein the longest off-screen period of the i-th day before the updating coincides with the longest off-screen period of the i-th day after the updating, comprising:
the center moment of the longest off-screen time period of the i day before updating is the same as the center moment of the longest off-screen time period of the i day after updating.
8. The method according to any one of claims 1 to 7, wherein the proportion of repeated geographic locations corresponding to the maximum overlapping duration for each sleep period is: the number of times that the geographic position corresponding to the maximum overlapping time length corresponding to each sleep time period repeatedly appears is the ratio of the number of days that the geographic position corresponding to the maximum overlapping time length corresponding to each sleep time period appears in the n days.
9. An electronic device, comprising: one or more processors; one or more memories; the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform the method of any of claims 1-8.
10. A computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of any of claims 1 to 8.
CN202211214452.0A 2022-09-30 2022-09-30 Site marking method, electronic equipment and storage medium Active CN116684524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211214452.0A CN116684524B (en) 2022-09-30 2022-09-30 Site marking method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211214452.0A CN116684524B (en) 2022-09-30 2022-09-30 Site marking method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116684524A true CN116684524A (en) 2023-09-01
CN116684524B CN116684524B (en) 2024-04-05

Family

ID=87786001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211214452.0A Active CN116684524B (en) 2022-09-30 2022-09-30 Site marking method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116684524B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957465A (en) * 2016-04-25 2016-09-21 广东欧珀移动通信有限公司 Display screen detection method, display screen detection device, and terminal
CN107493388A (en) * 2017-08-24 2017-12-19 深圳天珑无线科技有限公司 Terminal and its sleep intelligent prompt method, storage device
CN110742580A (en) * 2019-09-18 2020-02-04 华为技术有限公司 Sleep state identification method and device
CN111596751A (en) * 2020-05-19 2020-08-28 歌尔智能科技有限公司 Display control method and device for wrist-worn device, wrist-worn device and storage medium
CN111983210A (en) * 2020-06-29 2020-11-24 北京津发科技股份有限公司 Time synchronization-based method and device for collecting spatial position and multi-channel man-machine environment data and analyzing time-space behavior
CN113486927A (en) * 2021-06-15 2021-10-08 北京大学 Unsupervised track access place labeling method based on prior probability
CN114343587A (en) * 2020-09-29 2022-04-15 Oppo广东移动通信有限公司 Sleep monitoring method and device, electronic equipment and computer readable medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957465A (en) * 2016-04-25 2016-09-21 广东欧珀移动通信有限公司 Display screen detection method, display screen detection device, and terminal
CN107493388A (en) * 2017-08-24 2017-12-19 深圳天珑无线科技有限公司 Terminal and its sleep intelligent prompt method, storage device
CN110742580A (en) * 2019-09-18 2020-02-04 华为技术有限公司 Sleep state identification method and device
CN111596751A (en) * 2020-05-19 2020-08-28 歌尔智能科技有限公司 Display control method and device for wrist-worn device, wrist-worn device and storage medium
CN111983210A (en) * 2020-06-29 2020-11-24 北京津发科技股份有限公司 Time synchronization-based method and device for collecting spatial position and multi-channel man-machine environment data and analyzing time-space behavior
CN114343587A (en) * 2020-09-29 2022-04-15 Oppo广东移动通信有限公司 Sleep monitoring method and device, electronic equipment and computer readable medium
CN113486927A (en) * 2021-06-15 2021-10-08 北京大学 Unsupervised track access place labeling method based on prior probability

Also Published As

Publication number Publication date
CN116684524B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN113794801B (en) Method and device for processing geo-fence
CN113170019B (en) Incoming call display method and terminal equipment based on application
CN116070035B (en) Data processing method and electronic equipment
CN114579389A (en) Application management method, device, equipment and storage medium
CN115333941B (en) Method for acquiring application running condition and related equipment
CN117079596B (en) Screen brightness adjusting method, terminal equipment and storage medium
CN114741256B (en) Sensor monitoring method and device and terminal equipment
CN116684524B (en) Site marking method, electronic equipment and storage medium
CN116709180B (en) Geofence generation method and server
CN115097993B (en) Express prompt method and electronic equipment
CN116486500B (en) Mail sending method and electronic equipment
CN117009005A (en) Display method, automobile and electronic equipment
CN113890929B (en) Method and device for switching audio output channel and electronic equipment
CN116389640A (en) Interface display method and electronic equipment
CN112014866B (en) Motion trail recording method and related equipment
CN116033341B (en) Method and device for triggering fence event
CN116437293B (en) Geofence establishment method, server and communication system
CN116233749B (en) Message pushing method, mobile terminal and computer readable storage medium
CN116668951B (en) Method for generating geofence, electronic equipment and storage medium
CN117009023B (en) Method for displaying notification information and related device
CN115712745B (en) Method, system and electronic device for acquiring user annotation data
CN116048710B (en) Application identifier display method, electronic device and readable storage medium
EP4336865A1 (en) Interaction method and apparatus for electronic device
CN116541188A (en) Notification display method, terminal device and storage medium
CN117241234A (en) Satellite short message communication charging calibration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant