State detection method, electronic equipment and computer readable storage medium

By reusing the electromagnetic wave absorption ratio component on the electronic device and using the electromagnetic wave absorption ratio antenna and sensor to determine the opening and closing status of the electronic device, the problem of high detection cost in the existing technology is solved, and low-cost and high-accuracy status detection is achieved. .

CN118625006APending Publication Date: 2024-09-10GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310232398.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing technology requires adding additional components when detecting the opening and closing status of foldable electronic devices, resulting in high costs.

Method used

By reusing electromagnetic wave absorption ratio components that are generally provided on electronic equipment, using electromagnetic wave absorption ratio antennas and sensors to determine the opening and closing status of electronic equipment based on charge and capacitance values, the need for additional detection components is avoided.

Benefits of technology

The detection cost is reduced, the accuracy of detecting the opening and closing status is improved, and the cost increase caused by setting up additional components is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118625006A
    Figure CN118625006A
Patent Text Reader

Abstract

The invention discloses a state detection method, electronic equipment and a computer readable storage medium, the electronic equipment comprises a first part provided with a first screen and a second part provided with a second screen, the first part is rotatably connected with the second part, the first part comprises a first metal component, and the second part comprises a second metal component. The electronic equipment further comprises an electromagnetic wave absorption ratio assembly, and the electromagnetic wave absorption ratio assembly comprises an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor. The method comprises the following steps: based on the distance between an electromagnetic wave absorption ratio antenna and a target metal assembly, obtaining the charge quantity collected by the electromagnetic wave absorption ratio antenna; converting the electric charge quantity into a capacitance value based on an electromagnetic wave absorption ratio sensor; and judging the on-off state of the electronic equipment based on the capacitance value. By multiplexing the electromagnetic wave absorption ratio component, the detection of the opening and closing state of the electronic equipment is realized, and the detection cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of detection technology, and more specifically, to a state detection method, an electronic device, and a computer-readable storage medium. Background Art

[0002] At present, with the rapid development of electronic information technology, the opening and closing states of foldable electronic devices can be detected. However, the existing methods generally require additional components to detect the opening and closing states of electronic devices, which is costly. Summary of the invention

[0003] The present application proposes a state detection method, an electronic device and a computer-readable storage medium to improve the above-mentioned defects.

[0004] In a first aspect, an embodiment of the present application provides a state detection method, wherein the electronic device includes a first part having a first screen and a second part having a second screen, the first part being rotatably connected to the second part so that the first screen and the second screen can approach and move away from each other, the first part includes a first metal component, the second part includes a second metal component, the electronic device also includes an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, and at least one of the first metal component and the second metal component can approach and move away from each other with the electromagnetic wave absorption ratio antenna; the method includes: based on the distance between the electromagnetic wave absorption ratio antenna and a target metal component, obtaining the amount of charge collected by the electromagnetic wave absorption ratio antenna, the target metal component including at least one of the first metal component and the second metal component; converting the amount of charge into a capacitance value based on the electromagnetic wave absorption ratio sensor; and judging the opening and closing state of the electronic device based on the capacitance value.

[0005] In a second aspect, an embodiment of the present application further provides an electronic device, comprising a first part having a first screen and a second part having a second screen, wherein the first part is rotatably connected to the second part so that the first screen and the second screen can approach and move away from each other, the first part comprises a first metal component, and the second part comprises a second metal component; the electronic device also comprises an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component comprises an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, and at least one of the first metal component and the second metal component can approach and move away from each other with the electromagnetic wave absorption ratio antenna; the electronic device also comprises one or more processors, the processors are coupled to the electromagnetic wave absorption ratio antenna, and are used to execute the method described in the first aspect.

[0006] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method described in the first aspect.

[0007] The state detection method, electronic device and computer-readable storage medium provided by the present application, the electronic device includes a first part provided with a first screen and a second part provided with a second screen, the first part is rotatably connected with the second part so that the first screen and the second screen can be close to and away from each other, the first part includes a first metal component, the second part includes a second metal component, the electronic device also includes an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, at least one of the first metal component and the second metal component can be close to and away from each other with the electromagnetic wave absorption ratio antenna; the method includes: based on the distance between the electromagnetic wave absorption ratio antenna and the target metal component, obtaining the amount of charge collected by the electromagnetic wave absorption ratio antenna; based on the electromagnetic wave absorption ratio sensor, converting the amount of charge into a capacitance value; based on the capacitance value, judging the opening and closing state of the electronic device. If the control of the opening and closing state of the electronic device is achieved by setting other components, the detection cost will increase. In the embodiment provided in the present application, the electromagnetic wave absorption ratio component generally provided on the electronic device can be reused to detect the opening and closing status of the electronic device, thereby eliminating the need to provide other elements for detection, thereby reducing the detection cost.

[0008] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;

