Electronic device, control method and control device of electronic device

By setting up a distance detector and a pressing area inside the electronic device, the button function is internalized, which solves the problems of mechanical buttons that limit thinness and reduce waterproofness and dustproofness, and improves the overall performance of the device.

CN113131916BActive Publication Date: 2024-09-24VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110427076.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-20
Publication Date
2024-09-24
Estimated Expiration
2041-04-20

AI Technical Summary

Technical Problem

Slotting mechanical buttons on the sides of electronic devices limits the development of thinner devices and reduces water and dust resistance.

Method used

A distance detector is installed in the casing. The back cover is provided with a pressing area on the opposite side of the distance detector. A gap is formed between the pressing area and the casing. The distance detector obtains distance changes. The processor executes functions under preset conditions. Cancel Instead of conventional keys, the key functions can be internalized.

Benefits of technology

Avoiding side grooves promotes thinner and lighter electronic devices while improving sealing, waterproofness and dustproofness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113131916B
    Figure CN113131916B
Patent Text Reader

Abstract

The present application discloses an electronic device, comprising: a shell, a back cover, a distance detector and a processor; wherein the back cover is mounted on the shell, and the distance detector is arranged in the shell; the back cover is provided with a pressing area at a position opposite to the distance detector, and a first gap is formed between the pressing area and the shell, and when the pressing area is pressed, the distance between the pressing area and the shell changes, and the distance detector is used to obtain the distance; the processor is arranged in the shell and is electrically connected to the distance detector, and the processor is used to execute a function corresponding to a preset condition when the distance meets the preset condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of electronic equipment, and in particular relates to an electronic equipment, and a control method and control device for the electronic equipment. Background Art

[0002] At present, electronic devices (such as mobile phones, tablet computers, etc.) are usually provided with mechanical buttons (such as volume buttons, lock screen buttons, etc.) on the side. The mechanical buttons are connected to the circuit board in the electronic device. When the user presses the mechanical buttons to generate a pressing signal, the circuit board can control the electronic device according to the pressing signal.

[0003] In the process of implementing this application, the applicant found that there are at least the following problems in the prior art: mechanical buttons usually require grooves to be cut on the sides of electronic devices, which not only limits the continued development of electronic devices towards lighter and thinner shapes, but also affects the sealing of electronic devices, thereby reducing the waterproofness and dustproofness of electronic devices. Summary of the invention

[0004] The present application aims to provide an electronic device that can solve the problem that the existing mechanical buttons are grooved on the side of the electronic device, which not only limits the electronic device from continuing to develop towards being lighter and thinner, but also affects the sealing of the electronic device, thereby reducing the waterproofness and dustproofness of the electronic device.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an electronic device, comprising: a housing, a back cover, a distance detector, and a processor; wherein:

[0007] The rear cover is installed outside the housing, and the distance detector is arranged inside the housing;

[0008] The back cover is provided with a pressing area at a position opposite to the distance detector, a first gap is formed between the pressing area and the housing, and when the pressing area is pressed, the distance between the pressing area and the housing changes, and the distance detector is used to obtain the distance;

[0009] The processor is disposed in the housing and is electrically connected to the distance detector. The processor is configured to execute a function corresponding to the preset condition when the distance satisfies the preset condition.

[0010] In a second aspect, an embodiment of the present application provides a control method for an electronic device, including:

[0011] Obtaining the distance between the pressing area and the shell;

[0012] When the distance meets a preset condition, a function corresponding to the preset condition is executed.

[0013] In a third aspect, an embodiment of the present application provides a control device for an electronic device, comprising:

[0014] A distance acquisition module, used to acquire the distance between the pressing area and the housing;

[0015] The function trigger module is used to execute the function corresponding to the preset condition when the distance meets the preset condition.

[0016] In a fourth aspect, an embodiment of the present application proposes an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the control method of the electronic device as described in the second aspect.

[0017] In a fifth aspect, an embodiment of the present application proposes a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the control method of the electronic device as described in the second aspect are implemented.

[0018] In an embodiment of the present application, the distance detector is disposed inside the housing, that is, the distance detector is disposed inside the electronic device. A pressing area is provided on the back cover at a position opposite to the distance detector, and a first gap is formed between the pressing area and the housing. When the pressing area is pressed, the distance between the pressing area and the housing changes, and the distance detector can obtain the distance. When the distance meets a preset condition, the processor executes a function corresponding to the preset condition. Compared with the prior art, the present application eliminates conventional buttons, and the components for realizing the button functions are all disposed inside the electronic device, avoiding grooves on the side of the electronic device, which is not only conducive to the continued development of electronic devices towards lightness and thinness, but also can improve the sealing of electronic devices, thereby improving the waterproofness and dustproofness of electronic devices.

[0019] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0021] Figure 1 is an exploded diagram of an electronic device according to an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of the structure of pressing an electronic device according to an embodiment of the present application;

[0023] Figure 3is a structural schematic diagram of an electronic device from one perspective of an embodiment of the present application;

[0024] Figure 4 yes Figure 3 One of the cross-sectional views along line AA, wherein the pressing area is not pressed;

[0025] Figure 5 yes Figure 4 The enlarged view of the circled point C;

[0026] Figure 6 yes Figure 3 The second cross-sectional view along the middle AA line, wherein the pressing area is pressed;

[0027] Figure 7 yes Figure 6 The enlarged view of the point D indicated by the middle circle;

[0028] Figure 8 is a schematic structural diagram of one surface of a back cover of an electronic device according to an embodiment of the present application;

[0029] Fig. 9 is a structural schematic diagram of a first circuit board of an electronic device according to an embodiment of the present application from one perspective;

