CN108829277B - Electronic device, speed control method and related product - Google Patents

Electronic device, speed control method and related product Download PDF

Info

Publication number
CN108829277B
CN108829277B CN201810587825.6A CN201810587825A CN108829277B CN 108829277 B CN108829277 B CN 108829277B CN 201810587825 A CN201810587825 A CN 201810587825A CN 108829277 B CN108829277 B CN 108829277B
Authority
CN
China
Prior art keywords
control parameter
sliding seat
parameter range
stroke
speed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810587825.6A
Other languages
Chinese (zh)
Other versions
CN108829277A (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 CN201810587825.6A priority Critical patent/CN108829277B/en
Publication of CN108829277A publication Critical patent/CN108829277A/en
Application granted granted Critical
Publication of CN108829277B publication Critical patent/CN108829277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0362Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 1D translations or rotations of an operating part of the device, e.g. scroll wheels, sliders, knobs, rollers or belts

Abstract

The embodiment of the application discloses an electronic device, a speed control method and a related product, comprising the following steps: when a control instruction for the sliding seat is detected, obtaining at least one control parameter range for the driving mechanism according to the control instruction, wherein each control parameter range is a value set of control parameters corresponding to a preset stroke in a pre-configuration mode, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes; determining a current value of the control parameter, and determining a target control parameter range to which the current value belongs; and controlling a driving mechanism to drive the sliding seat to slide at the target speed according to the target speed description information, wherein the target speed description information is speed description information corresponding to the target control parameter range. The embodiment of the application is favorable for improving the accuracy and flexibility of sliding speed control of the sliding seat and reducing power consumption.

Description

Electronic device, speed control method and related product
Technical Field
The present disclosure relates to the field of electronic devices, and more particularly, to an electronic device, a speed control method and a related product.
Background
With the development of technology and the demand of market, the screen of the electronic device is developing towards an increasingly larger trend. The screen occupation ratio of the electronic equipment is greatly limited by functional devices, for example, the screen occupation ratio of the electronic equipment is limited to be increased by the installation layout of a camera module, a receiver module, a flash lamp, a sensor and the like.
At present, electronic equipment accounts for than in order to promote the screen, does not set up the functional device in the homonymy of electronic equipment display screen, so, design a sliding block during the design, including holding the functional device in the sliding block, the position relation between this sliding block and the electronic equipment's body is unset, carries out starting or hiding of functional device through changing position relation.
Disclosure of Invention
The embodiment of the application provides an electronic device, a speed control method and a related product, aiming at improving the accuracy and flexibility of sliding speed control of a sliding seat and reducing power consumption.
In a first aspect, an embodiment of the present application provides an electronic device, including a middle frame, a sliding seat, a processor, and a memory and a driving mechanism connected to the processor, wherein the sliding seat accommodates a plurality of functional devices therein, the middle frame includes a pair of side end surfaces arranged opposite to each other and a top end surface connected between the pair of side end surfaces, and a receiving groove is formed in the top end surface and penetrates through the pair of side end surfaces; the sliding seat is connected with the middle frame in a sliding way in the accommodating groove through the driving mechanism,
the memory is used for storing the mapping relation between the control instruction and the at least one control parameter range and the mapping relation between the at least one control parameter range and the speed description information;
the processor is configured to obtain at least one control parameter range for the driving mechanism according to a control instruction when the control instruction for the sliding seat is detected, where each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes; the control parameter range determining module is used for determining a current value of the control parameter and determining a target control parameter range to which the current value belongs; and the driving mechanism is controlled to drive the sliding seat to slide at a target speed according to target speed description information, the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
In a second aspect, an embodiment of the present application provides a speed control method applied to an electronic device, where the electronic device includes a sliding seat and a driving mechanism, and the method includes:
when a control instruction for the sliding seat is detected, obtaining at least one control parameter range for the driving mechanism according to the control instruction, wherein each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
determining a current value of the control parameter, and determining a target control parameter range to which the current value belongs;
and controlling the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, wherein the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
In a third aspect, embodiments of the present application provide a speed control device applied to an electronic device, the electronic device including a sliding seat and a driving mechanism, the speed control device including an obtaining unit, a determining unit, and a control unit, wherein,
the acquisition unit is used for acquiring at least one control parameter range for the driving mechanism according to a control instruction when the control instruction for the sliding seat is detected, wherein each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
the determining unit is used for determining the current value of the control parameter and determining the target control parameter range to which the current value belongs;
the control unit is used for controlling the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any of the methods in the second aspect of the embodiment of the present application.
In a fifth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods in the second aspect of the present application.
In a sixth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in any one of the methods of the second aspect of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1B is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
fig. 1C is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
FIG. 2 is a flow chart of a speed control method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of another speed control method provided by the embodiments of the present application;
FIG. 4 is a schematic flow chart diagram illustrating another speed control method provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a block diagram of functional units of a speed control device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiment of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like. For convenience of description, the above-mentioned apparatuses are collectively referred to as electronic devices.
The following describes embodiments of the present application in detail.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of an electronic device 100 according to an embodiment of the present invention, where the electronic device 100 includes: a middle frame 101, a sliding seat 102, a processor 103, and a memory 104 and a driving mechanism 105 connected to the processor 103, wherein the sliding seat accommodates a plurality of functional devices 106, as shown in fig. 1B, the middle frame 101 includes a pair of side end surfaces 101B arranged oppositely and a top end surface 101a connected between the pair of side end surfaces 101B, the top end surface 101a is provided with a receiving groove 101c, and the receiving groove 101c penetrates between the pair of side end surfaces 101B; the sliding seat 102 is slidably connected to the middle frame 101 in the accommodating groove 101c via the driving mechanism 105, wherein,
the memory 103 is used for storing the mapping relation between the control instruction and the at least one control parameter range and the mapping relation between the at least one control parameter range and the speed description information;
the processor 104 is configured to, when a control instruction for the sliding seat 102 is detected, obtain at least one control parameter range for the driving mechanism 105 according to the control instruction, where each control parameter range is a pre-configured value set of the control parameter corresponding to a preset stroke, the preset stroke is a part or all of the stroke of the sliding seat 102, and different control parameter ranges correspond to different preset strokes; the control parameter range determining module is used for determining a current value of the control parameter and determining a target control parameter range to which the current value belongs; and the driving mechanism 105 is controlled to drive the sliding seat 102 to slide at a target speed according to target speed description information, wherein the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
The sliding seat 102 is slidably connected to the middle frame 101, so that the electronic device 100 can extend or retract the sliding seat 102 to the middle frame 101 according to the actual requirement of the user. The sliding seat 102 accommodates the plurality of functional devices 106, and the sliding seat 102 slides relative to the middle frame 101, so that the plurality of functional devices 106 can slide out when needed, and the sliding distances corresponding to different functional devices are different, thereby avoiding the limitation of the use of the functional devices 106 on the screen occupation ratio of the display screen of the electronic device 100, and being beneficial to improving the screen occupation ratio of the electronic device 100.
As shown in fig. 1A, the driving mechanism 105 includes a stepping motor 105a and a lead screw 105b, the electronic device 100 transmits a control signal to the stepping motor 105a through the processor 103, the stepping motor 105a drives the lead screw 105b to push the sliding seat to slide by rotating, and the lead screw 105b can enable the sliding seat 102 to move on a predetermined track when sliding relative to the middle frame 101, so as to ensure accuracy and stability when the sliding seat 102 slides.
Referring to fig. 1B, the middle frame 101 includes a pair of side end surfaces 101B disposed opposite to each other and a top end surface 101a connected between the pair of side end surfaces 101B, the top end surface 101a is provided with a receiving groove 101c, and the receiving groove 101c penetrates through the pair of side end surfaces 101B; referring to fig. 1A and fig. 1B, the sliding seat 102 is slidably connected to the middle frame 101 in the accommodating groove 101c through the driving mechanism 105, so that the sliding seat 102 is driven by the driving mechanism 105 to extend out of or be accommodated in the accommodating groove 101c, and the middle frame 101 further includes a bottom end surface 101d for arranging earphones and speakers of the electronic device 100.
As shown in fig. 1B, the sliding seat 102 has a size corresponding to the receiving groove 101c, i.e., the sliding seat 102 fills the entire receiving groove 101 c. The sliding seat 102 has a first end surface 102a and a second end surface 102b which are opposite to each other. When the first end surface 102a of the sliding seat 102 protrudes from the top end surface 101A by a certain distance, it is defined that the sliding seat 102 is completely extended out of the middle frame 101, in other words, the sliding seat 102 is in an extended state, and when the first end surface 102a of the sliding seat 102 is flush with the bottom end, as shown in fig. 1A, it is defined that the sliding seat 102 is completely accommodated in the accommodating groove 101c, in other words, the sliding seat 102 is in a retracted state.
For example, when a certain functional device 106 in the sliding seat 102 needs to operate according to a control command, the position of the sliding seat 102 may be correspondingly changed according to the position of the functional device 106, so that the sliding seat 102 is in an extended state, and at this time, the functional device 106 on the sliding seat 102 is no longer covered by the display screen. For example, a front camera device may be included in the plurality of functional devices 106, referring to fig. 1B, when the function of the front camera needs to be used, the driving mechanism 105 drives the sliding seat 102 to slide, so that the sliding seat 102 is in an extended state, and at this time, the photographing function of the front camera can be realized; referring to fig. 1A, when the function of the front camera is not needed, the driving mechanism 105 drives the sliding seat 102 to slide, so that the sliding seat 102 is in a retracted state and is accommodated in the accommodating groove 101c of the electronic device 100.
The processor 103 includes an application processor and a baseband processor, the processor 103 is a control center of the electronic device 100, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by running or executing software programs and/or modules stored in the memory 104 and calling data stored in the memory 104, thereby performing overall monitoring of the electronic device 100. The application processor mainly processes an operating system, a user interface, application programs and the like, and the baseband processor mainly processes wireless communication. It will be appreciated that the baseband processor described above may not be integrated into the processor.
The memory 104 may be used for storing software programs and modules, and the processor 103 executes various functional applications and data processing of the electronic device 100 by operating the software programs and modules stored in the memory 104. The memory 104 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 104 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
In one possible example, the at least one control parameter range includes a first control parameter range, a second control parameter range, and a third control parameter range, where a total stroke corresponding to a first stroke, a second stroke, and a third stroke is a maximum stroke of the sliding seat 102, the first stroke includes an initial position of the maximum stroke in the current sliding direction of the sliding seat 102, the third stroke includes an end position of the maximum stroke in the current sliding direction of the sliding seat 102, the first stroke is a stroke corresponding to the first control parameter range, the second stroke is a stroke corresponding to the second control parameter range, and the third stroke is a stroke corresponding to the third control parameter range;
the first speed corresponding to the first control parameter range is greater than the third speed corresponding to the third control parameter range and is less than the second speed corresponding to the second control parameter range.
In this possible example, in the aspect of controlling the driving mechanism 105 to drive the sliding seat 102 to slide at the target speed according to the target speed description information, the processor 103 is specifically configured to: when the target control parameter range is the third control parameter range, controlling the driving mechanism 105 to drive the sliding seat 102 to slide according to the third speed; and is used for detecting the actual position of the sliding seat 102 when the sliding seat 102 is determined to be at a first target position through the current value of the control parameter, wherein the first target position is a position where the sliding seat 102 corresponding to the control instruction stops sliding; and is used for controlling the driving mechanism 105 to drive the sliding seat 102 to slide from the actual position to the first target position when the actual position is detected to be different from the first target position.
In this possible example, the electronic device 100 further comprises a target sensor 107, and in terms of the detection of the actual position of the sliding seat 102, the processor 103 is specifically configured to: detecting a reference value of a target sensor 107, the target sensor 107 being any one of: a Hall sensor, an infrared sensor; and for determining the actual position of the slide shoe from the reference value.
For example, as shown in fig. 1C, the target sensor 107 is a hall sensor, the hall sensor includes a first hall sensor 107a and a second hall sensor 107b, the electronic device 100 further includes a magnet 108 disposed between the first hall sensor 107a and the second hall sensor 107b, the positions of the first hall sensor 107a, the second hall sensor 107b and the magnet 108 on the electronic device 100 may be various, for example, the first hall sensor 107a and the second hall sensor 107b may be located on the middle frame 101, the magnet 108 may be located on an extension portion of the sliding seat 102, the first hall sensor 107a and the second hall sensor 107b may be located on an extension portion of the sliding seat 102, and the magnet 108 may be located on the middle frame 101, such an arrangement may enable the sliding seat 102 to change a relative position relationship between the first hall sensor 107a or the second hall sensor 107b and the magnet 108 during the sliding, since the change in the relative positional relationship causes a change in the magnetic flux of the magnetic field, and thus changes the values of the first hall sensor 107a and the second hall sensor 107b, the actual position of the slide base 102 relative to the middle frame 101 can be determined by the change in the values of the first hall sensor and the second hall sensor.
In one possible example, as shown in fig. 1C, the electronic device 100 further comprises a display 109, and the processor 103 is further configured to: when the target control parameter range is in the first control parameter range or the second control parameter range and it is detected that the speed at which the driving mechanism 105 drives the sliding seat 102 to slide is less than a preset speed threshold, executing a first operation and a second operation in parallel, where the first operation is to control the display 109 to display a prompt message for blocking an obstacle, and the second operation is to control the driving mechanism 105 to stop driving the sliding seat 102 to slide.
The display 109 includes a display driving circuit, a display screen, and a touch panel, where the display driving circuit is configured to control the display screen to display content according to display data and display parameters (e.g., brightness, color, saturation, etc.) of a picture, the touch panel is configured to detect a touch operation, and the display screen is an organic light emitting diode display screen OLED.
In one possible example, the processor 103 is further configured to: when the position of the sliding seat 102 is not detected to be at the second target position, acquiring the acceleration of the electronic device 100; and is used for controlling the driving mechanism 105 to drive the sliding seat 102 to slide to the second target position when the electronic device 100 is determined to be in the falling state according to the acceleration.
Referring to fig. 2, fig. 2 is a schematic flow chart of a speed control method according to an embodiment of the present application, applied to the electronic device shown in fig. 1A-1C, the electronic device including a sliding seat and a driving mechanism, as shown in the figure, the speed control method includes:
s201, when detecting a control instruction for the sliding seat, the electronic device obtains at least one control parameter range for the driving mechanism according to the control instruction, wherein each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
wherein, the sliding seat comprises a plurality of functional devices, such as any one or more of the following: the control instruction for the sliding seat may be a control instruction for different functional devices in the plurality of functional devices, for example, a control instruction for a camera module in the plurality of functional devices, such as a shooting start instruction or a video start instruction corresponding to a plurality of application programs, a control instruction for a receiver module in the plurality of functional devices, such as a call instruction for a telephone application, or a voice receiving instruction corresponding to a chat-type interactive application, and the like, which is not limited herein.
For example, the plurality of functional devices corresponding to the video call starting instruction for the chat interactive application are respectively a camera module and a receiver module, and for example, the functional device corresponding to the starting instruction for the camera application may be a camera module.
The control parameter is a control parameter for controlling the driving mechanism to drive the sliding seat by the electronic device, for example, the number of steps of the stepping motor in the driving mechanism or the number of cycles of the stepping motor, and is not limited herein.
The number of the control parameter ranges corresponding to different control instructions is different, for example, the control instruction is a control instruction for a camera module, the sliding seat needs to slide out of the accommodating groove of the middle frame, so that 3 control parameter ranges can be set to correspond to 3 sections of preset strokes respectively, or the control instruction is a control instruction for a receiver, a small part of the sliding seat needs to slide out of the accommodating groove of the middle frame, so that one control parameter range can be set to correspond to 1 section of preset strokes, therefore, the number of the control parameter ranges corresponding to different control instructions is flexible and changeable, and is not limited herein.
S202, the electronic device determines a current numerical value of the control parameter and determines a target control parameter range to which the current numerical value belongs;
if the control parameter is the number of steps of the stepping motor, the current numerical value is the number of steps currently rotated by the stepping motor, and if the control parameter is the number of cycles, the current numerical value is the total number of control pulses correspondingly sent to the stepping motor when the driving mechanism drives the sliding seat to the current position.
S203, the electronic device controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, wherein the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range;
the electronic device is preset with a mapping relation between the control parameter range and the speed, and the speed is the speed at which the electronic device controls the driving mechanism to drive the sliding seat to slide.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
In one possible example, the at least one control parameter range includes a first control parameter range, a second control parameter range, and a third control parameter range, where a total stroke corresponding to a first stroke, a second stroke, and a third stroke is a maximum stroke of the sliding seat, the first stroke includes an initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke includes an end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is a stroke corresponding to the first control parameter range, the second stroke is a stroke corresponding to the second control parameter range, and the third stroke is a stroke corresponding to the third control parameter range;
the first speed corresponding to the first control parameter range is greater than the third speed corresponding to the third control parameter range and is less than the second speed corresponding to the second control parameter range.
The maximum stroke of the sliding seat corresponds to the maximum length of a screw rod in the driving mechanism, namely the farthest distance that the sliding seat can extend out of the accommodating groove of the middle frame.
The sliding seat is provided with a sliding seat, a middle frame and a sliding seat, wherein different control instructions correspond to different sliding directions of the sliding seat relative to the middle frame, and a first control parameter range, a second control parameter range and a third control parameter range which correspond to different sliding directions are different; if the current sliding direction of the sliding seat is the direction that the sliding seat tends to the middle frame and retracts into the accommodating groove, the ending position is the position that the sliding seat is completely accommodated in the accommodating groove of the middle frame, and the initial position is the farthest position on the sliding stroke of the sliding seat opposite to the ending position.
For example, the total stroke of the screw rod is 8.5mm, the sliding direction is the direction in which the sliding seat is far away from the middle frame and extends out of the accommodating groove, then the first control parameter range is the control parameter range corresponding to the first stroke (0-0.5mm), the first speed is 1000pps, the second control parameter range is the control parameter range corresponding to the second stroke (0.5mm-7.5mm), the second speed is 2500pps, the third control parameter range is the control parameter range corresponding to the third stroke (7.5mm-8.5mm), and the third speed is 50pps, where unit pps represents the number of pulses per second.
Taking the first stroke as an example, the sliding distance is 0.5mm, the pitch of the stepping motor in the driving mechanism is 2.4mm, the gear box transmission ratio in the stepping motor is 18.06, and the number of turns of the stepping motor is 0.5/(2.4 × 18.06), wherein the stepping motor makes 20 turns, each turn corresponds to 32 cycles inside the motor, the angular speed of the driving mechanism is 2 pi/20 × 32, and the sliding distance corresponding to the sliding seat sliding first stroke corresponds to the first control parameter range, namely, the cycle number is N ═ 0.5/(2.4 × 18.06) ] [2 pi/(2 pi/20 × 32) ] [0.5/(2.4 × 18.06) ] (20 × 32).
It can be seen that, in this example, the electronic device sets the control parameter ranges to three control parameter ranges, and sets the first speed of the stroke including the initial position to a speed value smaller than the second speed and greater than the third speed, so as to ensure that the driving mechanism has sufficient starting force when initially driving the sliding seat, which is beneficial to ensuring the normal operation of the motor, and sets the middle stroke to the second speed, i.e. the maximum speed can ensure that the total sliding duration of the sliding block is within a shorter duration range, which is beneficial to shortening the sliding duration and increasing the sliding speed, and sets the third speed of the stroke including the end position to the minimum speed, thereby avoiding that the sliding seat and the middle frame collide with each other more strongly when sliding to the end position, reducing the loss of devices, and reducing noise.
In this possible example, the controlling the driving mechanism to drive the sliding seat to slide at the target speed according to the target speed description information includes:
when the target control parameter range is the third control parameter range, controlling the driving mechanism to drive the sliding seat to slide according to the third speed;
when the sliding seat is determined to be at a first target position through the current numerical value of the control parameter, detecting the actual position of the sliding seat, wherein the first target position is a position, corresponding to the control instruction, at which the sliding seat stops sliding;
when the actual position is detected to be different from the first target position, controlling the driving mechanism to drive the sliding seat to slide from the actual position to the first target position.
Different control commands correspond to different sliding seat sliding stopping positions, and different control commands correspond to different started functional devices, so that the sliding seats need to slide out at different distances, and the sliding seat sliding stopping positions are different.
The specific implementation manner of detecting the actual position of the sliding seat by the electronic device may be various, for example, the distance between the sliding seat and the middle frame may be obtained by an infrared sensor or a proximity sensor mounted on the middle frame or the sliding seat, so as to determine the actual position of the sliding seat; or the position of the sliding seat may be changed by changing the magnetic flux of the magnetic field through a hall sensor mounted on the middle frame and a magnet mounted on the extension portion of the sliding seat, and the actual position of the sliding seat may be determined by reading the value of the hall sensor, which is not limited herein.
The control time length for controlling the driving device by the electronic device is set for the first target position, and the control time length can enable the driving device to control the sliding seat to accurately reach the first target position, but the step loss phenomenon can occur in the rotating process of the stepping motor in the driving device, so that the control time length of the electronic device is short, and the sliding seat cannot reach the first target position, namely the actual position is different from the target position.
The specific implementation manner of the electronic device controlling the driving mechanism to drive the sliding seat to slide from the actual position to the first target position may be various, for example, the control duration may be determined again first, and the sliding seat is controlled to reach the target position according to the control duration, or the actual position may be detected in parallel during the driving of the sliding seat by the driving mechanism, and when it is detected that the actual position is the same as the first target position, the driving mechanism is stopped being controlled to drive the sliding seat.
Therefore, in the example, when the electronic device controls the driving mechanism to move the sliding seat to the first target position, the electronic device detects the actual position where the sliding seat arrives, and when the actual position is different from the target position, the electronic device controls the driving mechanism, so that the phenomenon of step loss of the motor is effectively avoided, and the accuracy of the position where the sliding seat stops sliding is ensured.
In this possible example, said detecting the actual position of said sliding seat comprises
Detecting a reference value of a target sensor, wherein the target sensor is any one of the following: a Hall sensor, an infrared sensor;
determining the actual position of the sliding seat according to the reference value.
The target sensor may be one or more sensors of any one of the sensors, which is not limited herein, and different sensors or different numbers of sensors correspond to different reference values, for example, when the target sensor is one hall sensor, the reference value is a value fed back by the hall sensor, and when the target sensor is two hall sensors, the reference value may be a difference between values fed back by the two hall sensors, which is not limited herein.
The specific implementation manner of determining the actual position of the sliding seat according to the reference value may be that the actual position is determined according to a mapping relationship between pre-stored reference values and positions, different reference values correspond to different mapping relationships, and the pre-stored mapping relationship is determined by a technical developer before the electronic device leaves a factory, according with the mapping relationship of each electronic device, by testing numerical values of the sensor at different positions of the sliding seat.
It can be seen that, in this example, after the electronic device is driven by the driving mechanism, the current actual position is detected by the target sensor to determine whether the motor has a step loss phenomenon, which is beneficial to ensuring that the sliding seat can reach the first target position when the driving is completed, so that the accuracy of the driving control is improved.
In one possible example, the method further comprises:
when the target control parameter range is in the first control parameter range or the second control parameter range and the speed of the driving mechanism driving the sliding seat to slide is detected to be smaller than a preset speed threshold value, executing a first operation and a second operation in parallel, wherein the first operation is displaying a prompt message blocked by an obstacle, and the second operation is controlling the driving mechanism to stop driving the sliding seat to slide.
The preset speed threshold is an empirical value, and is preset in the electronic device by a technical developer before the electronic device leaves a factory, where the preset speed threshold may include one or two, and when the preset speed threshold is one, for example, 900pps, 800pps, and the like, and when the preset speed threshold is two, the preset speed threshold may correspond to different control parameter ranges, for example, the preset speed threshold corresponding to the first control parameter range is 900pps, and the preset speed threshold corresponding to the second control parameter range is 2000pps, and the like, and is not limited herein.
It can be seen that, in this example, the electronic device detects that the drive mechanism drives the gliding speed of sliding seat is less than preset speed threshold, when speed is not conform to the speed under the electronic device control promptly, it shelters from to confirm that there is the barrier, for example can be people's hand, object etc., remind the user when the barrier shelters from, the user can remove the barrier according to the suggestion message, be favorable to indicateing drive control's intelligence, stop to drive the sliding seat simultaneously and slide, be favorable to avoiding sliding by force under the barrier condition and leading to mechanical damage, in addition, carry out first operation and second operation in parallel and effectively reduced serial operation's duration, promote control speed.
In one possible example, the method further comprises:
when the position of the sliding seat is detected not to be at the second target position, acquiring the acceleration of the electronic device;
and when the electronic device is determined to be in a falling state according to the acceleration, controlling the driving mechanism to drive the sliding seat to slide to the second target position.
The second target position is a position when the sliding seat is completely accommodated in the accommodating groove, and the specific implementation manner of determining that the electronic device is in the falling state according to the acceleration may be that the acceleration of the electronic device is detected to be suddenly changed and the changed acceleration lasts for a preset duration, or may be that the acceleration of the gravity acceleration of the electronic device is detected to be suddenly changed and the changed acceleration lasts for a preset duration, which is not limited herein.
Therefore, in the example, when the electronic device is not completely accommodated in the accommodating groove at the position of the sliding seat, the acceleration of the electronic device is monitored, and when the electronic device is determined to be in a falling state through the acceleration, the sliding seat is immediately and completely accommodated in the accommodating groove, so that the damage degree of the sliding seat in the falling process is reduced.
Referring to fig. 3, in accordance with the embodiment shown in fig. 2, fig. 3 is a schematic flow chart of a speed control method provided in an embodiment of the present application, applied to the electronic device shown in fig. 1A-1C, the electronic device including a sliding seat and a driving mechanism, as shown in the figure, the method includes:
and S301, when a control instruction for the sliding seat is detected, the electronic device obtains a first control parameter range, a second control parameter range and a third control parameter range for the driving mechanism according to the control instruction, wherein the total stroke corresponding to a first stroke, a second stroke and a third stroke is the maximum stroke of the sliding seat, the first stroke comprises the initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke comprises the end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is the stroke corresponding to the first control parameter range, the second stroke is the stroke corresponding to the second control parameter range, and the third stroke is the stroke corresponding to the third control parameter range.
S302, the electronic device determines the current value of the control parameter.
And S303, when the electronic device determines the first control parameter range to which the current numerical value belongs, controlling the driving device to drive the sliding seat to slide at a first speed.
S304, when determining a second control parameter range to which the current value belongs, the electronic device controls the driving device to drive the sliding seat to slide at a second speed, wherein the second speed is greater than the first speed.
S305, when determining a third control parameter range to which the current numerical value belongs, the electronic device controls the driving mechanism to drive the sliding seat to slide according to a third speed, wherein the third speed is lower than the first speed.
S306, when the electronic device determines that the sliding seat is at a first target position according to the current value of the control parameter, detecting the actual position of the sliding seat, wherein the first target position is a position where the sliding seat corresponding to the control instruction stops sliding.
S307, when the electronic device detects that the actual position is different from the first target position, the electronic device controls the driving mechanism to drive the sliding seat to slide from the actual position to the first target position.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
In addition, the electronic device sets the control parameter range to be three control parameter ranges, sets the first speed of the stroke including the initial position to be a speed value which is smaller than the second speed and larger than the third speed, ensures that the driving mechanism has enough starting force when initially driving the sliding seat, and is favorable for ensuring the normal operation of the motor, sets the middle stroke to be the second speed, namely, the maximum speed can ensure that the total sliding time of the sliding block is within a shorter time range, and is favorable for shortening the sliding time and improving the sliding speed, and sets the third speed of the stroke including the termination position to be the minimum speed, thereby avoiding that the collision strength between the sliding seat and the middle frame is larger when the sliding block slides to the termination position, reducing the loss of devices and reducing noise.
In addition, when the electronic device controls the driving mechanism sliding seat to the first target position, the actual position reached by the sliding seat is detected, and when the actual position is different from the target position, the driving mechanism is controlled, so that the phenomenon of motor step loss is effectively avoided, and the accuracy of the position where the sliding seat stops sliding is ensured.
Referring to fig. 4, fig. 4 is a schematic flow chart of a speed control method according to an embodiment of the present application, applied to the electronic device shown in fig. 1A-1C, where the electronic device includes a sliding seat and a driving mechanism. As shown in the figure, the speed control method includes:
s401, when a control instruction for the sliding seat is detected, the electronic device obtains a first control parameter range, a second control parameter range and a third control parameter range for the driving mechanism according to the control instruction, wherein a total stroke corresponding to a first stroke, a second stroke and a third stroke is a maximum stroke of the sliding seat, the first stroke comprises an initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke comprises an end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is a stroke corresponding to the first control parameter range, the second stroke is a stroke corresponding to the second control parameter range, and the third stroke is a stroke corresponding to the third control parameter range.
S402, the electronic device determines the current value of the control parameter.
S403, when the electronic device determines that the current value belongs to the first control parameter range, the electronic device controls the driving device to drive the sliding seat to slide at a first speed.
S404, when determining a second control parameter range to which the current value belongs, the electronic device controls the driving device to drive the sliding seat to slide at a second speed, wherein the second speed is greater than the first speed.
S405, when determining a third control parameter range to which the current numerical value belongs, the electronic device controls the driving mechanism to drive the sliding seat to slide according to a third speed, wherein the third speed is lower than the first speed.
S406, when the electronic device detects that the position of the sliding seat is not at the second target position, acquiring the acceleration of the electronic device.
S407, when the electronic device is determined to be in a falling state according to the acceleration, controlling the driving mechanism to drive the sliding seat to slide to the second target position.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
In addition, the electronic device sets the control parameter range to be three control parameter ranges, sets the first speed of the stroke including the initial position to be a speed value which is smaller than the second speed and larger than the third speed, ensures that the driving mechanism has enough starting force when initially driving the sliding seat, and is favorable for ensuring the normal operation of the motor, sets the middle stroke to be the second speed, namely, the maximum speed can ensure that the total sliding time of the sliding block is within a shorter time range, and is favorable for shortening the sliding time and improving the sliding speed, and sets the third speed of the stroke including the termination position to be the minimum speed, thereby avoiding that the collision strength between the sliding seat and the middle frame is larger when the sliding block slides to the termination position, reducing the loss of devices and reducing noise.
In addition, when the electronic device is not completely accommodated in the accommodating groove at the position of the sliding seat, the acceleration of the electronic device is monitored, and when the electronic device is determined to be in a falling state through the acceleration, the sliding seat is immediately accommodated in the accommodating groove completely, so that the damage degree of the sliding seat in the falling process is reduced.
In accordance with the embodiments shown in fig. 2, fig. 3, and fig. 4, please refer to fig. 5, and fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device includes a sliding seat, a driving mechanism, a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the following steps;
when a control instruction for the sliding seat is detected, obtaining at least one control parameter range for the driving mechanism according to the control instruction, wherein each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
determining a current value of the control parameter, and determining a target control parameter range to which the current value belongs;
and controlling the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, wherein the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
In one possible example, the at least one control parameter range includes a first control parameter range, a second control parameter range, and a third control parameter range, where a total stroke corresponding to a first stroke, a second stroke, and a third stroke is a maximum stroke of the sliding seat, the first stroke includes an initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke includes an end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is a stroke corresponding to the first control parameter range, the second stroke is a stroke corresponding to the second control parameter range, and the third stroke is a stroke corresponding to the third control parameter range;
the first speed corresponding to the first control parameter range is greater than the third speed corresponding to the third control parameter range and is less than the second speed corresponding to the second control parameter range.
In this possible example, in the aspect of controlling the driving mechanism to drive the sliding seat to slide at the target speed according to the target speed description information, the instructions in the program are specifically configured to perform the following operations: when the target control parameter range is the third control parameter range, controlling the driving mechanism to drive the sliding seat to slide according to the third speed; and detecting the actual position of the sliding seat when the sliding seat is determined to be at a first target position through the current value of the control parameter, wherein the first target position is a position, corresponding to the control instruction, at which the sliding seat stops sliding; and the driving mechanism is controlled to drive the sliding seat to slide from the actual position to the first target position when the actual position is detected to be different from the first target position.
In this possible example, in terms of said detecting the actual position of the sliding seat, the instructions in the program are specifically intended to perform the following operations: detecting a reference value of a target sensor, wherein the target sensor is any one of the following: a Hall sensor, an infrared sensor; and for determining the actual position of the slide shoe from the reference value.
In one possible example, the program further includes instructions for performing the steps of: when the target control parameter range is in the first control parameter range or the second control parameter range and the speed of the driving mechanism driving the sliding seat to slide is detected to be smaller than a preset speed threshold value, executing a first operation and a second operation in parallel, wherein the first operation is displaying a prompt message blocked by an obstacle, and the second operation is controlling the driving mechanism to stop driving the sliding seat to slide.
In one possible example, the program further includes instructions for performing the steps of: when the position of the sliding seat is detected not to be at the second target position, acquiring the acceleration of the electronic device; and the driving mechanism is controlled to drive the sliding seat to slide to the second target position when the electronic device is determined to be in the falling state according to the acceleration.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a block diagram showing functional units of a speed control device 600 according to an embodiment of the present application. The speed control device 600 is applied to an electronic device comprising a slide base and a driving mechanism, the speed control device 600 comprises an acquisition unit 601, a determination unit 602 and a control unit 603, wherein,
the obtaining unit 601 is configured to, when a control instruction for the sliding seat is detected, obtain at least one control parameter range for the driving mechanism according to the control instruction, where each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
the determining unit 602 is configured to determine a current value of the control parameter, and determine a target control parameter range to which the current value belongs;
the control unit 603 is configured to control the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, where the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used to indicate a speed adapted to the preset stroke corresponding to the control parameter range.
It can be seen that, in the embodiment of the present application, when a control instruction for the sliding seat is detected, the electronic device first obtains at least one control parameter range for the driving mechanism according to the control instruction, then determines a current value of the control parameter, determines a target control parameter range to which the current value belongs, and finally controls the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information. It can be known that, when the electronic device detects a control instruction for the sliding seat, at least one control parameter range corresponding to the control instruction is firstly obtained, and different control instructions correspond to different numbers of control parameter ranges and different value sets of the control parameter ranges, which is beneficial to improving the accuracy of driving and controlling the sliding seat, and the sliding seat does not need to slide the same stroke under all the control instructions, thereby reducing the power consumption of the driving mechanism.
In one possible example, the at least one control parameter range includes a first control parameter range, a second control parameter range, and a third control parameter range, where a total stroke corresponding to a first stroke, a second stroke, and a third stroke is a maximum stroke of the sliding seat, the first stroke includes an initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke includes an end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is a stroke corresponding to the first control parameter range, the second stroke is a stroke corresponding to the second control parameter range, and the third stroke is a stroke corresponding to the third control parameter range;
the first speed corresponding to the first control parameter range is greater than the third speed corresponding to the third control parameter range and is less than the second speed corresponding to the second control parameter range.
In this possible example, in the aspect of controlling the driving mechanism to drive the sliding seat to slide at the target speed according to the target speed description information, the control unit 603 is specifically configured to: when the target control parameter range is the third control parameter range, controlling the driving mechanism to drive the sliding seat to slide according to the third speed; and detecting the actual position of the sliding seat when the sliding seat is determined to be at a first target position through the current value of the control parameter, wherein the first target position is a position, corresponding to the control instruction, at which the sliding seat stops sliding; and the driving mechanism is controlled to drive the sliding seat to slide from the actual position to the first target position when the actual position is detected to be different from the first target position.
In this possible example, in terms of said detecting the actual position of the sliding seat, the control unit 603 is specifically configured to: detecting a reference value of a target sensor, wherein the target sensor is any one of the following: a Hall sensor, an infrared sensor; and for determining the actual position of the slide shoe from the reference value.
In one possible example, the speed control device 600 further comprises an execution unit, wherein:
the execution unit is configured to execute a first operation and a second operation in parallel when the target control parameter range is within the first control parameter range or the second control parameter range and it is detected that the speed at which the driving mechanism drives the sliding seat to slide is less than a preset speed threshold, where the first operation is to display a prompt message for blocking an obstacle, and the second operation is to control the driving mechanism to stop driving the sliding seat to slide.
In one possible example, the obtaining unit 601 is further configured to: when the position of the sliding seat is detected not to be at the second target position, acquiring the acceleration of the electronic device;
the control unit 603 is further configured to: and when the electronic device is determined to be in a falling state according to the acceleration, controlling the driving mechanism to drive the sliding seat to slide to the second target position.
The acquiring unit 601, the determining unit 602, and the controlling unit 603 may be processors.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (15)