[0011] Figure 2 A schematic diagram showing the opening and closing states of an electronic device provided in an embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram showing the opening and closing states of an electronic device provided by another embodiment of the present application is shown;

[0013] Figure 4 A method flow chart of a state detection method provided by an embodiment of the present application is shown;

[0014] Figure 5 A method flow chart of a state detection method provided by another embodiment of the present application is shown;

[0015] Figure 6 A method flow chart of a state detection method provided by another embodiment of the present application is shown;

[0016] Figure 7 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;

[0017] Figure 8 A structural block diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0019] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0020] At present, with the rapid development of electronic information technology, the opening and closing states of foldable electronic devices can be detected. However, the existing methods generally require the addition of additional components to detect the opening and closing states of electronic devices, which is costly. How to reduce the cost required to detect the opening and closing states of foldable electronic devices is an urgent problem to be solved.

[0021] At present, electronic devices can be provided with Hall sensors and magnetic units, such as magnets. When the electronic device is in different open and closed states, the relative position relationship between the Hall sensor and the magnetic unit changes, so that the magnetic field value collected by the Hall sensor changes, thereby determining the open and closed state of the electronic device at this time.

[0022] The electronic device may also be provided with a mechanical switch and a detection unit, one end of the mechanical switch is electrically connected to the detection unit, and the other end is electrically connected to the ground wire. The detection unit is used to determine the opening and closing state of the electronic device according to the state of the mechanical switch.

[0023] Some electronic devices may be provided with a variable resistor. The resistance value of the variable resistor may change based on the different opening and closing states of the electronic device. Thus, the resistance value of the variable resistor may be detected to detect the opening and closing state of the electronic device.

[0024] However, the inventors have found in their research that the above-mentioned detection methods generally require additional detection components to be set in the electronic device, such as Hall sensors, mechanical switches or variable resistors, etc. The additional components will increase the cost required for detection.

[0025] Therefore, the present application provides a state detection method to solve or partially solve the above problems.

[0026] See also Figure 1 , Figure 1 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown. The electronic device 100 includes a first part 110 and a second part 120, wherein the first part 110 is rotatably connected to the second part 120. The first part 110 and the second part 120 can be relatively folded to a closed state, and can also be relatively unfolded to an open state. Among them, the first part 110 is provided with a first screen 111, and the second part 120 is provided with a second screen 121, so that the first screen 111 of the first part 110 and the second screen 121 of the second part 120 can be close to and away from each other. Figure 1 The opened and closed state of the electronic device 100 shown in FIG. 1 is the unfolded state.

[0027] The first part 110 may further include a first metal component 112, and the second part 120 may further include a second metal component 122. In some embodiments, the first metal component 112 may include at least one of a first metal middle frame 1122 and a first antenna 1121. The second metal component 122 may include at least one of a second metal middle frame 1222 and a second antenna 1221.

[0028] Further, the electronic device 100 may also include an electromagnetic wave absorption ratio (Specific Absorption Rate, SAR) component 160, wherein the electromagnetic wave absorption ratio component 160 includes an electromagnetic wave absorption ratio antenna 161 and an electromagnetic wave absorption ratio sensor 162, and the electromagnetic wave absorption ratio antenna 161 is connected to the electromagnetic wave absorption ratio sensor 162. Among them, the electromagnetic wave absorption ratio antenna 161 can be used to sense the amount of charge in the space, and the electromagnetic wave absorption ratio sensor 162 converts the amount of charge into a capacitance value, thereby realizing the acquisition of the capacitance value. An exemplary, if the target has a capacitive sensing characteristic, that is, the target can carry a charge, so that when the spatial distance between the target and the electromagnetic wave absorption ratio antenna 161 changes, the amount of charge of the target acting on the electromagnetic wave absorption ratio antenna 161 will also change, so that the amount of charge collected by the electromagnetic wave absorption ratio antenna 161 will change. Among them, the electromagnetic wave absorption ratio component 160 is generally provided in the electronic device for controlling the electronic device based on the distance between the user and the electronic device.

[0029] In some embodiments, the electronic device 100 may further include a rotation axis 130, which may be used to rotatably connect the first portion 110 and the second portion 120. Thus, the first portion 110 and the second portion 120 may be relatively folded or unfolded along the rotation axis 130, and the first portion 110 and the second portion 120 may be switched between a closed state and an unfolded state through the rotation axis 130. Furthermore, the opening and closing state of the electronic device may further include an intermediate state, which is a state between the unfolded state and the closed state.

[0030] Further, at least one of the first metal component 112 in the first part 110 and the second metal component 122 in the second part 120 and the electromagnetic wave absorption ratio antenna 161 can be close to or away from each other. Figure 2 , Figure 2 Shows Figure 1 The opening and closing state of the electronic device 100 is a structural schematic diagram of a closed state. Figure 2 The electromagnetic wave absorption ratio antenna 161 is arranged in the first part 110, so that the electromagnetic wave absorption ratio antenna 161 can approach and move away from the second metal component 122 in the second part 120, and specifically can approach and move away from at least one of the second metal middle frame 1222 and the second antenna 1221.