[0030] Fig.10 yes Figure 3 Sectional view along the midline BB;

[0031] Fig.11 yes Fig.10 The enlarged view of the circled E;

[0032] Fig.12 is a flowchart of the steps of the control method of the electronic device according to the embodiment of the present application;

[0033] Fig.13 is a structural block diagram of a control device of an electronic device according to an embodiment of the present application;

[0034] Fig.14 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0035] Fig.15 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0036] Reference numerals:

[0037] 10-housing, 11-mainboard cover, 110-first mounting slot, 111-second mounting slot, 12-middle frame, 13-second threaded hole, 20-back cover, 21-pressing area, 30-first circuit board, 31-first threaded hole, 41-distance detector, 410-fixed pole piece, 411-moving pole piece, 4110-conductive contact piece, 4111-contact portion, 4112-connecting portion, 50-processor, 60-second circuit board, 70-connector, 71-male connector, 72-female connector, 80-spring, 81-fixed portion, 82-contact portion, 90-adhesive layer. DETAILED DESCRIPTION

[0038] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0039] The term "first" or "second" in the specification and claims of this application may include one or more of the features explicitly or implicitly. In the description of this application, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the objects connected before and after are in an "or" relationship.

[0040] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0041] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0042] The electronic device provided by the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0043] Reference Figures 1 to 7 , Figure 1 An exploded view of an electronic device according to an embodiment of the present application is shown. Figure 2 A schematic diagram of the pressing structure of an electronic device according to an embodiment of the present application is shown. Figure 3 A structural schematic diagram showing an electronic device from one perspective according to an embodiment of the present application is shown. Figure 4 Shows Figure 3 One of the cross-sectional views along line AA, where the pressing area is not pressed. Figure 5 Shows Figure 4 The enlarged view of the circled point C, Figure 6 Shows Figure 3 The second cross-sectional view of the middle AA line, in which the pressing area is pressed, Figure 7 It shows that Figure 6 An enlarged view of the circled D.

[0044] The electronic device may specifically include: a housing 10, a back cover 20, a distance detector 41 and a processor 50; wherein the back cover 20 is mounted on the housing 10, and the distance detector 41 is arranged in the housing 10; the back cover 20 is provided with a pressing area 21 at a position opposite to the distance detector 41, and a first gap is formed between the pressing area 21 and the housing 10, and when the pressing area 21 is pressed, the distance between the pressing area 21 and the housing 10 changes, and the distance detector 41 is used to obtain the above distance; the processor 50 is arranged in the housing 10 and is electrically connected to the distance detector 41, and the processor 50 is used to execute the function corresponding to the preset condition when the distance meets the preset condition. Compared with the prior art, the present application cancels the key, and the components for realizing the key function are all arranged inside the electronic device, avoiding the slotting on the side of the electronic device, which is not only conducive to the continued development of electronic devices towards lightness and thinness, but also can improve the sealing of the electronic device, thereby improving the waterproofness and dustproofness of the electronic device.

[0045] Specifically, if Figures 1 to 3As shown, the rear cover 20 is mounted on the housing 10, the distance detector 41 is disposed in the housing, and the rear cover 20 is provided with a pressing area 21 at a position opposite to the distance detector 41, and a first gap is formed between the pressing area 21 and the housing. Figures 4 to 7 As shown, when the pressing area 21 is pressed, the back cover 20 is deformed, and the distance between the pressing area 21 and the housing 10 (the surface of the housing 10 opposite to the back cover 20) is changed.

[0046] Specifically, the distance detector 41 can obtain the distance between the pressing area 21 and the housing 10. Since the processor 50 is electrically connected to the distance detector 41, the processor 50 compares the received distance value with a preset condition, wherein the preset condition is a preset distance value between the pressing area 21 and the housing 10. When the distance satisfies the preset condition, that is, when the distance satisfies the preset distance value, the processor 50 can execute a function corresponding to the preset condition.

[0047] In the prior art, if an anti-placement groove for placing keys is provided on the side of an electronic device, the material at the placement groove needs to be dug out, which will reduce the strength of the side of the electronic device, thereby reducing the strength of the entire device, and will also affect the integrity and aesthetics of the entire device. Compared with the prior art, the present application eliminates conventional keys and places all components that can realize key presses inside the electronic device. In this way, it avoids making grooves on the side of the electronic device, and can realize the corresponding functions of the pressing device without destroying the integrity of the entire device, reducing the strength of the entire device, and affecting the integrity of the entire device. In addition, from Figure 2 It can be seen that after the user holds the electronic device, he can press the pressing area 21 with one finger to realize the function corresponding to the preset condition (that is, the conventional button in the prior art), which is very convenient to operate and improves the user experience.

[0048] It should be noted that the functions performed by the processor 50 may be screen lock, volume increase, volume decrease, power on and off, etc. The specific functions may be set according to actual needs, and this embodiment may not be limited thereto. For ease of understanding, this embodiment takes volume increase as an example for explanation. This embodiment may pre-store a correspondence between a preset distance value D and a volume increment in the processor 50. When the processor 50 receives a distance value, it queries whether the distance value exists in the correspondence. If so, based on the correspondence, it determines the volume increment corresponding to the distance value, and adds the volume increment to the current volume of the electronic device to achieve the purpose of increasing the volume.

[0049] It should also be noted that the present embodiment does not limit the number of distance detectors 41, and can be set specifically according to user needs. Each distance detector 41 can correspond to one function or multiple functions. Since the setting method of each distance detector 41 is the same, only one distance detector 41 is shown in the diagram of the present embodiment, and the other distance detectors 41 can be set for reference.

