CN114430439A - Method and device for acquiring sensor data, electronic equipment and readable storage medium - Google Patents

Method and device for acquiring sensor data, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114430439A
CN114430439A CN202011186237.5A CN202011186237A CN114430439A CN 114430439 A CN114430439 A CN 114430439A CN 202011186237 A CN202011186237 A CN 202011186237A CN 114430439 A CN114430439 A CN 114430439A
Authority
CN
China
Prior art keywords
sensor
data
physical sensor
physical
application
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.)
Pending
Application number
CN202011186237.5A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202011186237.5A priority Critical patent/CN114430439A/en
Priority to PCT/CN2021/126309 priority patent/WO2022089399A1/en
Publication of CN114430439A publication Critical patent/CN114430439A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • 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/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a method and a device for acquiring sensor data, an electronic device and a computer readable storage medium, wherein the method for acquiring the sensor data comprises the following steps: receiving a sensor registration request sent by an application; wherein the sensor registration request is to request data of a first physical sensor; and under the condition that the preset condition is met, simulating the data of the first physical sensor, and reporting the simulated data of the first physical sensor to the application.

Description

Method and device for acquiring sensor data, electronic equipment and readable storage medium
Technical Field
The embodiments of the present application relate to the field of data processing, and in particular, to a method and an apparatus for acquiring sensor data, an electronic device, and a computer-readable storage medium.
Background
Terminals typically have multiple physical sensors, for example, on a terminal with a display (e.g., a mobile phone), and common physical sensors include an ambient light sensor, a proximity sensor, an acceleration sensor, a gyroscope sensor, and the like. For both ambient light sensors and proximity sensors, they are typically placed on the screen side of the terminal to detect the proximity of ambient light or objects. Early terminals generally placed physical sensors by making holes in the glass outside the screen display area, a solution known as the traditional solution; recent terminals place physical sensors outside the screen display area closer to the terminal bezel, a scheme called a slot scheme.
There is also a case where the physical sensor is directly placed within the display area of the screen, and the display area is directly perforated, which has an advantage in that the screen occupation of the terminal can be increased, but has a disadvantage in that the physical sensor may affect the display of contents on the terminal when it operates. For example, in a conventional terminal, a physical switch such as a proximity sensor is used to detect whether an object is in proximity. For the proximity sensor implemented in the off-screen mode, if the proximity sensor under the screen is directly used for detection, the display of the screen is affected, and therefore the user experience is poor.
For the situation that the content display on the terminal is influenced when the physical sensor works, other sensors which can be replaced can be used for directly replacing the original physical sensor. The task of directly replacing the original sensor with another replaceable sensor may introduce new and other problems, such as poor user experience.
For example, in the case that the proximity sensor is adopted under the screen to influence the display content of the terminal, the detection of whether an object approaches can be realized by improving the sensitivity of the touch screen. However, the improvement of the sensitivity of the touch screen requires the use of a special touch screen device, which increases the cost and may cause the problem of false touch.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring sensor data, electronic equipment and a computer-readable storage medium.
In a first aspect, an embodiment of the present application provides a method for acquiring sensor data, including:
receiving a sensor registration request sent by an application; wherein the sensor registration request is to request data of the first physical sensor:
and under the condition that the preset condition is met, simulating the data of the first physical sensor, and reporting the simulated data of the first physical sensor to the application.
In a second aspect, an embodiment of the present application provides an electronic device, including:
at least one processor;
a memory having at least one program stored thereon that, when executed by the at least one processor, performs any of the above-described methods of acquiring sensor data.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the above methods for acquiring sensor data.
In a fourth aspect, an embodiment of the present application provides an apparatus for acquiring sensor data, including:
the control module is used for receiving a sensor registration request sent by an application; wherein the sensor registration request is to request data of a first physical sensor; reporting the simulated data of the first physical sensor to an application;
and the data simulation module is used for simulating the data of the first physical sensor under the condition of meeting the preset condition.
According to the method for acquiring the sensor data, under the condition that the preset condition is met, for example, under the condition that user experience is influenced when the first physical sensor is used for acquiring the data of the first physical sensor, the data of the first physical sensor is acquired in a simulation mode, the first physical sensor does not need to be actually used for acquiring the data of the first sensor, and therefore the data of the first physical sensor is acquired under the condition that the user experience is not influenced, and the user experience is improved.
Drawings
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of acquiring sensor data provided by one embodiment of the present application;
FIG. 3 is a block diagram illustrating an apparatus for acquiring sensor data according to another embodiment of the present disclosure;
FIG. 4 is a block diagram illustrating an apparatus for acquiring sensor data according to another embodiment of the present disclosure;
fig. 5 is a flowchart of a method for acquiring sensor data according to an example of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present application, the method and apparatus for acquiring sensor data, the electronic device, and the computer readable storage medium provided in the present application are described in detail below with reference to the accompanying drawings.
Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but which may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiments and features of the embodiments of the present application may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of at least one of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of at least one other feature, integer, step, operation, element, component, and/or group thereof.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present application and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As shown in fig. 1, for a proximity sensor 2 implemented using an off-screen scheme (i.e., disposed at an off-screen position of a display screen 1), the main purpose is to detect the proximity and the distance of an object, but if the proximity sensor is directly used in any scene, the proximity sensor may flicker on the screen, thereby affecting the user experience.
Note that, in fig. 1, a dotted line is used to indicate that the proximity sensor 2 is disposed at an off-screen position of the display screen 1.
Although the method for acquiring sensor data according to the embodiment of the present application is proposed based on the problem encountered in the scenario in which the proximity sensor is used to detect whether an object is approaching or moving away, the method for acquiring sensor data according to the embodiment of the present application is also applicable to other application scenarios, for example, a scenario in which the power consumption of the physical sensor is reduced. The specific application scenario is not used to limit the scope of the embodiments of the present application.
It should be noted that the method for acquiring sensor data in the embodiments of the present application may be applied to any terminal including a physical sensor, where the terminal may include a display screen or may not include the display screen, for example, for a scene in which a proximity sensor is used to detect whether an object is approaching or moving away, the terminal includes the display screen; for a scenario of reducing power consumption of the physical sensor, the terminal may or may not include a display screen.
The terminal may be a portable terminal such as a mobile phone and a tablet computer, or a non-portable terminal such as a television, a computer, and a large screen terminal.
Fig. 2 is a method for acquiring sensor data according to an embodiment of the present application.
In a first aspect, referring to fig. 2, an embodiment of the present application provides a method for acquiring sensor data, including:
step 200, receiving a sensor registration request sent by an application; wherein the sensor registration request is to request data of the first physical sensor.
In some example embodiments, an application may send a sensor registration request if data for a first physical sensor needs to be acquired. For example, when the method for acquiring sensor data is applied to a terminal, for a wechat application, when the wechat application enters a chat interface, it is necessary to determine whether an object approaches or leaves in real time. Under the condition that an object approaches, the screen is extinguished to avoid misoperation; and in the case that an object is far away, the screen is lightened to facilitate the operation of a user. This is typically the case in order to determine whether the user is engaged in a voice call and, accordingly, the wechat application needs to send a sensor registration request. Other situations can be analogized, and the application is not used to limit the scope of the embodiments of the present application, particularly in what case the sensor registration request is sent.
In some exemplary embodiments, the type of the first physical sensor may be included in the sensor registration request to indicate which type of sensor is requested. It should be noted that the sensor registration request sent by the application can only include the type of the physical sensor, and cannot include the type of the virtual sensor, and the application does not know the existence of the virtual sensor.
Step 201, under the condition that a preset condition is met, simulating data of the first physical sensor, and reporting the simulated data of the first physical sensor to an application.
In the present disclosure, there is no particular limitation on what operation is performed after the application receives the data of the simulated first physical sensor. Also taking the terminal to which the method is applied as a mobile phone, taking the application as an example of a WeChat application, the first physical sensor is a proximity sensor, and the data of the simulated first physical sensor is the data of the simulated proximity sensor (for example, such data may include data representing that an object is close to the terminal and data representing that an object is far away from the terminal). When the wechat application receives the data representing that the object is close, indicating that a human face is close to the mobile phone screen to hear the voice, the operation performed by the wechat application after receiving the "data of the simulated first physical sensor" may include: a control signal is generated to control the speaker to turn on to play the voice.
In some exemplary embodiments, simulating the data of the first physical sensor comprises:
enabling at least one second physical sensor; and receiving data reported by at least one second physical sensor, and simulating the data of the first physical sensor according to the data reported by the at least one second physical sensor.
In some exemplary embodiments, the second physical sensor may refer to a physical sensor different from the first physical sensor, and since the data of the first physical sensor may affect the user experience when the data of the first physical sensor is obtained by using the first physical sensor, the data of the first physical sensor is simulated by using the data of the at least one second sensor, so that the data of the first physical sensor is obtained without affecting the user experience.
In some exemplary embodiments, the second physical sensor may also refer to the same physical sensor as the first physical sensor.
The specific position of the second physical sensor is not limited in the embodiment of the application, and the second physical sensor may be disposed at a position under the screen of the display screen, or at other positions (e.g., a position on the screen, a frame, etc.) other than the position under the screen of the display screen. For example, when data of the proximity sensor is simulated by using data of the acceleration sensor, since the normal display of the display screen is not affected by the operation of the acceleration sensor, the acceleration sensor may be disposed at any position of the terminal, such as a position under the screen, or other positions besides the position under the screen.
In some exemplary embodiments, enabling the at least one second physical sensor means that the at least one second physical sensor is in an operating state, so that the at least one second physical sensor can perform measurement and report the measured data.
In some exemplary embodiments, if the second physical sensor is already in the working state, the second physical sensor does not need to be enabled, and the data reported by the second physical sensor is directly received. That is, simulating data of the first physical sensor includes: and receiving data reported by at least one second physical sensor, and simulating the data of the first physical sensor according to the data reported by the at least one second physical sensor.
In some exemplary embodiments, the second physical sensor also reports the type of the second physical sensor when reporting the data, that is, receiving the data reported by the at least one second physical sensor includes: receiving data reported by each second physical sensor and the type of the second physical sensor;
accordingly, reporting the simulated data of the first physical sensor to the application comprises: reporting the simulated data of the first physical sensor and the type of the first physical sensor to the application.
In some exemplary embodiments, for a proximity sensor implemented in an off-screen manner, a main purpose is to detect whether an object approaches or departs, but in a case where a bright screen state is currently being performed, the screen flickers due to direct use of the proximity sensor, and then the data of the proximity sensor may be simulated by detecting a motion of the terminal using an acceleration sensor, and when a motion of the terminal being lifted is detected by the acceleration sensor, the data of the proximity sensor may be simulated by: data characterizing the proximity of an object; when the terminal is detected to have a dropping action through the acceleration sensor, simulating the data of the proximity sensor comprises: data characterizing the distance of the object; when the terminal is not detected to have the lifting and falling actions by the acceleration sensor, the data of the analog proximity sensor comprises: data characterizing no object approach and departure. The method can realize the scene of detecting whether the terminal is held to the ear to listen to the voice or not by using the proximity sensor aiming at certain applications, can realize that the screen is closed to prevent misoperation when the user raises the hand to listen to the voice at the ear, and can lighten the screen to facilitate the operation of the user when the user takes the terminal away from the ear. That is, the first physical sensor includes a proximity sensor, and the second physical sensor includes an acceleration sensor; simulating the data of the first physical sensor according to the data reported by the at least one second physical sensor comprises at least one of the following:
in the event that the data uploaded by the at least one second physical sensor comprises data indicative of the detected motion of the lift-off, the simulated data of the first physical sensor comprises data indicative of the proximity of an object;
in the event that the data uploaded by the at least one second physical sensor comprises data indicative of the detected lowering action, the simulated data of the first physical sensor comprises data indicative of the presence of the object;
in the case where the data uploaded by the at least one second physical sensor comprises data characterizing that no motion of lifting is detected and no motion of lowering is detected, the simulated data of the first physical sensor comprises data characterizing that no object is approaching and departing.
In some exemplary embodiments, the first physical sensor comprises a proximity sensor, and the second physical sensor comprises an acceleration sensor; simulating the data of the first physical sensor according to the data reported by the at least one second physical sensor comprises:
and enabling the first physical sensor to receive the data reported by the first physical sensor and using the data reported by the first physical sensor as a simulated first physical sensor under the condition that the data uploaded by the at least one second physical sensor comprises data representing that the uplifted action is detected or data representing that the laid-down action is detected.
For example, for a proximity sensor (that is, the proximity sensor is disposed at a position under a display screen) implemented by using an off-screen scheme, under the condition that a display screen region corresponding to the proximity sensor normally displays, the acceleration sensor is enabled, and the motion of lifting or putting down is detected by the acceleration sensor.
In some exemplary embodiments, in case that the preset condition is not satisfied, the method further includes: and acquiring data of the first physical sensor, and reporting the acquired data of the first physical sensor to an application.
In some exemplary embodiments, acquiring data of the first physical sensor comprises:
enabling a first physical sensor; and receiving data reported by the first physical sensor.
In some exemplary embodiments, enabling the first physical sensor means that the first physical sensor is in an operating state, so that the first physical sensor can perform measurement and report the measured data.
In some exemplary embodiments, if the first physical sensor is already in the working state, the first physical sensor does not need to be enabled any more, and the data reported by the first physical sensor is directly received. That is, acquiring data of the first physical sensor includes: and receiving data reported by the first physical sensor.
In some exemplary embodiments, in the case that the first physical sensor is a proximity sensor, the data reported by the first sensor is data characterizing that an object is close to or far away from, or data characterizing that no object is close to and far away from.
In some exemplary embodiments, the first physical sensor, when reporting the data of the first physical sensor, also reports the type of the first physical sensor, that is, receiving the data reported by the first physical sensor includes: receiving data reported by a first physical sensor and the type of the first physical sensor;
accordingly, reporting the obtained data of the first physical sensor to the application comprises: the obtained data of the first physical sensor and the type of the first physical sensor are reported to the application.
In some exemplary embodiments, for a scene in which the proximity sensor detects whether an object is approaching or moving away, meeting the preset condition means that the user experience is affected when the first physical sensor is used to obtain data of the first physical sensor, and not meeting the preset condition means that the user experience is not affected when the first physical sensor is used to obtain data of the first physical sensor. For example, for a physical proximity sensor implemented in an off-screen manner, the physical proximity sensor is used to detect whether an object is approaching or departing from the screen, which may cause screen flicker, and affect normal display of the screen, thereby affecting user experience. In this case, meeting the preset condition may mean that the display screen region corresponding to the first physical sensor displays normally; the first physical sensor is arranged at the position below the display screen; the condition that the preset condition is not met can mean that the display screen area corresponding to the first physical sensor displays abnormally; the first physical sensor is arranged at the position below the display screen; alternatively, the first physical sensor is not disposed in an off-screen location of the display screen. That is, in some exemplary embodiments, satisfying the preset condition includes: normally displaying in a display screen area corresponding to the first physical sensor; the first physical sensor is arranged at the position below the display screen; the condition that the preset condition is not met comprises the following steps: abnormal display is carried out in a display screen area corresponding to the first physical sensor; the first physical sensor is arranged at the position below the display screen; alternatively, the first physical sensor is not disposed in an off-screen location of the display screen.
In some exemplary embodiments, in order to reduce the power consumption of the first physical sensor, the first sampling period of the first physical sensor may be reduced in an analog manner, that is, simulating the data of the first physical sensor includes:
and enabling the first physical sensor under the condition that a second sampling period which is less than the first sampling period comes, receiving data reported by the first physical sensor, and enabling the first physical sensor.
In this case, meeting the preset condition may mean that the power consumption of the first physical sensor needs to be reduced at present; not meeting the preset condition may mean that the power consumption of the first physical sensor does not currently need to be reduced.
In some exemplary embodiments, in order to implement differentiated management on applications, packet names of some applications may be placed in a white list, an application corresponding to a packet name of an application included in the white list may obtain data of the first physical sensor in a simulated manner, and an application corresponding to a packet name of an application not included in the white list may not obtain data of the first physical sensor in a simulated manner. Then, satisfying the preset condition further includes: the applications include white list applications, which are applications in a white list that include a corresponding package name.
The condition that the preset condition is not met comprises the following steps: any of the above-described cases; alternatively, the application does not include a whitelist application.
In some exemplary embodiments, in order to implement difference management on sensor types, one or more sensor types may be preset, and in the case that the type of the first physical sensor is the same as the preset sensor type, data of the first physical sensor can be obtained in an analog manner; in the case where the type of the first physical sensor is different from the preset sensor type, the data of the first physical sensor cannot be obtained in an analog manner. Then, satisfying the preset condition further includes: the type of the first physical sensor is the same as the preset sensor type.
The condition that the preset condition is not met comprises the following steps: any of the above-described cases; alternatively, the type of the first physical sensor is different from a preset sensor type.
In some exemplary embodiments, in order to implement the differential management of the preference settings of the user, the user may set the preference settings according to his own preference, for example, set a switch, and if the preference settings of the user are met, the data of the first physical sensor can be obtained in a simulated manner; in the case where the preference setting of the user is not satisfied, the data of the first physical sensor cannot be obtained in a simulated manner. Then, satisfying the preset condition further includes: satisfying the user's preference settings.
The condition that the preset condition is not met comprises the following steps: any of the above-described cases; alternatively, the user's preference setting is not satisfied.
Of course, there are many other examples of simulating the data of the first physical sensor, and the specific simulation method is not used to limit the protection scope of the embodiment of the present application, and the preset condition is not only the above-mentioned example, and the specific preset condition is not used to limit the protection scope of the embodiment of the present application.
According to the method for acquiring the sensor data, under the condition that the preset condition is met, for example, under the condition that the user experience is influenced when the first physical sensor is used for measurement, the data of the first physical sensor is acquired in a simulation mode, the first physical sensor does not need to be actually used for acquiring the data of the first sensor, and therefore the data of the first physical sensor is acquired under the condition that the user experience is not influenced, and the user experience is improved.
In some exemplary embodiments, the data of the first physical sensor is simulated through the data reported by the at least one second physical sensor, so that the data of the first physical sensor is obtained without actually using the first physical sensor, and thus the data of the first physical sensor is obtained without affecting user experience, that is, the user experience is improved.
In a second aspect, an embodiment of the present application provides an electronic device, including:
at least one processor;
a memory having at least one program stored thereon that, when executed by the at least one processor, performs any of the above-described methods of acquiring sensor data.
Wherein, the processor is a device with data processing capability, which includes but is not limited to a Central Processing Unit (CPU) and the like; memory is a device with data storage capabilities including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), FLASH memory (FLASH).
In some embodiments, the processor, memory, and in turn other components of the computing device are connected to each other by a bus.
As an optional implementation, the electronic device is a mobile phone. Accordingly, the electronic device may further include a display screen, various physical sensors. Of course, the present disclosure is not so limited.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the above methods for acquiring sensor data.
Fig. 3 is a diagram of an apparatus for acquiring sensor data according to another embodiment of the present application.
In a fourth aspect, referring to fig. 3, another embodiment of the present application provides an apparatus for acquiring sensor data, including:
a control module 301, configured to receive a sensor registration request sent by an application; wherein the sensor registration request is to request data of a first physical sensor; reporting the simulated data of the first physical sensor to an application;
the data simulation module 302 is configured to simulate data of the first physical sensor when a preset condition is met.
In some exemplary embodiments, the data simulation module 302 is specifically configured to implement the simulation of the data of the first physical sensor in the following manner: enabling at least one second physical sensor; and receiving data reported by at least one second physical sensor, and simulating the data of the first physical sensor according to the data reported by the at least one second physical sensor.
In some exemplary embodiments, the first physical sensor is a proximity sensor and the second physical sensor is an acceleration sensor;
the data simulation module 302 is specifically configured to simulate data of the first physical sensor according to data reported by the at least one second physical sensor in at least one of the following manners:
in the event that the data uploaded by the at least one second physical sensor comprises data indicative of the detected motion of the lift-off, the simulated data of the first physical sensor comprises data indicative of the proximity of an object;
in the event that the data uploaded by the at least one second physical sensor comprises data indicative of the detected lowering action, the simulated data of the first physical sensor comprises data indicative of the presence of the object;
where the data uploaded by the at least one second physical sensor comprises data characterizing that no motion to lift is detected and no motion to drop is detected, the data of the simulated first physical sensor comprises data characterizing that no object is approaching and departing.
In some exemplary embodiments, the control module 301 is further configured to:
and under the condition that the preset condition is not met, acquiring data of the first physical sensor, and reporting the acquired data of the first physical sensor to the application.
In some exemplary embodiments, the control module 301 is specifically configured to obtain data of the first physical sensor by: enabling a first physical sensor; and receiving data reported by the first physical sensor.
In some exemplary embodiments, the satisfying of the preset condition includes:
normally displaying in a display screen area corresponding to the first physical sensor; the first physical sensor is arranged at the position below the display screen;
alternatively, there is currently a need to reduce the power consumption of the first physical sensor.
In some exemplary embodiments, satisfying the preset condition further includes: the applications include whitelist applications.
In some exemplary embodiments, the sensor registration request comprises: the type of the first physical sensor, the control module 201 is specifically configured to report the simulated data of the first physical sensor to the application in the following manner: reporting the simulated data of the first physical sensor and the type of the first physical sensor to the application.
The specific implementation process of the device for acquiring sensor data is the same as that of the method for acquiring sensor data in the foregoing embodiment, and is not described herein again.
In some exemplary embodiments, the data simulation module 302 may be regarded as a virtual sensor corresponding to the first physical sensor, as shown in fig. 4, the apparatus for acquiring sensor data includes a control module 301 and a virtual sensor 402, and a specific example is listed below to describe a specific implementation process when the data simulation module 302 is regarded as a virtual sensor corresponding to the first physical sensor, and the listed example is merely for convenience of illustration and is not used to limit the scope of the embodiments of the present application.
Examples of the invention
As shown in fig. 5, the method includes:
step 500, when entering a chat interface, the WeChat application sends a sensor registration request to the control module 301; wherein the sensor registration request comprises: a type of first physical sensor (e.g., a physical proximity sensor, etc.).
Step 501, the control module 301 judges whether the wechat application is a white list application, and if the wechat application is a white list application, step 502 is executed; if the WeChat application is not a white list application, steps 508-510 are performed.
Step 502, the control module 301 determines whether the display screen area corresponding to the first physical sensor is normally displayed, and if the display screen area corresponding to the first physical sensor is normally displayed, steps 503 to 507 are executed; if the display screen area corresponding to the first physical sensor is not properly displayed, steps 508-510 are performed.
In step 503, control module 301 enables virtual sensor 402.
At step 504, the virtual sensor 402 enables at least one second physical sensor (e.g., acceleration sensor, etc.).
And 505, reporting the data and the type of the second physical sensor to the virtual sensor 402 by the second physical sensor.
Step 506, the virtual sensor 402 simulates the data of the first physical sensor according to the data reported by the second physical sensor, and reports the data and the type of the virtual sensor to the control module 301.
Step 507, the control module 301 converts the type of the virtual sensor into the type of the first physical sensor, and reports the simulated data of the first physical sensor and the type of the first physical sensor to the WeChat application.
At step 508, the control module 301 enables the first physical sensor.
In step 509, the first physical sensor reports the data of the first physical sensor and the type of the first physical sensor to the control module 301.
Step 510, the control module 301 reports the data of the first physical sensor and the type of the first physical sensor to the wechat application.
As can be seen from the above example, for a wechat application, the data provided by the virtual sensor is not known, and is considered to be the data provided by the first physical virtual sensor.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purposes of limitation. In some instances, features, characteristics and/or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics and/or elements described in connection with other embodiments, unless expressly stated otherwise, as would be apparent to one skilled in the art. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the application as set forth in the appended claims.