[0031] For another example, see Figure 3 , Figure 3 Shows Figure 1 The opening and closing state of the electronic device is a structural schematic diagram of the unfolded state. Figure 3 The electromagnetic wave absorption ratio antenna 161 is arranged in the second part 110, so that at this time the electromagnetic wave absorption ratio antenna 161 can approach and move away from the first metal component 112 in the first part 110, and specifically can approach and move away from at least one of the first metal middle frame 1122 and the first antenna 1121.

[0032] Thus, when the electronic device is in different opening and closing states, at least one of the first metal component 112 or the second metal component 122 is far away from or close to the electromagnetic wave absorption ratio antenna 161, so different amounts of charge can be obtained based on the electromagnetic wave absorption ratio antenna 161 to further determine the opening and closing state of the electronic device. For a specific introduction, please refer to the subsequent embodiments.

[0033] Please continue reading Figure 1The electronic device 100 may further include a processor 170, which may be one or more processors. The processor 170 is connected to the electromagnetic wave absorption ratio antenna 161, and may be used to control the electromagnetic wave absorption ratio antenna 161 to obtain a charge. The processor 170 is also connected to the electromagnetic wave absorption ratio sensor 162, and may be used to obtain a capacitance value determined based on the electromagnetic wave absorption ratio sensor 162, and detect the opening and closing state of the electronic device 100 according to the capacitance value. The specific method may be described in the subsequent embodiments.

[0034] See also Figure 4 , Figure 4 A method flow chart of a method for detecting the state of an electronic device provided in an embodiment of the present application is shown. The state detection method can be applied to Figure 1 In the electronic device shown, a processor in the electronic device can be used as an execution subject. The method includes steps S110 to S130.

[0035] Step S110: acquiring the amount of charge collected by the electromagnetic wave absorption ratio antenna based on the distance between the electromagnetic wave absorption ratio antenna and a target metal component, wherein the target metal component includes at least one of the first metal component and the second metal component.

[0036] Through the above analysis, it can be known that when the electronic device is in different opening and closing states, the target metal component and the electromagnetic wave absorption ratio antenna can be close to or far away from each other. Therefore, when the electronic device is in different opening and closing states, the distance between the target metal component and the electromagnetic wave absorption ratio antenna is not the same. The target metal component includes at least one of the first metal component and the second metal component.

[0037] Specifically, the target metal component and the electromagnetic wave absorption ratio antenna can be regarded as the two side plates of a capacitor. For example, the first metal component can be one side plate of the capacitor, and the electromagnetic wave absorption ratio antenna can be the other side plate of the capacitor; or the second metal component can be one side plate of the capacitor, and the electromagnetic wave absorption ratio antenna can be the other side plate of the capacitor.

[0038] It can be seen from the capacitance formula C=εS / d that when the area of ​​the plates on both sides remains unchanged, the change in the plate distance d will cause the capacitance value C to change. Specifically, the plate distance d is inversely correlated with the capacitance value C. It is not difficult to understand that the charge amount and the capacitance value are positively correlated. Therefore, when the electronic device is in different opening and closing states, the distance between the target metal component and the electromagnetic wave absorption ratio antenna changes, resulting in changes in the capacitance value and the charge amount, so that the opening and closing state of the electronic device can be detected based on the acquired charge amount and capacitance value.

[0039] For some embodiments, the amount of charge collected by the electromagnetic wave absorption ratio antenna can be obtained based on the distance between the electromagnetic wave absorption ratio antenna and the target metal component. Since an electromagnetic wave absorption ratio component is generally provided on an electronic device, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor. Therefore, by obtaining the amount of charge through the electromagnetic wave absorption ratio antenna, it is not necessary to provide additional components on the electronic device, which can reduce the detection cost.

[0040] Among them, both the first metal component and the second metal component have capacitive induction characteristics, that is, when the distance between the target metal component and the electromagnetic wave absorption ratio antenna changes, the amount of charge acting on the electromagnetic wave absorption ratio antenna will change, thereby changing the amount of charge collected by the electromagnetic wave absorption ratio antenna.

[0041] Step S120: converting the charge amount into a capacitance value based on the electromagnetic wave absorption ratio sensor.

[0042] Furthermore, the electromagnetic wave absorption ratio sensor provided on the electronic device can convert the collected charge into a capacitance value.

[0043] Specifically, for example, when the electronic device is in the unfolded state, the distance between the target metal component and the electromagnetic wave absorption ratio antenna is relatively far, so the amount of charge acquired is relatively small, and the capacitance value converted based on the smaller amount of charge is also relatively small; when the electronic device is in the closed state, the distance between the target metal component and the electromagnetic wave absorption ratio antenna is relatively close, so the amount of charge acquired is relatively large, and the capacitance value converted based on the smaller amount of charge is also relatively large. Therefore, the opening and closing state of the electronic device can be judged based on the capacitance value in the future.

