Electronic equipment, state detection method thereof and computer readable storage medium
By multiplexing the positioning antenna on the electronic device to receive the target signal, judging the opening and closing state of the electronic device, the problem of high detection cost in the prior art is solved, and low-cost opening and closing state detection is achieved.
Patent Information
- Application Number
- CN202310715789.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2024-12-17
AI Technical Summary
The prior art requires additional detection devices to be added when detecting the open and closed state of the foldable electronic device, resulting in higher costs.
By multiplexing the positioning antenna generally provided on the electronic device, the target signal is received, wherein the target signal includes the positioning signal and the specified signal of the specified antenna radiation. The opening and closing state of the electronic device is determined based on the strength of the target signal, and only additional settings are required for A specified antenna that radiates a specified signal.
The cost of detecting the open and closed state of electronic devices is reduced, and the need to set up additional detection devices is avoided.
Smart Images

Figure CN119148170A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of detection technology, and more specifically, to an electronic device and a state detection method thereof, 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 technology requires adding many additional detection devices to detect the opening and closing states of foldable electronic devices, which makes the cost high. Summary of the invention
[0003] The present application proposes an electronic device and a state detection method thereof 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, the first part including a positioning antenna, and the second part including a designated antenna for radiating a designated signal; the method includes: obtaining a target signal strength based on a target signal received by the positioning antenna, the target signal including a positioning signal and at least one of the designated signal; if the target signal strength meets a target condition, judging the opening and closing state of the electronic device based on the target signal strength.
[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, the first part being rotatably connected to the second part, the first part comprising a positioning antenna, and the second part comprising a designated antenna for radiating a designated signal; the electronic device further comprises a processor, the processor being coupled to the positioning antenna and the designated antenna, respectively, for executing 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] In the electronic device and its state detection method and computer-readable storage medium provided by the present application, the positioning antenna generally provided on the electronic device can be reused to receive the target signal through the positioning antenna, wherein the target signal includes the positioning signal and at least one of the designated signal radiated by the designated antenna, and then the opening and closing state of the electronic device can be detected based on the target signal strength of the target signal, so that only a designated antenna for radiating the designated signal needs to be additionally provided, and no additional detection device needs to be provided, thereby reducing the cost of detecting the opening and closing state of the electronic device.
[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 structure of an electronic device provided by an embodiment of the present application in a closed state;
[0012] Figure 3 A schematic diagram showing a structure of an electronic device in an intermediate state provided by another embodiment of the present application is shown;
[0013] Figure 4 A schematic diagram of a flow chart of a state detection method provided in an embodiment of the present application is shown;
[0014] Figure 5 A schematic diagram showing a flow chart of a state detection method provided by another embodiment of the present application is shown;
[0015] Figure 6 A schematic diagram showing a first duration length and a second duration length provided in an embodiment of the present application is shown;
[0016] Figure 7 Shows Figure 5 Implementation diagram of step S240;
[0017] Figure 8A schematic diagram of a flow chart of a state detection method provided by another embodiment of the present application is shown;
[0018] Fig. 9 A schematic diagram of a flow chart of a state detection method provided in yet another embodiment of the present application is shown;
[0019] Fig.10 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;
[0020] Fig.11 A structural block diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] 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.
[0022] 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.
[0023] At present, with the rapid development of electronic information technology, the opening and closing state of foldable electronic devices can be detected. However, the existing technology generally requires the addition of additional detection devices to detect the opening and closing state of foldable electronic devices, which makes the cost high. How to reduce the cost required to detect the opening and closing state of foldable electronic devices is an urgent problem to be solved.
[0024] Therefore, the present application provides an electronic device and a state detection method thereof, as well as a computer-readable storage medium, to solve or partially solve the above-mentioned problems.
[0025] See also Figure 1 , Figure 1A 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.
[0026] Further, the first part 110 may include a positioning antenna 112, and the second part 120 may include a designated antenna 122. It is not difficult to understand that, since the positioning antenna 112 and the designated antenna 122 are respectively located on the first part 110 and the second part 120, the positioning antenna 112 and the designated antenna 122 can be close to and away from each other. Specifically, when the first part 110 and the second part 120 are relatively folded to a closed state, the positioning antenna 112 and the designated antenna 122 are close to each other, and when the first part 110 and the second part 120 are relatively unfolded to an open state, the positioning antenna 112 and the designated antenna 122 are away from each other.
[0027] It should be noted that Figure 1 In the electronic device 100 shown, the positioning antenna 112 is disposed in the first portion 110, and the designated antenna 122 is disposed in the second portion 120. In other implementations, the positioning antenna 112 may be disposed in the second portion 120, and the designated antenna 122 may be disposed in the first portion 110.
[0028] The positioning antenna 112 can be used to obtain a positioning signal, which can be a signal of a specified frequency band, so as to realize the positioning of the electronic device based on the signal of the specified frequency band, and the signal of the specified frequency band can be sent by a global navigation satellite system (GNSS). Exemplarily, if the global navigation satellite system is a BeiDou Navigation Satellite System (BDS), the signal of the specified frequency band is the frequency band corresponding to the BeiDou Navigation Satellite System; if the global navigation satellite system is a GPS satellite navigation and positioning system (GPS), the signal of the specified frequency band is the frequency band corresponding to the GPS satellite navigation and positioning system; if the global navigation satellite system is a GLONASS satellite navigation satellite system (GLONASS), the signal of the specified frequency band is the frequency band corresponding to the GLONASS satellite navigation and positioning system.
[0029] The designated antenna 122 can be used to radiate a designated signal, wherein the designated signal can also be a signal of a designated frequency band, so that the designated signal can be received by the positioning antenna 112. Therefore, the opening and closing state of the electronic device can be judged based on the target signal received by the positioning antenna 112, wherein the target signal includes at least one of the positioning signal and the designated signal radiated by the designated antenna. For the specific judgment method, please refer to the introduction in the subsequent embodiments.
[0030] 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, so that 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 also include an intermediate state, which is a state between the unfolded state and the closed state.
[0031] See also 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 positioning antenna 112 is disposed in the first portion 110 , and the designated antenna 122 is disposed in the second portion 120 . At this time, the positioning antenna 112 and the designated antenna 122 are close to each other and have the shortest spatial distance between them.
[0032] See also Figure 3 , Figure 3 Shows Figure 1 The structural schematic diagram shows that the opening and closing state of the electronic device is an intermediate state. Figure 3 The positioning antenna 112 is disposed in the first portion 110 , and the designated antenna 122 is disposed in the second portion 120 . At this time, the positioning antenna 112 and the designated antenna 122 move away from each other as the electronic device switches from a closed state to an unfolded state.
[0033] Please continue reading Figure 1 The electronic device 100 may further include a processor 170, which may be one or more processors. The processor 170 is respectively connected to the positioning antenna 112 and the designated antenna 122, and may be used to control the designated antenna 122 to radiate a designated signal, and may also be used to obtain a target signal received by the positioning antenna 112, and further determine the opening and closing state of the electronic device based on the target signal.
[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 step S110 and step S120.
[0035] Step S110: obtaining a target signal strength based on a target signal received by a positioning antenna, where the target signal includes at least one of a positioning signal and a designated signal.
[0036] The electronic device is generally equipped with a positioning antenna, which can be used to receive a positioning signal to achieve positioning of the electronic device. The positioning signal can be sent by a global navigation satellite system, which has been described in detail above and will not be repeated here.
[0037] In some embodiments, the electronic device may also be configured with a designated antenna, which may be used to radiate a designated signal, which may be received by the positioning antenna, and further determine the opening and closing state of the electronic device. It is easy to understand that the positioning antenna is used to receive the positioning signal and locate the electronic device, so the frequency band of the signal that the positioning antenna can respond to is the frequency band corresponding to the positioning signal, and the designated signal radiated by the designated antenna should also be the frequency band corresponding to the positioning signal, thereby improving the efficiency of the positioning antenna coupling to the designated signal.
[0038] Through the above analysis, it can be known that when the electronic device is in different opening and closing states, the positioning antenna and the designated antenna can be close to and away from each other. Therefore, the distance between the designated antenna and the positioning antenna is not the same when the electronic device is in different opening and closing states. Among them, the distance is a spatial distance, that is, a Euclidean distance. Specifically, when the opening and closing state of the electronic device is a closed state, the positioning antenna and the designated antenna have a smaller distance; when the opening and closing state of the electronic device is an unfolded state, the positioning antenna and the designated antenna have a larger distance. Moreover, as the opening and closing state of the electronic device switches from a closed state to an unfolded state, the distance between the positioning antenna and the designated antenna gradually increases; and as the opening and closing state of the electronic device switches from an unfolded state to a closed state, the distance between the positioning antenna and the designated antenna gradually decreases.
[0039] Therefore, if the strength of the designated signal radiated by the designated antenna is set to a fixed value, the strength of the designated signal acquired by the positioning antenna, for example, as the second signal strength, can change based on the different opening and closing states of the electronic device. Specifically, when the opening and closing state of the electronic device is the closed state, the positioning antenna and the designated antenna have a smaller distance, so the second signal strength acquired by the positioning antenna will be larger; and when the opening and closing state of the electronic device is the unfolded state, the positioning antenna and the designated antenna have a larger distance, and the second signal strength acquired by the positioning antenna will be smaller. In addition, as the opening and closing state of the electronic device switches from the closed state to the unfolded state, the distance between the positioning antenna and the designated antenna gradually increases, and the second signal strength acquired by the positioning antenna gradually decreases; and as the opening and closing state of the electronic device switches from the unfolded state to the closed state, the distance between the positioning antenna and the designated antenna gradually decreases, and the second signal strength acquired by the positioning antenna gradually increases.
[0040] Furthermore, since the positioning antenna is used to obtain the positioning signal, the positioning antenna may only obtain the positioning signal, may only obtain the designated signal, or may obtain the positioning signal and the designated signal at the same time. Therefore, the positioning antenna can obtain the target signal, which may include at least one of the positioning signal and the designated signal radiated by the designated antenna. Specifically, in some cases, if the designated antenna radiates the designated signal while the positioning antenna obtains the positioning signal, the positioning antenna may receive the positioning signal and the designated signal at the same time, and the target signal is the positioning signal and the designated signal. In other cases, the designated antenna may not radiate the designated signal temporarily, so the positioning antenna may only obtain the positioning signal, and the target signal is the positioning signal. In some other cases, the designated antenna may radiate the designated signal, and the positioning signal is not obtained at this time, so the positioning antenna only obtains the designated signal at this time, and the target signal is the designated signal.
[0041] After acquiring the target signal, the positioning antenna can determine the opening and closing state of the electronic device based on the target signal. In some embodiments, the target signal strength of the target signal can be acquired, and then the opening and closing state of the electronic device can be determined based on the target signal strength. For example, after receiving the target signal, the positioning antenna can transmit the target signal to a processor connected to the positioning antenna, and then determine the target signal strength of the target signal through the processor. Since the positioning antenna is an antenna that is generally equipped with electronic devices, in the embodiments provided in the present application, only a designated antenna for radiating a designated signal needs to be additionally provided, and no additional detection device needs to be provided, thereby reducing the cost of detecting the opening and closing state of the electronic device.
[0042] Step S120: If the target signal strength meets the target condition, the opening and closing state of the electronic device is determined based on the target signal strength.
[0043] In addition, the strength of the positioning signal acquired by the positioning antenna may be used as the first signal strength.
[0044] From the above introduction, it can be known that when the strength of the designated signal radiated by the designated antenna is fixed, the strength of the second signal received by the positioning antenna will change with the change of the opening and closing state of the electronic device. The target signal acquired by the designated antenna includes at least one of the positioning signal and the designated signal radiated by the designated antenna. Therefore, in order to judge the opening and closing state of the electronic device by the target signal strength of the target signal, it is necessary to first determine whether there is a designated signal in the target signal. If there is a designated signal in the target signal, the opening and closing state of the electronic device can be further determined based on the target signal strength; if there is no designated signal in the target signal, the target signal only includes the positioning signal. At this time, the electronic device can be located based on the target signal, that is, based on the positioning signal.
[0045] That is to say, when it is determined that the target signal includes the designated signal, the target signal strength can be regarded as meeting the target condition. Therefore, in order to determine whether the target signal includes the designated signal, the strength of the designated signal radiated by the designated antenna can be set to be larger, so that when the positioning antenna acquires the designated signal, the second signal strength is greater than the first signal strength, so that by pre-setting the designated signal strength, the target signal strength and the designated signal strength can be used to determine whether the target signal includes the designated signal.
[0046] Among them, since the second signal strength obtained by the positioning antenna is different when the electronic device is in different opening and closing states, specifically, the second signal strength obtained by the positioning antenna is weaker when the electronic device is in the unfolded state, and the second signal strength obtained by the positioning antenna is stronger when the electronic device is in the closed state. In order to be able to determine whether the target signal includes the designated signal, it can be set that when the second signal strength obtained by the positioning antenna is weak when the electronic device is in the unfolded state, the first signal strength is less than the weaker second signal strength, so that when the second signal strength obtained by the positioning antenna is strong when the electronic device is in the closed state, the second signal strength is of course greater than the first signal strength. In this way, it is possible to determine whether the target signal includes the designated signal through the relationship between the target signal strength and the designated signal strength, and when the target signal includes the designated signal, it is determined that the target signal strength meets the target condition.
[0047] Furthermore, it can be seen from the above introduction that the strength of the second signal received by the positioning antenna will change with the opening and closing state of the electronic device, and when the target signal strength meets the target condition, it can be determined that the target signal includes the designated signal. Therefore, in some embodiments, when the target signal strength meets the target condition, the threshold condition can be directly pre-set, and then the relationship between the target signal strength and the threshold condition is determined to determine the opening and closing state of the electronic device.
[0048] In other embodiments, a comparison table of acquisition strength and opening and closing angles may be preset, so that after acquiring the target signal strength, the target opening and closing angle corresponding to the target signal strength is determined based on the comparison table of strength and opening and closing angles, and then the opening and closing state of the electronic device is judged based on the target opening and closing angle. The opening and closing angle is the angle formed by the unfolding of the first screen and the second screen of the electronic device. For example, if the electronic device is in a fully unfolded state, the opening and closing angle may be close to 180 degrees; if the electronic device is in a fully closed state, the opening and closing angle may be close to 0 degrees. For a detailed description of the method for judging the opening and closing state of an electronic device, please refer to the subsequent embodiments.
[0049] In the status detection method provided in the present application, the positioning antenna generally provided on the electronic device can be reused to receive the target signal through the positioning antenna, wherein the target signal includes the positioning signal and at least one of the designated signal radiated by the designated antenna, and then the opening and closing state of the electronic device can be detected based on the target signal strength of the target signal. Therefore, only a designated antenna for radiating the designated signal needs to be additionally provided, and no additional detection device needs to be provided, thereby reducing the cost of detecting the opening and closing state of the electronic device.
[0050] See also Figure 5 , Figure 5A 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 S260.
[0051] Step S210: The designated antenna radiates the designated signal at intervals of a first duration each time, wherein there is a time period that is at least partially non-overlapping between the first duration of the designated signal received by the positioning antenna and the second duration of the positioning signal received by the positioning antenna.
[0052] As can be seen from the above introduction, when the target signal includes the designated signal and the positioning signal, it can be determined that the target signal strength meets the target condition, and the opening and closing state of the electronic device can be further determined based on the target signal strength. In other words, the electronic device is not positioned in response to the positioning signal at this time.
[0053] Since the designated antenna is used as the radiating end and the positioning antenna is used as the receiving end, the distance between the radiating end and the receiving end is relatively small relative to the speed of signal transmission (i.e., the speed of light), so the moment when the designated antenna radiates the designated signal can be approximated to the moment when the positioning antenna receives the designated signal. In order to avoid the designated antenna radiating the designated signal for a long time, thereby occupying the positioning antenna for a long time, so that the electronic device cannot respond to the positioning signal, the designated antenna can be controlled to radiate the designated signal at intervals of the first duration length. Thus, the duration of each time the positioning antenna receives the designated signal can be the first duration length. Further, the time when the positioning antenna obtains the positioning signal can be used as the second duration length, so that the first duration length can be set so that there is at least a partially non-overlapping time period between the first duration length when the positioning antenna receives the designated signal and the second duration length when the positioning antenna receives the positioning signal. That is, the positioning antenna can receive the positioning signal in at least a partially non-overlapping time period, and then locate the electronic device based on the positioning signal. That is, by multiplexing the positioning antenna configured on the electronic device to detect the opening and closing state of the electronic device, it will not have a negative impact on the positioning signal and the positioning of the electronic device.
[0054] For an exemplary example, see Figure 6 , Figure 6 A schematic diagram of the first duration length and the second duration length provided in an embodiment of the present application is shown. Figure 6The first duration length 601 and the second duration length 602 shown in the figure overlap each other in the time period between T2 and T3, that is, in the time period between T2 and T3, the target signal includes the positioning signal and the designated signal; in the time period between T1 and T2, the target signal only includes the designated signal; in the time period between T3 and T4, the target signal only includes the positioning signal. The time period between T1 and T2, and the time period between T3 and T4 are the time periods that do not overlap between the first duration length 601 and the second duration length 602.
[0055] In some embodiments, the first duration length may include the time interval for each time the designated antenna radiates the designated signal, and the duration of each time the designated signal is radiated. If the first duration length is t, the time interval for each time the designated antenna radiates the designated signal is t1, and the duration of each time the designated signal is radiated is t2, then t is greater than or equal to t1+t2, that is, the first duration length includes the time interval for each time the designated antenna radiates the designated signal, and the duration of each time the designated signal is radiated. For example, t1 and t2 can be set so that t1+t2=t. The specific allocation of the time interval t1 and the duration t2 included in the first duration length t is not limited in the embodiments of the present application, and can be flexibly set as needed.
[0056] Step S220: obtaining a target signal strength based on a target signal received by the positioning antenna, where the target signal includes at least one of a positioning signal and a designated signal.
[0057] Among them, step S220 has been introduced in detail in the above embodiment and will not be repeated here.
[0058] Step S230: Determine whether the target signal strength is greater than or equal to the first specified signal strength.
[0059] As can be seen from the above introduction, the opening and closing state of the electronic device can be determined based on the target signal strength of the target signal. In some embodiments, the strength of the positioning signal received by the positioning antenna can be the first signal strength, and the strength of the designated signal received by the positioning antenna can be the second signal strength. In order to detect the designated signal from the target signal, the first signal strength needs to be less than the second signal strength.
[0060] The first designated signal strength may be preset so that the first designated signal strength is greater than the maximum value of the first signal strength and less than or equal to the minimum value of the second signal strength. Thus, if the acquired target signal strength is greater than or equal to the first designated signal strength, it indicates that the target signal includes the designated signal. At this time, it can be determined that the target signal strength meets the target condition, and the opening and closing state of the electronic device can be determined based on the target signal strength, that is, at this time, the execution of step S240 can be jumped; if the acquired target signal strength is less than the first designated signal strength, it indicates that the target signal does not include the designated signal. At this time, it can be determined that the target signal strength does not meet the target condition, and the execution of step S260 can be jumped.
[0061] Step S240: If the target signal strength is greater than or equal to the first specified signal strength, the opening and closing state of the electronic device is determined based on the target signal strength, wherein the first specified signal strength is greater than the maximum value of the first signal strength and less than or equal to the minimum value of the second signal strength.
[0062] If the maximum value of the first signal strength is a and the minimum value of the second signal strength is f, an exemplary first designated signal strength may be directly set to f; another exemplary first designated signal strength may also be set to a strength between a and f.
[0063] In some embodiments, see Figure 7 , Figure 7 An implementation diagram of step S240 is shown, which may specifically include steps S241 to S245.
[0064] Step S241: Determine whether the target signal strength is greater than or equal to the second specified signal strength.
[0065] From the above introduction, it can be known that as the opening and closing state of the electronic device changes, the strength of the designated signal obtained by the positioning antenna, that is, the second signal strength, will change accordingly, and the change of the second signal strength is monotonically changed as the electronic device is opened and closed. Specifically, as the opening and closing state of the electronic device switches from the closed state to the unfolded state, the distance between the positioning antenna and the designated antenna gradually increases, and the second signal strength obtained by the positioning antenna will gradually decrease; and as the opening and closing state of the electronic device switches from the unfolded state to the closed state, the distance between the positioning antenna and the designated antenna gradually decreases, and the second signal strength obtained by the positioning antenna will gradually increase. Therefore, the second designated signal strength can be pre-set, and when the target signal strength is greater than or equal to the second designated signal, step S242 can be jumped to execute; when the target signal strength is less than the second designated signal, step S243 can be jumped to execute, wherein the second designated signal strength is greater than the first designated signal strength.
[0066] Step S242: If the target signal strength is greater than or equal to the second designated signal strength, determining that the opening and closing state of the electronic device is the closed state, wherein the second designated signal strength is greater than the first designated signal strength.
[0067] It is not difficult to understand that the second signal strength will change with the change of the opening and closing state of the electronic device. Therefore, the maximum strength value of the second signal strength can be obtained in advance, that is, the second signal strength of the designated signal received by the positioning antenna when the electronic device is in a fully closed state. In other words, the electronic device can be pre-set to be in a fully closed state and the designated antenna can be controlled to radiate the designated signal, and the second signal strength of the designated signal can be obtained through the positioning antenna. At this time, the maximum strength value of the second signal strength is obtained, which can be used as the second designated signal strength. Therefore, when it is detected that the target signal strength is greater than or equal to the second designated signal strength, it can be determined that the opening and closing state of the electronic device is a closed state.
[0068] It should be noted that the second designated signal strength can also be set to reduce the designated value based on the maximum strength value of the second signal strength, for example, the maximum strength value of the second signal strength is reduced by Δx and then used as the second designated signal strength. This can avoid erroneous detection of the opening and closing state of the electronic device due to detection errors when obtaining the target signal strength.
[0069] Optionally, the second specified signal strength can also be set to a value between the maximum strength value of the second signal strength and the minimum strength value of the second signal strength, and close to the maximum strength value of the second signal strength, so that the opening and closing state of the electronic device can be determined to be a closed state before the electronic device switches to a fully closed state. The specific embodiments of the present application are not limited. Among them, the fully closed state refers to a state in which the first part and the second part of the electronic device are closed and are at the closest distance to each other and cannot get any closer.
[0070] Step S243: Determine whether the target signal strength is less than or equal to a third specified signal strength.
[0071] Furthermore, if the target signal strength is greater than the second specified signal, it indicates that the electronic device is not in a closed state at this time. However, if the electronic device is not in a closed state, the electronic device may be in an unfolded state, or it may be in an intermediate state between the closed state and the unfolded state. Therefore, in order to further determine the opening and closing state of the electronic device at this time, a third specified signal strength can be pre-set. When the target signal strength is less than or equal to the third specified signal strength, the execution can be skipped to step S244; when the target signal strength is greater than the third specified signal strength, the execution can be skipped to step S245.
[0072] Step S244: If the target signal strength is less than or equal to the third designated signal strength, determining that the opening and closing state of the electronic device is the unfolded state, wherein the third designated signal strength is less than the second designated signal strength and greater than or equal to the first designated signal strength.
[0073] The strength of the designated signal obtained by the positioning antenna, that is, the second signal strength, will change accordingly, and the change of the second signal strength changes monotonically with the opening and closing of the electronic device. Therefore, the minimum strength value of the second signal strength can be obtained in advance, that is, the second signal strength of the designated signal received by the positioning antenna when the electronic device is in a fully expanded state. In other words, the electronic device can be pre-set to be in a fully expanded state and the designated antenna can be controlled to radiate the designated signal, and the second signal strength of the designated signal can be obtained through the positioning antenna. At this time, the minimum strength value of the second signal strength is obtained, which can be used as the third designated signal strength. Therefore, when it is detected that the target signal strength is less than or equal to the third designated signal strength, it can be determined that the opening and closing state of the electronic device is the expanded state.
[0074] In addition, since the first designated signal strength is less than or equal to the second signal strength, and the third designated signal strength is the minimum strength value among the second signal strengths, and the second designated signal strength is the maximum strength value among the second signal strengths, the first designated signal strength is less than or equal to the second designated signal strength and the third designated signal strength.
[0075] It should be noted that the third designated signal strength can also be set to increase the designated value based on the minimum strength value of the second signal strength, for example, the minimum strength value of the second signal strength is increased by Δx and then used as the third designated signal strength. This can avoid misdetection of the opening and closing state of the electronic device due to detection errors when obtaining the target signal strength.
[0076] Optionally, the third designated signal strength may also be set to a value between the maximum strength value of the second signal strength and the minimum strength value of the second signal strength, and close to the minimum strength value of the second signal strength, so that the opening and closing state of the electronic device can be determined to be the expanded state before the electronic device switches to the fully expanded state. The specific embodiments of the present application are not limited. Among them, the fully expanded state refers to a state in which the first part and the second part of the electronic device have been expanded to the farthest distance from each other and cannot be moved further away.
[0077] Step S245: If the target signal strength is less than the second specified signal strength and greater than the third specified signal strength, it is determined that the opening and closing state of the electronic device is an intermediate state between the open state and the closed state.
[0078] Furthermore, since step S243 is further judged on the basis that the target signal strength is less than the second specified signal strength in step S241, if it is further judged that the target signal strength is greater than the third specified signal strength, then it can be determined that the target signal strength is between the third specified signal strength and the second specified signal strength, and thus it can be determined that the opening and closing state of the electronic device is between the extended state and the closed state, that is, it is in the intermediate state.
[0079] Step S250: Based on the target signal strength, controlling the working brightness of the target screen, the target screen including the first screen and / or the second screen.
[0080] In some embodiments, in addition to determining the open or closed state of the electronic device based on the target signal strength, the operating brightness of the target screen may also be controlled based on the target signal strength, where the target screen may include the first screen and / or the second screen.
[0081] In an exemplary manner, similar to the aforementioned step of determining the open or closed state of the electronic device, the second designated signal strength and the third designated signal strength can be determined in advance, wherein the second designated signal strength can be determined based on the maximum strength value among the second signal strengths of the designated signal received by the positioning antenna, and the third designated signal strength can be determined based on the minimum strength value among the second signal strengths of the designated signal received by the positioning antenna.
[0082] Furthermore, if the target signal strength is greater than or equal to the second specified signal strength, then the working brightness of the target screen can be directly controlled to a greater extent, for example, the working brightness is controlled to be a specified percentage of the maximum brightness of the target screen, such as 90%, 85%, etc. If the target signal strength is less than or equal to the third specified signal strength, then the working brightness of the target screen can be directly controlled to be zero. If the target signal strength is between the third specified signal strength and the second specified signal strength, then the working brightness of the target screen can be controlled to increase as the target signal strength gradually increases. For example, as the target signal strength gradually increases, the working brightness of the target screen can be controlled to increase from zero to the working brightness of the target screen when the target signal strength is greater than or equal to the second specified signal strength. It should be noted that when the working brightness of the target screen is set to zero, it can be indicated that the target screen is not working.
[0083] In another exemplary embodiment, a brightness intensity comparison table may be obtained in advance, so that after obtaining the target signal intensity, the operating brightness of the target screen may be directly determined by looking up the table. Specifically, when executing step S250, step S251 and step S252 may also be included.
[0084] Step S251: searching for a target brightness corresponding to a target signal strength based on a pre-acquired brightness intensity comparison table, wherein the brightness intensity comparison table includes at least one reference signal strength and a reference brightness corresponding to each reference signal strength.
[0085] Step S252: Adjust the working brightness of the target screen to the target brightness.
[0086] In some embodiments, the reference signal strength and the reference brightness corresponding to the reference signal strength may be preset, so that the brightness strength comparison table includes at least one reference signal strength and the reference brightness corresponding to each reference signal strength. The reference signal strength should be greater than or equal to the minimum strength value of the second signal strength and less than or equal to the maximum strength value of the second signal strength. There may be multiple reference signal strengths, so that after obtaining the target signal strength, the target brightness corresponding to the target signal strength may be found based on the brightness strength comparison table.
[0087] Specifically, a reference signal strength equal to or close to the target signal strength can be found in the brightness strength comparison table, and the reference brightness corresponding to the reference signal strength is used as the target brightness corresponding to the target signal strength. For example, the brightness strength comparison table includes reference signal strengths A1, A2, and A3, reference signal strength A1 corresponds to reference brightness L1, reference signal strength A2 corresponds to reference brightness L2, and reference signal strength A3 corresponds to reference brightness L3. The target signal strength is B, where B is equal to or close to A2, so it can be determined that the reference signal strength A2 corresponds to reference brightness L2 as the target brightness corresponding to the target signal strength.
[0088] Furthermore, the operating brightness of the target screen may be adjusted to the target brightness, thereby enabling adjustment of the operating brightness of the target screen directly based on the target signal strength.
[0089] Step S260: If the target signal strength does not meet the target condition, the electronic device is positioned based on the positioning signal.
[0090] The target signal strength does not meet the target condition, which may be that the target signal strength is less than the first specified signal strength. Thus, the acquired target signal only includes the positioning signal, so the electronic device can be positioned by the positioning signal.
[0091] In the state detection method provided by the present application, by presetting the second designated signal strength and the third designated signal strength, and then judging the opening and closing state of the electronic device by the target signal strength, it is only necessary to additionally set a designated antenna for radiating the designated signal, and no longer need to set an additional detection device, thereby reducing the cost of detecting the opening and closing state of the electronic device. Furthermore, the second designated signal strength can also be set to reduce the designated value based on the maximum strength value of the second signal strength, and the third designated signal strength can also be set to increase the designated value based on the minimum strength value of the second signal strength, thereby avoiding the false detection of the opening and closing state of the electronic device due to detection errors and the like when obtaining the target signal strength. Moreover, in the implementation method provided by the present application, the operating brightness of the target screen can be adjusted directly based on the target signal strength, so that the operating brightness of the target screen does not have to be adjusted by the opening and closing state.
[0092] See also Figure 8 , Figure 8 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 S310 to S340.
[0093] Step S310: obtaining a target signal strength based on a target signal received by a positioning antenna, where the target signal includes at least one of a positioning signal and a designated signal.
[0094] Among them, step S310 has been introduced in detail in the above embodiment and will not be repeated here.
[0095] Step S320: If the target signal strength is greater than or equal to the first specified signal strength, the target opening and closing angle corresponding to the target signal strength is determined based on a pre-acquired strength and opening and closing angle comparison table, wherein the strength and opening and closing angle comparison table includes at least one standard signal strength and a standard opening and closing angle corresponding to each standard signal strength.
[0096] In some embodiments, when the target signal strength is greater than or equal to the first specified signal strength, it can be determined that the target signal strength meets the target condition. In order to determine the opening and closing state of the electronic device through the target signal strength, the target opening and closing angle of the electronic device can be first determined through the target signal strength, and then the opening and closing state of the electronic device can be further determined based on the target opening and closing angle.
[0097] Exemplarily, a strength and opening angle comparison table can be obtained in advance, wherein the strength and opening angle comparison table may include at least one standard signal strength and a standard opening angle corresponding to each standard signal strength. For example, the electronic device can be controlled in advance to be at a plurality of different opening angles, respectively, as standard opening angles, and the designated antenna is controlled to radiate designated signals when the electronic device is at different standard opening angles. At this time, the designated signal is received by the positioning antenna, and the standard signal strength of each designated signal is obtained, so that the standard signal strength corresponding to each standard opening angle can be determined. Multiple standard opening angles are combined to form a strength and opening angle comparison table based on the standard signal strength corresponding to each standard opening angle.
[0098] Therefore, after obtaining the target signal strength, the standard signal strength equal to or close to the target signal strength can be found in the strength and opening angle comparison table, and the standard opening angle corresponding to the standard signal strength is used as the target opening angle.
[0099] Optionally, when the target signal strength is less than the first designated signal strength, it means that the target signal does not include the designated signal at this time, and the target signal can be positioned based on the positioning signal in the target signal.
[0100] Step S330: determining the opening and closing state of the electronic device based on the target opening and closing angle.
[0101] Furthermore, the opening and closing state of the electronic device can be determined based on the target opening and closing angle. It is easy to understand that if the opening and closing state of the electronic device is in the unfolded state, the target opening and closing angle will be larger; and if the opening and closing state of the electronic device is in the closed state, the target opening and closing angle will be smaller. Therefore, the opening and closing state of the electronic device can be determined by pre-setting an angle threshold and by the relationship between the angle threshold and the target opening and closing angle. Specifically, step S330 may include steps S331 to S333.
[0102] Step S331: If the target opening and closing angle is greater than or equal to the first angle threshold, it is determined that the opening and closing state of the electronic device is the unfolded state.
[0103] Step S332: If the target opening and closing angle is less than or equal to a second angle threshold, the opening and closing state of the electronic device is determined to be a closed state, and the second angle threshold is less than the first angle threshold.
[0104] Step S333: If the target opening and closing angle is less than the first angle threshold and greater than the second angle threshold, it is determined that the opening and closing state of the electronic device is an intermediate state between the open state and the closed state.
[0105] In some embodiments, a first angle threshold and a second angle threshold can be set, so that when the target opening and closing angle is greater than or equal to the first angle threshold, the opening and closing state of the electronic device can be determined to be an extended state; when the target opening and closing angle is less than or equal to the second angle threshold, the opening and closing state of the electronic device can be determined to be a closed state. Among them, the target opening and closing angle of the electronic device when it is fully extended can be used as the first angle threshold. It should be noted that the electronic device is in a fully extended state, which means that the first part and the second part of the electronic device have been extended to the farthest distance from each other and cannot be further away.
[0106] Optionally, an angle value slightly smaller than the target angle of the electronic device in the fully unfolded state may be used as the first angle threshold, so that before the electronic device is fully unfolded, the opening and closing state of the electronic device is determined to be the unfolded state by the target opening and closing angle. Further, when the target opening and closing angle is greater than or equal to the first angle threshold, the target screen is controlled to operate. Thus, before the electronic device is fully unfolded, the target screen is operated.
[0107] Similarly, the target opening and closing angle of the electronic device when it is in a fully closed state can also be used as the second angle threshold. It should be noted that the electronic device is in a fully closed state, which means that the first part and the second part of the electronic device have been closed and are at the closest distance from each other and cannot be further approached. It is not difficult to understand that the second angle threshold is smaller than the first angle threshold.
[0108] Optionally, an angle value slightly larger than the target angle of the electronic device when it is in a fully closed state may be used as the second angle threshold, so that before the electronic device is fully closed, the opening and closing state of the electronic device can be determined to be a closed state by the target opening and closing angle. It is also possible to further control the target screen not to work when the target opening and closing angle is less than or equal to the second angle threshold. Thus, before the electronic device is fully closed, the target screen is not working.
[0109] Furthermore, if the target opening and closing angle is greater than or equal to the first angle threshold, the opening and closing state of the electronic device is determined to be the unfolded state; if the target opening and closing angle is less than or equal to the second angle threshold, the opening and closing state of the electronic device is determined to be the closed state; if the target opening and closing angle is less than the first angle threshold and greater than the second angle threshold, the opening and closing state of the electronic device is determined to be the intermediate state, and the intermediate state includes a state between the unfolded state and the closed state.
[0110] Step S340: controlling the working state of the target screen based on the target opening and closing angle, where the target screen includes the first screen and / or the second screen.
[0111] Furthermore, the working state of the target screen may be controlled based on the target opening and closing angle, and the target screen may include the first screen and / or the second screen. For example, a third angle threshold and a fourth angle threshold may be set for specific control. Specifically, when executing step S340, step S341 and step S342 may be included.
[0112] Step S341: If the target opening and closing angle is greater than or equal to the third angle threshold, the working state of the target screen is controlled to be working.
[0113] Step S342: If the target opening and closing angle is less than or equal to the fourth angle threshold, the working state of the target screen is controlled to be not working.
[0114] In some embodiments, the third angle threshold can be set to the same value as the first angle threshold, and the fourth angle threshold can be set to the same value as the second angle threshold, so that when the opening and closing state of the electronic device is determined to be the unfolded state, the working state of the target screen is controlled to be working; and when the opening and closing state of the electronic device is determined to be the closed state, the working state of the target screen is controlled to be not working.
[0115] That is to say, when the target opening and closing angle is greater than or equal to the first angle threshold, the working state of the target screen is controlled to be working; when the target opening and closing angle is less than or equal to the second angle threshold, the working state of the target screen is controlled to be not working.
[0116] It should be noted that the working status of the target screen is working, which can be understood as controlling the target screen to light up and display, so that the target screen is working; and the working status of the target screen is not working, which can be understood as controlling the target screen to turn off and display, so that the target screen is not working, for example, putting the target screen into sleep or standby mode.
[0117] In other embodiments, a third angle threshold may be set, for example, the third angle threshold may be slightly smaller than the first angle threshold, so that if the target opening and closing angle is greater than or equal to the third angle threshold, the target screen is controlled to work. It is possible to control the target screen to work in advance before detecting that the opening and closing state of the electronic device is the unfolded state, and then after the user unfolds the electronic device, the target screen is already in the working state, which can reduce the time the user waits for the target screen to work after unfolding the electronic device, thereby improving the user experience.
[0118] A fourth angle threshold may also be set, for example, the fourth angle threshold may be slightly greater than the second angle threshold, so that if the target opening and closing angle is less than or equal to the fourth angle threshold, the target screen is controlled to be inoperative. The target screen may be controlled to be inoperative in advance before the electronic device is detected to be in the closed state, thereby reducing the overall power consumption of the system and improving battery life.
[0119] The state detection method provided by the present application can realize the control of the target screen to work in advance before detecting that the opening and closing state of the electronic device is the unfolded state, and then after the user unfolds the electronic device, the target screen is already in working state, which can reduce the time for the user to wait for the target screen to work after unfolding the electronic device, thereby improving the user experience. It is also possible to control the target screen not to work in advance before detecting that the opening and closing state of the electronic device is the closed state, thereby reducing the overall power consumption of the system and improving the battery life. In addition, by presetting the second designated signal strength and the third designated signal strength, and then judging the opening and closing state of the electronic device by the target signal strength, it is only necessary to set up an additional designated antenna for radiating the designated signal, and no longer need to set up an additional detection device, thereby reducing the cost of detecting the opening and closing state of the electronic device.
[0120] See also Fig. 9 , Fig. 9 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 S410 to S4160.
[0121] Step S410: Acquire the target signal strength of the target signal.
[0122] First, a target signal can be obtained based on the positioning antenna, and then the target signal strength of the target signal can be determined, where the target signal includes at least one of the positioning signal and the designated signal radiated by the designated antenna. The specific method of obtaining the target signal strength can be referred to the introduction of the above embodiment, which will not be repeated here.
[0123] Step S420: Determine whether the target signal strength is greater than or equal to the first specified signal strength.
[0124] Further, it can be determined whether the target signal strength is greater than or equal to the first specified signal strength. If it is greater than or equal to the first specified signal strength, the process can jump to step S440; if it is less than the first specified signal strength, the process can jump to step S430. The first specified signal strength is greater than the first signal strength and less than or equal to the second signal strength. For a specific description, please refer to the above embodiment.
[0125] Step S430: Positioning the electronic device.
[0126] When the target signal strength is less than the first specified signal strength, it indicates that the target signal only includes the positioning signal, so that the electronic device can be positioned in response to the positioning signal.
[0127] Step S440: determining whether the current opening and closing state of the electronic device is a fully closed state or a fully opened state based on the target signal strength.
[0128] When the target signal strength is greater than or equal to the first specified signal strength, the target signal may include a positioning signal and a specified signal, or may only include a specified signal. At this time, the current opening and closing state of the electronic device can be determined based on the target signal strength. If the current opening and closing state is a fully closed state, jump to step S450; if the current opening and closing state is a fully expanded state, jump to step S4110. Among them, the method for determining the current opening and closing state of the electronic device can refer to the method for determining the opening and closing state of the electronic device in the aforementioned embodiment, which will not be repeated here.
[0129] Step S450: The current opening and closing state is a fully closed state.
[0130] Step S460: The electronic device is gradually unfolded.
[0131] If the current opening and closing state of the electronic device is a fully closed state, the electronic device can be controlled to gradually unfold, that is, the opening and closing state of the electronic device is controlled to switch from a fully closed state to a fully unfolded state.
[0132] Step S470: Determine whether the target opening and closing angle is greater than or equal to a first angle threshold.
[0133] The electronic device is continuously controlled to gradually unfold and the target opening and closing angle is detected. The target opening and closing angle can be determined based on the target signal strength, and when the target opening and closing angle is greater than or equal to the first angle threshold, the process jumps to step S480 to control the target screen to work; if the target opening and closing angle is less than the first angle threshold, the process returns to step S470.
[0134] Step S480: Control the target screen to work.
[0135] In some implementations, when the target opening and closing angle is greater than or equal to a first angle threshold, the target screen may be directly controlled to operate.
[0136] Step S490: Determine whether the target signal strength is less than or equal to a third specified signal strength.
[0137] In the process of controlling the electronic device to gradually unfold, it is possible to detect whether the target signal strength is less than or equal to the third specified signal strength. If it is greater than the third specified signal strength, it is possible to return to step S490 to continue the detection; if it is less than or equal to the third specified signal strength, it is possible to jump to step S4100 to determine that the opening and closing state of the electronic device is in the unfolded state at this time. The third specified signal strength is less than the second specified signal strength and greater than or equal to the first specified signal strength.
[0138] Step S4100: Determine whether the electronic device is in the unfolded state.
[0139] At this point, the process can further jump to step S4110.
[0140] Step S4110: The current opening and closing state is a fully opened state.
[0141] Step S4120: The electronic device gradually closes.
[0142] When the electronic device is unfolded to the fully unfolded state, the current open and closed state can be determined to be the fully unfolded state. At this time, the electronic device can also be controlled to gradually close, that is, the open and closed state of the electronic device is controlled to switch from the fully unfolded state to the fully closed state.
[0143] Step S4130: Determine whether the target opening and closing angle is less than or equal to a second angle threshold.
[0144] The electronic device is continuously controlled to gradually close, and the target opening and closing angle is detected. The target opening and closing angle can be determined based on the target signal strength, and when the target opening and closing angle is less than or equal to the second angle threshold, the process jumps to step S4140 to control the target screen not to work; if the target opening and closing angle is greater than the second angle threshold, the process returns to step S4130.
[0145] Step S4140: The control target screen is not working.
[0146] In some implementations, when the target opening and closing angle is less than or equal to the second angle threshold, the target screen may be directly controlled to be inoperative.
[0147] Step S4150: Determine whether the target signal strength is greater than or equal to the second specified signal strength.
[0148] In the process of controlling the electronic device to gradually close, it is possible to detect whether the target signal strength is greater than or equal to the second specified signal strength. If it is less than the second specified signal strength, it is possible to return to step S4150 to continue the detection; if it is greater than or equal to the second specified signal strength, it is possible to jump to step S4160 to determine whether the opening and closing state of the electronic device is in the closed state at this time. The second specified signal strength is greater than the first specified signal strength.
[0149] Step S4160: Determine whether the electronic device is in a closed state.
[0150] At this time, the process may further jump to step S450 .
[0151] 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.
[0152] 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.
[0153] 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.
[0154] 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).
[0155] 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 target signal strength, and the target screen includes the first screen 111 and / or the second screen 121. The specific adjustment method may refer to the introduction in the aforementioned embodiment, which will not be repeated here.
[0156] Please refer to Fig.10 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1000 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0157] The computer readable storage medium 1000 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 1000 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1000 has storage space for program code 1010 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 1010 can be compressed, for example, in an appropriate form.
[0158] Please refer to Fig.11 , which shows a structural block diagram 1100 of a computer program product provided by an embodiment of the present application. The computer program product 1100 includes a computer program / instruction 1110, and when the computer program / instruction 1110 is executed by a processor, the steps of the above method are implemented.
[0159] 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, It is 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, the first part comprises a positioning antenna, and the second part comprises a designated antenna for radiating a designated signal; The method comprises: Acquire a target signal strength based on a target signal received by the positioning antenna, wherein the target signal includes at least one of a positioning signal and the designated signal; If the target signal strength meets the target condition, the opening and closing state of the electronic device is determined based on the target signal strength.
2. The state detection method according to claim 1, It is characterized in that The first signal strength of the positioning signal received by the positioning antenna is less than the second signal strength of the designated signal received by the positioning antenna, and if the target signal strength meets the target condition, judging the opening and closing state of the electronic device based on the target signal strength, comprises: If the target signal strength is greater than or equal to a first specified signal strength, the opening and closing state of the electronic device is determined based on the target signal strength, wherein the first specified signal strength is greater than the maximum value of the first signal strength and less than or equal to the minimum value of the second signal strength.
3. The state detection method according to claim 2, It is characterized in that If the target signal strength is greater than or equal to the first specified signal strength, determining the opening and closing state of the electronic device based on the target signal strength includes: If the target signal strength is greater than or equal to a second designated signal strength, determining that the opening and closing state of the electronic device is a closed state, wherein the second designated signal strength is greater than the first designated signal strength; If the target signal strength is less than or equal to a third designated signal strength, determining that the opening and closing state of the electronic device is an unfolded state, wherein the third designated signal strength is less than the second designated signal strength and greater than or equal to the first designated signal strength; If the target signal strength is less than the second designated signal strength and greater than the third designated signal strength, it is determined that the opening and closing state of the electronic device is an intermediate state between the unfolded state and the closed state.
4. The state detection method according to claim 2, It is characterized in that If the target signal strength is greater than or equal to the first specified signal strength, determining the opening and closing state of the electronic device based on the target signal strength includes: If the target signal strength is greater than or equal to the first specified signal strength, determining the target opening and closing angle corresponding to the target signal strength based on a pre-acquired strength and opening and closing angle comparison table, wherein the strength and opening and closing angle comparison table includes at least one standard signal strength and a standard opening and closing angle corresponding to each standard signal strength; The opening and closing state of the electronic device is determined based on the target opening and closing angle.
5. The state detection method according to claim 4, It is characterized in that The determining the opening and closing state of the electronic device based on the target opening and closing angle includes: If the target opening and closing angle is greater than or equal to a first angle threshold, determining that the opening and closing state of the electronic device is an unfolded state; If the target opening and closing angle is less than or equal to a second angle threshold, determining that the opening and closing state of the electronic device is a closed state, and the second angle threshold is less than the first angle threshold; If the target opening and closing angle is smaller than the first angle threshold and larger than the second angle threshold, it is determined that the opening and closing state of the electronic device is an intermediate state between the unfolded state and the closed state.
6. The state detection method according to claim 4, It is characterized in that The method further comprises: The working state of a target screen is controlled based on the target opening and closing angle, and the target screen includes the first screen and / or the second screen.
7. The state detection method according to claim 6, It is characterized in that The controlling the working state of the target screen based on the target opening and closing angle includes: If the target opening and closing angle is greater than or equal to a third angle threshold, controlling the working state of the target screen to be working; If the target opening and closing angle is less than or equal to a fourth angle threshold, the working state of the target screen is controlled to be not working.
8. The state detection method according to claim 1, It is characterized in that Before acquiring the target signal strength based on the target signal received by the positioning antenna, the method further includes: The designated antenna radiates the designated signal at intervals of a first duration each time, wherein there is a time period that is at least partially non-overlapping between the first duration during which the positioning antenna receives the designated signal and the second duration during which the positioning antenna receives the positioning signal.
9. The state detection method according to claim 1, It is characterized in that The method further comprises: Based on the target signal strength, the operating brightness of a target screen is controlled, where the target screen includes the first screen and / or the second screen.
10. The state detection method according to claim 9, It is characterized in that The controlling the working brightness of the target screen based on the target signal strength includes: Based on a pre-acquired brightness intensity comparison table, searching for a target brightness corresponding to the target signal intensity, the brightness intensity comparison table including at least one reference signal intensity and a reference brightness corresponding to each reference signal intensity; Adjust the operating brightness of the target screen to the target brightness.
11. The state detection method according to claim 1, It is characterized in that The method further comprises: If the target signal strength does not meet the target condition, the electronic device is positioned based on the positioning signal.
12. An electronic device, It is 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, the first part comprises a positioning antenna, and the second part comprises a designated antenna for radiating a designated signal; The electronic device also includes a processor, which is coupled to the positioning antenna and the designated antenna respectively, and is used to execute the method described in any one of claims 1-11.
13. The electronic device according to claim 12, It is 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 target signal strength, and the target screen includes the first screen and / or the second screen.
14. A computer-readable storage medium, It is 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 11.