[0050] Optionally, in order to facilitate the user to find the position of the pressing area 21, the present embodiment may set a mark at the position of each pressing area 21, and in order to improve the aesthetics of the electronic device, the mark may be set to a cartoon pattern, artistic text, a combination of pattern and text, etc. The present embodiment does not limit the specific implementation form of the mark, and it can be set according to the actual needs of the user and the specific function performed by the processor 50.

[0051] In the embodiments of the present application, Figure 1 , Figures 4 to 7 As shown, the distance detector 41 may specifically include: a moving pole piece 411, a fixed pole piece 410 and a detection unit; Figure 8 , Figure 8 A schematic structural diagram of a surface of a back cover 20 of an electronic device according to an embodiment of the present application is shown, wherein a moving electrode piece 411 is connected to a surface of the back cover 20 close to the shell 10 and is opposite to the pressing area 21; a fixed electrode piece 410 is connected to the shell 10 and is opposite to the moving electrode piece 411, and a distance is the distance between the fixed electrode piece 410 and the moving electrode piece 411, and the distance is related to the capacitance value between the fixed electrode piece 410 and the moving electrode piece 411; a detection unit is electrically connected to the moving electrode piece 411 and the fixed electrode piece 410, respectively, for detecting the capacitance value; the detection unit is integrated in the processor 50, or the processor 50 is electrically connected to the detection unit, and the processor 50 is also used to execute a function corresponding to a preset capacitance condition when the capacitance value meets a preset capacitance condition.

[0052] Specifically, if Figure 8 As shown, the moving pole piece 411 can be connected to the surface of the rear cover 20 close to the housing 10 by bonding, and the moving pole piece 411 is arranged at a position opposite to the pressing area 21. Figure 1 , Figures 4 to 7As shown, the fixed pole piece 410 is connected to the surface of the housing 10 opposite to the back cover 20, and the fixed pole piece 410 is arranged opposite to the moving pole piece 411. The distance between the pressing area 21 and the housing 10 mentioned above specifically refers to: the distance d between the fixed pole piece 410 and the moving pole piece 411. Since there is a capacitance value between the fixed pole piece 410 and the moving pole piece 411, that is, the fixed pole piece 410 and the moving pole piece 411 can form a capacitor, and the capacitance value of the capacitor Cx=εS / d, wherein ε is the dielectric constant of the medium between the fixed pole piece 410 and the moving pole piece 411, S is the facing area of ​​the fixed pole piece 410 and the moving pole piece 411, and d is the distance between the fixed pole piece 410 and the moving pole piece 411. When the pressing area 21 is pressed, ε and S remain unchanged, and ε and S are known quantities, therefore, the capacitance value C between the fixed pole piece 410 and the moving pole piece 411 x changes with the change of d. Figure 5 As shown, when the pressing area 21 of the electronic device is not pressed, the distance between the fixed electrode piece 410 and the moving electrode piece 411 can be set to the initial distance d0, and d0 can also be considered as the distance between the fixed electrode piece 410 and the moving electrode piece 411 when the electronic device leaves the factory. At this time, the capacitance value corresponding to d0 is the initial capacitance value C0; Figure 7 As shown, when the pressing area 21 of the electronic device is pressed, the back cover 20 is deformed, and the distance d between the fixed electrode piece 410 and the moving electrode piece 411 changes. At this time, the capacitance value C between the fixed electrode piece 410 and the moving electrode piece 411 is x Since the detection unit is electrically connected to the fixed electrode piece 410 and the moving electrode piece 411 respectively, the detection unit is used to detect the capacitance value between the fixed electrode piece 410 and the moving electrode piece 411. That is, the detection unit can detect C in real time according to the change of d. x .

[0053] It should be noted that, in actual applications, since the fixed pole piece 410 is stationary, the change in the distance d between the fixed pole piece 410 and the moving pole piece 411 can be regarded as the change in the displacement S of the moving pole piece 411, that is, the distance d between the fixed pole piece 410 and the moving pole piece 411 can be equivalent to S, that is, the processor 50 can also pre-store the corresponding relationship between S and the volume increment, where S is the distance between the center of mass of the moving pole piece 411 at the initial position and the center of mass of the moving pole piece 411 after deformation. When the processor 50 receives the displacement of the moving pole piece 411, it queries whether the displacement exists in the corresponding relationship. If so, based on the corresponding relationship, it determines the volume increment corresponding to the displacement, and adds the volume increment to the current volume of the electronic device.

[0054] It should also be noted that the area of ​​the pressing zone 21 is compatible with the area covered by the moving pole piece 411 and the fixed pole piece 410, that is, the area of ​​the pressing zone 21 can be set according to the area covered by the moving pole piece 411 and the fixed pole piece 410, and this embodiment does not limit the specific area of ​​the pressing zone 21.

[0055] Optionally, the detection unit can be integrated into the processor 50, that is, the detection unit can be regarded as a unit in the processor 50. For the processor 50, the detection unit detects the capacitance value between the fixed electrode piece 410 and the moving electrode piece 411 in real time. After obtaining the capacitance value, it is compared with the preset capacitance condition. The preset capacitance condition is the preset capacitance value between the fixed electrode piece 410 and the moving electrode piece 411. When the capacitance value meets the preset capacitance condition, that is, when the capacitance value meets the preset capacitance value, the processor 50 performs the function corresponding to the preset capacitance condition. It should be noted that the preset condition mentioned above includes the preset capacitance condition. Still taking the function of increasing the volume performed by the processor 50 as an example for explanation, when the detection unit detects the capacitance value, the processor 50 queries whether the capacitance value exists in the corresponding relationship based on the corresponding relationship between the preset capacitance value and the volume increment. If so, based on the corresponding relationship, the volume increment corresponding to the capacitance value is determined, and the volume increment is added to the current volume of the electronic device. It should be noted that the corresponding relationship between the preset capacitance value and the volume increment is pre-stored in the processor 50.