[0044] Step S130: determining the open or closed state of the electronic device based on the capacitance value.

[0045] In some embodiments, the electronic device may have different opening and closing states, and the electronic device may detect the opening and closing state, thereby controlling the electronic device accordingly. For example, if it is detected that the electronic device switches from the unfolded state to the closed state, the first screen and the second screen of the electronic device may be controlled to turn off and enter the standby state. For another example, if it is detected that the electronic device switches from the closed state to the unfolded state, the first screen and the second screen of the electronic device may be controlled to light up and enter the normal working state.

[0046] From the above analysis, it can be seen that when the opening and closing state of the electronic device is different, the capacitance value collected by the electromagnetic wave absorption ratio sensor will change. Therefore, the opening and closing state of the electronic device can be judged by the capacitance value collected by the electromagnetic wave absorption ratio sensor. Since electronic devices generally need to be equipped with an electromagnetic wave absorption ratio antenna and an electromagnetic wave ratio sensor, the opening and closing state of the electronic device can be detected by reusing the electromagnetic wave absorption ratio antenna, which will not increase the cost.

[0047] As an exemplary method, a specified threshold may be predetermined, and then the on / off state of the electronic device may be determined based on the magnitude relationship between the capacitance value and the specified threshold.

[0048] Specifically, for some embodiments, when the electronic device switches from the unfolded state to the closed state, the distance between the target metal component and the electromagnetic wave absorption ratio antenna changes from large to small; and when the electronic device switches from the closed state to the unfolded state, the distance between the target metal component and the electromagnetic wave absorption ratio antenna changes from small to large. Based on the capacitive sensing feature, it can be known that when the electronic device is in the unfolded state, the capacitance value obtained by the electromagnetic wave absorption ratio sensor is a small value; and when the electronic device is in the closed state, the capacitance value obtained by the electromagnetic wave absorption ratio sensor is a large value. Among them, the capacitive sensing feature can be used to characterize that the closer the target object is to the electromagnetic wave absorption ratio antenna, the greater the amount of charge collected by the electromagnetic wave absorption ratio antenna; the farther the target object is from the electromagnetic wave absorption ratio antenna, the smaller the amount of charge collected by the electromagnetic wave absorption ratio antenna. In the embodiment provided in the present application, the target object can be a target metal component. Thus, by setting a first specified threshold, when the collected capacitance value is greater than or equal to the first specified threshold, the opening and closing state of the electronic device is determined to be a closed state; when it is less than the first specified threshold, the opening and closing state of the electronic device is determined to be an unfolded state.

[0049] Optionally, there is an intermediate state between the open and closed state and the closed state. It is not difficult to know from the above analysis that when the electronic device is in the intermediate state, the capacitance value obtained by the electromagnetic wave absorption ratio sensor should be between the capacitance value corresponding to the unfolded state and the capacitance value corresponding to the closed state. Therefore, a second specified threshold value can be further set, wherein the second specified threshold value is less than the first specified threshold value. Thus, when the capacitance value is less than the second specified threshold value, the open and closed state of the electronic device is determined to be a closed state; when the capacitance value is between the first specified threshold value and the second specified threshold value, the open and closed state of the electronic device can be determined to be an intermediate state. For details, please refer to the introduction of the subsequent embodiments.

[0050] The state detection method provided by the present application, the electronic device includes a first part with a first screen and a second part with a second screen, the first part is rotatably connected to the second part, so that the first screen and the second screen can be close to and away from each other, the first part includes a first metal component, the second part includes a second metal component, the electronic device also includes an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, and at least one of the first metal component and the second metal component can be close to and away from each other with the electromagnetic wave absorption ratio antenna; the method includes: based on the distance between the electromagnetic wave absorption ratio antenna and the target metal component, obtaining the amount of charge collected by the electromagnetic wave absorption ratio antenna; based on the electromagnetic wave absorption ratio sensor, converting the amount of charge into a capacitance value; based on the capacitance value, judging the opening and closing state of the electronic device. If the control of the opening and closing state of the electronic device is achieved by setting other components, it will lead to an increase in detection costs. In the embodiment provided in the present application, the electromagnetic wave absorption ratio component generally provided on the electronic device can be reused to detect the opening and closing status of the electronic device, thereby eliminating the need to provide other elements for detection, thereby reducing the detection cost.

[0051] See also Figure 5 , Figure 5 A method flow chart of a method for detecting the state of an electronic device provided in an embodiment of the present application is shown. The state detection method can be applied to Figure 1 In the electronic device shown, a processor in the electronic device can be used as an execution subject. The method includes steps S210 to S270.

[0052] Step S210: acquiring the amount of charge collected by the electromagnetic wave absorption ratio antenna based on the distance between the electromagnetic wave absorption ratio antenna and a target metal component, wherein the target metal component includes at least one of the first metal component and the second metal component.