1. An electronic device is characterized by comprising a middle frame, a sliding seat, a processor, a memory and a driving mechanism, wherein the memory and the driving mechanism are connected with the processor, a plurality of functional devices are accommodated in the sliding seat, the middle frame comprises a pair of side end surfaces which are oppositely arranged and a top end surface which is connected between the pair of side end surfaces, an accommodating groove is formed in the top end surface, and the accommodating groove penetrates through the pair of side end surfaces; the sliding seat is connected with the middle frame in a sliding way in the accommodating groove through the driving mechanism,
the memory is used for storing the mapping relation between the control instruction and the at least one control parameter range and the mapping relation between the at least one control parameter range and the speed description information;
the processor is configured to obtain at least one control parameter range for the driving mechanism according to a control instruction when the control instruction for the sliding seat is detected, where each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes; the control parameter range determining module is used for determining a current value of the control parameter and determining a target control parameter range to which the current value belongs; and the driving mechanism is controlled to drive the sliding seat to slide at a target speed according to target speed description information, the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
2. The electronic device according to claim 1, wherein the at least one control parameter range includes a first control parameter range, a second control parameter range, and a third control parameter range, wherein a total stroke corresponding to a first stroke, a second stroke, and a third stroke is a maximum stroke of the sliding seat, the first stroke includes an initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke includes an end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is a stroke corresponding to the first control parameter range, the second stroke is a stroke corresponding to the second control parameter range, and the third stroke is a stroke corresponding to the third control parameter range;
the first speed corresponding to the first control parameter range is greater than the third speed corresponding to the third control parameter range and is less than the second speed corresponding to the second control parameter range.
3. The electronic device according to claim 2, wherein in said controlling the driving mechanism to drive the sliding seat to slide at the target speed according to the target speed description information, the processor is specifically configured to: when the target control parameter range is the third control parameter range, controlling the driving mechanism to drive the sliding seat to slide according to the third speed; and detecting the actual position of the sliding seat when the sliding seat is determined to be at a first target position through the current value of the control parameter, wherein the first target position is a position, corresponding to the control instruction, at which the sliding seat stops sliding; and the driving mechanism is controlled to drive the sliding seat to slide from the actual position to the first target position when the actual position is detected to be different from the first target position.
4. The electronic device according to claim 3, further comprising a target sensor, said processor being specifically configured to, in said detecting the actual position of the sliding seat: detecting a reference value of a target sensor, wherein the target sensor is any one of the following: a Hall sensor, an infrared sensor; and for determining the actual position of the slide shoe from the reference value.
5. The electronic device of claim 2, further comprising a display, the processor further configured to: when the target control parameter range is in the first control parameter range or the second control parameter range and the speed of the driving mechanism driving the sliding seat to slide is detected to be smaller than a preset speed threshold value, executing a first operation and a second operation in parallel, wherein the first operation is used for controlling the display to display a prompt message shielded by an obstacle, and the second operation is used for controlling the driving mechanism to stop driving the sliding seat to slide.
6. The electronic device of any of claims 1-5, wherein the processor is further configured to: when the position of the sliding seat is detected not to be at a second target position, acquiring the acceleration of the electronic device; and when the electronic device is determined to be in a falling state according to the acceleration, controlling the driving mechanism to drive the sliding seat to slide to the second target position, wherein the second target position is a position when the sliding seat is completely accommodated in the accommodating groove.
7. A speed control method applied to an electronic device including a slide base and a drive mechanism, the method comprising:
when a control instruction for the sliding seat is detected, obtaining at least one control parameter range for the driving mechanism according to the control instruction, wherein each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
determining a current value of the control parameter, and determining a target control parameter range to which the current value belongs;
and controlling the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, wherein the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
8. The method according to claim 7, wherein the at least one control parameter range comprises a first control parameter range, a second control parameter range and a third control parameter range, wherein the total stroke corresponding to a first stroke, a second stroke and a third stroke is the maximum stroke of the sliding seat, the first stroke comprises the initial position of the maximum stroke in the current sliding direction of the sliding seat, the third stroke comprises the end position of the maximum stroke in the current sliding direction of the sliding seat, the first stroke is the stroke corresponding to the first control parameter range, the second stroke is the stroke corresponding to the second control parameter range, and the third stroke is the stroke corresponding to the third control parameter range;
the first speed corresponding to the first control parameter range is greater than the third speed corresponding to the third control parameter range and is less than the second speed corresponding to the second control parameter range.
9. The method of claim 8, wherein the controlling the driving mechanism to drive the sliding seat to slide at the target speed according to the target speed description information comprises:
when the target control parameter range is the third control parameter range, controlling the driving mechanism to drive the sliding seat to slide according to the third speed;
when the sliding seat is determined to be at a first target position through the current numerical value of the control parameter, detecting the actual position of the sliding seat, wherein the first target position is a position, corresponding to the control instruction, at which the sliding seat stops sliding;
when the actual position is detected to be different from the first target position, controlling the driving mechanism to drive the sliding seat to slide from the actual position to the first target position.
10. The method of claim 9, wherein said detecting an actual position of said carriage comprises
Detecting a reference value of a target sensor, wherein the target sensor is any one of the following: a Hall sensor, an infrared sensor;
determining the actual position of the sliding seat according to the reference value.
11. The method of claim 8, further comprising:
when the target control parameter range is in the first control parameter range or the second control parameter range and the speed of the driving mechanism driving the sliding seat to slide is detected to be smaller than a preset speed threshold value, executing a first operation and a second operation in parallel, wherein the first operation is displaying a prompt message blocked by an obstacle, and the second operation is controlling the driving mechanism to stop driving the sliding seat to slide.
12. The method according to any one of claims 7-11, further comprising:
when the position of the sliding seat is detected not to be at a second target position, acquiring the acceleration of the electronic device;
when the electronic device is determined to be in a falling state according to the acceleration, the driving mechanism is controlled to drive the sliding seat to slide to the second target position, wherein the second target position is a position when the sliding seat is completely accommodated in the accommodating groove.
13. A speed control device, applied to an electronic device including a slide base and a drive mechanism, includes an acquisition unit, a determination unit, and a control unit, wherein,
the acquisition unit is used for acquiring at least one control parameter range for the driving mechanism according to a control instruction when the control instruction for the sliding seat is detected, wherein each control parameter range is a value set of the control parameter corresponding to a preset stroke in advance, the preset stroke is a part or all of the stroke of the sliding seat, and different control parameter ranges correspond to different preset strokes;
the determining unit is used for determining the current value of the control parameter and determining the target control parameter range to which the current value belongs;
the control unit is used for controlling the driving mechanism to drive the sliding seat to slide at a target speed according to target speed description information, the target speed description information is speed description information corresponding to the target control parameter range, and the speed description information is used for representing the speed of the preset stroke corresponding to the control parameter range.
14. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 7-12.
15. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any of the claims 7-12.
CN201810587825.6A 2018-06-08 2018-06-08 Electronic device, speed control method and related product Active CN108829277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810587825.6A CN108829277B (en) 2018-06-08 2018-06-08 Electronic device, speed control method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810587825.6A CN108829277B (en) 2018-06-08 2018-06-08 Electronic device, speed control method and related product