[0056] Optionally, the processor 50 can be electrically connected to the detection unit, and the detection unit detects the capacitance value between the fixed electrode piece 410 and the moving electrode piece 411 in real time, and sends the capacitance value to the processor 50. After the processor obtains the capacitance value, it compares it with the preset capacitance condition. When the capacitance value meets the preset condition, the function corresponding to the preset capacitance condition is executed. Still taking the function of increasing the volume performed by the processor 50 as an example for explanation, when the detection unit detects the capacitance value, it sends it to the processor 50. After the processor 50 obtains the capacitance value, according to the correspondence between the capacitance value and the volume increment, it queries whether the capacitance value exists in the correspondence. If so, based on the correspondence, the volume increment corresponding to the capacitance value is determined, and the volume increment is added to the current volume of the electronic device.

[0057] It should be noted that the distance detector 41 may also include a vibration component, which is electrically connected to the processor 50. When the processor 50 obtains the capacitance value, it compares it with the preset capacitance condition. When the capacitance value meets the preset condition, the processor 50 performs the function corresponding to the preset capacitance condition, and at the same time, drives the vibration component to generate vibration to improve the user's interactive experience. The vibration component may be a linear motor or a rotor motor, which is not limited in this embodiment and can be set according to actual needs.

[0058] Optional, such as Figure 1 , Figure 5 and Figure 7 As shown, the distance detector 41 also includes: a first circuit board 30 and a second circuit board 60; the first circuit board 30 is arranged in the shell, and the processor 50 is connected to the first circuit board 30; the second circuit board 60 is connected to the shell 10, and the electrode plate 410 is connected to the surface of the second circuit board 60 close to the back cover 20, and the second circuit board 60 is electrically connected to the first circuit board 30.

[0059] Specifically, if Figure 1 As shown, the first circuit board 30 is arranged in the shell 10, and the first circuit board 30 is specifically arranged on the surface of the shell 10 opposite to the back cover 20. The processor 50 is connected to the first circuit board 30. In practical applications, the processor 50 can generally be integrated into the first circuit board 30 through SMT (Surface Mounted Technology) or DIP (Dual Inline-pin Package).

[0060] In actual applications, multiple circuit boards are provided inside the electronic device, and multiple components are integrated on each circuit board. In addition, multiple parts are also provided inside the electronic device. Since the fixed pole piece 410 is provided at a position opposite to the pressing area 21, when the pressing area 21 is pressed, in order to avoid possible damage to components on a circuit board or parts inside the electronic device, this embodiment provides a second circuit board 60 in the first gap according to the specific shape of the fixed pole piece 410 and the space inside the electronic device. The second circuit board 60 is adapted to the shape of the fixed pole piece 410. Figure 1 , Figure 5 and Figure 7 As shown, the second circuit board 60 is connected to the surface of the housing 10 opposite to the back cover 20, and the fixed pole piece 410 can be fixed to the surface of the second circuit board 60 close to the back cover 20 by SMT or DIP. Since the second circuit board 60 is electrically connected to the first circuit board 30, if the detection unit is integrated in the processor 50, the fixed pole piece 410 can be electrically connected to the processor 50. If the detection unit is electrically connected to the processor 50, the fixed pole piece 410 can be electrically connected to the processor 50 through the detection unit, so that the processor 50 performs the function corresponding to the preset capacitance condition. In addition, since the space inside the electronic device is limited, in order to facilitate the arrangement of the second circuit board 60 according to the space inside the electronic device, the second circuit board 60 is preferably a flexible circuit board, so that the shape of the second circuit board 60 can be flexibly set according to the shape and position of the moving pole piece 411.

[0061] Further, such as Figure 1 , Figure 3 , Figure 5 and Figure 6 As shown, the distance detector 41 further includes a connector 70 , and the second circuit board 60 is electrically connected to the first circuit board 30 via the connector 70 .

[0062] In practical applications, connectors are bridges for transmitting signals and connecting current in electronic devices. Two circuit boards are generally connected through connectors. Therefore, Figure 1 , Figure 3 , Figure 5 and Figure 6 As shown, in this embodiment, the second circuit board 60 is connected to the first circuit board 30 through the connector 70, so that the fixed electrode 410 can be electrically connected to the processor 50. Of course, in this embodiment, the second circuit board 60 can also be electrically connected to the first circuit board 30 through a connecting wire. In this embodiment, there is no limitation on the specific connection relationship between the second circuit board 60 and the first circuit board 30, which can be set according to actual conditions.

[0063] Furthermore, since the board-to-board connector (BTB) has the advantages of strong transmission capability, lightness, and no need for welding, the connector 70 of this embodiment can use BTB, which includes a male connector 71 and a female connector 72. The male connector 71 and the female connector 72 are plugged and used in pairs. Figure 1 and Fig. 9 As shown, in this embodiment, the female connector 72 can be fixed to the first circuit board 30, such as Figure 5 As shown, the male connector 71 can be fixed to the second circuit board 60, and the second circuit board 60 is electrically connected to the first circuit board 30 through the cooperation of the male connector 71 and the female connector 72. In addition, the BTB makes the connection between the first circuit board 30 and the second circuit board 60 a detachable connection, which can facilitate the subsequent disassembly and maintenance of the two circuit boards. It should be noted that the female connector can also be fixed to the second circuit board 60, and the male connector can be fixed to the first circuit board 30. There is no limitation on the specific setting positions of the male connector and the female connector, and they can be set according to actual conditions.