[0053] Step S220: Convert the charge amount into a capacitance value based on the electromagnetic wave absorption ratio sensor.

[0054] Among them, step S210 and step S220 have been introduced in detail in the above embodiments and will not be repeated here.

[0055] Step S230: Whether the capacitance value is greater than or equal to a first specified threshold.

[0056] If the capacitance value is greater than the first specified threshold, it indicates that the capacitance value is large at this time, and it can be determined as an expanded state, that is, it can jump to step S240; if it is not greater than or greater than the first specified threshold, it can jump to step S250 at this time.

[0057] Step S240: If the capacitance value is greater than or equal to the first specified threshold, determining that the opening and closing state of the electronic device is a closed state.

[0058] In some embodiments, when the electronic device switches from the unfolded state to the closed state, the electromagnetic wave absorption ratio antenna and the target metal component are close to each other; when the electronic device switches from the closed state to the unfolded state, the electromagnetic wave absorption ratio antenna and the target metal component are far away from each other. In other words, when the electronic device switches from the unfolded state to the closed state, the amount of charge collected by the electromagnetic wave absorption ratio antenna will gradually increase, so that the capacitance value converted by the electromagnetic wave absorption ratio sensor will gradually increase; and when the electronic device switches from the closed state to the unfolded state, the amount of charge collected by the electromagnetic wave absorption ratio antenna will gradually decrease, so that the capacitance value converted by the electromagnetic wave absorption ratio sensor will gradually decrease.

[0059] In some embodiments, a first specified threshold value may be preset, and when the capacitance value is greater than or equal to the first specified threshold value, the opening and closing state of the electronic device may be determined to be a closed state. The first specified threshold value may be a charge amount collected by an electromagnetic wave absorption ratio antenna measured in advance when the electronic device is in a closed state, and then converted based on the electromagnetic wave absorption ratio sensor.

[0060] Optionally, since there will be a certain error when collecting the capacitance value each time, in order to further improve the accuracy of judging the open and closed state, the charge amount collected by the electromagnetic wave absorption ratio antenna in advance when the electronic device is in the closed state can also be converted by the electromagnetic wave absorption ratio sensor, and then corrected based on the first correction value, and then used as the first specified threshold. This can reduce the situation where the electronic device is already in the closed state, but due to a certain error in the collected charge amount, or a certain error in the capacitance value obtained based on the charge amount conversion, the capacitance value is not greater than or equal to the first specified threshold, and the erroneous detection occurs, thereby improving the accuracy of judging the closed state.

[0061] It should be noted that the first correction value can be flexibly set according to actual conditions and is not specifically limited in the embodiments of the present application.

[0062] Step S250: Whether the capacitance value is less than a second specified threshold.

[0063] Furthermore, when the capacitance value is already less than the first specified threshold, it can be determined whether the capacitance value is less than the second specified threshold. If so, the process can jump to step S260; if not, the process can jump to step S270.

[0064] Step S260: If the capacitance value is less than a second specified threshold, determining that the opening and closing state of the electronic device is an unfolded state, wherein the second specified threshold is less than the first specified threshold.

[0065] Through the above analysis, it can be known that when the electronic device switches from the unfolded state to the closed state, the amount of charge collected by the electromagnetic wave absorption ratio antenna will gradually increase, so the capacitance value obtained based on the charge amount conversion will gradually increase; and when the electronic device is from the closed state to the unfolded state, the capacitance value collected by the electromagnetic wave absorption ratio antenna will gradually decrease, so the capacitance value obtained based on the charge amount conversion will gradually decrease. Therefore, a second specified threshold value can also be pre-set, and when the capacitance value is detected to be less than the second specified threshold value, it can be determined that the opening and closing state of the electronic device is the unfolded state. Among them, the second threshold value can be the charge amount collected by the electromagnetic wave absorption ratio antenna in advance when the electronic device is in the unfolded state, and then the capacitance value obtained by converting the charge amount based on the electromagnetic wave absorption ratio sensor. Among them, the second specified threshold value is less than the first specified threshold value.

[0066] Optionally, since there will be a certain error each time the capacitance value is collected, in order to further improve the accuracy of judging the opening and closing state, the charge amount collected by the electromagnetic wave absorption ratio antenna when the electronic device is in the unfolded state can be converted into a capacitance value by the electromagnetic wave absorption ratio sensor, and then corrected based on the second correction value, and then used as the second designated threshold. This can reduce the situation where the electronic device is already in the unfolded state, but due to a certain error in the collected charge amount, or a certain error in converting the charge amount into a capacitance value, the capacitance value is not less than the second designated threshold at this time, resulting in false detection, thereby improving the accuracy of judging the unfolded state.

[0067] It should be noted that the second correction value can be flexibly set according to actual conditions and is not specifically limited in the embodiments of the present application.