Publications (2)

Publication Number Publication Date
CN108829277A CN108829277A (en) 2018-11-16
CN108829277B true CN108829277B (en) 2021-04-13

Family

ID=64144387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810587825.6A Active CN108829277B (en) 2018-06-08 2018-06-08 Electronic device, speed control method and related product

Country Status (1)

Country Link
CN (1) CN108829277B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587317B (en) * 2018-11-19 2021-01-19 Oppo广东移动通信有限公司 Calibration method, calibration device and computer storage medium
CN110113449B (en) * 2019-03-29 2020-09-01 维沃移动通信有限公司 Terminal equipment and device retraction method
CN110602399A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Processing method and device for lifting obstacle of camera and mobile terminal
CN113271370A (en) * 2021-06-10 2021-08-17 Oppo广东移动通信有限公司 Drive module, mobile terminal, control method and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507736A (en) * 2001-03-19 2004-06-23 ���µ�����ҵ��ʽ���� Mobile terminal device having camera function
CN101631199A (en) * 2009-07-13 2010-01-20 中兴通讯股份有限公司 Mobile terminal, mobile terminal camera device and method for realizing camera
CN101990032A (en) * 2009-07-29 2011-03-23 深圳富泰宏精密工业有限公司 Mobile electronic device with camera device and control method thereof
CN107819907A (en) * 2017-11-14 2018-03-20 维沃移动通信有限公司 A kind of camera control method and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8395496B2 (en) * 2007-03-29 2013-03-12 Shiv P Joshi Miniature modular wireless sensor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1507736A (en) * 2001-03-19 2004-06-23 ���µ�����ҵ��ʽ���� Mobile terminal device having camera function
CN101631199A (en) * 2009-07-13 2010-01-20 中兴通讯股份有限公司 Mobile terminal, mobile terminal camera device and method for realizing camera
CN101990032A (en) * 2009-07-29 2011-03-23 深圳富泰宏精密工业有限公司 Mobile electronic device with camera device and control method thereof
CN107819907A (en) * 2017-11-14 2018-03-20 维沃移动通信有限公司 A kind of camera control method and mobile terminal