[0064] Furthermore, in order to improve the installation stability of the fixed electrode sheet 410, as Figure 1 As shown, the electronic device further includes an adhesive layer, which is disposed between the second circuit board 60 and the housing, and the second circuit board 60 is fixedly connected to the housing through the adhesive layer. For the adhesive layer, the adhesive medium may be chemical glue or double-sided tape, which is not limited in this embodiment and may be selected according to actual conditions.

[0065] Further, see Figure 1 , Fig.10 and Fig.11 , Fig.10 Shows Figure 3 The cross-sectional view of the BB line. Fig.11 Shows Fig.10 In the enlarged view of the point E indicated by the middle circle, the distance detector 41 also includes: a spring piece 80 and a conductive contact piece 4110; the spring piece 80 is fixedly arranged on the surface of the first circuit board 30 close to the back cover, and the conductive contact piece 4110 is fixedly arranged on the surface of the moving pole piece 411 close to the first circuit board 30 and opposite to the spring piece, and the conductive contact piece 4110 contacts the spring piece 80 to electrically connect the moving pole piece 411 to the first circuit board 30.

[0066] Specifically, if Figure 1 and Fig.11 As shown, the spring piece 80 is fixedly arranged on the surface of the first circuit board 30 close to the rear cover, and the specific arrangement position of the spring piece 80 can be flexibly set according to the space on the first circuit board. Figure 8 As shown, the conductive contact piece 4110 is fixedly arranged on the surface of the moving pole piece 411 close to the first circuit board 30 and opposite to the spring sheet. The conductive contact piece 4110 can be considered as a gold finger known to ordinary technicians in the field, and the gold finger can be used as a signal input and output port. When the pressing area 21 of the electronic device is not pressed, it can be considered as the state of the electronic device when it leaves the factory and the state of the electronic device being stationary. The conductive contact piece 4110 is connected after contacting the spring sheet 80, so that the moving pole piece 411 can be electrically connected to the first circuit board 30, and then electrically connected to the processor 50, so that the processor 50 can perform the function corresponding to the preset capacitance condition.

[0067] Optional, such as Fig.11 As shown, the spring piece 80 may include a fixing portion 81 and a contact portion 82. The fixing portion 81 is in the shape of a plate. The fixing portion 81 is fixedly connected to the first circuit board 30. One end of the contact portion 82 is connected to the fixing portion 81, and the other end is suspended. A second gap is provided between the other end of the contact portion 82 and the fixing portion 81. The second gap is used to provide space for the distance change between the fixed pole piece 410 and the moving pole piece 411. The contact portion 82 of the spring piece 80 is formed by a series of continuous arc portions. The arc portion that contacts the conductive contact piece 4110 of the moving pole piece 411 is a convex arc relative to the fixing portion 81. The curvature of the convex arc can be set according to the area of ​​the conductive contact piece 4110. It should be noted that Fig.11 It is shown that when the pressing area 21 is subjected to three kinds of pressing forces, the contact portion 82 of the spring 80 is at different positions. In practical applications, the second gap changes with the magnitude of the pressing force, and the size of the second gap can be set according to actual conditions. For example, taking the function of the processor 50 to increase the volume as an example, the second gap can be set according to the deformation degree of the rear cover 20 when the volume increases to the limit decibel.

[0068] Optional, such as Figure 1 and Figure 8 As shown, the moving pole piece 411 includes a connected contact portion 4111 and a connecting portion 4112, and the conductive contact piece 4110 is arranged on the surface of the connecting portion 4112 close to the first circuit board 30. The contact portion 4111 and the fixed pole piece 410 have the same shape and area, and can be any one of a circle, a rectangle, a square and a diamond. In this embodiment, the shapes of the contact portion 4111 and the fixed pole piece 410 are not limited, and can be set according to actual conditions. In addition, the shape of the connecting portion 4112 needs to be set according to the position of the spring 80. Figure 8 The connecting portion 4112 shown in the figure is rectangular, and the conductive contact piece 4110 is arranged at one end of the connecting portion 4112 away from the contact portion 4111. It should be noted that in order to save costs, the connecting portion 4112 is made as small as possible, and the shape of the connecting portion 4112 can also be circular, wave-shaped, etc. This embodiment does not limit this, and the specific shape needs to be set according to the specific setting position of the spring piece 80.

[0069] In an optional embodiment of the present application, Figure 1 As shown, the shell 10 may specifically include a mainboard cover 11 and a middle frame 12; the mainboard cover 11 is arranged in the middle frame 12 and is opposite to the back cover 20, the back cover 20 covers the outside of the middle frame 12, and the first gap is formed by the back cover 20 and the mainboard cover 11; the first circuit board 30 and the second circuit board 60 are respectively connected to the mainboard cover 11.

[0070] Specifically, if Figure 1 As shown, the mainboard cover 11 is disposed in the middle frame 12, the circumferential side edge of the mainboard cover 11 is connected to the circumferential inner side edge of the middle frame 12, the mainboard cover 11 is opposite to the rear cover 20, and the rear cover 20 covers the outside of the middle frame 12, and the first gap mentioned above is specifically formed by the rear cover 20 and the mainboard cover 11, that is, the distance detector 41 is placed between the rear cover 20 and the mainboard cover 11. In addition, the distance detected by the distance detector 41 is specifically the distance between the pressing area 21 and the mainboard cover 11.

[0071] Optional, such as Figure 1 As shown, the surfaces opposite to the mainboard upper cover 11 and the rear cover 20 are provided with a first mounting groove 110 and a second mounting groove 111; the first mounting groove 110 is adapted to the shape of the first circuit board 30, and the first circuit board 30 is embedded in the first mounting groove 110; the second mounting groove 111 is adapted to the shape of the second circuit board 60, and the second circuit board 60 is embedded in the second mounting groove 111.

