[go: up one dir, main page]

CN108769319B - Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components - Google Patents

Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components Download PDF

Info

Publication number
CN108769319B
CN108769319B CN201810589836.8A CN201810589836A CN108769319B CN 108769319 B CN108769319 B CN 108769319B CN 201810589836 A CN201810589836 A CN 201810589836A CN 108769319 B CN108769319 B CN 108769319B
Authority
CN
China
Prior art keywords
sliding
assembly
speed
distance
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201810589836.8A
Other languages
Chinese (zh)
Other versions
CN108769319A (en
Inventor
莫斐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810589836.8A priority Critical patent/CN108769319B/en
Publication of CN108769319A publication Critical patent/CN108769319A/en
Application granted granted Critical
Publication of CN108769319B publication Critical patent/CN108769319B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0264Details of the structure or mounting of specific components for a camera module assembly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Transmission Devices (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses an electromagnetic interference prevention speed change method and a driving assembly of a sliding assembly, wherein the sliding assembly is used for an electronic device and comprises a body and the driving assembly, the driving assembly is used for controlling the sliding assembly to slide between a first position accommodated in the body and a second position exposed out of the body, and the electromagnetic interference prevention speed change method comprises the following steps: controlling the driving component to start the sliding component according to a preset first speed, and starting a timer; calculating the sliding time of the sliding component corresponding to the preset variable speed sliding distance according to the working parameters of the driving component; when the learned coasting time is reached, the driving component is controlled to switch from the first speed to the second speed to drive the sliding component to move to the target position. Therefore, the influence of related components on the screen occupation ratio is reduced through the sliding component, the interference of electromagnetism on the speed change position regulation and control of the driving component is avoided, the accuracy of the speed change position regulation and control of the driving component is guaranteed, and the sliding component is guaranteed to provide functional services well.

Description

滑动组件防电磁干扰的变速方法、驱动组件、装置和介质Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components

技术领域technical field

本发明涉及电子技术领域,尤其涉及一种滑动组件防电磁干扰的变速方法和驱动组件。The invention relates to the field of electronic technology, and in particular, to a speed change method and a drive assembly for preventing electromagnetic interference of a sliding assembly.

背景技术Background technique

随着智能手机等便携式电子装置的普及,电子装置的美观性和功能性的优化也成为大趋势,比如,电子装置的屏幕占比的提高就是其中一种流行趋势。With the popularization of portable electronic devices such as smartphones, the optimization of the aesthetics and functionality of electronic devices has also become a major trend. For example, the increase in the screen ratio of electronic devices is one of the popular trends.

相关技术中,电子装置的前面板中安装有前置相机等设备以为用户提供前置摄像服务,因而,前置相机的在前面板上的安装空间的占用与屏幕占比的提高的矛盾亟待解决。In the related art, equipment such as a front camera is installed in the front panel of the electronic device to provide a front camera service for the user. Therefore, the contradiction between the installation space occupied by the front camera on the front panel and the increase of the screen ratio needs to be solved urgently. .

发明内容SUMMARY OF THE INVENTION

本发明旨在至少在一定程度上解决相关技术中的技术问题之一。The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

为此,本发明提出一种滑动组件防电磁干扰的变速方法和驱动组件。To this end, the present invention provides a speed change method and a drive assembly for preventing electromagnetic interference of a sliding assembly.

为达上述目的,本发明第一方面实施例提出了一种滑动组件防电磁干扰的变速方法,所述滑动组件用于电子装置,所述电子装置包括本体和驱动组件,所述驱动组件用于控制所述滑动组件在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动,所述防电磁干扰的变速方法包括以下步骤:控制所述驱动组件按照预设的第一速度启动所述滑动组件,并启动定时器;根据所述驱动组件的工作参数,计算所述滑动组件与预设的变速滑行距离对应的滑行时间;当根据所述定时器获知所述滑行时间到达时,控制所述驱动组件从所述第一速度切换到所述第二速度驱动所述滑动组件运行到目标位置,其中,所述第二速度大于所述第一速度。In order to achieve the above object, the first aspect of the present invention provides a method for preventing electromagnetic interference of a sliding component. The sliding component is used in an electronic device, and the electronic device includes a body and a driving component. The driving component is used for The sliding assembly is controlled to slide between a first position accommodated in the main body and a second position exposed from the main body, and the method for preventing electromagnetic interference includes the following steps: controlling the driving assembly according to a preset The first speed starts the sliding component and starts the timer; according to the working parameters of the driving component, calculate the sliding time corresponding to the sliding component and the preset variable speed sliding distance; when the sliding component is obtained according to the timer When the time arrives, the driving assembly is controlled to switch from the first speed to the second speed to drive the sliding assembly to run to the target position, wherein the second speed is greater than the first speed.

为达上述目的,本发明第二方面实施例提出了一种驱动组件,所述驱动组件用于电子装置,所述电子装置包括本体和滑动组件,所述驱动组件用于控制所述滑动组件在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动,所述驱动组件包括处理器,所述处理器用于:控制所述驱动组件按照预设的第一速度启动所述滑动组件,并启动定时器;根据所述驱动组件的工作参数,计算所述滑动组件与预设的变速滑行距离对应的滑行时间;当根据所述定时器获知所述滑行时间到达时,控制所述驱动组件从所述第一速度切换到所述第二速度驱动所述滑动组件运行到目标位置,其中,所述第二速度大于所述第一速度。In order to achieve the above object, the second aspect of the present invention provides a drive assembly, the drive assembly is used in an electronic device, the electronic device includes a body and a sliding assembly, and the drive assembly is used to control the sliding assembly to move sliding between a first position accommodated in the body and a second position exposed from the body, the drive assembly includes a processor, and the processor is used to: control the drive assembly to start at a preset first speed the sliding component, and start the timer; according to the working parameters of the driving component, calculate the sliding time corresponding to the sliding component and the preset variable speed sliding distance; when it is known according to the timer that the sliding time arrives, Controlling the drive assembly to switch from the first speed to the second speed drives the sliding assembly to run to a target position, wherein the second speed is greater than the first speed.

为达上述目的,本发明第三方面实施例提出了一种电子装置,包括:本体;滑动组件,所述滑动组件用于在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动;驱动组件,所述驱动组件用于控制所述滑动组件在收容于所述本体的第一位置和自所述本体露出的第二位置之间滑动,所述驱动组件包括处理器,所述处理器用于控制所述驱动组件按照预设的第一速度启动所述滑动组件,并启动定时器,根据所述驱动组件的工作参数,计算所述滑动组件与预设的变速滑行距离对应的滑行时间,当根据所述定时器获知所述滑行时间到达时,控制所述驱动组件从所述第一速度切换到所述第二速度驱动所述滑动组件运行到目标位置,其中,所述第二速度大于所述第一速度。In order to achieve the above object, an embodiment of the third aspect of the present invention provides an electronic device, comprising: a main body; sliding between two positions; a driving assembly for controlling the sliding assembly to slide between a first position accommodated in the body and a second position exposed from the body, the driving assembly includes a process The processor is used to control the drive assembly to start the sliding assembly according to a preset first speed, and start a timer, and calculate the sliding assembly and the preset variable speed sliding according to the working parameters of the drive assembly. The distance corresponding to the taxiing time, when it is known according to the timer that the taxiing time arrives, the driving component is controlled to switch from the first speed to the second speed to drive the sliding component to run to the target position, wherein, The second speed is greater than the first speed.

为达上述目的,本发明第四个方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时,实现如前述方法实施例所述的滑动组件防电磁干扰的变速方法。In order to achieve the above purpose, a fourth aspect embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the sliding component anti-sliding device as described in the foregoing method embodiments is implemented. Variable speed methods for electromagnetic interference.

本发明提供的技术方案,至少包括如下有益效果:The technical scheme provided by the present invention at least includes the following beneficial effects:

控制驱动组件按照预设的第一速度启动滑动组件,并启动定时器,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间,进而,当根据定时器获知滑行时间到达时,控制驱动组件从第一速度切换到第二速度驱动滑动组件运行到目标位置,其中,第二速度大于第一速度。由此,通过滑动组件降低前置相机等组件对屏幕占比的影响,且避免电磁对驱动组件变速位置调控的干扰,保证了对驱动组件变速位置调控的准确性,从而保证滑动组件较好的提供功能服务。Control the driving component to start the sliding component according to the preset first speed, and start the timer, and calculate the sliding time corresponding to the sliding component and the preset variable speed sliding distance according to the working parameters of the driving component, and then, when the sliding time is obtained according to the timer. Upon arrival, the control drive assembly switches from a first speed to a second speed to drive the sliding assembly to the target position, wherein the second speed is greater than the first speed. Therefore, the influence of the front camera and other components on the screen ratio is reduced by the sliding component, and the electromagnetic interference on the control of the shifting position of the driving component is avoided, and the accuracy of the shifting position control of the driving component is ensured, thereby ensuring a better performance of the sliding component. Provide functional services.

本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be set forth, in part, from the following description, and in part will be apparent from the following description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of embodiments taken in conjunction with the accompanying drawings, wherein:

图1是本发明实施方式的电子装置在第二位置时的状态示意图;1 is a schematic diagram of a state of an electronic device according to an embodiment of the present invention when it is in a second position;

图2是本发明实施方式的电子装置在第一位置时的状态示意图;FIG. 2 is a schematic diagram of the state of the electronic device according to the embodiment of the present invention when it is in a first position;

图3是本发明实施方式的电子装置在第三位置时的状态示意图;3 is a schematic diagram of the state of the electronic device according to the embodiment of the present invention when it is in a third position;

图4是本发明实施方式的检测组件的结构示意图;4 is a schematic structural diagram of a detection assembly according to an embodiment of the present invention;

图5是本发明实施方式的电子装置的使用场景图;5 is a usage scene diagram of an electronic device according to an embodiment of the present invention;

图6是本发明实施方式的电子装置的另一使用场景图;FIG. 6 is another usage scenario diagram of the electronic device according to the embodiment of the present invention;

图7是本发明实施方式的电子装置的结构示意图;7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;

图8是根据本发明一个实施例的滑动组件防电磁干扰的变速方法的流程图;FIG. 8 is a flowchart of a method for shifting a sliding assembly against electromagnetic interference according to an embodiment of the present invention;

图9是根据本发明另一个实施例的滑动组件防电磁干扰的变速方法的流程图;以及FIG. 9 is a flowchart of a method for preventing electromagnetic interference of a sliding assembly for shifting according to another embodiment of the present invention; and

图10是根据本发明又一个实施例的滑动组件防电磁干扰的变速方法的流程图。FIG. 10 is a flowchart of a method for preventing electromagnetic interference of a sliding assembly for shifting according to yet another embodiment of the present invention.

主要元件符号说明:Description of main component symbols:

电子装置100、本体10、壳体12、显示组件14、盖板142、滑槽16、凹槽162、滑动组件20、承载件22、螺纹孔24、转动丝杆26、检测组件30、磁场产生元件32、霍尔元件 34、处理器36、功能器件40、前置相机42、听筒44、驱动组件50、驱动电机52、第一位置A、第二位置B、第三位置C。Electronic device 100 , main body 10 , casing 12 , display assembly 14 , cover plate 142 , chute 16 , groove 162 , sliding assembly 20 , carrier 22 , threaded hole 24 , rotating screw 26 , detection assembly 30 , magnetic field generation Element 32 , Hall element 34 , processor 36 , functional device 40 , front camera 42 , earpiece 44 , drive assembly 50 , drive motor 52 , first position A, second position B, and third position C.

具体实施方式Detailed ways

下面详细描述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, only used to explain the present invention, and should not be construed as a limitation of the present invention.

在本发明的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", " rear, left, right, vertical, horizontal, top, bottom, inside, outside, clockwise, counterclockwise, etc., or The positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, features defined as "first", "second" may expressly or implicitly include one or more of said features. In the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.

在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接或可以相互通讯;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense, unless otherwise expressly specified and limited, for example, it may be a fixed connection or a detachable connection Connection, or integral connection; it can be mechanical connection, electrical connection or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal communication of two elements or the interaction of two elements relation. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

在本发明中,除非另有明确的规定和限定,第一特征在第二特征之“上”或之“下”可以包括第一和第二特征直接接触,也可以包括第一和第二特征不是直接接触而是通过它们之间的另外的特征接触。而且,第一特征在第二特征“之上”、“上方”和“上面”包括第一特征在第二特征正上方和斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”包括第一特征在第二特征正下方和斜下方,或仅仅表示第一特征水平高度小于第二特征。In the present invention, unless otherwise expressly specified and limited, a first feature "on" or "under" a second feature may include the first and second features in direct contact, or may include the first and second features Not directly but through additional features between them. Also, the first feature being "above", "over" and "above" the second feature includes the first feature being directly above and obliquely above the second feature, or simply means that the first feature is level higher than the second feature. The first feature is "below", "below" and "below" the second feature includes the first feature being directly below and diagonally below the second feature, or simply means that the first feature has a lower level than the second feature.

下文的公开提供了许多不同的实施方式或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/ 或设置之间的关系。此外,本发明提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, they are only examples and are not intended to limit the invention. Furthermore, the present disclosure may repeat reference numerals and/or reference letters in different instances for the purpose of simplicity and clarity and not in itself indicative of a relationship between the various embodiments and/or arrangements discussed. In addition, the present disclosure provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the application of other processes and/or the use of other materials.

下面参考附图描述本发明实施例的滑动组件防电磁干扰的变速方法和驱动组件。The following describes the method for preventing electromagnetic interference of the sliding assembly and the driving assembly according to the embodiments of the present invention with reference to the accompanying drawings.

为了更加清楚的描述本发明实施例的防电磁干扰的变速方法,下面首先对本发明的电子装置进行结构上的描述。In order to describe the speed change method for preventing electromagnetic interference according to the embodiment of the present invention more clearly, the following first describes the structure of the electronic device of the present invention.

具体地,为了降低前置相机等安装在电子装置前置面板上的硬件设备对屏幕占比的影响,本发明提出了一种滑动组件,通过滑动组件的滑动控制前置相机等在需要的时候滑出,在不需要的时候收容于电子装置本体内,由此,在不进行前置相机等组件的功能服务时,使其不占用电子装置前置面板。Specifically, in order to reduce the influence on the screen ratio of the hardware devices such as the front camera installed on the front panel of the electronic device, the present invention proposes a sliding component, which controls the front camera when needed by sliding the sliding component. It slides out and is accommodated in the main body of the electronic device when not needed, so that it does not occupy the front panel of the electronic device when the functional services of components such as the front camera are not performed.

具体而言,如图1-图4所示,本发明实施例的电子装置100包括本体10、滑动组件20和驱动组件50。滑动组件20用于在收容于本体10的第一位置A和自本体10露出的第二位置B之间滑动。驱动组件50用于驱动滑动组件20在收容于本体的第一位置和自本体露出的第二位置之间滑动。Specifically, as shown in FIGS. 1 to 4 , the electronic device 100 according to the embodiment of the present invention includes a body 10 , a sliding component 20 and a driving component 50 . The sliding assembly 20 is used for sliding between a first position A accommodated in the body 10 and a second position B exposed from the body 10 . The driving assembly 50 is used for driving the sliding assembly 20 to slide between a first position accommodated in the body and a second position exposed from the body.

当然,为了使得驱动组件50获知驱动滑动组件20滑动至相应位置,该电子装置中还必然包括检测滑动组件20当前位置的检测组件30,在本发明的实施例中,检测组件30用于检测滑动组件20的位置,检测组件30包括磁场产生元件32、霍尔元件34和处理器36,磁场产生元件32和霍尔元件34分别固定在本体10和滑动组件20上,处理器36用于接收霍尔元件34输出的检测信号值,以及用于根据检测信号值确定滑动组件20相对于本体10 的当前相对位置。Of course, in order for the driving assembly 50 to know the driving sliding assembly 20 to slide to a corresponding position, the electronic device must also include a detection assembly 30 for detecting the current position of the sliding assembly 20. In the embodiment of the present invention, the detection assembly 30 is used to detect sliding The position of the assembly 20, the detection assembly 30 includes a magnetic field generating element 32, a Hall element 34 and a processor 36, the magnetic field generating element 32 and the Hall element 34 are respectively fixed on the body 10 and the sliding assembly 20, and the processor 36 is used to receive the Hall element 36. The detection signal value output by the element 34 is used to determine the current relative position of the sliding assembly 20 relative to the body 10 according to the detection signal value.

值得注意的是,此处“磁场产生元件32和霍尔元件34分别固定在本体10和滑动组件 20上”包括两种情况,一是磁场产生元件32固定在本体10上,霍尔元件34固定在滑动组件20上,二是磁场产生元件32固定在滑动组件20上,霍尔元件34固定在本体10上。此外,磁场产生元件32和霍尔元件34可以在竖直方向上相对放置,也可以在水平方向上相对放置。也即是说,只要磁场产生元件32和霍尔元件34可以产生相对运动,不对磁场产生元件32和霍尔元件34的具体位置做限制。It is worth noting that here "the magnetic field generating element 32 and the Hall element 34 are respectively fixed on the body 10 and the sliding assembly 20" includes two cases, one is that the magnetic field generating element 32 is fixed on the body 10, and the Hall element 34 is fixed On the sliding assembly 20 , secondly, the magnetic field generating element 32 is fixed on the sliding assembly 20 , and the Hall element 34 is fixed on the body 10 . In addition, the magnetic field generating element 32 and the Hall element 34 may be placed opposite to each other in the vertical direction, and may also be placed opposite to each other in the horizontal direction. That is to say, as long as the magnetic field generating element 32 and the Hall element 34 can generate relative motion, the specific positions of the magnetic field generating element 32 and the Hall element 34 are not limited.

在某些实施方式中,本体10形成有滑槽16,滑动组件20在第一位置A时收容于滑槽16内。如此,可以使得滑动组件20通过滑槽16在第一位置A和第二位置B之间滑动。In some embodiments, the body 10 is formed with a chute 16 , and the sliding assembly 20 is accommodated in the chute 16 when the first position A is located. In this way, the sliding assembly 20 can be slid between the first position A and the second position B through the sliding groove 16 .

具体地,本体10包括壳体12和显示组件14,壳体12和显示组件14组合在一起构成封闭式结构。滑槽16开设在壳体12,从而实现滑动组件20的滑回与滑出。可以理解,滑槽16可以开设在壳体12的任意一条侧边。优选地,滑槽16开设在壳体12的顶边。如此可以符合用户的使用习惯。Specifically, the body 10 includes a casing 12 and a display assembly 14, and the casing 12 and the display assembly 14 are combined together to form a closed structure. The chute 16 is opened in the housing 12 so as to realize the sliding back and the sliding out of the sliding assembly 20 . It can be understood that the chute 16 can be provided on any side of the housing 12 . Preferably, the chute 16 is opened on the top edge of the housing 12 . This can conform to the user's usage habits.

显示组件14包括触控面板(图未示)和盖板142。触控面板包括显示模组(图未示)和设置在显示模组上的触控层(图未示)。显示模组例如为液晶显示模组(LCD Module,LCM),当然,显示模组也可以为柔性的显示模组。触控层用于接收用户的触控输入,以产生用于控制显示模组显示的内容的信号和控制滑动组件20滑动的信号。The display assembly 14 includes a touch panel (not shown) and a cover 142 . The touch panel includes a display module (not shown) and a touch layer (not shown) disposed on the display module. The display module is, for example, a liquid crystal display module (LCD Module, LCM). Of course, the display module can also be a flexible display module. The touch layer is used for receiving a user's touch input to generate a signal for controlling the content displayed by the display module and a signal for controlling the sliding of the sliding component 20 .

盖板142的材料可以由玻璃、陶瓷或蓝宝石等透光材料制成。由于盖板142由于作为电子装置100的输入零件,盖板142经常受到碰撞或刮划等接触。例如,用户将电子装置100放入口袋时,盖板142可能被用户口袋中的钥匙刮划而损伤。因此,盖板142的材料可以采用硬度较大的材料,例如以上的蓝宝石材料。或者在盖板142的表面形成硬化层以提高盖板142的抗刮能力。The material of the cover plate 142 may be made of transparent materials such as glass, ceramics or sapphire. Since the cover plate 142 is an input part of the electronic device 100, the cover plate 142 is often subjected to contact such as bumps or scratches. For example, when a user puts the electronic device 100 into a pocket, the cover 142 may be scratched and damaged by a key in the user's pocket. Therefore, the material of the cover plate 142 may be a material with relatively high hardness, such as the above sapphire material. Alternatively, a hardened layer may be formed on the surface of the cover plate 142 to improve the scratch resistance of the cover plate 142 .

触控面板与盖板142例如通过光学胶(Optically Clear Adhesive,OCA)粘接固定在一起,光学胶不仅粘接固定触控面板及盖板142,还可以透过触控面板发出的光线。The touch panel and the cover 142 are bonded and fixed together by, for example, Optical Clear Adhesive (OCA). The optical adhesive not only bonds and fixes the touch panel and the cover 142 , but also transmits light emitted by the touch panel.

为了更加清楚的说明本发明实施例的滑动组件20的功能,参照图5,当在某些实施方式中,电子装置100包括前置相机42,滑动组件20包括承载件22,前置相机42设置在承载件22上。如此,前置相机42可以随着滑动组件20滑动。当然,可以将用户打开前置相机42和关闭前置相机42作为触发信号,也即是说,当用户打开前置相机42时,触发滑动组件20滑出,当用户关闭前置相机42时,触发滑动组件20滑回。如此用户只需依照现有的习惯打开或关闭前置相机,而无需针对滑动组件20进行另外的操作,可以方便用户的使用。In order to more clearly illustrate the function of the sliding assembly 20 according to the embodiment of the present invention, referring to FIG. 5 , in some embodiments, the electronic device 100 includes a front camera 42 , the sliding assembly 20 includes a carrier 22 , and the front camera 42 is provided with on the carrier 22 . In this way, the front camera 42 can slide with the slide assembly 20 . Of course, the user can open the front camera 42 and close the front camera 42 as the trigger signal, that is to say, when the user opens the front camera 42, the sliding component 20 is triggered to slide out, and when the user closes the front camera 42, Trigger slide assembly 20 to slide back. In this way, the user only needs to open or close the front camera according to the existing habits, and does not need to perform another operation on the sliding component 20, which can facilitate the use of the user.

除前置相机42之外,承载件22上也可以承载其他的功能器件40,功能器件40比如为光线传感器、接近传感器和听筒44等,如图1所示。这些功能器件40可以根据用户的输入随着滑动组件20的滑出而从本体10露出从而正常工作,也可以根据用户的输入随着滑动组件20的滑回而收容在本体10内。如此,可以尽量少地在显示组件14上设置通孔,有利于满足电子装置100全面屏的设计需求。In addition to the front camera 42 , the carrier 22 may also carry other functional devices 40 , such as a light sensor, a proximity sensor, an earpiece 44 , etc., as shown in FIG. 1 . These functional devices 40 can be exposed from the body 10 as the sliding assembly 20 slides out according to the user's input to work normally, or can be accommodated in the body 10 according to the user's input as the sliding assembly 20 slides back. In this way, the display assembly 14 can be provided with as few through holes as possible, which is beneficial to meet the design requirements of the full screen of the electronic device 100 .

具体地,当承载件22上承载有光线传感器时,可以将光线传感器设置在承载件22的顶部,也即是说,当滑动组件20完全收容于滑槽16内时,光线传感器依旧可以从承载件22的顶部露出,从而实时感应光线。Specifically, when the light sensor is carried on the carrier 22, the light sensor can be arranged on the top of the carrier 22, that is to say, when the sliding component 20 is completely accommodated in the chute 16, the light sensor can still be removed from the carrier 22. The top of the piece 22 is exposed, thereby sensing light in real time.

请参阅图6,当承载件22上承载有接近传感器和听筒44时,可以将用户接听电话和挂断电话作为触发信号,也即是说,当用户接听电话时,触发滑动组件20滑出,当用户挂断电话时,触发滑动组件20滑回。如此用户只需依照现有的习惯接听或挂断电话,而无需针对滑动组件20进行另外的操作,可以方便用户的使用。Please refer to FIG. 6 , when the carrier 22 carries the proximity sensor and the receiver 44, the user can answer and hang up the phone as a trigger signal, that is to say, when the user answers the phone, the trigger sliding component 20 slides out, When the user hangs up the phone, the sliding component 20 is triggered to slide back. In this way, the user only needs to answer or hang up the phone according to the existing habits, and does not need to perform another operation on the sliding component 20, which can be convenient for the user to use.

可以理解,多个功能器件40可以承载在同一个承载件22上,也可以承载在多个承载件上。当多个功能器件40承载在同一个承载件22上时,多个功能器件40可以纵向排列,处理器36可以通过控制滑动组件20滑出的距离控制设置在承载件22下部的功能器件40 是否露出。当多个功能器件40承载在同多个承载件22上时,处理器36可以通过控制某个承载件22的滑动从而选择需要露出的功能器件40。It can be understood that a plurality of functional devices 40 may be carried on the same carrier 22, or may be carried on multiple carriers. When a plurality of functional devices 40 are carried on the same carrier 22, the plurality of functional devices 40 can be arranged longitudinally, and the processor 36 can control whether the functional devices 40 provided at the lower part of the carrier 22 are slid out by controlling the sliding distance of the sliding assembly 20. exposed. When multiple functional devices 40 are carried on the same multiple carriers 22 , the processor 36 can select the functional device 40 to be exposed by controlling the sliding of a certain carrier 22 .

请参阅图7,在某些实施方式中,滑动组件20包括设置在承载件22中部的螺纹孔24和与螺纹孔24配合的转动丝杆26。滑槽16包括与螺纹孔24相对设置且位于滑槽16底部的凹槽162。电子装置100包括设置在凹槽162的驱动组件50。驱动组件50包括与处理器 36连接的驱动电机52和与转动丝杆26的底部连接的输出轴(图未示)。Referring to FIG. 7 , in some embodiments, the sliding assembly 20 includes a threaded hole 24 disposed in the middle of the carrier 22 and a rotating screw 26 matched with the threaded hole 24 . The chute 16 includes a groove 162 disposed opposite the threaded hole 24 and located at the bottom of the chute 16 . The electronic device 100 includes the drive assembly 50 disposed in the groove 162 . The drive assembly 50 includes a drive motor 52 connected to the processor 36 and an output shaft (not shown) connected to the bottom of the rotating lead screw 26 .

可以理解,处理器36可以通过控制驱动电机52来控制滑动组件20的滑动。当用户命令滑动组件20从第一位置A向第二位置B滑动时,处理器36控制驱动电机52正转,从而使得输出轴带动转动丝杆26在螺纹孔24内转动,进而使得滑动组件20从第一位置A 向第二位置B滑动。当用户命令滑动组件20从第二位置B向第一位置A滑动时,处理器 36控制驱动电机52反转,从而使得输出轴带动转动丝杆26在螺纹孔24内转动,进而使得滑动组件20从第二位置B向第一位置A滑动。值得注意的是,此处的“从第一位置A向第二位置B”和“从第二位置B向第一位置A”是指滑动的方向,而不是指滑动的起点和终点。It is understood that the processor 36 can control the sliding of the sliding assembly 20 by controlling the driving motor 52 . When the user commands the sliding assembly 20 to slide from the first position A to the second position B, the processor 36 controls the driving motor 52 to rotate forward, so that the output shaft drives the rotating screw 26 to rotate in the threaded hole 24 , thereby making the sliding assembly 20 rotate. Slide from the first position A to the second position B. When the user commands the sliding assembly 20 to slide from the second position B to the first position A, the processor 36 controls the driving motor 52 to reverse, so that the output shaft drives the rotating screw 26 to rotate in the threaded hole 24, thereby causing the sliding assembly 20 to rotate. Slide from the second position B to the first position A. It is worth noting that "from the first position A to the second position B" and "from the second position B to the first position A" here refer to the direction of sliding, rather than the starting point and end point of the sliding.

本发明实施方式的电子装置100利用霍尔元件34和磁场产生元件32确定滑动组件20 的当前相对位置,在前置相机等功能器件40承载在滑动组件20上时,可以实时地检测滑动组件20的状态,从而确定功能器件40的位置。The electronic device 100 of the embodiment of the present invention uses the Hall element 34 and the magnetic field generating element 32 to determine the current relative position of the sliding assembly 20 , and can detect the sliding assembly 20 in real time when the functional device 40 such as the front camera is carried on the sliding assembly 20 . state to determine the position of the functional device 40 .

可以理解,前置相机42等功能器件40需要自本体10露出,否则无法正常工作。本发明实施方式的电子装置100通过在滑动组件上承载功能器件40,使得功能器件40在不需要工作时收容在本体10内,在需要工作时随着滑动组件20从本体10露出。如此,无需在显示组件14上开设用以露出前置相机42等功能器件40的通孔,从而增大屏占比,进而提高用户的体验。It can be understood that the functional devices 40 such as the front camera 42 need to be exposed from the main body 10 , otherwise they cannot work normally. The electronic device 100 according to the embodiment of the present invention carries the functional device 40 on the sliding assembly, so that the functional device 40 is accommodated in the main body 10 when it does not need to work, and is exposed from the main body 10 along with the sliding assembly 20 when it needs to work. In this way, there is no need to open a through hole on the display assembly 14 for exposing the functional device 40 such as the front camera 42, thereby increasing the screen ratio and improving the user experience.

相关技术中,通过磁场产生元件32和霍尔元件34之间的磁场信号强度来获知当前滑动组件20的当前位置,比如,预先根据大量试验数据标定磁场信号强度与滑动组件20的当前滑出位置的对应关系,从而根据当前检测出的磁场信号强度匹配出对应的滑出位置。In the related art, the current position of the current sliding assembly 20 is known by the magnetic field signal strength between the magnetic field generating element 32 and the Hall element 34. For example, the magnetic field signal strength and the current sliding-out position of the sliding assembly 20 are calibrated in advance according to a large amount of experimental data. Therefore, the corresponding sliding-out position is matched according to the currently detected magnetic field signal strength.

然而,不难理解的是,当外界电磁场干扰时,检测出的磁场产生元件32和霍尔元件34 之间的电磁信号的精确度将会受到影响,从而导致对滑动组件20的变速控制不精确,当对滑动组件20的变速控制的控制节点靠前,则可能导致滑动组件20无法启动,当滑动组件20的变速控制的控制节点靠后,则会增大全程的滑块滑行时间。However, it is not difficult to understand that when the external electromagnetic field interferes, the accuracy of the detected electromagnetic signal between the magnetic field generating element 32 and the Hall element 34 will be affected, resulting in inaccurate speed control of the sliding assembly 20. , when the control node of the speed change control of the sliding assembly 20 is at the front, the sliding assembly 20 may be unable to start, and when the control node of the speed change control of the sliding assembly 20 is at the back, the total sliding time of the slider will be increased.

为了解决由于受到外界电磁干扰,导致变速控制不准确的技术问题,本发明还提出了一种防电磁干扰的变速方法,图8是根据本发明一个实施例的滑动组件防电磁干扰的变速方法的流程图,如图8所示,该方法包括:In order to solve the technical problem of inaccurate shifting control due to external electromagnetic interference, the present invention also proposes a shifting method for preventing electromagnetic interference. FIG. 8 shows a shifting method for preventing electromagnetic interference of a sliding assembly according to an embodiment of the present invention. The flowchart, as shown in Figure 8, the method includes:

步骤101,控制驱动组件按照预设的第一速度启动滑动组件,并启动定时器。Step 101, controlling the driving component to start the sliding component according to the preset first speed, and start the timer.

步骤102,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间。Step 102 , according to the working parameters of the drive assembly, calculate the gliding time of the sliding assembly corresponding to the preset speed-variable gliding distance.

其中,工作参数包括驱动组件的硬件工作参数,比如,当驱动组件包括步进电机时,则工作参数包括脉冲宽度调制周期,以及单位步数所需的脉冲宽度调制周波数等。The working parameters include hardware working parameters of the driving component. For example, when the driving component includes a stepping motor, the working parameters include the pulse width modulation period and the number of pulse width modulation cycles required per unit number of steps.

步骤103,当根据定时器获知滑行时间到达时,控制驱动组件从第一速度切换到第二速度驱动滑动组件运行到目标位置,其中,第二速度大于第一速度。Step 103 , when the sliding time is reached according to the timer, control the driving component to switch from the first speed to the second speed to drive the sliding component to run to the target position, wherein the second speed is greater than the first speed.

应当理解的是,根据滑动组件的运作机理,驱动组件控制滑动组件由启动速度启动后,在一定位置后,切换为极限速度,由此,不但保证了驱动组件的平稳启动,还缩短了滑动组件到达目标位置的时间。It should be understood that, according to the operation mechanism of the sliding component, the driving component controls the sliding component to start from the starting speed, and then switches to the limit speed after a certain position, thereby not only ensuring the smooth start of the driving component, but also shortening the sliding component. Time to reach the target location.

其中,在本发明的实施例中,以第一速度代表启动速度,以第二速度代表极限速度,显然,第二速度大于第一速度。Wherein, in the embodiment of the present invention, the starting speed is represented by the first speed, and the limit speed is represented by the second speed. Obviously, the second speed is greater than the first speed.

在本发明的实施例中,考虑到通常硬件的工作不会受到外界磁场等的干扰,基于硬件工作参数在短距离范围内进行滑动距离测量的精度,要大于基于电磁信号等软件工作参数获取的距离,基于驱动组件的硬件参数来确定滑动组件的移动位置以实现对其变速节点的把握和控制。In the embodiment of the present invention, considering that the operation of the hardware is generally not disturbed by external magnetic fields, etc., the accuracy of sliding distance measurement in a short distance range based on hardware operating parameters is greater than that obtained based on software operating parameters such as electromagnetic signals. The distance is determined based on the hardware parameters of the drive assembly to determine the moving position of the sliding assembly to realize the grasp and control of its speed change node.

具体而言,控制驱动组件按照预设的第一速度启动滑动组件,并启动定时器,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间,其中,预设的变速滑行距离为根据滑动组件的运作机理,到达上述平衡启动速度与滑动时间的目标位置时的距离。Specifically, the driving component is controlled to start the sliding component according to the preset first speed, and the timer is started, and according to the working parameters of the driving component, the sliding time corresponding to the preset variable speed sliding distance of the sliding component is calculated, wherein the preset sliding distance The variable-speed sliding distance is the distance when the target position of the above-mentioned equilibrium starting speed and sliding time is reached according to the operation mechanism of the sliding component.

进而,当根据定时器获知滑行时间到达时,控制驱动组件从第一速度切换到第二速度以驱动滑动组件运行到目标位置。Further, when it is known that the sliding time arrives according to the timer, the driving assembly is controlled to switch from the first speed to the second speed to drive the sliding assembly to run to the target position.

也就是说,在本发明的实施例中,考虑到驱动组件运作机理的稳定性,其按照一定速度驱动到目标位置的时间其实是相对固定的,因而,基于这种时间来确定其是否移动到对应的目标位置,精确度较高。That is to say, in the embodiment of the present invention, considering the stability of the operation mechanism of the driving component, the time it takes to drive to the target position at a certain speed is actually relatively fixed. Therefore, whether it moves to the target position is determined based on this time The corresponding target position has high accuracy.

为了进一步提高对滑动组件的变速节点控制的精确度,在实际执行中,动态实时的设置对应的变速滑行距离,具体说明如下:In order to further improve the accuracy of the control of the variable speed nodes of the sliding components, in the actual execution, the corresponding variable speed sliding distance is dynamically set in real time. The details are as follows:

在本发明的一个实施例中,如图9所示,上述步骤101包括:In an embodiment of the present invention, as shown in FIG. 9 , the above step 101 includes:

步骤201,获取第一启动指令。Step 201: Obtain a first startup instruction.

其中,第一启动指令可以根据不同的应用场景设置为不同的形式,比如,当驱动组件具有语音识别功能时,该第一启动指令为语音形式,又比如,当驱动组件具有语义识别功能时,该第一启动指令为文字形式等。Wherein, the first start instruction can be set in different forms according to different application scenarios. For example, when the driving component has the function of speech recognition, the first start command is in the form of speech, and for example, when the driving component has the function of semantic recognition, The first activation instruction is in the form of text or the like.

在某些实施方式中,第一启动指令可以由用户输入。如此,实现滑动组件的滑动。如前所述,可以根据用户输入通过控制步进电机来控制滑动组件的滑动。当接收到用户输入的第一控制指令时,驱动组件控制控制步进电机正转或反转,从而使得输出轴带动转动丝杆在螺纹孔内转动,进而使得滑动组件向预定位置滑动。In some embodiments, the first activation instruction may be input by a user. In this way, the sliding of the sliding assembly is achieved. As previously mentioned, the sliding of the sliding assembly can be controlled by controlling a stepper motor according to user input. When receiving the first control command input by the user, the drive assembly controls the stepper motor to rotate forward or reverse, so that the output shaft drives the rotating screw to rotate in the threaded hole, thereby making the sliding assembly slide to a predetermined position.

当然,也可以设定触发信号使得驱动组件控制滑动组件在特定情况下运动。比如,当承载上承载有接近传感器和听筒时,可以将用户接听电话和挂断电话作为触发信号。举例而言,当用户接听电话时,触发驱动组件控制滑动组件自动滑出,当用户挂断电话时,触发滑动组件自动滑回。总而言之,滑动组件的滑动可以基于用户的操作,也可以在特定情况下自动发生。当然,用户可以设置具体在哪些情况下自动滑动或者关闭自动滑动。Of course, the trigger signal can also be set so that the driving assembly controls the sliding assembly to move under certain conditions. For example, when a proximity sensor and an earpiece are carried on the bearer, the user answering the phone and hanging up the phone can be used as trigger signals. For example, when the user answers the call, the triggering drive component controls the sliding component to slide out automatically, and when the user hangs up the call, the sliding component is triggered to slide back automatically. All in all, the sliding of the sliding component can be based on user actions, or it can happen automatically under certain circumstances. Of course, the user can set specific circumstances under which automatic sliding is performed or automatic sliding is turned off.

步骤202,根据第一启动指令控制驱动组件按照预设的第一速度从第一位置启动滑动组件。Step 202 , controlling the drive assembly to activate the sliding assembly from a first position at a preset first speed according to the first activation instruction.

具体地,正如以上分析的,根据驱动组件的工作原理,根据第一启动指令控制驱动组件按照预设的第一速度从第一位置启动滑动组件,此时,第一位置可以理解为滑动组件收缩进电子装置本体内时的初始位置。Specifically, as analyzed above, according to the working principle of the drive assembly, the drive assembly is controlled to start the sliding assembly from the first position at a preset first speed according to the first start instruction, and at this time, the first position can be understood as the contraction of the sliding assembly The initial position when entering the electronic device body.

进一步地,继续参照图9,上述步骤103包括:Further, with continued reference to FIG. 9 , the above step 103 includes:

步骤203,根据第一位置设置变速滑行距离,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间。Step 203 , setting the speed change gliding distance according to the first position, and calculating the glide time corresponding to the preset speed change gliding distance of the sliding component according to the operating parameters of the drive assembly.

随着滑动组件的使用,受到灰尘等的影响,即使滑动组件收缩进电子装置本体内的初始位置,可能该初始位置并不是完全相同的,因而,根据当前的第一位置实时设置变速滑行距离。With the use of the sliding assembly, under the influence of dust and the like, even if the sliding assembly retracts into the initial position of the electronic device body, the initial position may not be exactly the same. Therefore, the variable speed sliding distance is set in real time according to the current first position.

具体地,根据第一位置设置变速滑行距离,从而,即使当前第一位置与上一次的第一位置不同,由于当前的变速滑行距离为根据当前第一位置设置,因而,确定的变速滑行距离与当前滑动组件的位置的实际情况一致,根据驱动组件的工作参数,计算出的滑动组件与预设的变速滑行距离对应的滑行时间较为精确,从而保证了对滑动组件的变速节点的控制的精确性。Specifically, the shifting sliding distance is set according to the first position, so that even if the current first position is different from the previous first position, since the current shifting sliding distance is set according to the current first position, the determined shifting sliding distance is the same as the current first position. The current position of the sliding assembly is consistent with the actual situation. According to the working parameters of the driving assembly, the calculated sliding time of the sliding assembly and the preset sliding distance of the speed change is relatively accurate, thereby ensuring the accuracy of the control of the speed change node of the sliding assembly. .

在本发明的一个实施例中,如图10所示,上述步骤101包括:In an embodiment of the present invention, as shown in FIG. 10 , the above step 101 includes:

步骤301,获取第二启动指令。Step 301: Obtain a second startup instruction.

同样的,第二启动指令可以根据不同的应用场景设置为不同的形式,比如,当驱动组件具有语音识别功能时,该第二启动指令为语音形式,又比如,当驱动组件具有语义识别功能时,该第二启动指令为文字形式等。Similarly, the second startup instruction can be set in different forms according to different application scenarios. For example, when the driving component has the function of speech recognition, the second startup instruction is in the form of speech, and for example, when the driving component has the function of semantic recognition , the second start instruction is in text form, etc.

在某些实施方式中,第二启动指令可以由用户输入。如此,实现滑动组件的滑动。如前所述,可以根据用户输入通过控制步进电机来控制滑动组件的滑动。当接收到用户输入的第二控制指令时,驱动组件控制控制步进电机正转或反转,从而使得输出轴带动转动丝杆在螺纹孔内转动,进而使得滑动组件向预定位置滑动。In some embodiments, the second activation instruction may be input by the user. In this way, the sliding of the sliding assembly is achieved. As previously mentioned, the sliding of the sliding assembly can be controlled by controlling a stepper motor according to user input. When receiving the second control command input by the user, the drive assembly controls the stepper motor to rotate forward or reverse, so that the output shaft drives the rotating screw to rotate in the threaded hole, thereby making the sliding assembly slide to a predetermined position.

当然,也可以设定触发信号使得驱动组件控制滑动组件在特定情况下运动。比如,当承载上承载有接近传感器和听筒时,可以将用户接听电话和挂断电话作为触发信号。举例而言,当用户接听电话时,触发驱动组件控制滑动组件自动滑出,当用户挂断电话时,触发滑动组件自动滑回。总而言之,滑动组件的滑动可以基于用户的操作,也可以在特定情况下自动发生。当然,用户可以设置具体在哪些情况下自动滑动或者关闭自动滑动。Of course, the trigger signal can also be set so that the driving assembly controls the sliding assembly to move under certain conditions. For example, when a proximity sensor and an earpiece are carried on the bearer, the user answering the phone and hanging up the phone can be used as trigger signals. For example, when the user answers the call, the triggering drive component controls the sliding component to slide out automatically, and when the user hangs up the call, the sliding component is triggered to slide back automatically. All in all, the sliding of the sliding component can be based on user actions, or it can happen automatically under certain circumstances. Of course, the user can set specific circumstances under which automatic sliding is performed or automatic sliding is turned off.

步骤302,根据第二启动指令控制驱动组件按照预设的第一速度从第三位置启动滑动组件,其中,第三位置位于第一位置和第二位置之间。Step 302 , controlling the drive assembly to activate the sliding assembly from a third position at a preset first speed according to the second activation instruction, wherein the third position is located between the first position and the second position.

其中,第一位置为滑动组件收缩进电子装置本体内时的初始位置,第二位置为滑动组件进行变速时所在的位置。Wherein, the first position is the initial position when the sliding assembly is retracted into the electronic device body, and the second position is the position where the sliding assembly is shifting gears.

进一步地,继续参照图10,上述步骤103包括:Further, continuing to refer to FIG. 10 , the above step 103 includes:

步骤303,根据第三位置到第一位置的距离差设置变速滑行距离,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间。Step 303: Set the speed change gliding distance according to the distance difference between the third position and the first position, and calculate the glide time corresponding to the preset speed change gliding distance of the sliding component according to the operating parameters of the drive assembly.

应当理解的是,由于电量不足或者其他原因导致故障在第一位置到第二位置之间的第三位置停止,此时,当故障排除后,比如,电子装置与充电电源连接后,接收到第二启动指令,从而,根据第二启动指令再次控制驱动组件按照预设的第一速度从第三位置启动滑动组件,此时,为了保证对滑动组件的变速节点的控制的精确性,根据第三位置到第一位置的距离差设置变速滑行距离,根据剩余的需要滑行的距离设置变速滑行距离,进而,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间。It should be understood that, due to insufficient power or other reasons, the fault stops at the third position between the first position and the second position. At this time, after the fault is eliminated, for example, after the electronic device is connected to the charging power source, the Two start instructions, thus, according to the second start instruction, the drive assembly is again controlled to start the sliding assembly from the third position according to the preset first speed. The distance difference between the position and the first position is used to set the speed change gliding distance, and the speed change gliding distance is set according to the remaining required gliding distance, and then, according to the working parameters of the drive assembly, the glide time corresponding to the preset speed change gliding distance of the sliding component is calculated.

其中,计算滑行时间的方式在不同的应用场景下不同,在一些可能的实施例中,当图7中的驱动电机52为步进电机时,获取步进马达的脉冲宽度调制周期,以及单位步数所需的脉冲宽度调制周波数,根据脉冲宽度调制周期以及脉冲宽度调制周波数,计算滑动组件与预设的变速滑行距离对应的滑行时间。Among them, the way of calculating the taxiing time is different in different application scenarios. In some possible embodiments, when the driving motor 52 in FIG. 7 is a stepping motor, the pulse width modulation period of the stepping motor and the unit step are obtained. Calculate the required number of pulse width modulation cycles, and calculate the sliding time corresponding to the sliding component and the preset variable speed sliding distance according to the pulse width modulation period and the number of pulse width modulation cycles.

在本实施例中,在不同的应用场景下,根据脉冲宽度调制周期以及脉冲宽度调制周波数,计算滑动组件与预设的变速滑行距离对应的滑行时间的方式不同:In this embodiment, under different application scenarios, according to the pulse width modulation period and the pulse width modulation cycle number, the ways of calculating the taxiing time corresponding to the sliding component and the preset variable speed taxiing distance are different:

作为一种可能的实现方式,将脉冲宽度调制周期以及脉冲宽度调制周波数的乘积作为滑行时间,在本实施例中,可以理解,脉冲宽度调制周期为每一个脉冲宽度所占用的时间,通过将脉冲宽度调制周期以及脉冲宽度调制的总的周波数相乘,可以获取滑行时间。As a possible implementation, the product of the pulse width modulation period and the number of pulse width modulation cycles is used as the glide time. In this embodiment, it can be understood that the pulse width modulation period is the time occupied by each pulse width. The glide time can be obtained by multiplying the width modulation period and the total number of pulse width modulation cycles.

作为另一种可能的实现方式,获取步进马达的转速比、步进马达转一周的总步数、以及大齿轮转一圈的距离,应用预设算法对变速滑行距离、脉冲宽度调制周期、脉冲宽度调制周波数转速比、总步数、以及大齿轮转一圈的距离进行计算,获取滑行时间。其中,根据应用场景的不同,上述预设算法包括的内容不同,举例而言,预设的算法为公式:As another possible implementation, obtain the speed ratio of the stepping motor, the total number of steps in one revolution of the stepping motor, and the distance in which the large gear rotates one revolution, and apply a preset algorithm to the variable speed glide distance, pulse width modulation period, Calculate the speed ratio of the pulse width modulation cycle number, the total number of steps, and the distance of one revolution of the large gear to obtain the taxiing time. Among them, according to different application scenarios, the content included in the above preset algorithm is different. For example, the preset algorithm is the formula:

t=Tpwm*L*A*B*C/Dt=Tpwm*L*A*B*C/D

其中,t为滑行时间,Tpwm为脉冲宽度调制周期(代表每一个脉冲宽度所占用的时间), L为变速滑行的距离(mm),A为转速比,B为步进马达转一圈的步数,C为步进马达走一步需要的脉冲宽度调制周波数,D为大齿轮转一圈的距离。在一些可能的示例中,L=0.5mm,A=18.06,B=20,C=32,D=2.4mm。其中,参照上述公式,L/D可以理解为变速滑行的距离对应的步进马达的转动圈数,A*B*C可以理解为步进马达转动一圈需要的脉冲宽度调制周波数,从而,L*A*B*C/D可以理解为变速滑行的距离对应需要的总的脉冲宽度调制周波数,而每个脉冲宽度调制周波占用的时间为Tpwm,因而,Tpwm *L*A*B*C/D为计算得到的滑行时间。Among them, t is the coasting time, Tpwm is the pulse width modulation period (representing the time occupied by each pulse width), L is the distance (mm) of the variable speed coasting, A is the speed ratio, and B is the step of the stepper motor for one revolution. number, C is the number of pulse width modulation cycles required for the stepping motor to take one step, and D is the distance that the large gear rotates once. In some possible examples, L=0.5mm, A=18.06, B=20, C=32, D=2.4mm. Among them, referring to the above formula, L/D can be understood as the number of revolutions of the stepping motor corresponding to the distance of the variable-speed sliding, A*B*C can be understood as the number of pulse width modulation cycles required for the stepping motor to rotate one revolution, thus, L *A*B*C/D can be understood as the total number of pulse width modulation cycles required for the distance of variable-speed sliding, and the time occupied by each pulse width modulation cycle is Tpwm, therefore, Tpwm *L*A*B*C/ D is the calculated taxi time.

当由于电量不足或者其他原因导致滑动组件故障时,滑动组件可能被迫停止运动,此时需要进行报警以提示用户进行故障排除操作。When the sliding component fails due to insufficient power or other reasons, the sliding component may be forced to stop moving, and an alarm needs to be issued at this time to prompt the user to perform troubleshooting operations.

具体而言,在将相邻的两次检测信号值与预设的标定位置对应的标定信号值进行比较之后,若获知相邻的两次检测信号值小于标定信号值,则表明滑动组件可能在接近第二位置的某个位置停止,比如在如图3所示的第三位置停止,因而,发送故障报警信号,比如进行语音播放警告信息、蜂鸣器蜂鸣报警等。Specifically, after comparing the adjacent two detection signal values with the calibration signal value corresponding to the preset calibration position, if it is known that the adjacent two detection signal values are smaller than the calibration signal value, it indicates that the sliding component may be in Stop at a certain position close to the second position, for example, stop at the third position as shown in FIG. 3 , therefore, send a fault alarm signal, such as a voice playback warning message, a buzzer beeping alarm, and the like.

综上,本发明实施例的滑动组件防电磁干扰的变速方法,控制驱动组件按照预设的第一速度启动滑动组件,并启动定时器,根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间,进而,当根据定时器获知滑行时间到达时,控制驱动组件从第一速度切换到第二速度驱动滑动组件运行到目标位置,其中,第二速度大于第一速度。由此,通过滑动组件降低前置相机等组件对屏幕占比的影响,且避免电磁对驱动组件变速位置调控的干扰,保证了对驱动组件变速位置调控的准确性,从而保证滑动组件较好的提供功能服务。To sum up, the speed change method for preventing electromagnetic interference of a sliding component in the embodiment of the present invention controls the driving component to start the sliding component according to the preset first speed, and starts the timer, and calculates the difference between the sliding component and the preset value according to the working parameters of the driving component. The sliding time corresponding to the variable-speed sliding distance, and further, when the sliding time is reached according to the timer, the control drive assembly is switched from the first speed to the second speed to drive the sliding assembly to run to the target position, wherein the second speed is greater than the first speed. Therefore, the influence of the front camera and other components on the screen ratio is reduced by the sliding component, and the electromagnetic interference on the control of the shifting position of the driving component is avoided, and the accuracy of the shifting position control of the driving component is ensured, thereby ensuring a better performance of the sliding component. Provide functional services.

为了实现上述实施例,本发明还提出了一种驱动组件,参照上述图4,驱动组件50用于电子装置,电子装置包括本体10,驱动组件50用于控制滑动组件20在收容于本体的第一位置和自本体露出的第二位置之间滑动,驱动组件50包括处理器36,其中,该处理器 36可以为与检测组件30中的处理器为同一个处理器,也可以为单独的处理器(图中未示出),处理器用于控制驱动组件按照预设的第一速度启动滑动组件,并启动定时器。根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间。In order to realize the above embodiment, the present invention also proposes a driving assembly. Referring to the above FIG. 4 , the driving assembly 50 is used in an electronic device, and the electronic device includes a main body 10 . Sliding between a first position and a second position exposed from the body, the drive assembly 50 includes a processor 36, wherein the processor 36 can be the same processor as the processor in the detection assembly 30, or can be a separate processor a controller (not shown in the figure), the processor is used for controlling the driving component to start the sliding component according to the preset first speed, and start the timer. According to the working parameters of the driving component, the sliding time corresponding to the preset sliding distance of the sliding component is calculated.

当根据定时器获知滑行时间到达时,控制驱动组件从第一速度切换到第二速度驱动滑动组件运行到目标位置,其中,第二速度大于第一速度。When it is learned that the sliding time arrives according to the timer, the driving assembly is controlled to switch from a first speed to a second speed to drive the sliding assembly to run to the target position, wherein the second speed is greater than the first speed.

在本发明的一个实施例中,处理器用于获取步进马达的脉冲宽度调制周期,以及单位步数所需的脉冲宽度调制周波数,进而,根据脉冲宽度调制周期以及脉冲宽度调制周波数,计算滑动组件与预设的变速滑行距离对应的滑行时间。In one embodiment of the present invention, the processor is configured to obtain the PWM cycle of the stepping motor and the PWM cycle number required for a unit number of steps, and then calculate the sliding component according to the PWM cycle and the PWM cycle number The coasting time corresponding to the preset variable speed coasting distance.

在本发明的一个实施例中,处理器用于获取步进马达的转速比、步进马达转一周的总步数、以及大齿轮转一圈的距离,进而,应用预设算法对变速滑行距离、脉冲宽度调制周期、脉冲宽度调制周波数转速比、总步数、以及大齿轮转一圈的距离进行计算,获取滑行时间。In an embodiment of the present invention, the processor is used to obtain the rotational speed ratio of the stepping motor, the total number of steps in one revolution of the stepping motor, and the distance in which the large gear rotates one revolution, and then apply a preset algorithm to the speed change gliding distance, Calculate the pulse width modulation period, the pulse width modulation cycle number and rotation speed ratio, the total number of steps, and the distance that the large gear rotates once to obtain the taxiing time.

在本发明的一个实施例中,处理器用于获取第一启动指令,根据第一启动指令控制驱动组件按照预设的第一速度从第一位置启动滑动组件,进而,在根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间之前,根据第一位置设置变速滑行距离。In an embodiment of the present invention, the processor is configured to obtain a first start-up instruction, and control the drive assembly to start the sliding assembly from a first position at a preset first speed according to the first start-up instruction, and further, according to the working parameters of the drive assembly , before calculating the sliding time of the sliding component corresponding to the preset sliding distance of the shifting, setting the sliding distance of the shifting according to the first position.

在本发明的一个实施例中,处理器用于获取第二启动指令,根据第二启动指令控制驱动组件按照预设的第一速度从第三位置启动滑动组件,其中,第三位置位于第一位置和第二位置之间,进而,在根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间之前,根据第三位置到第一位置的距离差设置变速滑行距离。In an embodiment of the present invention, the processor is configured to acquire a second start-up instruction, and control the drive assembly to start the sliding assembly from a third position at a preset first speed according to the second start-up instruction, wherein the third position is located at the first position and the second position, and further, before calculating the sliding time corresponding to the preset sliding distance of the sliding assembly according to the operating parameters of the drive assembly, the shifting sliding distance is set according to the distance difference between the third position and the first position.

需要说明的是,前述集中在滑动组件防电磁干扰的变速方法实施例中描述的驱动组件,也适用于本发明实施例的驱动组件,在此不再对其实施细节和技术效果赘述。It should be noted that the drive assemblies described in the foregoing embodiments of the shifting method for preventing electromagnetic interference of sliding assemblies are also applicable to the drive assemblies of the embodiments of the present invention, and details of their implementation and technical effects will not be repeated here.

为了实现上述实施例,本发明还提出了一种电子装置,参照图1-图4,电子装置包括本体10、滑动组件20和驱动组件50。In order to realize the above embodiments, the present invention also provides an electronic device. Referring to FIG. 1 to FIG. 4 , the electronic device includes a body 10 , a sliding component 20 and a driving component 50 .

其中,滑动组件20用于在收容于本体的第一位置和自本体露出的第二位置之间滑动,驱动组件50用于控制滑动组件20在收容于本体的第一位置和自本体露出的第二位置之间滑动,驱动组件50包括处理器36,其中,处理器36用于控制驱动组件50按照预设的第一速度启动滑动组件20,并启动定时器,根据驱动组件50的工作参数,计算滑动组件20 与预设的变速滑行距离对应的滑行时间,当根据定时器获知滑行时间到达时,控制驱动组件50从第一速度切换到第二速度驱动滑动组件20运行到目标位置,其中,第二速度大于第一速度。The sliding assembly 20 is used for sliding between the first position accommodated in the body and the second position exposed from the body, and the driving assembly 50 is used to control the sliding assembly 20 between the first position accommodated in the body and the second position exposed from the body. For sliding between the two positions, the drive assembly 50 includes a processor 36, wherein the processor 36 is used to control the drive assembly 50 to start the slide assembly 20 at a preset first speed, and to start a timer, according to the working parameters of the drive assembly 50, Calculate the gliding time of the sliding assembly 20 corresponding to the preset variable speed gliding distance, and when it is known that the gliding time arrives according to the timer, the driving assembly 50 is controlled to switch from the first speed to the second speed to drive the sliding assembly 20 to run to the target position, wherein, The second speed is greater than the first speed.

在本发明的一个实施例中,处理器用于获取步进马达的脉冲宽度调制周期,以及单位步数所需的脉冲宽度调制周波数,进而,根据脉冲宽度调制周期以及脉冲宽度调制周波数,计算滑动组件与预设的变速滑行距离对应的滑行时间。In one embodiment of the present invention, the processor is configured to obtain the PWM cycle of the stepping motor and the PWM cycle number required for a unit number of steps, and then calculate the sliding component according to the PWM cycle and the PWM cycle number The coasting time corresponding to the preset variable speed coasting distance.

在本发明的一个实施例中,处理器用于获取步进马达的转速比、步进马达转一周的总步数、以及大齿轮转一圈的距离,进而,应用预设算法对变速滑行距离、脉冲宽度调制周期、脉冲宽度调制周波数转速比、总步数、以及大齿轮转一圈的距离进行计算,获取滑行时间。In an embodiment of the present invention, the processor is used to obtain the rotational speed ratio of the stepping motor, the total number of steps in one revolution of the stepping motor, and the distance in which the large gear rotates one revolution, and then apply a preset algorithm to the speed change gliding distance, Calculate the pulse width modulation period, the pulse width modulation cycle number and rotation speed ratio, the total number of steps, and the distance that the large gear rotates once to obtain the taxiing time.

在本发明的一个实施例中,处理器用于获取第一启动指令,进而,根据第一启动指令控制驱动组件按照预设的第一速度从第一位置启动滑动组件,在根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间之前,根据第一位置设置变速滑行距离。In an embodiment of the present invention, the processor is configured to acquire the first start-up instruction, and further, according to the first start-up instruction, control the drive assembly to start the sliding assembly from a first position at a preset first speed, and then control the drive assembly to start the sliding assembly from a first position at a preset first speed. , before calculating the sliding time of the sliding component corresponding to the preset sliding distance of the shifting, setting the sliding distance of the shifting according to the first position.

在本发明的一个实施例中,处理器用于获取第二启动指令,根据第二启动指令控制驱动组件按照预设的第一速度从第三位置启动滑动组件,其中,第三位置位于第一位置和第二位置之间,在根据驱动组件的工作参数,计算滑动组件与预设的变速滑行距离对应的滑行时间之前,根据第三位置到第一位置的距离差设置变速滑行距离。In an embodiment of the present invention, the processor is configured to acquire a second start-up instruction, and control the drive assembly to start the sliding assembly from a third position at a preset first speed according to the second start-up instruction, wherein the third position is located at the first position and the second position, before calculating the sliding time corresponding to the preset shifting sliding distance of the sliding assembly according to the operating parameters of the driving assembly, the shifting sliding distance is set according to the distance difference between the third position and the first position.

需要说明的是,前述集中在滑动组件防电磁干扰的变速方法实施例中描述的电子装置,也适用于本发明实施例的电子装置,在此不再对其实施细节和技术效果赘述。It should be noted that, the electronic devices described in the foregoing embodiments of the method for shifting gears for preventing electromagnetic interference of sliding components are also applicable to the electronic devices of the embodiments of the present invention, and details of their implementation and technical effects will not be repeated here.

为了实现上述实施例,本发明实施例还提出一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如前述方法实施例所述的滑动组件防电磁干扰的变速方法。In order to realize the above-mentioned embodiments, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, realizes the anti-electromagnetic interference variable speed of the sliding assembly as described in the foregoing method embodiments method.

在本说明书的描述中,参考术语“一个实施方式”、“某些实施方式”、“示意性实施方式”、“示例”、“具体示例”、或“一些示例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the description of this specification, reference to the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example", or "some examples", etc., are intended to be combined with the implementation A particular feature, structure, material or characteristic described by way or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

尽管已经示出和描述了本发明的实施方式,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施方式进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, The scope of the invention is defined by the claims and their equivalents.

Claims (13)

1. The electromagnetic interference prevention speed change method for the sliding assembly is characterized in that the sliding assembly is used for an electronic device, the electronic device comprises a body and a driving assembly, the driving assembly is used for controlling the sliding assembly to slide between a first position where the sliding assembly is contained in the body and a second position where the sliding assembly is exposed from the body, the driving assembly is a stepping motor, and the electromagnetic interference prevention speed change method comprises the following steps:
controlling the driving assembly to start the sliding assembly according to a preset first speed, and starting a timer;
acquiring the pulse width modulation period of the stepping motor and the number of pulse width modulation cycles required by unit step number;
calculating the sliding time of the sliding assembly corresponding to a preset variable speed sliding distance according to the pulse width modulation period and the number of the pulse width modulation cycles;
and when the sliding time is reached according to the timer, controlling the driving assembly to switch from the first speed to a second speed to drive the sliding assembly to run to a target position, wherein the second speed is greater than the first speed.
2. The method of claim 1, wherein said calculating a glide time of said sliding assembly corresponding to a preset variable glide distance based on said pwm cycle and said number of pwm cycles comprises:
acquiring the rotation speed ratio of the stepping motor, the total step number of the stepping motor rotating for one circle and the distance of the large gear rotating for one circle;
and calculating the variable-speed sliding distance, the pulse width modulation period, the rotating speed ratio of the pulse width modulation period, the total steps and the distance of the large gear rotating for one turn by using a preset algorithm to obtain the sliding time.
3. The method of claim 1, wherein said controlling said drive assembly to actuate said slide assembly at a preset first speed comprises:
acquiring a first starting instruction;
controlling the driving component to start the sliding component from the first position according to a preset first speed according to the first starting instruction;
before the step of calculating the sliding time of the sliding component corresponding to the preset variable speed sliding distance according to the working parameters of the driving component, the method further comprises the following steps:
setting the variable speed glide distance according to the first position.
4. The method of claim 1, wherein said controlling said drive assembly to actuate said slide assembly at a preset first speed comprises:
acquiring a second starting instruction;
controlling the driving assembly to start the sliding assembly from a third position according to the second starting instruction, wherein the third position is located between the first position and the second position;
before the step of calculating the sliding time of the sliding component corresponding to the preset variable speed sliding distance according to the working parameters of the driving component, the method further comprises the following steps:
and setting the variable-speed sliding distance according to the distance difference from the third position to the first position.
5. A drive assembly, wherein the drive assembly is used for an electronic device, the drive assembly is a stepping motor, the electronic device includes a body and a sliding assembly, the drive assembly is used for controlling the sliding assembly to slide between a first position accommodated in the body and a second position exposed from the body, the drive assembly includes a processor, and the processor is used for:
controlling the driving assembly to start the sliding assembly according to a preset first speed, and starting a timer;
acquiring the pulse width modulation period of the stepping motor and the number of pulse width modulation cycles required by unit step number;
calculating the sliding time of the sliding assembly corresponding to a preset variable speed sliding distance according to the pulse width modulation period and the number of the pulse width modulation cycles;
and when the sliding time is reached according to the timer, controlling the driving assembly to switch from the first speed to a second speed to drive the sliding assembly to run to a target position, wherein the second speed is greater than the first speed.
6. The drive assembly of claim 5, wherein the processor is to:
acquiring the rotation speed ratio of the stepping motor, the total step number of the stepping motor rotating for one circle and the distance of the large gear rotating for one circle;
and calculating the variable-speed sliding distance, the pulse width modulation period, the rotating speed ratio of the pulse width modulation period, the total steps and the distance of the large gear rotating for one turn by using a preset algorithm to obtain the sliding time.
7. The drive assembly of claim 5, wherein the processor is to:
acquiring a first starting instruction;
controlling the driving component to start the sliding component from the first position according to a preset first speed according to the first starting instruction;
before the calculating, according to the operating parameter of the driving assembly, the sliding time of the sliding assembly corresponding to a preset variable speed sliding distance, the processor is further configured to:
setting the variable speed glide distance according to the first position.
8. The drive assembly of claim 5, wherein the processor is to:
acquiring a second starting instruction;
controlling the driving assembly to start the sliding assembly from a third position according to the second starting instruction, wherein the third position is located between the first position and the second position;
before the calculating, according to the operating parameter of the driving assembly, the sliding time of the sliding assembly corresponding to a preset variable speed sliding distance, the processor is further configured to:
and setting the variable-speed sliding distance according to the distance difference from the third position to the first position.
9. An electronic device, comprising:
a body;
the sliding assembly is used for sliding between a first position where the sliding assembly is accommodated in the body and a second position where the sliding assembly is exposed out of the body;
the driving assembly is used for controlling the sliding assembly to slide between a first position accommodated in the body and a second position exposed out of the body, the driving assembly comprises a processor, the processor is used for controlling the driving assembly to start the sliding assembly according to a preset first speed and start a timer, a pulse width modulation period of the stepping motor and a pulse width modulation frequency required by unit step number are obtained, sliding time corresponding to a preset variable-speed sliding distance of the sliding assembly is calculated according to the pulse width modulation period and the pulse width modulation frequency, and when the sliding time is obtained according to the timer, the driving assembly is controlled to be switched from the first speed to the second speed to drive the sliding assembly to run to a target position, wherein the second speed is greater than the first speed.
10. The electronic device of claim 9, wherein the processor is to:
acquiring the rotation speed ratio of the stepping motor, the total step number of the stepping motor rotating for one circle and the distance of the large gear rotating for one circle;
and calculating the variable-speed sliding distance, the pulse width modulation period, the rotating speed ratio of the pulse width modulation period, the total steps and the distance of the large gear rotating for one turn by using a preset algorithm to obtain the sliding time.
11. The electronic device of claim 9, wherein the processor is to:
acquiring a first starting instruction;
controlling the driving component to start the sliding component from the first position according to a preset first speed according to the first starting instruction;
before the calculating, according to the operating parameter of the driving assembly, the sliding time of the sliding assembly corresponding to a preset variable speed sliding distance, the processor is further configured to:
setting the variable speed glide distance according to the first position.
12. The electronic device of claim 9, wherein the processor is to:
acquiring a second starting instruction;
controlling the driving assembly to start the sliding assembly from a third position according to the second starting instruction, wherein the third position is located between the first position and the second position;
before the calculating, according to the operating parameter of the driving assembly, the sliding time of the sliding assembly corresponding to a preset variable speed sliding distance, the processor is further configured to:
and setting the variable-speed sliding distance according to the distance difference from the third position to the first position.
13. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for shifting a sliding assembly according to any one of claims 1-4 for electromagnetic interference shielding.
CN201810589836.8A 2018-06-08 2018-06-08 Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components Expired - Fee Related CN108769319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810589836.8A CN108769319B (en) 2018-06-08 2018-06-08 Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810589836.8A CN108769319B (en) 2018-06-08 2018-06-08 Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components

Publications (2)

Publication Number Publication Date
CN108769319A CN108769319A (en) 2018-11-06
CN108769319B true CN108769319B (en) 2020-10-02

Family

ID=63999620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810589836.8A Expired - Fee Related CN108769319B (en) 2018-06-08 2018-06-08 Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components

Country Status (1)

Country Link
CN (1) CN108769319B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427164B (en) * 2019-07-31 2022-04-19 联想(北京)有限公司 Method for exposing component and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783640B (en) * 2010-01-26 2012-11-21 深圳市今朝时代新能源技术有限公司 Motor speed closed loop control method
US8842080B2 (en) * 2010-10-01 2014-09-23 Z124 User interface with screen spanning icon morphing
JP6136761B2 (en) * 2013-08-26 2017-05-31 富士電機株式会社 Induction motor speed control device
CN104902174B (en) * 2015-05-19 2017-11-24 广东欧珀移动通信有限公司 A kind of camera method for controlling rotation and terminal
CN105134938B (en) * 2015-08-18 2017-09-22 李激初 A kind of intelligent transmission and the motor control method used

Also Published As

Publication number Publication date
CN108769319A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108924283B (en) Sliding control method and device of sliding assembly and electronic device
CN108900663B (en) Sliding control method and device of sliding assembly and electronic device
CN108833623B (en) Sliding control method, device and electronic device for sliding assembly
US11789470B2 (en) Method and apparatus for calibrating sliding of sliding component
CN207782888U (en) Mobile terminal
CN109246361B (en) Camera module control method and device
CN108924286B (en) Electronic device and control method and device for sliding assembly thereof
CN108833699B (en) Electronic device and control method and device of sliding assembly of electronic device
US10992856B2 (en) Method for detecting position of movable structure, detection component, and electronic device
CN108829461B (en) Camera startup control method, device and electronic device
CN108958364A (en) Terminal device
CN108769319B (en) Variable speed method, drive assembly, device and medium for preventing electromagnetic interference of sliding components
CN108897375A (en) Control method and device for sliding mechanism, electronic device and storage medium
CN108924284B (en) Electronic device and control method and device of sliding assembly of electronic device
CN109151107B (en) Sliding control method, device, electronic device and storage medium of sliding component
CN109151106B (en) Sliding control method and device for sliding assembly, electronic device and storage medium
CN110307775A (en) Position detection method of slide-out assembly, detection assembly and electronic device
CN110138896A (en) mobile terminal
CN112073602B (en) Camera module, electronic equipment, and stroke detection method and device
CN109460178B (en) Sliding display method and device of sliding component
CN108897373B (en) Electronic device and control method and device for sliding assembly thereof
CN110311996B (en) Control method of slide-out component, detection component and electronic device
CN110311997A (en) Position detection method of slide-out assembly, detection assembly and electronic device
CN108924289A (en) Control method, device, electronic device and storage medium of sliding mechanism
CN108900666A (en) Play frame reminding method, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201002