[go: up one dir, main page]

CN117349125B - Device status acquisition method, electronic device and computer readable storage medium - Google Patents

Device status acquisition method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN117349125B
CN117349125B CN202311647679.9A CN202311647679A CN117349125B CN 117349125 B CN117349125 B CN 117349125B CN 202311647679 A CN202311647679 A CN 202311647679A CN 117349125 B CN117349125 B CN 117349125B
Authority
CN
China
Prior art keywords
state
electronic device
wireless charging
charging chip
magnetic force
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.)
Active
Application number
CN202311647679.9A
Other languages
Chinese (zh)
Other versions
CN117349125A (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 CN202311647679.9A priority Critical patent/CN117349125B/en
Publication of CN117349125A publication Critical patent/CN117349125A/en
Application granted granted Critical
Publication of CN117349125B publication Critical patent/CN117349125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J50/00Circuit arrangements or systems for wireless supply or distribution of electric power
    • H02J50/10Circuit arrangements or systems for wireless supply or distribution of electric power using inductive coupling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1626Constructional details or arrangements for portable computers with a single-body enclosure integrating a flat display, e.g. Personal Digital Assistants [PDAs]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1684Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
    • G06F1/169Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675 the I/O peripheral being an integrated pointing device, e.g. trackball in the palm rest area, mini-joystick integrated between keyboard keys, touch pads or touch stripes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • H02J7/44
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

一种设备状态获取方法、电子设备及计算机可读存储介质,涉及终端技术领域。可提升配件状态的准确性。第一电子设备基于传感器采集的数据确定第二电子设备的第一状态,向第二电子设备发起PING检测。其中第一状态为第二电子设备脱离可吸附区域的拿离状态或者第二电子设备吸附于可吸附区域的吸附状态。若PING失败,则确定第二电子设备的实时状态为拿离状态。若PING成功,则确定第二电子设备的实时状态为吸附状态。第一电子设备先基于传感器采集的传感器数据初步获取第二电子设备的第一状态,再向第二电子设备发起PING检测,通过PING检测的结果来获取更为准确的第二电子设备的设备状态。

A device status acquisition method, an electronic device and a computer-readable storage medium relate to the field of terminal technology. The accuracy of the accessory status can be improved. A first electronic device determines the first status of a second electronic device based on data collected by a sensor, and initiates a PING detection to the second electronic device. The first status is a removal status of the second electronic device from an adsorbable area or an adsorption status of the second electronic device adsorbed to the adsorbable area. If the PING fails, the real-time status of the second electronic device is determined to be a removal status. If the PING succeeds, the real-time status of the second electronic device is determined to be an adsorption status. The first electronic device first preliminarily obtains the first status of the second electronic device based on the sensor data collected by the sensor, and then initiates a PING detection to the second electronic device, and obtains a more accurate device status of the second electronic device through the result of the PING detection.

Description

Device state acquisition method, electronic device and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a device state acquisition method, electronic equipment and a computer readable storage medium.
Background
Some electronic devices may have accessories for matching use, for example, electronic devices such as tablet computers may have accessories such as handwriting pens that can be matched for use. The accessory may be attached to the electronic device, for example by magnetic force, in which case the state of the accessory relative to the electronic device may be referred to as an attached state. The accessory may also be lifted off by the user from the attached state, leaving the electronic device, at which point the state of the accessory relative to the electronic device may be referred to as the lifted-off state.
Currently, the electronic device can use a sensor module (including a controller and a magnetic force sensor for collecting magnetic force data) to detect the above-mentioned adsorption state and the removal state. The sensor module is used for detecting real-time magnetic force between the electronic equipment and the accessory and comparing the acquired real-time magnetic force with a pre-recorded magnetic force threshold value. If the real-time magnetic force is smaller than or equal to the magnetic force threshold value, the accessory is possibly taken away from the electronic device, namely, the accessory is switched from the adsorption state to the take-away state, and the sensor module reports a take-away event to the tablet computer. Otherwise, if the real-time magnetic force is greater than the magnetic force threshold value, the accessory is likely to be adsorbed on the electronic device, that is, the accessory is switched from the taken-off state to the adsorption state, and the sensor module reports an adsorption event to the tablet computer. The electronic device can respond to the event type reported by the sensor module and execute the corresponding event processing flow.
The electronic equipment relies on the scheme of magnetic force data acquisition accessory state that sensor module gathered, receives external environment's magnetic field variation influence easily, leads to the accuracy of acquired accessory state to reduce.
Disclosure of Invention
The embodiment of the application provides a device state acquisition method, electronic equipment and a computer readable storage medium, which are used for solving the technical problem that the accuracy of an accessory state determined by magnetic force data acquired by a magnetic force sensor is low, and further acquiring a more accurate accessory state by combining a PING detection result on the basis of the data acquired by the sensor.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, an apparatus state acquiring method is provided, where the apparatus state acquiring method is applied to a first electronic apparatus, and the acquired apparatus state refers to a relative state between a second electronic apparatus and the first electronic apparatus. The first electronic device and the second electronic device may be used together, or the second electronic device may be an accessory of the first electronic device. For example, the first electronic device may be a tablet computer or a notebook computer, and the second electronic device may be an accessory of the tablet computer or the notebook computer, such as a stylus. The surface of the first electronic device is provided with a adsorbable region that can be used to adsorb the second electronic device. For example, an adsorbable region is provided on the side surface of the tablet computer, a magnetic attraction device is provided in the adsorbable region, and a device capable of being attracted by the magnetic attraction device is provided in the stylus pen correspondingly, so that the stylus pen can be attracted to the adsorbable region when the stylus pen is attached to the adsorbable region on the side surface of the tablet computer.
In other cases, the first electronic device may also be a wireless charger, such as a vehicle-mounted magnetic charger, and the second electronic device may be an electronic device such as a tablet computer, a notebook computer, a mobile phone, a smart watch, a bracelet, an earphone, etc. that is matched with the wireless charger, and these second electronic devices may also be adsorbed to the adsorbable area on the surface of the first electronic device.
The electronic equipment is provided with a sensor at a position corresponding to the adsorbable region and is used for acquiring sensor data of the adsorbable region. For example, a magnetic force sensor is disposed in the adsorbable region for acquiring magnetic force data of the adsorbable region. The first electronic equipment is a flat plate, the second electronic equipment is a handwriting pen, and when the handwriting pen can be adsorbed on an adsorbable area on the surface of the flat plate through magnetic force, the magnetic force sensor arranged in the adsorbable area can collect magnetic force data of the adsorbable area, and the magnetic force data of the adsorbable area is used as magnetic force data between the flat plate and the handwriting pen.
After the first electronic device acquires the sensor data acquired by the sensor, the device state of the second electronic device is initially acquired based on the sensor data, and the device state is defined as a first state, wherein the first state may be a take-off state or an adsorption state. Considering that magnetic force data collected by the magnetic force sensor may be affected by an environmental magnetic field, only the first state determined by the magnetic force data may not accurately reflect the device state of the second electronic device.
Based on this, the electronic device is triggered by the first state of the second electronic device determined by the sensor, further confirming the device state. Considering that the second electronic device is adsorbed on the surface of the first electronic device, that is, when the second electronic device is in a real adsorption state, the first electronic device and the second electronic device can perform PING connection. On the contrary, if the second electronic device is not adsorbed on the surface of the first electronic device, the first electronic device cannot perform PING connection with the second electronic device. And a program for testing the network connection quantity during PING connection. PING is a service command that works at the application layer in a TCP/IP network architecture, mainly to send an internet message control protocol Echo request message to a specific destination host, test whether the destination station is reachable and understand its relevant status.
The first electronic device initiates PING detection for wireless charging to the second electronic device in order to further verify the accuracy of the acquired first state of the second electronic device. Only if the second electronic device is in a real adsorption state, the PING detection result may be a PING success, otherwise, the PING detection result is a PING failure. The first electronic device determines the real-time state of the second electronic device according to the PING detection result. If PING fails, determining that the real-time state of the second electronic equipment is a take-off state. Otherwise, if the PING is successful, determining that the real-time state of the second electronic equipment is the adsorption state.
In the above method for acquiring a device state provided by the embodiment of the present application, a first electronic device initially acquires a first state of a second electronic device based on sensor data acquired by a sensor, and in order to verify accuracy of the first state, the first electronic device initiates PING detection to the second electronic device, and acquires a more accurate device state of the second electronic device through a PING detection result. In this way, subsequent control of the first electronic device based on the device status of the second electronic device, such as wireless charging, data transfer, etc., is more efficient. Based on the first state of the second electronic device determined by the sensor data collected by the sensor in the existing scheme, the first electronic device starts the operation of determining the device state of the second electronic device through PING detection when receiving the first state reported by the sensor, does not need to continuously initiate PING detection, and can acquire more accurate device state.
In a possible implementation manner of the first aspect, the first electronic device to which the provided device state obtaining method is applied may be a tablet computer or a notebook computer, and the second electronic device corresponding to the first electronic device may be an accessory of the first electronic device, where the accessory includes a handwriting pen.
Or in other cases, the first electronic device may be a wireless charger and the second electronic device includes at least one of a tablet computer, a notebook computer, a cell phone, and a wearable device. The wearable device herein may be a smart watch, a bracelet, a wireless headset, etc.
In a possible implementation manner of the first aspect, a scheme for implementing PING detection is further defined. Specifically, a first wireless charging chip is mounted in the first electronic device, and the first wireless charging chip comprises a transmitting coil. The second electronic device includes a second wireless charging chip including a receiving coil. The transmitting coil of the first wireless charging chip can transmit electromagnetic waves to the receiving coil of the second wireless charging chip, so that the first wireless charging chip can wirelessly charge the second wireless charging chip, and the first electronic device can wirelessly charge the second electronic device. Of course, the first wireless charging chip may perform data transmission in addition to the function of wirelessly charging the second wireless charging chip. One precondition that the first wireless charging chip performs wireless charging for the second wireless charging chip is that the second electronic device is adsorbed on the adsorbable area on the surface of the first electronic device. The first wireless charging chip can initiate PING detection to the second wireless charging chip only when the second electronic device is adsorbed on the adsorbable region of the surface of the first electronic device.
In a possible implementation manner of the first aspect, it is considered that if the first wireless charging chip in the first electronic device is to perform PING detection with the second wireless charging chip, the first wireless charging chip needs to be powered on first, and then the PING detection can be performed on the second wireless charging chip after the first wireless charging chip is powered on. Before the first wireless charging chip is powered on, if the first wireless charging chip is in a power-down state, the first wireless charging chip is directly controlled to be powered on, and the influence is hardly caused. If the first wireless charging chip is in a power-on state, especially in a charging state before power-on, the first wireless charging chip needs to be powered down and then powered up, and in this case, the originally ongoing charging state may be suspended, that is, the charging is stopped, and the second electronic device displayed on the first electronic device is powered up after the charging is stopped, so that the user experience is poor.
If the first state determined based on the data collected by the sensor is the adsorption state, the state of the second electronic device should be the taking-off state before that, the first wireless charging chip can not wirelessly charge the second wireless charging chip in the taking-off state, and in this case, the first wireless charging chip is directly controlled to be electrified and PING detection is performed, and no charging interruption is caused.
If the first state determined based on the data collected by the sensor is the take-off state, the state of the second electronic device should be the adsorption state before that, and the first wireless charging chip is likely to perform wireless charging for the second wireless charging chip in the adsorption state. In this case, the first wireless charging chip is directly controlled to power up and perform PING detection, which is likely to cause suspension of wireless charging which is performed originally, resulting in poor user experience.
Based on this, in the device state acquiring method provided in the present embodiment, for the case that the first state of the second electronic device is determined to be the taken-off state based on the data acquired by the sensor, the determination as to whether the first wireless charging chip is in the charging state is further increased, so as to reduce the case of the disconnection as much as possible.
Specifically, the step of controlling, by the first electronic device, the first wireless charging chip to initiate PING detection to the second wireless charging chip may include: if the first state of the second electronic device is the taken-off state, which is determined based on the data collected by the sensor, whether the first wireless charging chip is in the charging state can be judged first.
And a flag register is arranged in the first electronic equipment, and a charging state flag bit is arranged in the flag register and used for recording the charging state of the first wireless charging chip. The charging state flag bit is determined according to a control instruction that the first electronic device controls the first wireless charging to the second wireless charging, and does not necessarily truly reflect the charging state of the first wireless charging chip. After the first electronic device receives the state event reported by the sensor module and determines that the state event is a take-off event, whether the first wireless charging chip is in a charging state or not can be judged based on the charging state flag bit.
If the first electronic device determines that the first wireless charging chip is not in the charging state, the first electronic device can directly power on the first wireless charging chip, then control the first wireless charging chip to initiate PING detection to the second wireless charging chip, and further verify whether the device state of the second electronic device is a real taking-out state according to the PING detection result.
If the first electronic device determines that the first wireless charging chip is in a charging state, in order to avoid possible charging interruption, the first electronic device does not verify the device state of the second electronic device by initiating PING detection, but verifies the device state of the second electronic device by other means. For example, the electronic device may verify whether the device status of the second electronic device is a real taken-off status through the output power of the first wireless charging chip or other electrical parameters.
According to the equipment state acquisition method provided by the embodiment, for the situation that the first state determined by the data acquired by the sensor is the taken-off state, the adaptive equipment state acquisition scheme is selected according to the charging state of the first wireless charging chip, so that the situation that the charging is broken and the power consumption is increased possibly is avoided.
In a possible implementation manner of the first aspect, for a case where the first wireless charging is in a charging state, the real device state is obtained according to an output power of the first wireless charging chip.
In the service flow of wireless charging for the second electronic device, the first wireless charging chip is used for outputting power to the second electronic device, and the second wireless charging chip of the second electronic device is used for receiving the power output by the first wireless charging chip and is the most dominant or unique power receiving end. When the first wireless charging chip does not perform wireless charging for the second wireless charging chip, or the first wireless charging chip is in an idle state which is not in a charging state, the idle power in the idle state can be basically equal to the charging link loss power. That is, the output power of the first electronic device when in the charging state is greater than the output power when not in the charging state, and the real-time state of the device can be further verified by combining the output power.
Specifically, if the first electronic device determines that the first wireless charging chip is in the charging state, the output power of the first wireless charging chip is obtained, and if the output power of the first wireless charging chip is less than or equal to a predefined power threshold, the real-time state of the second electronic device is determined to be the taking-off state. And if the output power of the first wireless charging chip is larger than the power threshold value, determining that the real-time state of the second electronic equipment is the adsorption state.
In a possible implementation manner of the first aspect, the power threshold is further defined as an idle power when the first wireless charging chip is not in a charging state.
In a possible implementation manner of the first aspect, after the first electronic device determines the real-time state of the second electronic device according to the data collected by the sensor, the PING detection result, or the output power of the first wireless charging chip, the subsequent control flow may be further continued. For example, if the real-time state of the second electronic device is the adsorption state, the first electronic device may control the first wireless charging chip to charge the second wireless charging chip. In this way, the second electronic device can be ensured to be in a state where a high amount of power is available as much as possible.
Of course, in the implementation, the first electronic device may also acquire the real-time electric quantity of the second electronic device first, and under the condition that it is determined that the real-time electric quantity of the second electronic device does not reach the maximum electric quantity and the remaining electric quantity of the first electronic device meets the charging requirement, the first electronic device performs wireless charging for the second electronic device through the first wireless charging chip. Because the acquired equipment state of the second electronic equipment is high in accuracy, the follow-up control flow is not easy to be wrong, and the equipment operation efficiency is improved.
In a possible implementation manner of the first aspect, an internal implementation principle of the device state acquisition method is provided. Specifically, the first electronic device includes a first controller, and the first controller may execute the device state acquiring method and the interaction control method of the first electronic device and the second electronic device provided in this embodiment. The first electronic device further comprises a sensor module, and the sensor module comprises a second controller and a magnetic force sensor. The magnetic force sensor can collect magnetic force data, the collected magnetic force data are sent to the second controller, and the second controller preliminarily determines the first state of the second electronic equipment according to the magnetic force data collected by the magnetic force sensor.
Specifically, the second controller reports a state event corresponding to the first state to the first controller based on magnetic force data acquired by the magnetic force sensor. The first controller receives the state event reported by the second controller and initiates PING detection to the second electronic device. In actual implementation, the first controller sends a PING connection instruction to the first wireless charging chip, and the first wireless charging chip initiates PING detection to the second wireless charging chip of the second electronic device.
In a possible implementation manner of the first aspect, the step of reporting, by the second controller, a state event corresponding to the first state based on magnetic force data collected by the magnetic force sensor specifically includes:
The second controller stores a magnetic threshold value in advance, wherein the magnetic threshold value indicates critical magnetic data when the equipment state of the second electronic equipment is switched from the taking-off state to the adsorption state or critical magnetic data when the equipment state is switched from the adsorption state to the taking-off state.
The second controller receives magnetic force data acquired by the magnetic force sensor in real time, and then determines a state event corresponding to the first state according to the magnetic force data and a predefined magnetic force threshold value. Specifically, if the second controller determines that the magnetic force data is greater than or equal to the magnetic force threshold value, a state event corresponding to the adsorption state is generated and reported to the first controller. Otherwise, if the second controller determines that the magnetic force data acquired by the magnetic force sensor in real time is smaller than the magnetic force threshold value, a state event corresponding to the take-off state is generated and reported to the first controller.
It should be noted that, the first state corresponding to the state event generated by the second controller is only the initially determined device state, and the more accurate device state of the second electronic device may be obtained only after further verification and determination by the first controller.
In a second aspect, the present application provides an electronic device comprising a processor and a memory; the memory is configured to store computer-executable instructions that, when executed by the electronic device, cause the electronic device to perform the device state acquisition method of any one of the first aspects described above.
The electronic equipment can be first electronic equipment, and the surface of the first electronic equipment is provided with an adsorbable area for adsorbing the second electronic equipment; and a sensor is arranged at a position corresponding to the adsorbable region in the first electronic device.
In a possible implementation manner of the second aspect, the processor of the first electronic device is configured to:
Determining a first state of the second electronic device based on data acquired by the sensor, and initiating PING detection to the second electronic device; the first state is a taking-off state or an adsorption state, the adsorption state refers to that the second electronic equipment is adsorbed on the adsorbable region, and the taking-off state refers to that the second electronic equipment is separated from the adsorbable region;
If PING fails, determining that the real-time state of the second electronic equipment is a take-off state; and if the PING is successful, determining that the real-time state of the second electronic equipment is the adsorption state.
In a possible implementation manner of the second aspect, the first electronic device is a tablet computer or a notebook computer, the second electronic device is an accessory of the first electronic device, and the accessory includes a handwriting pen; or alternatively
The first electronic device is a wireless charger, and the second electronic device comprises at least one of a tablet computer, a notebook computer, a mobile phone and a wearable device.
In a possible implementation manner of the second aspect, the electronic device includes a first wireless charging chip, and the second electronic device includes a second wireless charging chip, where the first wireless charging chip is configured to wirelessly charge the second wireless charging chip;
the processor of the first electronic device is further configured to:
And controlling the first wireless charging chip to initiate PING detection to the second wireless charging chip.
In a possible implementation manner of the second aspect, the processor of the first electronic device is further configured to:
the first state is a taking-off state, and whether the first wireless charging chip is in a charging state is judged;
if the first wireless charging chip is not in a charging state, powering on the first wireless charging chip;
And controlling the first wireless charging chip to initiate PING detection to the second wireless charging chip.
In a possible implementation manner of the second aspect, the processor of the first electronic device is further configured to:
If the first wireless charging chip is in a charging state, acquiring output power of the first wireless charging chip;
If the output power of the first wireless charging chip is smaller than or equal to a predefined power threshold, determining that the real-time state of the second electronic equipment is a take-off state;
And if the output power of the first wireless charging chip is larger than the power threshold value, determining that the real-time state of the second electronic equipment is the adsorption state.
In a possible implementation manner of the second aspect, the power threshold is an idle power when the first wireless charging chip is not in a charging state.
In a possible implementation manner of the second aspect, the processor of the first electronic device is further configured to:
the real-time state of the second electronic equipment is an adsorption state, and the first wireless charging chip is controlled to charge the second wireless charging chip.
In a possible implementation manner of the second aspect, the electronic device includes a first controller, and the sensor module includes a second controller and a magnetic force sensor;
the processor of the first electronic device is further configured to:
the second controller reports a state event corresponding to the first state based on magnetic force data acquired by the magnetic force sensor;
The first controller receives the state event reported by the second controller and initiates PING detection to the second electronic device.
In a possible implementation manner of the second aspect, the processor of the first electronic device is further configured to:
The second controller receives magnetic force data acquired by the magnetic force sensor in real time;
The second controller determines a state event corresponding to the first state according to the magnetic force data and a predefined magnetic force threshold value; and if the magnetic force data is larger than or equal to the magnetic force threshold value, the state event corresponds to the adsorption state, and if the magnetic force data is smaller than the magnetic force threshold value, the state event corresponds to the take-off state.
In a third aspect, an electronic device is provided, which has a function of implementing the device state acquisition method of the first aspect. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In a fourth aspect, there is provided a first electronic device comprising: a processor; the processor is configured to execute the device state acquisition method according to any one of the first aspect described above according to the instruction after being coupled to the memory and reading the instruction in the memory.
In a fifth aspect, there is provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the device state acquisition method of any one of the above first aspects.
In a sixth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the device state acquisition method of any of the first aspects described above.
In a seventh aspect, there is provided a control apparatus (e.g. the control apparatus may be a system-on-a-chip) comprising a processor for supporting a control device to implement the functions referred to in the first aspect above. In one possible design, the apparatus further comprises a memory for holding program instructions and data necessary for the control device. When the device is a chip system, the device can be formed by a chip, and can also comprise the chip and other discrete devices.
The technical effects of any one of the design manners of the second aspect to the seventh aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
Fig. 1 is one of connection schematic diagrams related to a device status acquisition method according to an embodiment of the present application;
FIG. 2 is a second connection diagram of the method for acquiring a device status according to the embodiment of the present application;
FIG. 3 is a third connection diagram related to a method for acquiring a device status according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a method for acquiring a device status according to an embodiment of the present application;
FIG. 5 is a second flowchart of a method for acquiring a device status according to an embodiment of the present application;
FIG. 6 is a third flowchart of a method for acquiring a device status according to an embodiment of the present application;
FIG. 7 is a flowchart of a method for acquiring a device status according to an embodiment of the present application;
Fig. 8 is a schematic diagram of a software framework of an electronic device according to an embodiment of the present application;
Fig. 9 is a hardware configuration diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
For the sake of easy understanding, a part of common technical knowledge related to the embodiments of the present application will be described.
As shown in fig. 1 and fig. 2, the first electronic device 100 and the second electronic device 200 may be used together, where the surface of the first electronic device 100 is provided with an adsorbable region, and the second electronic device 200 may be adsorbed on the adsorbable region on the surface of the first electronic device 100. The first electronic device 100 and the second electronic device 200 may perform unidirectional or bidirectional data transmission therebetween.
In particular, the second electronic device 200 may be an accessory of the first electronic device 100. For example, the first electronic device 100 may be a tablet computer or a notebook computer, and the second electronic device 200 may be an accessory of the first electronic device 100 such as a stylus. In some cases, the first electronic device 100 may also be a wireless charger, such as an on-board wireless charger, the second electronic device 200 may be a tablet computer, a notebook computer, a mobile phone, or a wearable device, and the wearable device may be a bracelet, a smart watch, an earphone, or the like that can be wirelessly charged through the wireless charger. In this embodiment, the first electronic device 100 is mainly used as a tablet computer, and the second electronic device 200 is used as a handwriting pen for example, to explain a specific implementation process of the device status acquisition method provided in the embodiment of the present application.
As shown in fig. 1 and 2, the first electronic device 100 is a tablet computer, and the second electronic device 200 is an accessory of the first electronic device, such as a stylus. As shown in (a) and (b) in fig. 1, the stylus is in an adsorption state with respect to the tablet computer. The adsorption state refers to that the handwriting pen is fixed close to the surface of the tablet computer through magnetic force or other types of suction. Under other conditions, the surface of the tablet personal computer can be provided with a buckle or a connecting wire, and the handwriting pen can be fixed close to the surface of the tablet personal computer through the buckle or the connecting wire. It should be noted that, in general, the stylus is attached to a fixed adsorbable area on the surface of the tablet computer, instead of any area, and the fixed adsorbable area may provide the magnetic force or other force required for stylus attachment. For example, the adsorbable region may be a side region of a tablet computer.
As shown in fig. 2, the first electronic device 100 includes a first wireless charging chip 110, and the second electronic device 200 includes a second wireless charging chip 210, where the first wireless charging chip 110 is configured to wirelessly charge the second wireless charging chip 210. When the second electronic device 200 is attached to the first electronic device 100, the first electronic device 100 performs wireless charging for the second electronic device 200 through electromagnetic coupling between the first wireless charging chip 110 and the second wireless charging chip 210.
As shown in fig. 1 (a), the tablet computer may obtain the real-time electric quantity of the stylus pen, and display an electric quantity mark of the stylus pen on the interface (as shown in a in fig. 1). The tablet computer detects that the electric quantity of the handwriting pen does not reach the maximum electric quantity, can charge the handwriting pen, and displays the prompt message on the interface when the handwriting pen is charged. For example, the tablet computer may display a charge flag on the charge flag of the stylus, or the tablet computer may also display a prompt message such as "charge the stylus" on the interface.
As shown in fig. 1 (b), when the tablet computer detects that the electric quantity of the handwriting pen reaches the maximum electric quantity, the tablet computer is fully charged, and the charging of the handwriting pen can be stopped. In addition, the tablet computer may cancel the charging mark displayed in advance on the interface, or display a prompt message (as shown in B in fig. 1) such as "the handwriting pen is full" on the interface by a popup frame, so as to prompt the user that the handwriting pen is full. When the tablet computer detects that the handwriting pen is in an adsorption state and is fully charged, an instruction for entering a low-power-consumption mode can be sent to the handwriting pen, so that the handwriting pen is instructed to be switched to the low-power-consumption mode, and power consumption is reduced. In the low power consumption mode, the handwriting pen does not receive and process other external instructions until the handwriting pen receives the instruction for exiting the low power consumption mode sent by the tablet personal computer, and the handwriting pen can exit the low power consumption mode and enter the normal working mode.
As shown in fig. 3 (a) and (b), the stylus is in a removed state with respect to the tablet computer. The taking-off state means that the handwriting pen is not adsorbed on the surface of the tablet personal computer through magnetic force. As shown in fig. 3 (a), the stylus is held by a user, and a touch operation is applied to the touch screen of the tablet computer. In this case, even if the pen tip of the stylus is in contact with the surface of the tablet computer, the tablet computer determines the state of the stylus as the taken-off state.
As shown in fig. 3 (b), the stylus is not adsorbed on the surface of the tablet computer, the pen tip of the stylus does not apply touch operation on the touch screen of the tablet computer, and a distance exists between the stylus and the tablet computer, so that the tablet computer can determine the state of the stylus as a taken-off state. The handwriting pen is in a take-off state, data transmission can be carried out between the handwriting pen and the tablet personal computer through a near field communication mode, and the near field communication mode can comprise Bluetooth communication or wireless network communication. If it is to be ensured that the stylus can transmit information with the tablet computer, the distance between the stylus and the tablet computer should meet the distance required by near field communication. If the distance between the handwriting pen and the tablet computer is larger than the distance required by near field communication, the handwriting pen cannot transmit information with the tablet computer, and the tablet computer can determine that the handwriting pen is in an abnormal state or a disconnection state.
Continuing with fig. 2, the tablet is equipped with a sensor module 120, and the sensor module 120 may be mounted near the adsorbable region of the tablet surface to collect sensor data for that region. In particular, the sensor module 120 may include a controller and a magnetic force sensor for collecting magnetic force data, such as magnetic flux, between the tablet and stylus. And the controller is internally provided with a magnetic threshold value of the adsorption state and the taking-off state of the handwriting pen in advance, and the real-time state of the handwriting pen is judged according to the magnetic data acquired by the magnetic sensor and the magnetic threshold value. For example, if the magnetic force data is greater than or equal to the magnetic force threshold value, the stylus pen is determined to be in an adsorption state. If the magnetic force data is smaller than the magnetic force threshold value, judging that the handwriting pen is in a take-off state. Of course, the description is simplified here, and in a practical solution, the magnetic force sensor is not one magnetic force data of a single direction, but multi-directional magnetic force data, such as triaxial magnetic force data, etc. The controller may compare magnetic force data of three axes when comparing, and then combine a series of calculations to obtain the real-time status of the stylus pen, which will not be described in detail herein.
Under other conditions, for example, when the handwriting pen is fixed on the tablet computer through a connecting piece such as a buckle, a sensor in the sensor module can be replaced by a pressure sensor arranged on the surface of the tablet computer, and the pressure sensor can collect the pressure of the handwriting pen attached to the surface of the tablet computer. The controller compares the pressure data collected by the pressure sensor with the pressure threshold value to judge the real-time state of the stylus, and the detection of the state of the stylus can be realized.
In addition, still be equipped with first wireless chip that charges in the panel computer, be equipped with transmitting coil on this first wireless chip that charges. Correspondingly, the handwriting pen is provided with a second wireless charging chip, and the second wireless charging chip is provided with a receiving coil. The transmitting coil of the first wireless charging chip transmits electromagnetic waves, and the receiving coil of the second wireless charging chip receives the electromagnetic waves, so that the tablet personal computer can perform wireless charging for the handwriting pen. If the tablet personal computer determines that the real-time state of the handwriting pen is the adsorption state, acquiring electric quantity data of the handwriting pen, and judging whether the handwriting pen needs to be charged or not. If the handwriting pen is determined to be charged, the first wireless charging chip is controlled to emit electromagnetic waves to the second wireless charging chip, so that the handwriting pen is charged.
For the scheme of acquiring the handwriting state based on the magnetic force data acquired by the magnetic force sensor, the magnetic force data acquired by the magnetic force sensor is easily influenced by the magnetic field of the surrounding environment, such as the strong magnetic environment, so that the accuracy of the determined handwriting state is reduced.
Based on the above, the embodiment of the application provides an equipment state acquisition method which is applied to first electronic equipment. The surface of the first electronic device is provided with an adsorbable region, and the second electronic device can be adsorbed on the adsorbable region of the surface of the first electronic device. The first electronic equipment determines the first state of the first and second electronic equipment based on the data acquired by the sensor, and further equipment state detection flow is added on the basis of the first state, so that the accuracy of the acquired equipment state is improved. The applied first electronic device may include a personal computer (Personal Computer, PC), a tablet computer, a notebook computer, a portable computer (e.g., a mobile phone), a wearable electronic device (e.g., a smart watch), an augmented Reality (Augmented Reality, AR) \virtual Reality (VR) device, a vehicle-mounted computer, etc., and the following embodiments do not limit the specific form of the first electronic device in particular. In this embodiment, the first electronic device may be a tablet computer, and the second electronic device may be a stylus.
Fig. 4 is a schematic flow chart of a method for acquiring a device status according to an embodiment of the present application. The provided equipment state acquisition method mainly comprises the following steps:
step S401, determining a first state of the second electronic device based on the data collected by the sensor, and initiating PING detection for wireless charging to the second electronic device.
Step S402, if the PING fails, determining that the real-time status of the second electronic device is the taken-off status.
Step S403, if PING is successful, determining that the real-time status of the second electronic device is the adsorption status.
The first electronic device is internally provided with a controller, and the controller can execute the device state acquisition method. For ease of description, the controller may be defined as a first controller. The first controller may be a main controller of the first electronic device, and controls an interaction flow between the first electronic device and the second electronic device.
As further shown in fig. 2, a sensor module is disposed in the first electronic device, where the sensor module may collect sensor data on the surface of the first electronic device, report the sensor data to a controller of the first electronic device, and determine, by the electronic device, a device state of the second electronic device according to the sensor, where the obtained device state is a predicted state, and may be defined as a first state, where the first state may be consistent with or inconsistent with a true device state of the second electronic device.
In particular, the sensor module may comprise a magnetic force sensor, which may collect magnetic force data within a range around, for example magnetic force data of the first electronic device surface. The sensor module may also include a controller, which may be defined as a second controller for ease of distinction.
In the implementation, the second controller may report a state event corresponding to the first state based on magnetic force data collected by the magnetic force sensor, and the first controller of the first electronic device receives the state event reported by the second controller and initiates PING detection for wireless charging to the second electronic device.
Fig. 5 shows a second flowchart of the provided device status acquisition method. The user adsorbs/takes the second electronic equipment off the adsorbable region on the surface of the first electronic equipment, the magnetic force of the adsorbable region on the surface of the first electronic equipment can be changed, the magnetic force sensor of the sensor module collects magnetic force data, the magnetic force change is detected, the second controller compares the magnetic force data with a magnetic force threshold value, a state event is obtained, and the state event is reported to the first controller of the first electronic equipment.
Specifically, the status events may include an adsorption event and a take-off event. The adsorption event is used for indicating that the real-time state of the second electronic device relative to the first electronic device is an adsorption state, and the taking-off event is used for indicating that the real-time state of the second electronic device relative to the first electronic device is a taking-off state. The adsorption event indicates that the real-time state of the second electronic device is the adsorption state with respect to the first electronic device, which is understood to mean that the real-time state of the second electronic device is switched from the take-off state to the adsorption state with respect to the first electronic device. Correspondingly, the take-off event indicates that the real-time state of the second electronic device relative to the first electronic device is taken off, which can be understood as that the real-time state of the second electronic device relative to the first electronic device is switched from the adsorption state to the take-off state.
And the second controller is internally pre-stored with magnetic force threshold values obtained by statistics when the second electronic equipment is in an adsorption state and a take-off state respectively. The magnetic force threshold value is used for indicating a magnetic force threshold value when the real-time state of the second electronic device relative to the first electronic device changes. The magnetic force sensor in the sensor module can periodically acquire real-time magnetic force data, and the second controller compares the acquired magnetic force data with a magnetic force threshold value of a pre-stored corresponding adsorption state and a corresponding take-off state to obtain a state event.
For example, if the magnetic force data is smaller than the magnetic force threshold value, the second controller determines that the second electronic device is switched from the adsorption state to the take-off state, and determines that the occurred state event is the take-off event. At this time, the second controller reports the take-off event to the first controller.
On the other hand, if the magnetic force data is greater than or equal to the magnetic force threshold value, the second controller determines that the second electronic device is switched from the take-off state to the adsorption state, and determines that the occurred state event is the adsorption event. At this point, the second controller reports the adsorption event to the first controller.
Of course, in other cases, other ways of acquiring the state event acquired by the first electronic device are also possible. For example, the sensor of the sensor module is a pressure sensor arranged in the adsorbable area, and the pressure sensor can also collect pressure data in real time, and the second controller judges whether to report a state event.
In other embodiments, the first electronic device may determine whether to take the electronic device out of the Control Error (CE) packet. The CE packet is a data packet for recording an error control instruction in the first electronic device. The CE packets may be divided into a fast CE packet and a slow CE packet, which have different recording periods, respectively. The second electronic device periodically sends CE packets to the first electronic device while the second electronic device is attached to the first electronic device. If the first electronic device does not receive the CE packet sent by the second electronic device in the appointed period, the first electronic device indicates that a take-off event occurs, and the device state of the second electronic device is switched to the take-off state. Therefore, the first electronic device can also acquire the device state of the second electronic device according to the contracted period and the packet sending state of various CE packets. The scheme of judging the device state of the second electronic device based on the period of the CE packet is relatively time-lag, and may not be able to acquire the device state of the second electronic device in time.
As shown in fig. 1, when the second electronic device is in an adsorption state relative to the first electronic device, the second electronic device is attached to the adsorbable region on the surface of the first electronic device. In this case, the first electronic device may make a PING connection with the second electronic device. PING, PACKET INTERNET Groper, is a program for testing network connectivity, an internet packet explorer. PING is a service command that works at the application layer in the TCP/IP network architecture, mainly to send an internet message control protocol (Internet Control Message Protocol, ICMP) Echo request message to a specific destination host, and to test whether the destination station is reachable and knows its relevant status. The PING referred to in this embodiment may refer to a PING connection for wireless charging. Before the first electronic equipment carries out wireless charging for the second electronic equipment, PING connection can be initiated, the first electronic equipment generally initiates PING connection to the second wireless charging chip of the second electronic equipment through an internal first wireless charging chip for wireless charging, and PING can be successfully performed only when the first electronic equipment and the second electronic equipment are in adsorption contact. In other cases, the PING detection may be implemented by other near field communication detection devices or chips capable of performing PING detection, which is not limited.
In the embodiment of the application, the second electronic device is attached to the adsorbable area on the surface of the first electronic device, that is, when the second electronic device is in a real adsorption state, the first electronic device and the second electronic device can be successfully connected by PING. If the first electronic device judges that the second electronic device is in the adsorption state, but the second electronic device is not in the adsorption state, the first electronic device cannot successfully realize PING connection with the second electronic device, and then PING failure can be caused.
Based on the foregoing analysis, in order to confirm whether the status event uploaded by the sensor module acquired by the first electronic device corresponds to a real device status, the first electronic device may initiate PING detection on the second electronic device, and detect whether the first electronic device and the second electronic device can successfully perform PING connection.
If the second electronic device is in a real adsorption state, the first electronic device and the second electronic device can perform PING successfully. If the second electronic device is in a real take-off state (i.e., the second electronic device is not in an adsorption state), the first electronic device and the second electronic device cannot perform PING successfully. That is, the second electronic device initiates the PING detection to the second electronic device in the real adsorption state, and if not, the PING detection results are PING success.
The first electronic device initiates PING detection to the second electronic device based on triggering of the state event reported by the sensor module, determines the real-time state of the second electronic device according to the PING detection result, and also verifies the accuracy of the state event reported by the sensor module.
In one case, assume that the status event reported by the sensor module is a take-off event. If the PING detection result is that the PING fails, the real-time state of the second electronic equipment is a real take-off state. Otherwise, if the PING detection result is that the PING is successful, the real-time state of the second electronic device is determined to be a real adsorption state, that is, the sensor module reports a false take-off event.
In another case, assume that the status event reported by the sensor module is an adsorption event. If the PING detection result is that PING is successful, determining that the real-time state of the second electronic equipment is a real adsorption state. Otherwise, if the PING detection result is that the PING fails, the real-time state of the second electronic device is a real take-off state. That is, the sensor module reports a false adsorption event.
According to the equipment state acquisition method provided by the embodiment of the application, after the first electronic equipment receives the state event reported by the sensor module, on the premise that PING is successful in a real adsorption state, the reliability degree of the state event is further verified by initiating PING detection to the second electronic equipment, so that the more accurate equipment state is acquired.
As shown in fig. 2, the first electronic device 100 is provided with a first wireless charging chip 110, and the second electronic device 200 is provided with a second wireless charging chip 210 corresponding to the first wireless charging chip, so that the first wireless charging chip can perform a function of initiating PING detection to the second electronic device in addition to a function of wireless charging for the second electronic device. That is, the first electronic device initiates PING detection to the second electronic device may be implemented through a first wireless charging chip in the first electronic device and a second wireless charging chip in the second electronic device.
In the implementation, the first electronic device responds to the state event reported by the sensor module, and the first wireless charging chip initiates PING detection to the second wireless charging chip of the second electronic device to further verify the credibility of the state event.
In some cases, it is considered that if the first wireless charging chip in the first electronic device performs PING detection with the second wireless charging chip, the first wireless charging chip needs to be powered on first, and the PING detection can be performed on the second wireless charging chip after the first wireless charging chip is powered on. Before the first wireless charging chip is powered on, if the first wireless charging chip is in a power-down state, the first wireless charging chip is directly controlled to be powered on, and the influence is hardly caused. If the first wireless charging chip is in a power-on state, particularly in a charging state before power-on, the first wireless charging chip needs to be powered down and then powered up, and in this case, the originally ongoing charging state may be suspended, that is, the charging is stopped, and the power is powered up after the charging is stopped, which may cause the power consumption of the first electronic device to increase.
On the basis of the embodiment, the embodiment of the application also provides another equipment state acquisition method. Compared to the device state acquiring method provided in the embodiment shown in fig. 4, this embodiment adds a process of selecting different processes according to whether the first electronic device is in a charging state, so as to reduce power consumption that may cause the first electronic device to be charged off, and improve accuracy of the acquired device state.
As shown in fig. 6, in the third embodiment of the present application, a flow chart of a device status acquisition method is provided, and the execution body may be a first controller in the first electronic device, and explain the main implementation procedure of the device status acquisition method from the perspective of the first controller. As shown in fig. 7, a fourth flowchart of the device status acquisition method according to the embodiment of the present application explains a main interaction process from the perspective of multiple execution subjects. Specifically, the provided equipment state acquisition method mainly comprises the following steps:
step S601, determining whether the status event reported by the sensor module is a take-off event.
If the status event reported by the sensor module is a take-off event, step S602 is executed to determine whether the first wireless charging chip is in a charging state.
The first controller of the first electronic device receives the state event reported by the sensor module, and the state event is divided into an adsorption event and a take-off event. If the state event reported by the sensor module is an adsorption event, the first wireless charging chip can be directly controlled to initiate PING detection to the second wireless charging chip, and whether the adsorption event reported by the sensor module is a trusted adsorption event is determined according to the PING detection result. For example, if the PING detection result is that PING is successful, the first electronic device may consider the reported adsorption event as a trusted adsorption event. Otherwise, if the PING detection result is that the PING fails, the first electronic device considers that the reported adsorption event is an unreliable adsorption event.
Before the first wireless charging chip is controlled to initiate PING detection to the second wireless charging chip, the first electronic device needs to control the first wireless charging chip to be electrified, and the PING detection can be initiated to the second wireless charging chip after the first wireless charging chip is electrified. In some cases, the control logic preconfigured in the first electronic device controls the first wireless charging chip to power down before the first electronic device controls the first wireless charging chip to power up. That is, the first wireless charging chip needs to be powered down and then powered up before PING detection can be initiated to the second wireless charging chip. If the first electronic device controls the first wireless charging chip to power down, the first wireless charging chip is charging the second wireless charging chip of the second electronic device, and the first electronic device controls the first wireless charging chip to power down, so that the wireless charging process of the first wireless charging chip for the second wireless charging chip is disconnected, and the charging is disconnected. The first electronic device switches the device state on the interface when detecting the charging failure or recharging after charging failure, for example, the charging frame disappears or the charging failure frame prompt is added. If the first electronic device switches the displayed device states frequently, the user perception is poor, and user experience is affected. Of course, in some cases, such as those where the stylus power is high, frequent recharging may also cause increased tablet power consumption.
In general, the adsorption event reported by the sensor module refers to that the second electronic device is switched from the take-off state to the adsorption state. That is, the first electronic device should be in the taken-off state before receiving the adsorption event reported this time. In the taken-off state, the first wireless charging chip of the first electronic device is not in a charging state for wirelessly charging the second electronic device. In this case, the first electronic device controls the first wireless charging chip to be powered down and then powered up, and initiates the PING detection operation to the second electronic device, so that no charging interruption is caused.
On the other hand, the take-off event reported by the sensor module means that the second electronic device is switched from the adsorption state to the take-off state. That is, before the first electronic device receives the take-off event reported by the sensor module, the previous state of the second electronic device should be an adsorption state, and in the adsorption state, the first wireless charging chip of the first electronic device may be in a charging state for wirelessly charging the second electronic device. In this case, the first electronic device controls the first wireless charging chip to be powered down and then powered up, and initiates a PING detection operation to the second electronic device, which may cause charging failure. That is, for some situations requiring the first wireless charging chip to be powered down and then powered up according to the control logic, if the first electronic device determines the credibility of the take-off event reported by the sensor module directly through the PING detection scheme, the second electronic device may be caused to be charged up, so that the power consumption of the first electronic device is increased.
Based on the above, the first electronic device may first determine whether the status event reported by the sensor module is a take-off event, and further determine whether the status event is in a charging state according to the take-off event, and respectively adopt different processing flows according to different situations in the charging state and not in the charging state.
Of course, if the status event reported by the sensor module is an adsorption event, a scheme of acquiring the real-time status of the second electronic device based on PING detection may be directly adopted, so as to save unnecessary computing operations. Of course, the first electronic device may follow the same processing flow for the adsorption event and the take-off event, so as to unify the control logic in the first electronic device, which is not limited. In this embodiment, a specific description is mainly made for the case that the status event reported by the sensor module is a take-off event.
And a flag register is arranged in the first electronic equipment, and a charging state flag bit is arranged in the flag register and used for recording the charging state of the first wireless charging chip. For example, if the charge status flag bit is 0, it indicates that the first wireless charging chip is not in the charge status. If the charge status flag bit is 1, it indicates that the first wireless charging chip is in a charge status. Of course, other recording modes are also possible, and are not limited.
The first electronic device determines that the second electronic device is in an adsorption state, determines that wireless charging is required to be performed on the second electronic device according to the real-time electric quantity of the second electronic device, controls the first wireless charging chip to charge the second wireless charging chip, and simultaneously marks the charging state at the position 1. The first electronic device determines that the second electronic device is in an adsorption state, and does not need to be wirelessly charged according to the real-time electric quantity of the second electronic device, or the first electronic device determines that the second electronic device is in a take-away state, and then the charging state flag position 0 can be set.
It should be noted that, the charging state flag bit herein is determined according to a control instruction that the first electronic device controls the first wireless charging to the second wireless charging, and does not necessarily truly reflect the charging state of the first wireless charging chip. For example, the first electronic device is in a process of controlling the first wireless charging chip to wirelessly charge the second wireless charging chip of the second electronic device, and the charging state is marked with the position 1. In the wireless charging process, if the user takes the second electronic device but the sensor module does not accurately report the take-off event, at this time, the first electronic device cannot control the first wireless charging chip to stop the operation of wireless charging for the second wireless charging chip because the first electronic device does not receive the take-off event, and then the charging state flag position 0 is not set. In the actual take-off state, the first wireless charging chip is not in the charging state, but the charging state flag bit may still be set to 1 and recorded as the charging state. In this case, the first electronic device needs to further determine in conjunction with the output power of the first wireless charging chip.
After the first electronic device receives the state event reported by the sensor module and determines that the state event is a take-off event, whether the first wireless charging chip is in a charging state or not can be judged based on the charging state flag bit. In one case, if the first electronic device determines that the first wireless charging chip is not in a charging state, a PING detection manner may be used to further determine the device state. In another case, if the first electronic device determines that the first wireless charging chip is in the charging state, the device state may be further determined according to the output power of the first wireless charging chip.
If the first wireless charging chip is not in the charging state, step S603 is performed to control the first wireless charging chip to power up.
In step S604, the first wireless charging chip is controlled to initiate PING detection to the second wireless charging chip.
If PING fails, step S605 is executed to determine that the real-time status of the second electronic device is the taken-off status.
If PING is successful, step S606 is executed to determine that the real-time status of the second electronic device is the adsorption status.
And the first electronic equipment firstly controls the first wireless charging chip to power on when determining that the first wireless charging chip is not in a charging state so as to control the first wireless charging chip to initiate PING detection to the second wireless charging chip. If the first wireless charging chip is in the power-down state, the first electronic device can directly control the first wireless charging chip to switch to the power-up state. If the first wireless charging chip is in a power-on state, and the initial control logic of the first electronic device indicates that the first electronic device must be switched from a power-off state to a power-on state to initiate PING detection, the first electronic device controls the first wireless charging chip to be switched to the power-on state and then to the power-on state before initiating PING detection. Of course, if the initial control logic of the first electronic device indicates that the first electronic device may directly initiate PING detection from the power-on state, or may directly initiate PING detection in the power-on state without an operation of switching to the power-down state.
The first electronic device controls the first wireless charging chip to initiate PING detection to the second wireless charging chip of the second electronic device, and determines the real-time state of the second electronic device according to the PING detection result. For example, if PING fails, the real-time state of the second electronic device is determined to be a take-off state, and the sensor module reports a real take-off event. If PING succeeds, determining that the real-time state of the second electronic equipment is an adsorption state, and reporting a false take-off event by the sensor module.
The specific implementation process of the first electronic device controlling the first wireless charging chip to initiate PING detection to the second wireless charging chip and determining the real-time state of the second electronic device according to the PING detection result may refer to the explanation about the corresponding content in the above embodiment, which is not repeated.
If the first wireless charging chip is in a charging state, step S607 is executed to obtain the output power of the first wireless charging chip;
in step S608, it is determined whether the output power of the first wireless charging chip is greater than the power threshold.
If the output power of the first wireless charging chip is not greater than the power threshold, step S605 is executed to determine that the real-time state of the second electronic device is the taken-off state.
If the output power of the first wireless charging chip is greater than the power threshold, step S606 is executed to determine that the real-time state of the second electronic device is the adsorption state.
In the service flow of wireless charging for the second electronic device, the first wireless charging chip is used for outputting power to the second electronic device, and the second wireless charging chip of the second electronic device is used for receiving the power output by the first wireless charging chip and is the most dominant or unique power receiving end. And combining the link power loss, and determining that the output power of the first wireless charging chip is as follows when the first wireless charging chip performs wireless charging for the second wireless charging chip according to the energy conservation principle: . Wherein Ptx represents the output power of the first wireless charging chip, prx represents the charging power of the second wireless charging chip, and Ploss represents the charging link loss power.
When the first wireless charging chip does not perform wireless charging for the second wireless charging chip, or the first wireless charging chip is in an idle state which is not in a charging state, the idle power in the idle state can be basically equal to the charging link loss power. The output power of the first wireless charging chip can be found as: The first electronic device may obtain no-load power when the first wireless charging chip is not in a charging state, as charging link loss power.
Based on the analysis, the first electronic device can use the idle power as a power threshold, and compare the output power of the first wireless charging chip with the power threshold to determine the charging power of the second wireless charging chip, and the charging power of the second wireless charging chip can accurately reflect the real charging state of the second electronic device.
The first wireless charging chip of the first electronic device can periodically collect and store electrical parameters, the collected electrical parameters generally comprise output current and output voltage, and the first electronic device can directly obtain the collected and stored electrical parameters without adding a process for collecting the electrical parameters. The first electronic device may obtain an output current and an output voltage of the first wireless charging chip, and through a power calculation formula: output power P (W) =output current I (I) ×output U voltage (V) to calculate the output power of the first wireless charging chip. Of course, considering that the output current and the output voltage are dynamically changed values, a single-number value acquired at each acquisition time may be used as a value involved in calculation, or an average value of a plurality of acquired values may be used as a value involved in calculation. Similarly, the second wireless charging chip of the first electronic device also periodically collects and stores the electrical parameters, so that the first electronic device can also obtain the charging current and the charging voltage collected and stored by the second wireless charging chip, and calculate the charging power of the second wireless charging chip.
Based on the analysis, the idle power of the first wireless charging chip in the first electronic device can be obtained through multiple experiments before the first electronic device leaves the factory. The specific process may include:
1. The data shown in table 1 were obtained by a plurality of experiments, respectively, and the collected data included: average voltage and average current of the first wireless charging chip, and average voltage and average current of the second wireless charging chip. Multiple experiments include a charged state and an uncharged state to record electrical parameters in different states, respectively.
TABLE 1
2. And calculating the output power of the first wireless charging chip according to the average voltage and the average current of the first wireless charging chip. And calculating the charging power of the second wireless charging chip according to the average voltage and the average current of the second wireless charging chip.
3. The analysis may obtain, for the experimental data (e.g., experimental data corresponding to the number 11 in table 1) obtained in the uncharged state, that the charging power of the second wireless charging chip is 0, and then the output power of the first wireless charging chip may be directly used as the no-load power. The difference power between the first wireless charging chip and the idle power is equal to 0. For each experimental data (such as experimental data corresponding to serial numbers 1-10 in table 1) obtained in the charging state, the difference between the output power and the idle power of the first wireless charging chip is greater than 0.
Therefore, the no-load power acquired in the uncharged state may be stored in the first electronic device in advance as the difference threshold. In the normal use process of the first electronic equipment after leaving a factory, the first electronic equipment can acquire the output voltage and the output current of the first wireless charging chip, and output power is obtained through calculation. And comparing the output power of the first wireless charging chip with a power threshold. If the output power of the first wireless charging chip is greater than the power threshold, the first wireless charging chip is in a charging state, and the state of the second electronic device is an adsorption state. Otherwise, if the output power of the first wireless charging chip is not greater than the power threshold, for example, equal to the power threshold, it indicates that the first wireless charging chip is not in a charging state, and at this time, the adsorption state of the second electronic device is a take-off state. That is, in the charged state, the current at the time of charge cut-off is not 0, prx is greater than 0, and as long as the second electronic device is in the charged state, ptx is greater than Ploss throughout the charging process, the determined take-off state in this case is the true take-off state.
In addition, when the experiment is carried out, an external oscilloscope can be used for collecting the minimum voltage value of the output voltage of the first wireless charging chip, and the output voltage of the first wireless charging chip can be used for screening out abnormal experimental data. For example, if the minimum voltage value acquired by the oscilloscope during an experiment is far smaller than the average value of the output voltage, the experimental data acquired by the experiment can be considered as abnormal experimental data, and the abnormal experimental data can be deleted.
Of course, when the first electronic device obtains the output voltage and the output current of the first wireless charging chip, the first electronic device may obtain the output voltage and the output current of the continuous period to calculate the corresponding average voltage and average current. For example, the continuous period may be between 5 ms and 30 ms, so that the waiting time for acquiring the device state is not too long, and more accurate electrical parameters can be acquired as far as possible, so as to reduce the influence of possible signal fluctuation on the accuracy of the acquired device state.
On the basis of the above embodiment, as shown in fig. 6, after determining that the real-time state of the second electronic device is the adsorption state, the first electronic device may further execute step S609 to control the first wireless charging chip to charge the second wireless charging chip in order to ensure the available state of the second electronic device. Therefore, the electric quantity of the second electronic equipment can be ensured to be in a higher electric quantity state all the time, and the use of a user is facilitated.
The equipment state detection method provided by the embodiment of the application can acquire a more real charging state according to the output power of the first wireless charging chip. Based on the above, the actual charging time length of the first electronic device for the second electronic device can also be obtained by monitoring the output power and the power threshold value of the first wireless charging chip. And comparing the actual charging time with the preset maximum charging time of the second electronic equipment to avoid possible battery damage caused by the maximum safe charging time exceeding the effective charging time.
Fig. 8 is a block diagram of a software and hardware structure of a first electronic device according to an embodiment of the present application. The software system of the first electronic device may adopt a layered architecture, where the layered architecture divides the software into a plurality of layers, each layer has a clear role and division, and the layers communicate with each other through software interfaces. In some embodiments, the software is divided into three layers, from top to bottom, an application layer (APPlication), a FrameWorK layer (FrameWorK, FWK), and a hardware abstraction layer (Hardware Abstraction Layer, HAL), respectively.
The application layer (i.e., application layer) may include a series of application packages, such as a setup application, a camera application, a stylus application, and the like. In this embodiment, software for implementing the device state acquiring method may be a setting application, or may be a separate stylus application, and is not limited thereto. This embodiment is exemplified by setting an application.
The application framework layer (i.e., framework layer) provides an application programming interface (Application Programming Interface, API) and programming framework for the application of the application layer. The application framework layer includes a number of predefined functions. 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 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.
When the method is specifically used, a window manager, a content provider, a view system, a notification manager and the like cooperate to realize various services, for example, interface services required by the embodiment of the application, and display of equipment states and related marks, such as marks of adsorption states, taking-off states and charging states, on an interface are realized, and the method is not limited.
The hardware abstraction layer can encapsulate the lower hardware and provide a calling interface to the upper framework layer, and shield the implementation details of the lower hardware. As shown in fig. 8, the hardware layer may include a magnetic force sensor, a flag register, a first wireless charging chip, and the like. Correspondingly, the hardware abstraction layer comprises a sensor control module, an accessory control module and a first wireless charging chip control module. The sensor control module can acquire magnetic force data acquired by the magnetic force sensor, generate corresponding state events after comparing the magnetic force data with a pre-stored magnetic force threshold value, report the state events and execute the operation of the second controller. The accessory control module is a main central control module and is used for executing the operation which can be executed by the first controller to acquire the equipment state. The first wireless charging chip control module is connected with the first wireless charging chip, acquires the electrical parameters of the first wireless charging chip, and issues related control instructions.
As shown in fig. 8, the main process of the first electronic device executing the device status acquisition method provided in the foregoing embodiment shown in fig. 6 may include:
The magnetic force sensor periodically collects magnetic force data and uploads the magnetic force data to the sensor control module. The sensor control module generates a state event according to the magnetic force data and a pre-stored magnetic force threshold value, and reports the state event to the accessory control module.
The accessory control module determines whether the first wireless charging chip is in a charging state or not according to the state event. The accessory control module acquires a charging state flag bit of the flag register and judges whether the first wireless charging chip is in a charging state according to the charging state flag bit.
And if the accessory control module determines that the first wireless charging chip is in the charging state, the accessory control module instructs the first wireless charging chip control module to control the first wireless charging chip to initiate PING detection to the second wireless charging chip of the second electronic device. The first wireless charging chip initiates PING detection to a second wireless charging chip of the second electronic device, and the PING result is fed back to the accessory control module through the first wireless charging chip control module. The accessory control module determines whether the equipment state is a taken-off state or an adsorption state according to the PING result.
And if the accessory control module determines that the first wireless charging chip is not in the charging state, the accessory control module instructs the first wireless charging chip control module to feed back the output power of the first wireless charging chip and acquire the equipment state according to the output power of the first wireless charging chip.
And then, the accessory control module sends the equipment state to the interface service of the framework layer, and indicates the second electronic equipment service to display the relevant mark of the equipment state on the interface of the first electronic equipment. The device state can be displayed on interfaces such as a desktop, a notification bar, a system control center and the like of the first electronic device.
According to the device state acquisition method provided by the embodiment of the application, on the premise that a new hardware structure is not needed, based on the original existing data of the first electronic device in the charging service flow, the state event reported by the sensor module is subjected to secondary judgment, on the premise that normal service is not influenced, the accuracy of the taking-off event is ensured, and on the premise that service which depends on the taking-off event strongly is ensured.
In addition, the embodiment of the application also provides electronic equipment. The electronic device may be the first electronic device involved in the device state acquiring method provided in the above embodiment. The surface of the first electronic device is provided with a adsorbable region that can be used to adsorb the second electronic device.
The provided electronic device includes a memory and a processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory, so that the electronic device executes the device state acquisition method provided in the above embodiment. In addition to this part of the main components, the electronic apparatus includes components for realizing basic functions, which will be described in detail below with reference to fig. 9.
Fig. 9 is a schematic structural diagram of an electronic device 900 according to an embodiment of the present application. The electronic device 900 may include, among other things, a processor 910, an external memory interface 920, a memory 921, a universal serial bus (Universal Serial Bus, USB) interface 930, a charge management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a radio frequency module 950, a communication module 960, an audio module 970, a speaker, a receiver, a microphone, an earphone interface, a sensor module 980, keys 990, a motor 991, an indicator 992, a camera 993, a display 994, and a SIM card module 995. The sensor modules 980 may include, among other things, pressure sensors 980A, gyroscope sensors 980B, barometric pressure sensors 980C, magnetic force sensors 980D, acceleration sensors 980E, distance sensors 980F, proximity sensors 980G, fingerprint sensors 980H, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, and the like.
The illustrated structure of the embodiment of the present invention does not constitute a limitation of the electronic device 900. More or fewer components than shown may be included, 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.
Processor 910 may include one or more processing units. For example, the Processor 910 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 memory, 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), among others. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a decision maker that directs the various components of the electronic device 900 to coordinate their operations in accordance with instructions. Is the neural and command center of the electronic device 900. The controller generates an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 910 for storing instructions and data. In some embodiments, memory in the processor 910 is a cache memory that holds instructions or data that the processor 910 has just used or recycled. If the processor 910 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 910 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 910 may include an interface. 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 SIM interface, and/or a USB interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SERIAL DATA LINE, SDL) and a serial clock line (Derail Clock Line, SCL). In some embodiments, the processor 910 may include multiple sets of I2C buses. The processor 910 may be coupled to a touch sensor, charger, flash, camera 993, etc., respectively, through different I2C bus interfaces. For example: the processor 910 may couple the touch sensor through an I2C interface, causing the processor 910 to communicate with the touch sensor through an I2C bus interface, implementing the touch function of the electronic device 900.
The I2S interface may be used for audio communication. In some embodiments, the processor 910 may include multiple sets of I2S buses. The processor 910 may be coupled to the audio module 970 by an I2S bus to enable communication between the processor 910 and the audio module 970. In some embodiments, the audio module 970 may communicate audio signals to the communication module 960 through an I2S interface to implement a function of answering a call through a bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 970 and the communication module 960 may be coupled through a PCM bus interface. In some embodiments, the audio module 970 may also communicate audio signals to the communication module 960 through a PCM interface to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication, the sampling rates of the two interfaces being different.
The UART interface is a universal serial data bus for asynchronous communications. The bus is a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 910 with the communication module 960. For example: the processor 910 communicates with the bluetooth module through a UART interface to implement bluetooth functions. In some embodiments, the audio module 970 may communicate audio signals to the communication module 960 through a UART interface to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 910 with peripheral devices such as the display 994, the camera 993, and the like. The MIPI interface includes a camera serial interface (CAMERA SERIAL INTERFACE, CSI), a display serial interface (DISPLAY SERIAL INTERFACE, DSI), and the like. In some embodiments, processor 910 and camera 993 communicate through a CSI interface, implementing the photographing functions of electronic device 900. Processor 910 and display 994 communicate via a DSI interface to implement the display functions of electronic device 900.
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 910 with the camera 993, display 994, communication module 960, audio module 970, sensor module 980, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 930 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 930 may be used to connect a charger to charge the electronic device 900, or may be used to transfer data between the electronic device 900 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. But also for connecting other electronic devices, such as AR devices, etc.
The interface connection relationship between the modules illustrated in the embodiment of the present invention is only schematically illustrated, and does not limit the structure of the electronic device 900. The electronic device 900 may employ different interfacing schemes, or a combination of interfacing schemes in embodiments of the invention.
The charge management module 940 may be a rechargeable battery or a disposable battery, and the charge management module may receive a charge input through a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 940 may receive a charging input of the wired charger through the USB interface 930. In some wireless charging embodiments, the charge management module 940 may receive wireless charging input through a wireless charging coil of the electronic device 900. The charging management module 940 may also provide power to the electronic device 900 through the power management module 941 while charging the battery 942.
The power management module 941 is used to connect the battery 942, the charge management module 940 and the processor 910. The power management module 941 receives input from the battery 942 and/or the charge management module 940 and provides power to the processor 910, the memory 921, the external memory interface 920, the display 994, the camera 993, the communication module 960, and so forth. The power management module 941 may also be configured to monitor charge management module capacity, charge management module cycle number, charge management module health (leakage, impedance), etc. In some embodiments, a power management module 941 may also be provided in the processor 910. In some embodiments, the power management module 941 and the battery 942 may also be provided in the same device.
The wireless communication function of the electronic device 900 may be implemented by the antenna 1, the antenna 2, the radio frequency module 950, the communication module 960, the modem, the 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 900 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 cellular network antennas may be multiplexed into wireless local area network diversity antennas. In some embodiments, the antenna may be used in conjunction with a tuning switch.
The radio frequency module 950 may provide a communication processing module including a solution for 2G/3G/4G/5G wireless communication, etc., applied to the electronic device 900. The radio frequency module 950 may include at least one filter, switch, power amplifier, low noise amplifier (Low Noise Amplifier, LNA), and the like. The rf module 950 receives electromagnetic waves from the antenna 1, filters, amplifies, and transmits the received electromagnetic waves to the modem for demodulation. The rf module 950 may amplify the signal modulated by the modem and convert the signal into electromagnetic waves through the antenna 1to radiate the electromagnetic waves. In some embodiments, at least some of the functional modules of the radio frequency module 950 may be disposed in the processor 910. In some embodiments, at least some of the functional modules of the radio frequency module 950 may be provided in the same device as at least some of the modules of the processor 910.
The modem 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 speakers, receivers, etc.), or displays images or video through a display 994. In some embodiments, the modem may be a stand-alone device. In some embodiments, the modem may be provided in the same device as the radio frequency module 950 or other functional modules, independent of the processor 910.
The Communication module 960 may provide a Communication processing module including wireless Communication solutions such as 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 Fodulation, FM), near field Communication technology (NEAR FIELD Communication, NFC), inFrared technology (IR), etc., applied to the electronic device 900. The communication module 960 may be one or more devices integrating at least one communication processing module. The communication module 960 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals and filters them, and transmits the processed signals to the processor 910. The communication module 960 may also receive a signal to be transmitted from the processor 910, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and radio frequency module 950 of electronic device 900 are coupled, and antenna 2 and communication module 960 are coupled, such that electronic device 900 may communicate with networks and other devices via 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 (GPRS), code division multiple Access (Code Division Multiple Access, CDMA), wideband code division multiple Access (Wideband Code Division Multiple Access, WCDMA), time 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 positioning system (SATELLITE BASED AUGMENTATION SYSTEMS, SBAS), 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 900 implements display functionality via a GPU, a display 994, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 910 may include one or more GPUs that execute program instructions to generate or change display information.
The display 994 is used to display images, videos, and the like. The display 994 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-Matri Organic LIGHT EMITTING Diode (AMOLED), a Flexible Light-Emitting Diode (FLED), miniled, microLED, micro-OLED, quantum dot LIGHT EMITTING Diodes (QLED), or the like. In some embodiments, the electronic device 900 may include 1 or N displays 994, N being a positive integer greater than 1.
The electronic device 900 may implement shooting functions through an ISP, a camera 993, a video codec, a GPU, a display screen, an application processor, and the like.
The ISP is used to process the data fed back by the camera 993. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and chromaticity of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 993.
The camera 993 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (Charge Coupled Device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 900 may include 1 or N cameras 993, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 900 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 900 may support one or more video codecs. Thus, the electronic device 900 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (Moving Picture Experts Group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural Network (Neural-Network, NN) computing processor, and can rapidly process input information by referencing a biological neural Network structure, such as referencing a transmission mode among human brain neurons, and can continuously learn. Applications such as intelligent cognition of the electronic device 900 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 920 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 900. The external memory card communicates with the processor 910 through an external memory interface 920 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 921 may be used to store computer-executable program code that includes instructions. The processor 910 executes various functional applications of the electronic device 900 and data processing by executing instructions stored in the internal memory 921. The memory 921 may include a stored program area and a stored 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 900 (e.g., audio data, phonebook, etc.), and so forth. In addition, memory 921 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, other volatile solid-state memory devices, universal flash memory (Universal Flash Storage, UFS), and the like.
The electronic device 900 may implement audio functions through an audio module 970, speakers, a receiver, microphone, headphone interface, application processor, and so forth. Such as music playing, recording, etc.
The audio module 970 is used to convert digital audio information to an analog audio signal output and also to convert an analog audio input to a digital audio signal. The audio module 970 may also be used to encode and decode audio signals. In some embodiments, the audio module 970 may be disposed in the processor 910 or some functional modules of the audio module 970 may be disposed in the processor 910.
Speakers, also known as "horns," are used to convert audio electrical signals into sound signals. The electronic device 900 may listen to music through a speaker or to hands-free conversations.
A receiver, also called an "earpiece", is used to convert the audio electrical signal into a sound signal. When the electronic device 900 is answering a telephone call or voice message, the voice can be received by placing the receiver in close proximity to the human ear.
Microphones, also known as "microphones" and "microphones", are used to convert sound signals into electrical audio signals. When making a call or transmitting voice information, a user can sound near the microphone through the mouth, inputting a sound signal to the microphone. The electronic device 900 may be provided with at least one microphone. In some embodiments, the electronic device 900 may be provided with two microphones, and may implement a noise reduction function in addition to collecting sound signals. In some embodiments, the electronic device 900 may also be provided with three, four, or more microphones to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface is used for connecting a wired earphone. The earphone interface may be a USB interface or a 3.5mm open mobile terminal platform (Open Mobile Terminal Platform, OMTP) standard interface, a american cellular telecommunications industry association (Cellular Telecommunications Industry Association of the USA, CTIA) standard interface.
The keys 990 include a power-on key, a volume key, etc. The keys 990 may be mechanical keys. Or may be a touch key. The electronic device 900 receives key 990 inputs, generating key signal inputs related to user settings and function controls of the electronic device 900.
The motor 991 may generate a vibratory alert. The motor 991 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. Touch operations applied to different areas of the display 994 may also correspond to different vibration feedback effects. 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 992 may be an indicator light, which may be used to indicate a state of charge, a change in charge, an indication message, a missed call, a notification, or the like.
The SIM card module 995 is used to implement the communication functions of a SIM card, and the SIM card module 995 may include a SIM card interface, a SIM card circuit, and associated auxiliary devices. The SIM card may be inserted into or removed from the SIM card interface to enable contact and separation with the electronic device 900. The electronic device 900 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. SIM card module 995 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface can be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface may also be compatible with different types of SIM cards. The SIM card interface may also be compatible with external memory cards. The electronic device 900 interacts with the network through the SIM card to implement functions such as talking and data communication. In some embodiments, the electronic device 900 employs esims, i.e., embedded SIM cards. The eSIM card can be embedded in the electronic device 900 and cannot be separated from the electronic device 900.
The device state acquisition methods in the foregoing embodiments may be implemented in the electronic device 900 having the above-described hardware structure.
On the basis of the above embodiment, the embodiment of the present application further provides an apparatus state acquiring device, where the apparatus state acquiring device includes a processor, and the processor is configured to execute the apparatus state acquiring method provided in the above embodiment.
The embodiment of the application also provides a computer readable storage medium, in which a computer program is stored, which when run on a computer, causes the computer to execute the device state acquisition method provided in the above embodiment.
The embodiments of the present application also provide a computer program product containing instructions which, when run on a computer, enable the computer to perform the device state acquisition method as provided in the above embodiments.
The specific implementation of the electronic device, the device state acquiring apparatus, the computer readable storage medium, and the computer program product containing the instructions and the technical effects thereof provided in the embodiments of the present application can refer to the specific implementation process of the device state acquiring method and the technical effects thereof provided in the foregoing embodiments, and are not repeated herein.
In some embodiments, it will be clearly understood by those skilled in the art from the foregoing description of the embodiments, for convenience and brevity of description, only the division of the above functional modules is illustrated, and in practical application, the above functional allocation may be implemented by different functional modules, that is, the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The functional units 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 technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiment of the present application should be covered by the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. The equipment state acquisition method is characterized by being applied to first electronic equipment, wherein an adsorbable area is arranged on the surface of the first electronic equipment and used for adsorbing second electronic equipment; a sensor is arranged at a position corresponding to the adsorbable region in the first electronic device; the first electronic device comprises a first wireless charging chip, the second electronic device comprises a second wireless charging chip, and the first wireless charging chip is used for wirelessly charging the second wireless charging chip;
determining a first state of the second electronic device based on the data acquired by the sensor; the first state is a take-off state or an adsorption state, the adsorption state refers to that the second electronic equipment is adsorbed on the adsorbable region, and the take-off state refers to that the second electronic equipment is separated from the adsorbable region;
The first state is an adsorption state, and PING detection for wireless charging is initiated to the second electronic equipment; if PING fails, determining that the real-time state of the second electronic equipment is the take-off state; if PING succeeds, determining that the real-time state of the second electronic equipment is the adsorption state;
The first state is the take-off state, and whether a first wireless charging chip of the first electronic device is in a charging state is judged; if the first wireless charging chip is not in the charging state, powering on the first wireless charging chip; controlling the first wireless charging chip to initiate the PING detection to the second wireless charging chip;
If a first wireless charging chip of the first electronic equipment is in a charging state, acquiring output power of the first wireless charging chip; if the output power of the first wireless charging chip of the first electronic device is smaller than or equal to a predefined power threshold, determining that the real-time state of the second electronic device is a take-off state; if the output power of the first wireless charging chip is larger than the power threshold, determining that the real-time state of the second electronic equipment is an adsorption state; the power threshold is an idle power when the first wireless charging chip is not in the charging state.
2. The device state acquisition method according to claim 1, wherein the first electronic device is a tablet computer or a notebook computer, the second electronic device is an accessory of the first electronic device, and the accessory includes a stylus; or alternatively
The first electronic device is a wireless charger, and the second electronic device comprises at least one of a tablet computer, a notebook computer, a mobile phone and a wearable device.
3. The device status acquisition method according to claim 1 or 2, characterized in that the step of initiating PING detection for wireless charging to the second electronic device comprises:
And controlling the first wireless charging chip to initiate the PING detection to the second wireless charging chip.
4. A device state acquisition method according to claim 3, characterized in that the method further comprises:
And the real-time state of the second electronic equipment is the adsorption state, and the first wireless charging chip is controlled to charge the second wireless charging chip.
5. The device state acquisition method of any one of claims 1,2, or 4, wherein the first electronic device comprises a first controller and a sensor module, the sensor module comprising a second controller and a magnetic force sensor;
the step of determining a first state of the second electronic device based on the data collected by the sensor, wherein the first state is an adsorption state, and initiating PING detection for wireless charging to the second electronic device comprises the following steps:
the second controller reports a state event corresponding to the first state based on magnetic force data acquired by the magnetic force sensor;
and the first controller receives the state event reported by the second controller and initiates the PING detection to the second electronic equipment.
6. The apparatus state acquisition method according to claim 5, wherein the step of reporting a state event corresponding to the first state by the second controller based on magnetic force data acquired by the magnetic force sensor includes:
the second controller receives magnetic force data acquired by the magnetic force sensor in real time;
The second controller determines the state event corresponding to the first state according to the magnetic force data and a predefined magnetic force threshold value; and if the magnetic force data is larger than or equal to the magnetic force threshold value, the state event corresponds to the adsorption state, and if the magnetic force data is smaller than the magnetic force threshold value, the state event corresponds to the taking-off state.
7. An electronic device comprising a memory and a processor, the memory coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to cause an electronic device to perform the device state acquisition method of any one of claims 1 to 6.
8. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to perform the device state acquisition method according to any one of claims 1 to 6.
CN202311647679.9A 2023-12-04 2023-12-04 Device status acquisition method, electronic device and computer readable storage medium Active CN117349125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311647679.9A CN117349125B (en) 2023-12-04 2023-12-04 Device status acquisition method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311647679.9A CN117349125B (en) 2023-12-04 2023-12-04 Device status acquisition method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN117349125A CN117349125A (en) 2024-01-05
CN117349125B true CN117349125B (en) 2024-07-12

Family

ID=89357896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311647679.9A Active CN117349125B (en) 2023-12-04 2023-12-04 Device status acquisition method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117349125B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785000A (en) * 2022-03-18 2022-07-22 荣耀终端有限公司 Charging method and device for electronic stylus pen
CN115543700A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Stylus detection method, device and terminal equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9714003B2 (en) * 2015-03-17 2017-07-25 Intel Corporation Restraint apparatus and method with alert
US10666084B2 (en) * 2015-07-10 2020-05-26 Apple Inc. Detection and notification of an unpowered releasable charging device
US11258307B2 (en) * 2019-08-14 2022-02-22 Apple Inc. Wireless power system with foreign object detection
CN111416449B (en) * 2020-03-30 2022-02-01 维沃移动通信有限公司 Wireless charging equipment
CN114977350A (en) * 2021-02-27 2022-08-30 华为技术有限公司 A charging method, wireless charging device and related devices
CN115800557A (en) * 2021-09-09 2023-03-14 华为技术有限公司 Wireless charging method, electronic device, storage medium, and program
CN119620875A (en) * 2022-04-06 2025-03-14 荣耀终端股份有限公司 Accessory detection system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543700A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Stylus detection method, device and terminal equipment
CN114785000A (en) * 2022-03-18 2022-07-22 荣耀终端有限公司 Charging method and device for electronic stylus pen

Also Published As

Publication number Publication date
CN117349125A (en) 2024-01-05

Similar Documents

Publication Publication Date Title
US20240389174A1 (en) Bluetooth reconnection method and related apparatus
WO2020244623A1 (en) Air-mouse mode implementation method and related device
CN114554012B (en) Incoming call answering method, electronic equipment and storage medium
EP3952264B1 (en) Information processing method and device
CN113490291B (en) Data download method, device and terminal device
CN111182140A (en) Motor control method and device, computer readable medium and terminal device
CN114915747B (en) Video call method, electronic device and readable storage medium
EP4102352A1 (en) Identity verification method and apparatus, and electronic devices
CN112099741A (en) Display screen position identification method, electronic device and computer readable storage medium
CN114422340A (en) Log reporting method, electronic device and storage medium
WO2020051852A1 (en) Method for recording and displaying information in communication process, and terminals
CN111935705A (en) Data service management method and device, computer readable medium and terminal equipment
CN113678481B (en) Wireless audio system, audio communication method and device
CN113890929B (en) Method and device for switching audio output channel and electronic equipment
CN115119336B (en) Earphone connection system, earphone connection method, earphone, electronic device and readable storage medium
CN117349125B (en) Device status acquisition method, electronic device and computer readable storage medium
CN114338913A (en) Fault diagnosis method and electronic device
CN114091006B (en) Device connection method and electronic device
CN118870639A (en) Motherboard architecture and electronics
CN118589626A (en) A charging control method and related device
CN114329595A (en) Application detection method, device, storage medium and program product
CN112996066A (en) Network residing method and related equipment
CN116708317B (en) Data packet MTU adjustment method and device and terminal equipment
CN115134402B (en) Equipment connection method and electronic equipment
WO2025180209A1 (en) Network diagnosis method and electronic 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
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address