[0068] Step S270: If the capacitance value is less than the first specified threshold and greater than or equal to the second specified threshold, it is determined that the opening and closing state of the electronic device is an intermediate state, and the intermediate state includes a state between the unfolded state and the closed state.

[0069] Through the above analysis, it can be known that when the electronic device is in the intermediate state, the amount of charge collected by the electromagnetic wave absorption ratio antenna will be between the amount of charge collected by the electromagnetic wave absorption ratio antenna in the unfolded state and the amount of charge collected by the electromagnetic wave absorption ratio antenna in the closed state, so when the electronic device is in the intermediate state, the capacitance value will be between the capacitance value in the unfolded state and the capacitance value in the closed state. Therefore, when the capacitance value is less than the first specified threshold value and greater than or equal to the second specified threshold value, it can be determined that the opening and closing state of the electronic device is an intermediate state, and the intermediate state includes a state between the unfolded state and the closed state.

[0070] The present application provides a state detection method, the electronic device includes a first part with a first screen and a second part with a second screen, the first part and the second part are rotatably connected so that the first screen and the second screen can move closer to and farther from each other, the first part includes a first metal component, the second part includes a second metal component, the electronic device also includes an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, at least one of the first metal component and the second metal component is connected to the electromagnetic wave absorption ratio sensor, The electromagnetic wave absorption ratio antenna can be close to and away from each other; the method includes: based on the distance between the electromagnetic wave absorption ratio antenna and the target metal component, obtaining the amount of charge collected by the electromagnetic wave absorption ratio antenna; based on the electromagnetic wave absorption ratio sensor, converting the amount of charge into a capacitance value; if the capacitance value is greater than or equal to the first specified threshold, the opening and closing state of the electronic device is determined to be a closed state; if the capacitance value is less than the second specified threshold, the opening and closing state of the electronic device is determined to be an unfolded state; if the capacitance value is less than the first specified threshold and greater than or equal to the second specified threshold, the opening and closing state of the electronic device is determined to be an intermediate state. If the control of the opening and closing state of the electronic device is achieved by setting other components, the detection cost will increase. In the embodiment provided by the present application, the electromagnetic wave absorption ratio component generally provided on the electronic device can be reused to realize the detection of the opening and closing state of the electronic device, so that other components for detection do not need to be set, reducing the detection cost. And through the first specified threshold and the second specified threshold, the accuracy of detecting the opening and closing state is improved.

[0071] See also Figure 6 , Figure 6 A method flow chart of a method for detecting the state of an electronic device provided in an embodiment of the present application is shown. The state detection method can be applied to Figure 1In the electronic device shown, a processor in the electronic device can be used as an execution subject. The method includes steps S310 to S3100.

[0072] Step S310: acquiring the amount of charge collected by the electromagnetic wave absorption ratio antenna based on the distance between the electromagnetic wave absorption ratio antenna and a target metal component, wherein the target metal component includes at least one of the first metal component and the second metal component.

[0073] Step S320: converting the charge amount into a capacitance value based on the electromagnetic wave absorption ratio sensor.

[0074] Step S330: determining the open or closed state of the electronic device based on the capacitance value.

[0075] Among them, step S310 to step S330 have been described in detail in the above embodiments and will not be repeated here.

[0076] Step S340: Based on the opening and closing state, controlling the working state of the target screen, the target screen including the first screen and the second screen.

[0077] Step S350: Whether the opening and closing state is the unfolded state.

[0078] For some implementations, after the opening and closing state of the electronic device is determined, the working state of the target screen can be controlled based on the opening and closing state, where the target screen includes the first screen and the second screen.

[0079] Specifically, it can be determined whether the opening and closing state is the unfolding state, and if so, the process can jump to step S360; if not, the process can jump to step S370.

[0080] Step S360: If the opening and closing state is the unfolding state, control the working state of the target screen to be working.

[0081] When the opening and closing state is the unfolded state, the user is likely to need to use the display screen of the electronic device, so the working state of the target screen can be controlled to be working, that is, the target screen display can be controlled to meet the user's usage needs. The target screen may include the first screen and the second screen.

[0082] In one exemplary embodiment, the target screen of the electronic device can be controlled to operate based on the processor of the electronic device; in another exemplary embodiment, the electronic device can also include a screen brightness control module, which is connected to the processor, so that the target screen can be controlled through the screen brightness control module based on the processor, for example, the target screen can be controlled to operate.

[0083] Step S370: Whether the opening and closing state is an intermediate state.

[0084] If the opening and closing state is not the unfolded state, it can be further determined whether the opening and closing state is an intermediate state. If it is an intermediate state, the process can jump to step S390; if it is not an intermediate state, the process can jump to step S380.

[0085] Step S380: If the opening and closing state is the closed state, control the working state of the target screen to be not working.