Also Published As

Publication number Publication date
CN108829277A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
CN108829277B (en) Electronic device, speed control method and related product
CN109040348B (en) Electronic device, drive control method and related product
CN108989491B (en) Electronic device, speed control method and related product
US10169634B2 (en) Method, device and computer-readable storage medium for fingerprint recognition
EP3396593A1 (en) Organic light emitting diode display module and control method thereof
KR101966127B1 (en) robot cleaner system and a control method of the same
US20170282913A1 (en) Method, device and computer-readable storage medium for parking a self-balancing vehicle
US20170078561A1 (en) Method for controlling cameras, storage medium and terminal
US20160037037A1 (en) Switching between cameras of an electronic device
EP3217373A1 (en) Terminal with infrared remote control function and infrared remote control pairing method
WO2013103022A1 (en) Touch panel system and electronic apparatus
CN110213414A (en) A kind of drive control method, terminal and computer readable storage medium
CN110262659B (en) Application control method and related device
KR20140056860A (en) Electronic device including a photo sensor and controlling method thereof, gesture recognition apparatus and method for the electronic device
EP3575917B1 (en) Collecting fingerprints
WO2014163333A1 (en) User interface display method and apparatus therefor
EP2889669A1 (en) Method for displaying a content through either a head mounted display device or a display device, corresponding head mounted display device and computer program product
CN108174086B (en) Shooting method and related product
CN111327807A (en) Electronic device
CN104902080A (en) Information interaction method and device
CN105786349A (en) Method for controlling screen picture to rotate and electronic device
CN106569716B (en) Single-hand control method and control system
CN108469875B (en) Control method of functional component and mobile terminal
CN110800277A (en) Call processing method and related product
CN104639964A (en) Method and device for determining key values of direction keys of remote controller

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