[0072] Specifically, in order to facilitate the continued development of electronic devices towards thinness and lightness, such as Figure 1As shown, in this embodiment, a first mounting groove 110 and a second mounting groove 111 are provided on the surfaces opposite to the mainboard cover 11 and the rear cover 20. The first mounting groove 110 is adapted to the shape of the first circuit board 30, and the first circuit board 30 is embedded in the first mounting groove 110. The second mounting groove 111 is adapted to the shape of the second circuit board 60, and the second circuit board 60 is embedded in the second mounting groove 111. In this way, the first gap can be minimized, thereby reducing the thickness of the entire machine, which is conducive to the continued development of electronic equipment towards lighter and thinner.

[0073] Furthermore, in order to improve the installation stability of the first circuit board 30 and facilitate the disassembly and assembly of the first circuit board 30, after the first circuit board 30 is embedded in the first installation groove 110, the first circuit board 30 can be fastened to the housing 10 by a plurality of fasteners. Figure 1 As shown, the first circuit board 30 and the mainboard cover 11 are provided with a first threaded hole 31 and a second threaded hole 13 correspondingly, and a fastener is sequentially provided with a first threaded hole 31 and a second threaded hole 13 to fasten the first circuit board 30 to the housing 10. It should be noted that the fastener can be selected from screws, bolts, and bolts, etc., and the specific selection of the fastener is not limited in this embodiment, and can be set according to actual conditions.

[0074] Optionally, the distance detector 41 may be at least one of a Hall sensor, a laser rangefinder and an infrared rangefinder.

[0075] Specifically, in addition to the distance detector 41 described above, this embodiment may also use any one of a Hall sensor, a laser rangefinder, and an infrared rangefinder. The detection principles of the Hall sensor, the laser rangefinder, or the infrared rangefinder are well known to ordinary technicians in the field and will not be described in detail here.

[0076] Furthermore, in order to make the distance measurement between the housing 10 and the pressing area 21 more accurate, any two of the Hall sensor, the laser rangefinder and the infrared rangefinder can be combined according to the weighting, or the three can be combined. Taking the Hall sensor and the laser rangefinder as an example, the Hall sensor and the laser rangefinder are electrically connected to the processor 50 respectively, and the distance m detected by the Hall sensor is x And the distance n detected by laser ranging x The processor 50 performs calculations according to the pre-stored weight distribution ratio. For example, m x *50%+n x*50%, based on the calculated distance value, matching with the preset condition, when it meets the preset condition, the processor 50 executes the function corresponding to the preset condition. Of course, the specific type of the distance detector 41 in this embodiment is not limited to the above-mentioned distances, and can also be other distance detectors 41 known to ordinary technicians in this field, and this embodiment may not be limited to this. Of course, the proportion of weight distribution may not be limited, and it can be set according to actual conditions.

[0077] It should be noted that, since the Hall sensor has the advantages of high precision, small size, light weight, long life, easy installation and low power consumption, the distance detector of this embodiment is preferably a Hall sensor.

[0078] It should be noted that the connection between the components on the two circuit boards is made through connecting wires. This technology is well known to ordinary technicians in this field and will not be described in detail here.

[0079] In summary, the electronic device described in the embodiments of the present application has at least the following advantages:

[0080] In an embodiment of the present application, the distance detector is disposed in the shell, that is, the distance detector is disposed inside the electronic device. A pressing area is provided on the back cover at a position opposite to the distance detector, and a first gap is formed between the pressing area and the shell. When the pressing area is pressed, the distance between the pressing area and the shell changes, and the distance detector can obtain the distance. When the distance meets the preset conditions, the processor executes the function corresponding to the preset conditions. Compared with the prior art, the present application cancels the conventional buttons, and the components for realizing the button functions are all disposed inside the electronic device. In this way, grooves are avoided on the side of the electronic device, which is not only conducive to the continued development of electronic devices towards lightness and thinness, but also can improve the sealing of the electronic device, thereby improving the waterproofness and dustproofness of the electronic device.

[0081] The present application also provides a method for controlling an electronic device, referring to Fig.12 , Fig.12 The flowchart of the control method of the electronic device according to the embodiment of the present application is shown, which may specifically include:

[0082] Step 201: Obtain the distance between the pressing area and the housing.

[0083] In the embodiment of the present application, the processor 50 of the electronic device obtains the distance between the pressing area 21 and the housing 10. In practical applications, refer to Figure 1 The housing 10 of the electronic device includes a middle frame 12 and a mainboard cover 11. The mainboard cover 11 is opposite to the back cover 20, and the back cover 20 covers the outside of the middle frame 12. Here, the distance between the pressing area 21 and the housing 10 specifically refers to the distance between the pressing area 21 and the mainboard cover 11.

[0084] Step 202: When the distance satisfies a preset condition, execute a function corresponding to the preset condition.

[0085] In the embodiments of the present application, Figure 1 As shown, the distance detector 41 is arranged inside the electronic device. Compared with the prior art, conventional buttons are eliminated, and the components for realizing button functions are arranged inside the electronic device, thus avoiding the need to make grooves on the side of the electronic device, which is not only conducive to the continued development of electronic devices towards lightness and thinness, but also can improve the sealing of the electronic device, thereby improving the waterproofness and dustproofness of the electronic device.

[0086] In the embodiment of the present application, the preset condition may be a preset distance value between the pressing area 21 and the housing 10, and the preset condition may be stored in advance in the processor 50. When the processor 50 obtains the distance between the pressing area 21 and the housing 10, it compares it with the preset distance value. If the distance corresponds to the preset distance value, the processor 50 executes the function corresponding to the preset condition.