[0086] In the case where the opening and closing state is not the unfolded state, if the opening and closing state is not the intermediate state, then the opening and closing state can be determined to be the closed state. Since the user is likely not to use the display screen of the electronic device when the electronic device is in the closed state, the working state of the target screen can be controlled to be not working. In other words, the target screen can be controlled not to be displayed, for example, the target screen can be controlled to enter a dormant state, thereby saving power consumption of the electronic device.

[0087] Similar to the aforementioned steps, the target screen of the electronic device may be controlled to be inoperative by the processor, or the target screen may be controlled by the screen brightness control module based on the processor, for example, the target screen may be controlled to be inoperative.

[0088] Step S390: If the opening and closing state is the intermediate state, the working state of the target screen is controlled to also work.

[0089] Step S3100: adjusting the operating brightness of the target screen based on the capacitance value.

[0090] When the opening and closing state of the electronic device is in the intermediate state, the user may still use the display screen, so the working state of the target screen can still be controlled to be working at this time.

[0091] Furthermore, the working brightness of the target screen can be adjusted based on the capacitance value. For example, the smaller the capacitance value, the higher the working brightness of the target screen; and the larger the capacitance value, the lower the working brightness of the target screen, that is, the working brightness of the target screen can be inversely correlated with the capacitance value.

[0092] The working brightness of the target screen can be adjusted to the target brightness through the brightness capacitance value comparison table. Specifically, when executing step S3100, step S3101 and step S3102 can also be included.

[0093] Step S3101: searching for a target brightness corresponding to the capacitance value based on a pre-acquired brightness capacitance value comparison table, wherein the brightness capacitance value comparison table includes at least one reference capacitance value and a reference brightness value corresponding to the reference capacitance value.

[0094] Step S3102: Adjust the working brightness of the target screen to the target brightness.

[0095] In some embodiments, a brightness capacitance value comparison table may be obtained in advance, wherein the brightness capacitance value comparison table includes at least one reference capacitance value and a reference brightness value corresponding to the reference capacitance value. The relationship between the reference capacitance value and the reference capacitance value may be preset, for example, a smaller capacitance value may correspond to a larger brightness value; a larger capacitance value may correspond to a smaller brightness value. Thus, a reference capacitance value having the same capacitance value as the reference capacitance value in the brightness capacitance value comparison table may be searched, and the reference brightness corresponding to the same reference capacitance value may be used as the target brightness.

[0096] Further, the operating brightness of the target screen can be adjusted based on the target brightness, that is, the operating brightness of the target screen can be adjusted to the target brightness. In an exemplary embodiment, the processor of the electronic device can adjust the operating brightness of the target screen through a screen brightness control module.

[0097] It should be noted that the reference capacitance value and the corresponding reference brightness value in the brightness capacitance value comparison table can be flexibly selected according to needs, and the embodiment of the present application does not limit this.

[0098] The state detection method provided by the present application, the electronic device includes a first part provided with a first screen and a second part provided with a second screen, the first part is rotatably connected with the second part, so that the first screen and the second screen can be close to and away from each other, the first part includes a first metal component, the second part includes a second metal component, the electronic device also includes an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, and at least one of the first metal component and the second metal component can be close to and away from each other with the electromagnetic wave absorption ratio antenna; the method includes: based on the distance between the electromagnetic wave absorption ratio antenna and the target metal component, obtaining the amount of charge collected by the electromagnetic wave absorption ratio antenna; based on the electromagnetic wave absorption ratio sensor, converting the amount of charge into a capacitance value; based on the capacitance value, judging the opening and closing state of the electronic device; based on the opening and closing state, controlling the working state of the target screen. In the embodiment provided by the present application, the working state of the target screen can be further controlled based on the opening and closing state, and the working state of the target screen can be controlled to be not working in the closed state to reduce power consumption. In a further embodiment of the present application, the operating brightness of the target screen can be adjusted based on the capacitance value when the opening and closing state is in the intermediate state.

[0099] Please continue reading Figure 1 , Figure 1 The electronic device 100 in the present application may be an electronic device capable of running a computer program, such as a smart phone or a tablet computer. The electronic device 100 in the present application may also include a memory 180, wherein the processor 170 is electrically connected to the memory 180, and one or more programs are configured to execute the method described in the above method embodiment.

[0100] The processor 170 may include one or more processing cores. The processor 170 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 180, and calling data stored in the memory 180. Optionally, the processor 170 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 80 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and computer programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 170, and it can be implemented separately through a communication chip. Specifically, the method described in the above embodiment can be executed by one or more processors 170.

[0101] For some embodiments, the memory 180 may include a random access memory (RAM) or a read-only memory (ROM). The memory 180 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 180 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 100 during use, etc.

[0102] The first screen 111 and the second screen 121 can be controlled by the processor 170 of the electronic device 100 to change the working state, such as working or not working. The first screen 111 and the second screen 121 may include a liquid crystal display (LCD), an organic electroluminescence display (OLED), or a quantum dot light emitting diode (QLED).