Claims (10)

1. A method of acquiring sensor data, comprising:
receiving a sensor registration request sent by an application; wherein the sensor registration request is to request data of a first physical sensor;
and under the condition that a preset condition is met, simulating the data of the first physical sensor, and reporting the simulated data of the first physical sensor to an application.
2. The method of claim 1, wherein the simulating data of the first physical sensor comprises:
enabling at least one second physical sensor;
receiving data reported by at least one second physical sensor;
and simulating the data of the first physical sensor according to the data reported by the at least one second physical sensor.
3. The method of any of claims 1-2, further comprising: and under the condition that the preset condition is not met, acquiring the data of the first physical sensor, and reporting the acquired data of the first physical sensor to an application.
4. The method of claim 3, wherein the acquiring data of the first physical sensor comprises:
enabling the first physical sensor;
and receiving data reported by the first physical sensor.
5. The method according to any one of claims 1-2, wherein the meeting of the preset condition comprises at least one of:
normally displaying in a display screen area corresponding to the first physical sensor; the first physical sensor is arranged at the position below the screen of the display screen;
there is a current need to reduce the power consumption of the first physical sensor;
the type of the first physical sensor is the same as the type of a preset sensor;
satisfying the user's preference settings.
6. The method of claim 5, the meeting a preset condition further comprising: the application comprises a whitelist application.
7. The method of any of claims 1-2, wherein the sensor registration request comprises: a type of the first physical sensor, the reporting data of the simulated first physical sensor to an application comprising:
reporting the simulated data of the first physical sensor and the type of the first physical sensor to the application.
8. An electronic device, comprising:
at least one processor;
memory having stored thereon at least one program which, when executed by the at least one processor, carries out a method of acquiring sensor data according to any one of claims 1-7.
9. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the method of acquiring sensor data according to any one of claims 1-7.
10. An apparatus for acquiring sensor data, comprising:
the control module is used for receiving a sensor registration request sent by an application; wherein the sensor registration request is to request data of a first physical sensor; reporting the simulated data of the first physical sensor to an application;
and the data simulation module is used for simulating the data of the first physical sensor under the condition of meeting the preset condition.
CN202011186237.5A 2020-10-29 2020-10-29 Method and device for acquiring sensor data, electronic equipment and readable storage medium Pending CN114430439A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011186237.5A CN114430439A (en) 2020-10-29 2020-10-29 Method and device for acquiring sensor data, electronic equipment and readable storage medium
PCT/CN2021/126309 WO2022089399A1 (en) 2020-10-29 2021-10-26 Method and apparatus for obtaining sensor data, and electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011186237.5A CN114430439A (en) 2020-10-29 2020-10-29 Method and device for acquiring sensor data, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114430439A true CN114430439A (en) 2022-05-03