[0087] It should be noted that the functions performed by the processor 50 may be screen locking, volume increase, volume decrease, power on and off, etc. For ease of understanding, this embodiment is illustrated by taking the function performed by the processor 50 of volume increase as an example. This embodiment may pre-store a correspondence between a preset distance value and a volume increment in the processor 50. When the processor 50 receives a distance value, it queries whether the distance value exists in the correspondence. If so, based on the correspondence, it determines the volume increment corresponding to the distance value, and adds the volume increment to the current volume of the electronic device to achieve the purpose of increasing the volume.

[0088] In the embodiment of the present application, for a distance detector 41, different preset distance values ​​may correspond to different functions. For example, the preset distance value includes a first preset value and a second preset value. The first preset value corresponds to the photo function, and the second preset value corresponds to the video recording function. When the processor obtains the distance between the pressing area 21 and the housing 10, it compares it with the preset distance value. When the obtained distance corresponds to the first preset value, the processor 50 executes the photo function of the electronic device. When the obtained distance corresponds to the second preset value, the processor 50 executes the video recording function. It should be noted that the functions corresponding to the first preset value and the second preset value are not limited to the one given as an example, and can also be functions such as screenshot, screen projection, power on, power off, and screen lock. This embodiment does not limit this, and it is set according to actual needs.

[0089] In an embodiment of the present application, for a distance detector 41, different preset distance values ​​combined with the duration of pressing correspond to different functions. For example, the third preset distance value and the first preset duration correspond to the lock screen function, and the fourth preset distance value and the second preset duration correspond to the power-on function. In this case, the processor 50 is electrically connected to the pressing area 21. When the pressing area 21 is pressed, the processor 50 performs timing. If the pressing duration is equal to the third preset duration, the lock screen function of the electronic device is triggered. If the pressing duration is equal to the fourth preset duration, the processor 50 executes the power-on function of the electronic device. It should be noted that the functions corresponding to the first preset value and the second preset value are not limited to the one given as an example, and can also be functions such as screenshot, screen projection, shutdown, photo taking, and video recording. This embodiment does not limit this, and it is set according to actual needs.

[0090] In an embodiment of the present application, a distance detector 41 can also correspond to a group of functions, for example, power on and off. If the electronic device is currently in the off state, when the processor 50 obtains that the distance between the pressing area 21 and the shell 10 meets the preset distance, the power-on function of the electronic device is executed. On the contrary, if the electronic device is currently in the on state, when the processor 50 obtains that the distance between the pressing area 21 and the shell 10 meets the preset distance, the power-off function of the electronic device is executed.

[0091] In the embodiment of the present application, the step 202 includes a sub-step: when the capacitance value satisfies the preset capacitance condition, executing a function corresponding to the preset capacitance condition.

[0092] In the embodiments of the present application, Figure 1 , Figures 4 to 8 As shown, the fixed pole piece 410 is connected to the surface of the shell 10 opposite to the back cover 20, that is, the fixed pole piece 410 is connected to the mainboard cover 11, the moving pole piece is connected to the surface of the back cover opposite to the mainboard cover, and the fixed pole piece 410 and the moving pole piece 411 are arranged opposite to each other. That is, the fixed pole piece 410 and the moving pole piece 411 can form a capacitor, and the capacitance value Cx of the capacitor is Cx=εS / d, wherein ε is the dielectric constant of the medium between the fixed pole piece 410 and the moving pole piece 411, S is the facing area of ​​the fixed pole piece 410 and the moving pole piece 411, and d is the distance between the fixed pole piece 410 and the moving pole piece 411. The distance between the pressing area 21 and the shell 10 mentioned above is specifically the distance d between the fixed pole piece 410 and the moving pole piece 411. In this embodiment, since ε and S are constant, and ε and S are known quantities, the capacitance value Cx between the fixed pole piece 410 and the moving pole piece 411 is x It is only related to d, that is, the capacitance value C xIt is related to the distance between the pressing area 21 and the housing 10. In this way, the present embodiment can also use the capacitance value as a condition for the processor 50 to execute the function corresponding to the preset condition. The processor 50 can obtain the capacitance value between the fixed electrode piece 410 and the moving electrode piece 411, which is described in detail in the above embodiment and will not be repeated here.

[0093] In an embodiment of the present application, a preset capacitance condition may be pre-stored in the processor 50, that is, a preset capacitance value between the fixed electrode piece 410 and the moving electrode piece 411. When the processor obtains the capacitance value between the fixed electrode piece 410 and the moving electrode piece 411, it is compared with the preset capacitance value. If the capacitance value corresponds to the preset distance value, the function corresponding to the preset capacitance condition is executed. For ease of understanding, the function performed by the processor 50 is still described as volume increase. The processor 50 queries whether the capacitance value exists in the corresponding relationship between the preset capacitance value and the volume increment based on the corresponding relationship. If so, the volume increment corresponding to the capacitance value is determined based on the corresponding relationship, and the volume increment is added to the current volume of the electronic device. It should be noted that the corresponding relationship between the preset capacitance value and the volume increment is pre-stored in the processor 50.

[0094] In an embodiment of the present application, the distance between the pressing area and the shell is obtained, and when the distance meets the preset condition, the function corresponding to the preset condition is executed. It can be seen that this embodiment executes the function corresponding to the preset condition through the control method of the electronic device. Since the present application cancels the conventional buttons, the components for realizing the button functions are all arranged inside the electronic device. Compared with the prior art, it avoids grooving on the side of the electronic device, which is not only conducive to the continued development of electronic devices towards lightness and thinness, but also can improve the sealing of the electronic device, thereby improving the waterproofness and dustproofness of the electronic device.