[0103] Optionally, the electronic device 100 may further include a screen brightness control module 190, which is connected to the processor 170. The screen brightness control module 190 may be used to adjust the working brightness of the target screen based on the capacitance value, and the target screen includes the first screen 111 and the second screen 121. The specific adjustment method can be referred to the introduction in the aforementioned embodiment, which will not be repeated here.

[0104] Please refer to Figure 7 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 700 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0105] The computer readable storage medium 700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 700 includes a non-transitory computer-readable storage medium. The computer readable storage medium 700 has storage space for program code 710 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 710 can be compressed, for example, in an appropriate form.

[0106] Please refer to Figure 8 , which shows a structural block diagram 800 of a computer program product provided by an embodiment of the present application. The computer program product 800 includes a computer program / instruction 810, and when the computer program / instruction 810 is executed by a processor, the steps of the above method are implemented.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting the state of an electronic device, characterized in that: The electronic device comprises a first part provided with a first screen and a second part provided with a second screen, the first part is rotatably connected to the second part so that the first screen and the second screen can move closer to and farther from each other, the first part comprises a first metal component, the second part comprises a second metal component, the electronic device further comprises an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component comprises an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, and at least one of the first metal component and the second metal component and the electromagnetic wave absorption ratio antenna can move closer to and farther from each other; The method comprises: Acquire the amount of charge collected by the electromagnetic wave absorption ratio antenna based on the distance between the electromagnetic wave absorption ratio antenna and a target metal component, wherein the target metal component includes at least one of the first metal component and the second metal component; Converting the charge amount into a capacitance value based on the electromagnetic wave absorption ratio sensor; Based on the capacitance value, the on / off state of the electronic device is determined.

2. The method according to claim 1, characterized in that The step of determining the open / closed state of the electronic device based on the capacitance value includes: If the capacitance value is greater than or equal to a first specified threshold, determining that the opening and closing state of the electronic device is a closed state; If the capacitance value is smaller than a second specified threshold, it is determined that the opening and closing state of the electronic device is an unfolded state, wherein the second specified threshold is smaller than the first specified threshold.

3. The method according to claim 2, characterized in that The method further comprises: If the capacitance value is less than the first specified threshold and greater than or equal to the second specified threshold, it is determined that the opening and closing state of the electronic device is an intermediate state, and the intermediate state includes a state between the unfolded state and the closed state.

4. The method according to claim 1, characterized in that: After judging the opening and closing state of the electronic device based on the capacitance value, the method further includes: Based on the opening and closing state, a working state of a target screen is controlled, where the target screen includes the first screen and the second screen.

5. The method according to claim 4, characterized in that The opening and closing state includes an unfolded state or a closed state, and the controlling the working state of the target screen based on the opening and closing state includes: If the opening and closing state is the unfolding state, controlling the working state of the target screen to be working; If the opening and closing state is the closed state, the working state of the target screen is controlled to be not working.

6. The method according to claim 5, characterized in that The open and closed state also includes an intermediate state, and the method further includes: If the opening and closing state is the intermediate state, controlling the working state of the target screen to be working; The operating brightness of the target screen is adjusted based on the capacitance value.

7. The method according to claim 6, characterized in that The adjusting the working brightness of the target screen based on the capacitance value includes: Based on a pre-acquired brightness capacitance value comparison table, searching for a target brightness corresponding to the capacitance value, the brightness capacitance value comparison table including at least one reference capacitance value and a reference brightness value corresponding to the reference capacitance value; Adjust the operating brightness of the target screen to the target brightness.

8. An electronic device, characterized in that: The electronic device comprises a first part with a first screen and a second part with a second screen, the first part is rotatably connected to the second part so that the first screen and the second screen can move closer to and farther from each other, the first part comprises a first metal component, the first metal component comprises a first metal middle frame and at least one of a first antenna, the second part comprises a second metal component, the second metal component comprises a second metal middle frame and at least one of a second antenna; The electronic device further includes an electromagnetic wave absorption ratio component, the electromagnetic wave absorption ratio component includes an electromagnetic wave absorption ratio antenna and an electromagnetic wave absorption ratio sensor, the electromagnetic wave absorption ratio antenna is connected to the electromagnetic wave absorption ratio sensor, and at least one of the first metal component and the second metal component can be close to or away from the electromagnetic wave absorption ratio antenna; The electronic device further includes one or more processors, which are coupled to the electromagnetic wave absorption ratio antenna and are used to execute the method described in any one of claims 1-7.

9. The electronic device according to claim 8, characterized in that: The electronic device further comprises a screen brightness control module, and the screen brightness control module is connected to the processor; The screen brightness control module is used to adjust the working brightness of a target screen based on the capacitance value, and the target screen includes the first screen and the second screen.

10. The electronic device according to claim 8, characterized in that: The first metal component includes at least one of a first metal middle frame and a first antenna; the second metal component includes at least one of a second metal middle frame and a second antenna.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.