Family

ID=81310204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011186237.5A Pending CN114430439A (en) 2020-10-29 2020-10-29 Method and device for acquiring sensor data, electronic equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN114430439A (en)
WO (1) WO2022089399A1 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101069566B1 (en) * 2006-04-07 2011-10-05 퀄컴 인코포레이티드 Sensor interface, and methods and apparatus pertaining to same
KR102544357B1 (en) * 2016-01-21 2023-06-19 삼성전자주식회사 A Electronic Device connected with The Sensors In A Network And A Method For Controlling The Same
US10108462B2 (en) * 2016-02-12 2018-10-23 Microsoft Technology Licensing, Llc Virtualizing sensors
CN108363609B (en) * 2018-02-07 2021-11-30 腾讯科技(深圳)有限公司 Method, device and storage medium for simulating sensor
CN109167817A (en) * 2018-08-06 2019-01-08 佛山市甜慕链客科技有限公司 A kind of method and device generating internet of things sensors data
CN109089323B (en) * 2018-08-23 2021-07-09 西安邮电大学 Low-overhead industrial wireless sensor selection method
CN111142422A (en) * 2019-11-15 2020-05-12 西安海的电子科技有限公司 Sensor information processing method for ios system

Also Published As

Publication number Publication date
WO2022089399A1 (en) 2022-05-05