[0095] The present application also provides a control device for an electronic device, referring to Fig.13 , Fig.13 The structural block diagram of the control device of the electronic device according to the embodiment of the present application is shown. The control device 300 may specifically include:

[0096] The distance acquisition module 301 is used to acquire the distance between the pressing area and the housing.

[0097] The function execution module 302 is used to trigger a function corresponding to a preset condition when the distance meets the preset condition.

[0098] The control device of the electronic device of the embodiment of the present application is used to implement the control method of the corresponding electronic device mentioned above, and has the beneficial effects corresponding to the method embodiment, which will not be repeated here.

[0099] Optional, see Fig.14 As shown, Fig.14 A schematic structural diagram of an electronic device according to an embodiment of the present application is shown.

[0100] The embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a program or instruction stored in the memory 402 and executable on the processor 401. When the program or instruction is executed by the processor 401, each process of the above-mentioned control method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0101] It should be noted that the electronic devices in the embodiments of the present application include mobile electronic devices and non-mobile electronic devices.

[0102] Reference Fig.15 , Fig.15 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application is shown.

[0103] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510.

[0104] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.14 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0105] The processor 510 is used to obtain the distance between the pressing area and the shell, and when the distance meets the preset condition, execute the function corresponding to the preset condition.

[0106] In an embodiment of the present application, the distance between the pressing area and the shell is obtained, and when the distance meets the preset condition, the function corresponding to the preset condition is executed. It can be seen that the present embodiment eliminates the conventional buttons, and the components for realizing the button functions are all arranged inside the electronic device. Compared with the prior art, it avoids grooving on the side of the electronic device, which is not only conducive to the continued development of electronic devices towards lightness and thinness, but also can improve the sealing of the electronic device, thereby improving the waterproofness and dustproofness of the electronic device.

[0107] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 509 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 510 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.

[0108] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the control method embodiment of the above-mentioned electronic device is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0109] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0110] In the description of the specification of this application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0111] It should be noted that, in the description of the specification of the present application, the term "comprises", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0113] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. An electronic device, It is characterized in that include: A housing, a back cover, a distance detector and a processor; wherein, The rear cover is mounted on the housing, and the housing includes a mainboard cover; the distance detector is arranged between the rear cover and the mainboard cover; The back cover is provided with a pressing area at a position opposite to the distance detector, and a first gap is formed between the pressing area and the housing, and the first gap is formed by the back cover and the mainboard upper cover; when the pressing area is pressed, the distance between the pressing area and the mainboard upper cover changes, and the distance detector is used to obtain the distance; The processor is disposed in the housing and is electrically connected to the distance detector, and the processor is used to execute a function corresponding to the preset condition when the distance meets the preset condition; The distance detector also includes: a moving pole piece and a fixed pole piece; The distance is the distance between the fixed pole piece and the moving pole piece, and the distance is related to the capacitance value between the fixed pole piece and the moving pole piece; The distance detector further includes: a first circuit board and a second circuit board; The first circuit board is disposed in the housing, and the processor is connected to the first circuit board; The second circuit board is connected to the housing, the fixed electrode sheet is connected to the surface of the second circuit board close to the rear cover, and the second circuit board is electrically connected to the first circuit board; the second circuit board is adapted to the shape of the fixed electrode sheet; The distance detector also includes: a spring sheet and a conductive contact sheet; The spring sheet is fixedly arranged on the surface of the first circuit board close to the back cover, and the conductive contact sheet is fixedly arranged on the surface of the moving electrode sheet close to the first circuit board and opposite to the spring sheet; The conductive contact piece contacts the spring piece so that the moving electrode piece is electrically connected to the first circuit board.

2. The electronic device according to claim 1, It is characterized in that The distance detector comprises: a detection unit; The moving electrode piece is connected to the surface of the rear cover close to the housing and is opposite to the pressing area; The fixed pole piece is connected to the housing and is opposite to the moving pole piece; The detection unit is electrically connected to the moving electrode piece and the fixed electrode piece respectively, and is used to obtain the capacitance value; The detection unit is integrated in the processor, or the processor is electrically connected to the detection unit. The processor is further configured to, when the capacitance value satisfies a preset capacitance condition, execute a function corresponding to the preset capacitance condition.

3. The electronic device according to claim 2, It is characterized in that The distance detector further comprises: a connector; The second circuit board is electrically connected to the first circuit board through the connector.

4. The electronic device according to claim 2, It is characterized in that The electronic device further comprises: an adhesive layer; The adhesive layer is arranged between the second circuit board and the shell, and the second circuit board is fixedly connected to the shell through the adhesive layer.

5. The electronic device according to claim 2, It is characterized in that The housing also includes a middle frame; The mainboard upper cover is arranged in the middle frame and is opposite to the rear cover, and the rear cover covers the outside of the middle frame; The first circuit board and the second circuit board are respectively connected to the mainboard upper cover.

6. The electronic device according to claim 2, It is characterized in that The surface of the mainboard upper cover opposite to the rear cover is provided with a first mounting groove and a second mounting groove; The first mounting groove is adapted to the shape of the first circuit board, and the first circuit board is embedded in the first mounting groove; The second mounting groove is adapted to the shape of the second circuit board, and the second circuit board is embedded in the second mounting groove.

7. A method for controlling an electronic device, It is characterized in that The electronic device according to any one of claims 1 to 6 comprises: Get the distance between the pressing area and the mainboard cover; When the distance meets a preset condition, a function corresponding to the preset condition is executed.

8. A control device for an electronic device, It is characterized in that The electronic device according to any one of claims 1 to 6 comprises: A distance acquisition module is used to acquire the distance between the pressing area and the mainboard cover; The function execution module is used to execute the function corresponding to the preset condition when the distance meets the preset condition.