Similar Documents

Publication Publication Date Title
US11164285B2 (en) Electronic device and method for displaying image on a display to prevent burn-in of the display
US11175824B2 (en) Method for detecting ambient light intensity, storage medium and electronic device
CN107945769B (en) Ambient light intensity detection method and device, storage medium and electronic equipment
EP2985723A1 (en) Method for adding application superscript and device and device thereof
EP3316136B1 (en) Method and device for evaluating system fluency, and ue
US9432391B2 (en) Method, device and apparatus for acquiring security state of mobile terminal
EP3567572B1 (en) Screen flickering processing method, device, storage medium, and electronic device
EP3165019A1 (en) Method and apparatus of notifying of smishing
KR20190021562A (en) Electronic device for displaying application andoperating method thereof
KR102372188B1 (en) Method for cancelling noise of audio signal and electronic device thereof
WO2018016741A1 (en) Notification information display method and device
US20180059079A1 (en) Method and apparatus for calibrating particulate matter measurement value
CN107864066A (en) Offline H5 pages monitoring method, device, equipment and readable storage medium storing program for executing
CN109753425A (en) Pop-up processing method and processing device
CN109522741B (en) Application program permission prompting method and terminal equipment thereof
KR20180083185A (en) Apparatus and method for providing adaptive user interface
CN108801321B (en) Sensor calibration method, electronic device and computer-readable storage medium
KR20160026500A (en) Method for transmitting call disconnection message of electronic apparatus and electronic apparatus thereof
KR20160056197A (en) Method for controlling display and electronic device thereof
CN110800277B (en) Call processing method and related product
CN108200546B (en) Data reporting method and device, mobile terminal and computer readable medium
CN105653320A (en) Loaded icon display method and apparatus
CN114430439A (en) Method and device for acquiring sensor data, electronic equipment and readable storage medium
EP3001652B1 (en) Method for providing information and an electronic device thereof
CN107908527B (en) Application icon display 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