CN108989491A - Electronic device, method for control speed and Related product - Google Patents

Electronic device, method for control speed and Related product Download PDF

Info

Publication number
CN108989491A
CN108989491A CN201810586804.2A CN201810586804A CN108989491A CN 108989491 A CN108989491 A CN 108989491A CN 201810586804 A CN201810586804 A CN 201810586804A CN 108989491 A CN108989491 A CN 108989491A
Authority
CN
China
Prior art keywords
range
sliding seat
speed
value
stroke
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.)
Granted
Application number
CN201810586804.2A
Other languages
Chinese (zh)
Other versions
CN108989491B (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 CN201810586804.2A priority Critical patent/CN108989491B/en
Publication of CN108989491A publication Critical patent/CN108989491A/en
Application granted granted Critical
Publication of CN108989491B publication Critical patent/CN108989491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/0206Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings
    • H04M1/0208Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings characterized by the relative motions of the body parts
    • H04M1/0235Slidable or telescopic telephones, i.e. with a relative translation movement of the body parts; Telephones using a combination of translation and other relative motions of the body parts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0266Details of the structure or mounting of specific components for a display module assembly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Environmental & Geological Engineering (AREA)
  • Seats For Vehicles (AREA)

Abstract

The embodiment of the present application discloses a kind of electronic device, method for control speed and Related product, it include: when detecting the control instruction for sliding seat, at least one numberical range of parameter preset is obtained according to control instruction, wherein, each numberical range is the numerical value set of the parameter preset for the correspondence preset strokes being pre-configured, parameter preset is the numerical value determined according to the first Hall sensor and the second Hall sensor, preset strokes are some or all of sliding seat stroke, and different numberical ranges corresponds to different preset strokes;It determines the current value of parameter preset, and determines target value range belonging to current value;Driving mechanism is controlled with target velocity driving sliding seat sliding according to target velocity description information, and target velocity description information is speed description information corresponding with target value range.The embodiment of the present application is conducive to be promoted the accuracy and flexibility of speed control, reduces power consumption.

Description

Electronic device, method for control speed and Related product
Technical field
This application involves technical field of electronic device, and in particular to a kind of electronic device, method for control speed and related produces Product.
Background technique
With the development of science and technology with the demand in market, the screen of electronic equipment is towards increasing trend development.Wherein, Larger limitation of the screen accounting of electronic equipment by function element, such as camera module, receiver mould group, flash lamp, sensing The screen accounting that the mounting arrangement of device etc. will limit electronic equipment is promoted.
Currently, electronic equipment is not arranged in the ipsilateral of electronic equipment display screen in order to promote screen accounting, by function element, therefore And setting one sliding shoe of timing design, include accommodating function element in sliding shoe, the ontology of the sliding shoe and electronic equipment it Between positional relationship be not fixed, by change positional relationship carry out function element starting or hide.
Summary of the invention
The embodiment of the present application provides a kind of electronic device, method for control speed and Related product, to promote speed control The accuracy and flexibility of system reduce power consumption.
In a first aspect, the embodiment of the present application provides a kind of electronic device, including center, sliding seat, processor, and connection Memory, driving mechanism, the first Hall sensor and the second Hall sensor of the processor, receiving is more in the sliding seat A function element, the center include the side end face of a pair of opposing and the top that is connected between a pair of side end face Face offers holding tank on the top end face, and the holding tank is through a pair of side end face;The sliding seat is through the driving Mechanism is slidably connected in the holding tank with the center, wherein
The memory, the mapping relations and extremely at least one of control store instruction and parameter preset numberical range The mapping relations of few a numberical range and speed description information;
The processor, for being obtained according to the control instruction when detecting the control instruction for the sliding seat To at least one numberical range of parameter preset, wherein each numberical range is the described pre- of the correspondence preset strokes being pre-configured The numerical value set of setting parameter, the parameter preset are to be determined according to first Hall sensor and second Hall sensor Numerical value, the preset strokes are some or all of sliding seat stroke, and at least one described numberical range is two Or when two or more numberical range, the corresponding institute of numberical range described in any two in described two or more than two numberical ranges State preset strokes difference;And the current value for determining the parameter preset, and determine mesh belonging to the current value Mark numberical range;And the sliding is driven with target velocity for controlling the driving mechanism according to target velocity description information Seat sliding, the target velocity description information are speed description information corresponding with the target value range, and the speed is retouched State speed of the information for indicating to be adapted to the corresponding preset strokes of the numberical range.
Second aspect, the embodiment of the present application provide a kind of method for control speed, are applied to electronic device, the electronic device Including sliding seat, driving mechanism, the first Hall sensor and the second Hall sensor, which comprises
When detecting the control instruction for the sliding seat, parameter preset is obtained at least according to the control instruction One numberical range, wherein each numberical range is the numerical value set of the parameter preset for the correspondence preset strokes being pre-configured, The parameter preset is the numerical value determined according to first Hall sensor and second Hall sensor, the default row Journey is some or all of sliding seat stroke, and at least one described numberical range is two or more numberical ranges When, the corresponding preset strokes of numberical range described in any two are different in described two or more than two numberical ranges;
It determines the current value of the parameter preset, and determines target value range belonging to the current value;
The driving mechanism is controlled according to target velocity description information, and the sliding seat sliding is driven with target velocity, it is described Target velocity description information is speed description information corresponding with the target value range, and the speed description information is used for table Show the speed for being adapted to the corresponding preset strokes of the numberical range.
The third aspect, the embodiment of the present application provide a kind of speed control unit, which is characterized in that it is applied to electronic device, The electronic device includes sliding seat, driving mechanism, the first Hall sensor and the second Hall sensor, the speed control dress It sets including acquiring unit, determination unit and control unit, wherein
The acquiring unit, for when detecting the control instruction for the sliding seat, according to the control instruction Obtain at least one numberical range of parameter preset, wherein each numberical range is the described of the correspondence preset strokes being pre-configured The numerical value set of parameter preset, the parameter preset are true according to first Hall sensor and second Hall sensor Fixed numerical value, the preset strokes are some or all of sliding seat stroke, and at least one described numberical range is two When a or more than two numberical ranges, numberical range described in any two is corresponding in described two or more than two numberical ranges The preset strokes are different;
The determination unit for determining the current value of the parameter preset, and determines belonging to the current value Target value range;
Described control unit drives institute for controlling the driving mechanism according to target velocity description information with target velocity Sliding seat sliding is stated, the target velocity description information is speed description information corresponding with the target value range, described Speed description information is used for the speed for indicating to be adapted to the corresponding preset strokes of the numberical range.
Fourth aspect, the embodiment of the present application provide a kind of electronic device, including processor, memory, communication interface and One or more programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned It manages device to execute, above procedure is included the steps that for executing the instruction in the embodiment of the present application second aspect either method.
5th aspect, the embodiment of the present application provide a kind of computer readable storage medium, wherein above-mentioned computer-readable Storage medium storage is used for the computer program of electronic data interchange, wherein above-mentioned computer program executes computer such as Step some or all of described in the embodiment of the present application second aspect either method.
6th aspect, the embodiment of the present application provide a kind of computer program product, wherein above-mentioned computer program product Non-transient computer readable storage medium including storing computer program, above-mentioned computer program are operable to make to calculate Machine executes the step some or all of as described in the embodiment of the present application second aspect either method.The computer program product It can be a software installation packet.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Figure 1A is a kind of structural schematic diagram of electronic device provided by the embodiments of the present application;
Figure 1B is the structural schematic diagram of another electronic device provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of method for control speed provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another method for control speed provided by the embodiments of the present application;
Fig. 4 is the flow diagram of another method for control speed provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of electronic device provided by the embodiments of the present application;
Fig. 6 is a kind of functional unit composition block diagram of speed control unit provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Electronic device involved by the embodiment of the present application may include the various handheld devices with wireless communication function, Mobile unit, wearable device calculate equipment or are connected to other processing equipments and various forms of radio modem User equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal Device) etc..For convenience of description, apparatus mentioned above is referred to as electronic device.
It describes in detail below to the embodiment of the present application.
Figure 1A is please referred to, Figure 1A is that the embodiment of the invention provides a kind of structural schematic diagram of electronic device 100, the electronics Device 100 includes: center 101, sliding seat 102, processor 103, and memory 104, the driving of the connection processor 103 Mechanism 105, the first Hall sensor 107a and the second Hall sensor 107b accommodate multiple effectors in the sliding seat 102 Part 106 the side end face 101b of the center 101 including a pair of opposing and is connected to a pair of side as shown in Figure 1B Offer holding tank 101c on top end face 101a, the top end face 101a between the 101b of face, the holding tank 101c through Between a pair of side end face 101b;The sliding seat 102 through the driving mechanism 105 in the holding tank 101c with it is described Center 101 is slidably connected, wherein
The memory 104, the mapping relations at least one of control store instruction and parameter preset numberical range With the mapping relations of at least one numberical range and speed description information;
The processor 103, for when detecting the control instruction for the sliding seat 102, according to the control Instruction obtains at least one numberical range of parameter preset, wherein each numberical range is the correspondence preset strokes being pre-configured The numerical value set of the parameter preset, the parameter preset are according to the first Hall sensor 107a and second Hall The numerical value that sensor 107b is determined, the preset strokes are some or all of the sliding seat 102 stroke, and described at least one When a numberical range is two or more numberical ranges, in described two or more than two numberical ranges described in any two The corresponding preset strokes of numberical range are different;And the current value for determining the parameter preset, and described in determination Target value range belonging to current value;And for according to target velocity description information control the driving mechanism 105 with Target velocity drives the sliding seat 102 to slide, and the target velocity description information is corresponding with the target value range Speed description information, the speed description information are used for the speed for indicating to be adapted to the corresponding preset strokes of the numberical range Degree.
Wherein, sliding seat 102 is slidably connected on center 101, enables electronic device 100 according to the practical need of user It asks and sliding seat 102 is stretched out or retracted center 101.Wherein, multiple function elements 106, sliding seat are contained in sliding seat 102 The 102 opposite slidings with center 101, enable multiple function elements 106 to skid off when need to use, different function elements It is corresponding to skid off that distance is different, the use of function element 106 is avoided to the screen accounting bring of the display screen of electronic device 100 Limitation is conducive to the screen accounting for improving electronic device 100.
Wherein, as shown in Figure 1A, driving mechanism 105 includes stepper motor 105a and screw rod 105b, and electronic device 100 passes through Processor 103 is transferred to stepper motor 105a control signal, and stepper motor 105a drives screw rod 105b to push sliding by rotation Seat is slided, and screw rod 105b is maintained on scheduled track when enabling to sliding seat 102 with respect to the sliding of center 101 and moves, Guarantee the accuracy and stationarity when sliding seat 102 slides.
Wherein, Figure 1B is please referred to, the center 101 includes the side end face 101b of a pair of opposing and is connected to a pair of of institute It states and offers holding tank 101c, the holding tank 101c on top end face 101a, the top end face 101a between the 101b of side end face Through a pair of side end face 101b;Please refer to Figure 1A and Figure 1B, the sliding seat 102 is through the driving mechanism 105 in described It is slidably connected in holding tank 101c with the center 101, so that the sliding seat 102 is under the driving of the driving mechanism 105 Stretch out or be contained in the holding tank 101c, center 101 further include bottom face 101d be used to arrange electronic device 100 earpiece, Loudspeaker etc..
Wherein, as shown in Figure 1B, the size of sliding seat 102 is corresponding with holding tank 101c, i.e., sliding seat 102 is filled with entirely Holding tank 101c.Sliding seat 102 has the first end face 102a and second end face 102b being disposed opposite to each other.The first of sliding seat 102 When end face 102a protrudes top end face 101a certain distance, then it is defined as the fully extended center 101 of sliding seat 102, in other words, at this time Sliding seat 102 is in stretching state, and, it is as shown in Figure 1A, when the first end face 102a of sliding seat 102 is concordant with bottom end, then fixed Justice is that sliding seat 102 is contained in completely in holding tank 101c, and in other words, sliding seat 102 is in retracted mode at this time.
Wherein, as shown in Figure 1A, the electronic device 100 is in the first Hall sensor 107a and the second hall sensing Magnet 108, the first Hall sensor 107a, the second Hall sensor 107b and magnet 108 are also provided between device 107b Position on electronic device 100 can be diversified, such as can be the first Hall sensor 107a and the second Hall Sensor 107b is located on center 101, and magnet 108 is located on the extension of sliding seat 102, is also possible to the first hall sensing Device 107a and the second Hall sensor 107b are located on the extension of sliding seat 102, and magnet 108 is located on center 101, in this way Setting sliding seat 102 can be made to change the first Hall sensor 107a or the second Hall sensor during sliding Relative positional relationship between 107b and magnet 108, since the change of relative positional relationship will lead to the magnetic flux change in magnetic field, And then change the numerical value of the first Hall sensor 107a and the second Hall sensor 107b, therefore pass through the first Hall sensor number The variation of value and the second Hall sensor numerical value can determine positional relationship of the sliding seat 102 relative to center 101.
It for example, then can be according to function element when needing some function element 106 in sliding seat 102 to work 106 position changes the position of sliding seat 102 accordingly, so that sliding seat 102 is in stretching state, at this point, on sliding seat 102 Function element 106 be no longer displayed by screen cover.For example, there can be front camera device in multiple function elements 106, please join According to Figure 1B, when needing the function using front camera, then sliding seat 102 is driven to slide by driving mechanism 105, so that sliding Dynamic seat 102 is in stretching state, then can be realized the camera function of front camera at this time;Please refer to Figure 1A, without using When the function of front camera, then sliding seat 102 is driven to slide by driving mechanism 105, so that sliding seat 102, which is in, retracts shape State is contained in the holding tank 101c of electronic device 100.
Wherein, processor 103 includes application processor and baseband processor, and processor 103 is the control of electronic device 100 Center is stored in memory by running or executing using the various pieces of various interfaces and the entire electronic device of connection Software program and/or module in 104, and the data being stored in memory 104 are called, execute each of electronic device 100 Kind function and processing data, to carry out integral monitoring to electronic device 100.Wherein, the main processing operation system of application processor System, user interface and application program etc., baseband processor mainly handles wireless communication.It is understood that above-mentioned Base-Band Processing Device can not also be integrated into the processor.
Wherein, memory 104 can be used for storing software program and module, and processor 103 is stored in storage by operation The software program and module of device 104, thereby executing the various function application and data processing of electronic device 100.Memory 104 can mainly include storing program area and storage data area, wherein storing program area can storage program area, at least one function Application program needed for energy etc.;Storage data area, which can be stored, uses created data etc. according to electronic device.In addition, storage Device 104 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a disk storage Device, flush memory device or other volatile solid-state parts.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
In a possible example, at least one described numberical range includes the first numberical range, second value range With third value range, wherein first stroke, second stroke and the corresponding total kilometres of third trip are the sliding seat 102 Range, the first stroke includes the initial position of the range in the current glide direction of the sliding seat 102, described Third trip includes the final position of the range in the current glide direction of the sliding seat 102, and the first stroke is institute The corresponding stroke of the first numberical range is stated, the second stroke is the corresponding stroke of the second value range, described the third line Journey is the corresponding stroke of the third value range;
The corresponding First Speed of first numberical range is greater than the corresponding third speed of the third value range, and small In the corresponding second speed of the second value range.
In this possible example, as shown in Figure 1B, the electronic device 100 further includes display 109, the processing Device 103 is also used to: when the target value range is in first numberical range or the second value range, and being detected When the speed that the driving mechanism 105 drives the sliding seat 102 to slide is less than pre-set velocity threshold value, the display is controlled The prompting message that 109 display barriers block;And for determining institute according to the response message of the prompting message received State the motion state of sliding seat 102.
Wherein, the display 109 includes circuit of display driving, display screen and touch screen, the display driving electricity Road is carried out for controlling the display screen according to the display data and display parameters (for example, brightness, color, saturation degree etc.) of picture Content shows that the touch screen is organic light-emitting diode (OLED) display screen OLED for detecting touch control operation, the display screen.
In a possible example, in terms of the current value of the determination parameter preset, the processor 103 It is specifically used for: determines current processing cycle associated first sampling period and the second sampling period, the process cycle is described Electronic device 100 calculates the execution period of the reference value;And for obtaining first sampling period corresponding described The first difference between the first numerical value of one Hall sensor 107a and the second value of the second Hall sensor 107b;With And the third value and described second for obtaining the second sampling period corresponding first Hall sensor 107a is suddenly The second difference between the 4th numerical value of your sensor 107b;And for true according to first difference and second difference The current value of the fixed parameter preset.
In a possible example, the processor 103 is also used to: when detecting the cunning by the parameter preset The position of dynamic seat 102 obtains the acceleration of the electronic device 100 not at target position;And for adding when according to described Speed determines that the electronic device 100 drives the sliding seat 102 sliding in the driving mechanism 105 when falling state, is controlled It moves to the target position.
Referring to Fig. 2, Fig. 2 is that the embodiment of the present application provides a kind of flow diagram of method for control speed, it is applied to Electronic device as described in Figure 1A -1B, the electronic device include sliding seat, driving mechanism, the first Hall sensor and second Hall sensor, as shown, this method for control speed includes:
S201, electronic device are obtained when detecting the control instruction for the sliding seat according to the control instruction At least one numberical range of parameter preset, wherein each numberical range is the described default of the correspondence preset strokes being pre-configured The numerical value set of parameter, the parameter preset are to be determined according to first Hall sensor and second Hall sensor Numerical value, the preset strokes are some or all of sliding seat stroke, and at least one described numberical range be two or When more than two numberical ranges, numberical range described in any two is corresponding described in described two or more than two numberical ranges Preset strokes are different;
Wherein, on the sliding seat include multiple function elements, such as can be it is following any one or it is a variety of: camera shooting Head mould group, receiver mould group, flash lamp, sensor etc., the control instruction for the sliding seat can be for described The control instruction of different function device in multiple function elements, such as refer to for the control of camera module in multiple function elements It enables, for example, multiple application programs corresponding take pictures enabled instruction or video enabled instruction, for called in multiple function elements The corresponding control instruction of device mould group for example, can be the call instruction of phone application, or can be chat class interactive application pair Voice answer command answered etc., is not limited thereto.
Wherein, a control instruction can correspond to a function element or multiple function elements, such as chat class The corresponding function element of video calling enabled instruction of interactive application is multiple, is camera module and receiver mould group respectively, In another example the corresponding function element of enabled instruction of camera-type application can be camera module for one.
Wherein, the numerical value of the parameter preset is determined according to first Hall sensor and second Hall sensor Specific implementation can be diversified, such as can be the first Hall sensor of setting and second Hall sensor The difference of reading is preset threshold, then numerical value is difference, or can be the above-mentioned difference of setting and adopt in two of Hall sensor Difference between the sample period is preset threshold etc., does not do unique restriction herein.
Wherein, the number of the corresponding numberical range of different control instructions is different, such as control instruction is for camera The control instruction of mould group needs sliding seat all to skid off from the holding tank of center, then 3 numberical range difference can be set Corresponding 3 sections of preset strokes need the sub-fraction of sliding seat therefrom alternatively, control instruction is the control instruction for receiver It is skidded off in holding tank in frame, then the corresponding 1 section of preset strokes of a numerical value, therefore, different control instructions pair can be set The number for the numberical range answered be it is flexible and changeable, be not limited thereto.
S202, the electronic device determines the current value of the parameter preset, and determines belonging to the current value Target value range;
S203, the electronic device control the driving mechanism according to target velocity description information and drive institute with target velocity Sliding seat sliding is stated, the target velocity description information is speed description information corresponding with the target value range, described Speed description information is used for the speed for indicating to be adapted to the corresponding preset strokes of the numberical range.
Wherein, different numberical ranges corresponds to different speed, and electronic device is default to be equipped with reflecting for numberical range and speed Relationship is penetrated, which is the speed that electronic device controls that driving mechanism drives sliding seat sliding.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
In a possible example, at least one described numberical range includes the first numberical range, second value range With third value range, wherein first stroke, second stroke and the corresponding total kilometres of third trip are the maximum of the sliding seat Stroke, the first stroke include the initial position of the range in the current glide direction of the sliding seat, described the third line Journey includes the final position of the range in the current glide direction of the sliding seat, and the first stroke is first numerical value The corresponding stroke of range, the second stroke are the corresponding stroke of the second value range, and the third trip is described the The corresponding stroke of three numberical ranges;
The corresponding First Speed of first numberical range is greater than the corresponding third speed of the third value range, and small In the corresponding second speed of the second value range.
Wherein, the range of the sliding seat corresponds to the maximum length of screw rod in the driving mechanism, i.e., the described sliding The maximum distance that seat can be stretched out from the holding tank of center.
Wherein, different control instructions corresponds to the sliding seat glide direction different relative to center, different glide directions Corresponding first numberical range, second value range and third value range are different, wherein if the current glide direction of sliding seat It is sliding seat far from center, when the direction of protruding holding tank, the initial position is during the sliding seat is contained in completely Position in the holding tank of frame, the final position are the sliding seat from the slidable highest distance position of initial position;If The current glide direction of sliding seat is that sliding seat tends to center, and when retracting the direction of holding tank, the final position is the cunning Dynamic seat is contained in the position in the holding tank of center completely, and the initial position is that the sliding seat opposite with the final position is sliding Highest distance position on dynamic stroke.
For example, screw rod total kilometres are 8.5mm, and glide direction is sliding seat far from center, protruding holding tank Direction, then the first numberical range is first stroke (0-0.5mm) corresponding numberical range, First Speed 1000pps, second Numberical range is second stroke (0.5mm-7.5mm) corresponding numberical range, second speed 2500pps, third value range For the corresponding numberical range of third trip (7.5mm-8.5mm), third speed 50pps, wherein unit pps indicates per second Umber of pulse.
Wherein, the mapping of the mapping relations of the first numberical range and first stroke, second value range and second stroke is closed The mapping relations of system, third value range and third trip pre-set in an electronic, which is Technological development personnel technological development personnel before electronic device dispatches from the factory pass through test sensor in the number of the different location of sliding seat The mapping relations for meeting each electronic device of value determination.
It as it can be seen that numberical range is set three numberical ranges by electronic device in this example, and will include initial position The First Speed of stroke is set smaller than second speed and is greater than the velocity amplitude of third speed, guarantees that driving mechanism initially drives cunning There is enough startup powers when dynamic seat, advantageously ensure that the normal operation of motor, set second speed for middle of stroke, I.e. maximum speed can ensure sliding block total sliding duration within the scope of a shorter duration, be conducive to shorten sliding duration, Sliding speed is promoted, and sets minimum speed for the third speed of the stroke including final position, avoids sliding into termination Sliding seat and center collision dynamics are larger when position, reduce device loss, reduce noise.
In this possible example, the method also includes:
When the target value range is in first numberical range or the second value range, and detect described When driving mechanism drives the speed of the sliding seat sliding to be less than pre-set velocity threshold value, the prompting message that barrier blocks is shown;
The motion state of the sliding seat is determined according to the response message of the prompting message received.
Wherein, the pre-set velocity threshold value is empirical value, is preset in front of electronic device factory for technological development personnel In electronic device, the pre-set velocity threshold value may include one or two, when the pre-set velocity threshold value is one, Such as can be 900pps, 800pps etc. can correspond to different control parameter models when the pre-set velocity threshold value is two It encloses, such as the corresponding pre-set velocity threshold value of the first control parameter range is 900pps, the second control parameter range is corresponding default Threshold speed is 2000pps etc., it is not limited here.
Wherein it is possible to the response message of the prompting message be determined by the touch control operation for detecting user, according to the sound Message is answered to determine that the motion state of the sliding seat can be to continue with sliding or be off sliding, for example, the prompting message Content is " detecting glide direction, there are barriers ", and including two options " continuing to slide " and " stopping sliding ", user It can be selected for one of option, electronic device is then controlled when detecting the touch control operation for " continuing to slide " Driving mechanism driving sliding seat processed continues to slide, and when detecting the touch control operation for " stopping sliding ", then controls driving machine Structure stops driving sliding seat and continues to slide, in addition, described, to continue sliding can also include driving sliding seat and current glide direction Identical direction continues to slide, or the direction for driving sliding seat opposite with current glide direction continues to slide.
As it can be seen that in this example, electronic device detect driving mechanism drive the sliding seat sliding speed be less than it is pre- If threshold speed, i.e., when speed does not meet the speed under electronic device control, determination has barrier to block, such as can be people Hand, object etc. remind user when there is barrier to block, and user can make a choice according to prompting message, and then fill electronics It sets and continues to drive sliding seat sliding or stop driving sliding seat sliding, be conducive to the intelligence for promoting drive control, meet use The use habit at family, for example, shelter be manpower when, user is currently not intended to continue to slide, then can be controlled by prompting message Sliding seat stops sliding.
In a possible example, the current value of the determination parameter preset, comprising:
Determine current processing cycle associated first sampling period and the second sampling period, the process cycle is the electricity Sub-device calculates the execution period of the parameter preset;
Obtain the first numerical value and second Hall of first sampling period corresponding first Hall sensor The first difference between the second value of sensor;
Obtain the third value and second Hall of second sampling period corresponding first Hall sensor The second difference between 4th numerical value of sensor;
The current value of the parameter preset is determined according to first difference and second difference.
Wherein, the first sampling period and the second sampling period are respectively the previous of current sample period and current sample period A sampling period, difference of the parameter preset between the first difference and the second difference.
Wherein, the first difference, the second difference and parameter preset are absolute value, that is, are nonnegative number.
As it can be seen that electronic device is detected by two Hall sensors in this example, rather than use a sensor It is detected, the interference in magnetic field when being conducive to that single sensor is avoided to detect, when being detected by two Hall sensors, By the first difference or the second difference, magnetic interference can be neutralized, be conducive to the accuracy for promoting detection, moreover, the One difference and the second difference are the numerical value of monotonic increase, and parameter preset be monotone decreasing and tend to 0 numerical value, therefore using pre- Setting parameter carries out in the range of detection is conducive to for reference value to be fixed on a closure, is conducive to the controllability for promoting detection and just Victory.
In a possible example, the method also includes:
When the position for detecting the sliding seat by the parameter preset is not at target position, the electronics dress is obtained The acceleration set;
When according to the acceleration determine the electronic device be in fall state when, control driving mechanism driving institute It states sliding seat and slides into the target position.
Wherein, the target position is the position when sliding seat is accommodated in holding tank completely, described to add according to Speed determines that the electronic device can be the acceleration hair for detecting electronic device in the specific implementation for falling state Raw mutation, and the acceleration after variation continues preset duration, or can be adding for the acceleration of gravity for detecting electronic device Velocity amplitude mutates, and the acceleration value after variation continues preset duration, it is not limited here.
As it can be seen that electronic device is when the position of sliding seat is not exclusively to be accommodated in the position of holding tank, monitoring in this example The acceleration of electronic device, when by acceleration determine electronic device be in fall state when, sliding seat is received completely immediately It is contained in holding tank, advantageously reduces the damaged condition of the sliding seat in falling process.
It is consistent with above-mentioned embodiment shown in Fig. 2, referring to Fig. 3, Fig. 3 is a kind of speed provided by the embodiments of the present application The flow diagram of control method, applied to the electronic device as described in Figure 1A -1B, the electronic device includes sliding seat, drives Motivation structure, the first Hall sensor and the second Hall sensor, as shown, method includes:
S301, electronic device are obtained when detecting the control instruction for the sliding seat according to the control instruction The first numberical range, second value range and the third value range of parameter preset, wherein first stroke, second stroke and The corresponding total kilometres of triple-travel are the range of the sliding seat, and the first stroke includes the sliding seat when front slide side The initial position of upward range, the third trip include the range in the current glide direction of the sliding seat Final position, the first stroke are the corresponding stroke of first numberical range, and the second stroke is the second value The corresponding stroke of range, the third trip are the corresponding stroke of the third value range.
S302, the electronic device determine the current value of the parameter preset.
S303, the electronic device control the driving when determining the first numberical range belonging to the current value Device drives the sliding seat sliding with First Speed.
S304, the electronic device control the driving when determining second value range belonging to the current value Device drives the sliding seat sliding with second speed, and the second speed is greater than the First Speed.
S305, the electronic device is when determining third value range belonging to the current value, according to the third Driving mechanism described in speed control drives the sliding seat sliding, and the third speed is less than the First Speed.
S306, the electronic device is worked as detects the position of the sliding seat not in target position by the parameter preset When, obtain the acceleration of the electronic device.
S307, the electronic device when according to the acceleration determine the electronic device be in fall state when, control The driving mechanism drives the sliding seat to slide into the target position.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
In addition, numberical range is set three numberical ranges by electronic device, and by include initial position stroke the One speed be set smaller than second speed and be greater than third speed velocity amplitude, guarantee driving mechanism initially drive sliding seat when Waiting has enough startup powers, advantageously ensures that the normal operation of motor, sets second speed for middle of stroke, i.e., maximum speed Degree can ensure total sliding duration of sliding block within the scope of a shorter duration, be conducive to shorten sliding duration, promote sliding Speed, and minimum speed is set by the third speed of the stroke including final position, it avoids sliding when sliding into final position Dynamic seat and center collision dynamics are larger, reduce device loss, reduce noise.
In addition, electronic device monitors electronic device when the position of sliding seat is not exclusively to be accommodated in the position of holding tank Acceleration, when by acceleration determine electronic device be in fall state when, sliding seat is accommodated in receiving completely immediately In slot, the damaged condition of the sliding seat in falling process is advantageously reduced.
It is consistent with above-mentioned embodiment shown in Fig. 2, referring to Fig. 4, Fig. 4 is a kind of speed provided by the embodiments of the present application The flow diagram of control method, applied to the electronic device as described in Figure 1A -1B, the electronic device includes sliding seat, drives Motivation structure, the first Hall sensor and the second Hall sensor.As shown, this method for control speed includes:
S401, electronic device are obtained when detecting the control instruction for the sliding seat according to the control instruction The first numberical range, second value range and the third value range of parameter preset, wherein first stroke, second stroke and The corresponding total kilometres of triple-travel are the range of the sliding seat, and the first stroke includes the sliding seat when front slide side The initial position of upward range, the third trip include the range in the current glide direction of the sliding seat Final position, the first stroke are the corresponding stroke of first numberical range, and the second stroke is the second value The corresponding stroke of range, the third trip are the corresponding stroke of the third value range.
S402, the electronic device determine current processing cycle associated first sampling period and the second sampling period.
Wherein, the process cycle is the execution period that the electronic device calculates the parameter preset.
S403, the electronic device obtain the first number of first sampling period corresponding first Hall sensor The first difference between value and the second value of second Hall sensor.
S404, the electronic device obtain the third number of second sampling period corresponding first Hall sensor The second difference between value and the 4th numerical value of second Hall sensor.
S405, the electronic device determine described in the parameter preset according to first difference and second difference Current value.
S406, the electronic device control the driving when determining the first numberical range belonging to the current value Device drives the sliding seat sliding with First Speed.
S407, the electronic device control the driving when determining second value range belonging to the current value Device drives the sliding seat sliding with second speed, and the second speed is greater than the First Speed.
S408, the electronic device is when determining third value range belonging to the current value, according to the third Driving mechanism described in speed control drives the sliding seat sliding, and the third speed is less than the First Speed.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
In addition, electronic device is detected by two Hall sensors, rather than detected using a sensor, The interference in magnetic field passes through first when being detected by two Hall sensors when being conducive to that single sensor is avoided to detect Difference or the second difference, magnetic interference can be neutralized, be conducive to promoted detection accuracy, moreover, the first difference and Second difference be monotonic increase numerical value, and parameter preset be monotone decreasing and tend to 0 numerical value, therefore using parameter preset into Row detection is conducive to be fixed on reference value in the range of one closure, is conducive to the controllability and convenience that promote detection.
In addition, numberical range is set three numberical ranges by electronic device, and by include initial position stroke the One speed be set smaller than second speed and be greater than third speed velocity amplitude, guarantee driving mechanism initially drive sliding seat when Waiting has enough startup powers, advantageously ensures that the normal operation of motor, sets second speed for middle of stroke, i.e., maximum speed Degree can ensure total sliding duration of sliding block within the scope of a shorter duration, be conducive to shorten sliding duration, promote sliding Speed, and minimum speed is set by the third speed of the stroke including final position, it avoids sliding when sliding into final position Dynamic seat and center collision dynamics are larger, reduce device loss, reduce noise.
It is consistent with above-mentioned Fig. 2, Fig. 3, embodiment shown in Fig. 4, referring to Fig. 5, Fig. 5 is provided by the embodiments of the present application A kind of structural schematic diagram of electronic device, as shown, the electronic device includes sliding seat, driving mechanism, the first hall sensing Device and the second Hall sensor, communication interface and one or more programs, wherein said one or multiple programs are stored in In above-mentioned memory, and it is configured to be executed by above-mentioned processor, above procedure includes the instruction for executing following steps;
When detecting the control instruction for the sliding seat, parameter preset is obtained at least according to the control instruction One numberical range, wherein each numberical range is the numerical value set of the parameter preset for the correspondence preset strokes being pre-configured, The parameter preset is the numerical value determined according to first Hall sensor and second Hall sensor, the default row Journey is some or all of sliding seat stroke, and at least one described numberical range is two or more numberical ranges When, the corresponding preset strokes of numberical range described in any two are different in described two or more than two numberical ranges;
It determines the current value of the parameter preset, and determines target value range belonging to the current value;
The driving mechanism is controlled according to target velocity description information, and the sliding seat sliding is driven with target velocity, it is described Target velocity description information is speed description information corresponding with the target value range, and the speed description information is used for table Show the speed for being adapted to the corresponding preset strokes of the numberical range.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
In a possible example, at least one described numberical range includes the first numberical range, second value range With third value range, wherein first stroke, second stroke and the corresponding total kilometres of third trip are the maximum of the sliding seat Stroke, the first stroke include the initial position of the range in the current glide direction of the sliding seat, described the third line Journey includes the final position of the range in the current glide direction of the sliding seat, and the first stroke is first numerical value The corresponding stroke of range, the second stroke are the corresponding stroke of the second value range, and the third trip is described the The corresponding stroke of three numberical ranges;
The corresponding First Speed of first numberical range is greater than the corresponding third speed of the third value range, and small In the corresponding second speed of the second value range.
In this possible example, above procedure further includes the instruction for executing following steps: when the number of targets It is worth range in first numberical range or the second value range, and detects that the driving mechanism drives the sliding When the speed of seat sliding is less than pre-set velocity threshold value, the prompting message that barrier blocks is shown;And received for basis The response message of the prompting message determines the motion state of the sliding seat.
In a possible example, in terms of the current value of the determination parameter preset, in described program Instruction is specifically used for executing following operation: determining current processing cycle associated first sampling period and the second sampling period, institute Stating process cycle is the execution period that the electronic device calculates the parameter preset;And for obtaining the first sampling week First between first numerical value of phase corresponding first Hall sensor and the second value of second Hall sensor Difference;And the third value and described second for obtaining second sampling period corresponding first Hall sensor The second difference between 4th numerical value of Hall sensor;And for being determined according to first difference and second difference The current value of the parameter preset.
In a possible example, above procedure further includes the instruction for executing following steps: when by described pre- Setting parameter detects that the position of the sliding seat not at target position, obtains the acceleration of the electronic device;And it is used for When according to the acceleration determine the electronic device be in fall state when, control the driving mechanism and drive the sliding seat Slide into the target position.
It is above-mentioned that mainly the scheme of the embodiment of the present application is described from the angle of method side implementation procedure.It is understood that , in order to realize the above functions, it comprises execute the corresponding hardware configuration of each function and/or software mould for electronic device Block.Those skilled in the art should be readily appreciated that, in conjunction with each exemplary unit of embodiment description presented herein And algorithm steps, the application can be realized with the combining form of hardware or hardware and computer software.Some function actually with Hardware or computer software drive the mode of hardware to execute, the specific application and design constraint item depending on technical solution Part.Professional technician can specifically realize described function to each using distinct methods, but this reality Now it is not considered that exceeding scope of the present application.
The embodiment of the present application can carry out the division of functional unit according to above method example to electronic device, for example, can With each functional unit of each function division of correspondence, two or more functions can also be integrated in a processing unit In.Above-mentioned integrated unit both can take the form of hardware realization, can also realize in the form of software functional units.It needs It is noted that be schematical, only a kind of logical function partition to the division of unit in the embodiment of the present application, it is practical real It is current that there may be another division manner.
Fig. 6 is the functional unit composition block diagram of speed control unit 600 involved in the embodiment of the present application.The speed control Device 600 processed is applied to electronic device, and the electronic device includes sliding seat, driving mechanism, the first Hall sensor and second Hall sensor, the speed control unit 600 include acquiring unit 601, determination unit 602 and control unit 603, wherein
The acquiring unit 601, for being referred to according to the control when detecting the control instruction for the sliding seat So that arrive parameter preset at least one numberical range, wherein each numberical range for the correspondence preset strokes of pre-configuration institute The numerical value set of parameter preset is stated, the parameter preset is according to first Hall sensor and second Hall sensor Determining numerical value, the preset strokes are some or all of sliding seat stroke, and at least one described numberical range is When two or more numberical ranges, numberical range described in any two is corresponding in described two or more than two numberical ranges The preset strokes it is different;
The determination unit 602 for determining the current value of the parameter preset, and determines belonging to the current value Target value range;
Described control unit 603 is driven for controlling the driving mechanism according to target velocity description information with target velocity The sliding seat sliding is moved, the target velocity description information is speed description information corresponding with the target value range, The speed description information is used for the speed for indicating to be adapted to the corresponding preset strokes of the numberical range.
As can be seen that in the embodiment of the present application, electronic device is first when detecting the control instruction for the sliding seat When, at least one numberical range of parameter preset is obtained according to the control instruction, secondly, determining the current of the parameter preset Numerical value, and determine target value range belonging to the current value, finally, controlling the drive according to target velocity description information Motivation structure drives the sliding seat sliding with target velocity, and the target velocity description information is and the target value range pair The speed description information answered.It is found that electronic device obtains the control first and refers to when detecting the control instruction for sliding seat Enable at least one numberical range of corresponding parameter preset, different control instructions correspond to different numberical ranges quantity and The numerical value set of different numberical ranges is conducive to the accuracy for promoting drive control sliding seat, does not need in all control Identical stroke is slided under instruction, reduces the power consumption of driving mechanism, moreover, passing through the first Hall sensor and described the Numerical value that two Hall sensors determine judges the corresponding stroke range of sliding seat, rather than the pulsed drive for passing through driving mechanism Duration etc. determines stroke range, is conducive to avoid motor in driving mechanism to lose the error of stroke range caused by step, promotes speed The accuracy of control is spent, in addition, determining corresponding numberical range according to the current value of parameter preset, and uses different speed Sliding seat sliding is driven, the flexibility for promoting speed control is conducive to.
In a possible example, at least one described numberical range includes the first numberical range, second value range With third value range, wherein first stroke, second stroke and the corresponding total kilometres of third trip are the maximum of the sliding seat Stroke, the first stroke include the initial position of the range in the current glide direction of the sliding seat, described the third line Journey includes the final position of the range in the current glide direction of the sliding seat, and the first stroke is first numerical value The corresponding stroke of range, the second stroke are the corresponding stroke of the second value range, and the third trip is described the The corresponding stroke of three numberical ranges;
The corresponding First Speed of first numberical range is greater than the corresponding third speed of the third value range, and small In the corresponding second speed of the second value range.
In this possible example, the speed control unit 600 further includes display unit, in which:
The display unit, for when the target value range is in first numberical range or the second value Range, and when detecting that the driving mechanism drives the speed of sliding seat sliding to be less than pre-set velocity threshold value, show obstacle The prompting message that object blocks;
The determination unit 602 is also used to: determining the sliding according to the response message of the prompting message received The motion state of seat.
In a possible example, in terms of the current value of the determination parameter preset, the determination unit 602 are specifically used for: determining current processing cycle associated first sampling period and the second sampling period, the process cycle is institute State the execution period that electronic device calculates the parameter preset;And for obtaining first sampling period corresponding described The first difference between first numerical value of one Hall sensor and the second value of second Hall sensor;And for obtaining Take second sampling period corresponding first Hall sensor third value and second Hall sensor The second difference between four numerical value;And for determining the parameter preset according to first difference and second difference The current value.
In a possible example, the acquiring unit 601 is also used to: described when being detected by the parameter preset The position of sliding seat obtains the acceleration of the electronic device not at target position;
Described control unit 603 is also used to: when according to the acceleration determine the electronic device be in fall state when, Controlling the driving mechanism drives the sliding seat to slide into the target position.
Wherein, acquiring unit 601 and control unit 603 can be processor, and the determination unit 602 can be Hall biography Sensor or processor.
The embodiment of the present application also provides a kind of computer storage medium, wherein computer storage medium storage is for electricity The computer program of subdata exchange, the computer program make computer execute any as recorded in above method embodiment Some or all of method step.
The embodiment of the present application also provides a kind of computer program product, and above-mentioned computer program product includes storing calculating The non-transient computer readable storage medium of machine program, above-mentioned computer program are operable to that computer is made to execute such as above-mentioned side Some or all of either record method step in method embodiment.The computer program product can be a software installation Packet.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of said units, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment above method of the application Step.And memory above-mentioned includes: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory The various media that can store program code such as (RAM, Random Access Memory), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory May include: flash disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English: Random Access Memory, referred to as: RAM), disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (13)

1. a kind of electronic device, which is characterized in that including center, sliding seat, processor, and the storage of the connection processor Device, driving mechanism, the first Hall sensor and the second Hall sensor accommodate multiple function elements in the sliding seat, described Center includes the side end face of a pair of opposing and the top end face that is connected between a pair of side end face, is opened on the top end face Equipped with holding tank, the holding tank is through a pair of side end face;The sliding seat is through the driving mechanism in the holding tank In be slidably connected with the center, wherein
The memory, for the mapping relations of at least one of control store instruction and parameter preset numberical range and at least one The mapping relations of a numberical range and speed description information;
The processor, for being obtained according to the control instruction pre- when detecting the control instruction for the sliding seat At least one numberical range of setting parameter, wherein each numberical range is the default ginseng for the correspondence preset strokes being pre-configured Several numerical value set, the parameter preset are the number determined according to first Hall sensor and second Hall sensor Value, the preset strokes are some or all of sliding seat stroke, and at least one described numberical range is two or two When a above numberical range, numberical range described in any two is corresponding described pre- in described two or more than two numberical ranges If stroke is different;And the current value for determining the parameter preset, and determine number of targets belonging to the current value It is worth range;And drive the sliding seat sliding with target velocity for controlling the driving mechanism according to target velocity description information Dynamic, the target velocity description information is speed description information corresponding with the target value range, the speed description letter Speed of the breath for indicating to be adapted to the corresponding preset strokes of the numberical range.
2. electronic device according to claim 1, which is characterized in that at least one described numberical range includes the first numerical value Range, second value range and third value range, wherein first stroke, second stroke and the corresponding total kilometres of third trip For the range of the sliding seat, the first stroke includes the first of the range in the current glide direction of the sliding seat Beginning position, the third trip include the final position of the range in the current glide direction of the sliding seat, and described first Stroke is the corresponding stroke of first numberical range, and the second stroke is the corresponding stroke of the second value range, institute Stating third trip is the corresponding stroke of the third value range;
The corresponding First Speed of first numberical range is greater than the corresponding third speed of the third value range, and is less than institute State the corresponding second speed of second value range.
3. electronic device according to claim 2, which is characterized in that the electronic device further includes display, the place Reason device is also used to: when the target value range is in first numberical range or the second value range, and being detected When the driving mechanism drives the speed of the sliding seat sliding to be less than pre-set velocity threshold value, controls the display and show obstacle The prompting message that object blocks;And the fortune for determining the sliding seat according to the response message of the prompting message received Dynamic state.
4. electronic device according to claim 1-3, which is characterized in that in the determination parameter preset In terms of current value, the processor is specifically used for: determining current processing cycle associated first sampling period and the second sampling Period, the process cycle are the execution period that the electronic device calculates the parameter preset;And for obtaining described The second value of first numerical value of one sampling period corresponding first Hall sensor and second Hall sensor it Between the first difference;And the third value for obtaining second sampling period corresponding first Hall sensor and The second difference between 4th numerical value of second Hall sensor;And for according to first difference and described second Difference determines the current value of the parameter preset.
5. electronic device according to claim 1-4, which is characterized in that the processor is also used to: when passing through The parameter preset detects that the position of the sliding seat not at target position, obtains the acceleration of the electronic device;With And for when according to the acceleration determine the electronic device be in fall state when, control described in driving mechanism driving Sliding seat slides into the target position.
6. a kind of method for control speed, which is characterized in that be applied to electronic device, the electronic device includes sliding seat, driving Mechanism, the first Hall sensor and the second Hall sensor, which comprises
When detecting the control instruction for the sliding seat, at least one of parameter preset is obtained according to the control instruction Numberical range, wherein each numberical range is the numerical value set of the parameter preset for the correspondence preset strokes being pre-configured, described Parameter preset is the numerical value determined according to first Hall sensor and second Hall sensor, and the preset strokes are Some or all of sliding seat stroke, and at least one described numberical range be two or more numberical ranges when, The corresponding preset strokes of numberical range described in any two are different in described two or more than two numberical ranges;
It determines the current value of the parameter preset, and determines target value range belonging to the current value;
The driving mechanism is controlled according to target velocity description information, and the sliding seat sliding, the target are driven with target velocity Speed description information is speed description information corresponding with the target value range, and the speed description information is for indicating suitable Speed with the corresponding preset strokes of the numberical range.
7. according to the method described in claim 6, it is characterized in that, at least one described numberical range includes the first numerical value model It encloses, second value range and third value range, wherein first stroke, second stroke and the corresponding total kilometres of third trip are The range of the sliding seat, the first stroke include the initial of the range in the current glide direction of the sliding seat Position, the third trip include the final position of the range in the current glide direction of the sliding seat, the first row Journey is the corresponding stroke of first numberical range, and the second stroke is the corresponding stroke of the second value range, described Third trip is the corresponding stroke of the third value range;
The corresponding First Speed of first numberical range is greater than the corresponding third speed of the third value range, and is less than institute State the corresponding second speed of second value range.
8. the method according to the description of claim 7 is characterized in that the method also includes:
When the target value range is in first numberical range or the second value range, and detect the driving When mechanism drives the speed of the sliding seat sliding to be less than pre-set velocity threshold value, the prompting message that barrier blocks is shown;
The motion state of the sliding seat is determined according to the response message of the prompting message received.
9. according to the described in any item methods of claim 6-8, which is characterized in that the current number of the determination parameter preset Value, comprising:
Determine current processing cycle associated first sampling period and the second sampling period, the process cycle is electronics dress Set the execution period for calculating the parameter preset;
Obtain the first numerical value and second hall sensing of first sampling period corresponding first Hall sensor The first difference between the second value of device;
Obtain the third value and second hall sensing of second sampling period corresponding first Hall sensor The second difference between 4th numerical value of device;
The current value of the parameter preset is determined according to first difference and second difference.
10. the method according to claim 6, which is characterized in that the method also includes:
When the position for detecting the sliding seat by the parameter preset is not at target position, the electronic device is obtained Acceleration;
When according to the acceleration determine the electronic device be in fall state when, control the driving mechanism and drive the cunning Dynamic seat slides into the target position.
11. a kind of speed control unit, which is characterized in that be applied to electronic device, the electronic device includes sliding seat, driving Mechanism, the first Hall sensor and the second Hall sensor, the speed control unit include acquiring unit, determination unit and control Unit processed, wherein
The acquiring unit, for being obtained according to the control instruction when detecting the control instruction for the sliding seat At least one numberical range of parameter preset, wherein each numberical range is the described default of the correspondence preset strokes being pre-configured The numerical value set of parameter, the parameter preset are to be determined according to first Hall sensor and second Hall sensor Numerical value, the preset strokes are some or all of sliding seat stroke, and at least one described numberical range be two or When more than two numberical ranges, numberical range described in any two is corresponding described in described two or more than two numberical ranges Preset strokes are different;
The determination unit for determining the current value of the parameter preset, and determines target belonging to the current value Numberical range;
Described control unit drives the cunning for controlling the driving mechanism according to target velocity description information with target velocity Dynamic seat sliding, the target velocity description information are speed description information corresponding with the target value range, the speed Description information is used for the speed for indicating to be adapted to the corresponding preset strokes of the numberical range.
12. a kind of electronic device, which is characterized in that including processor, memory, communication interface, and one or more programs, One or more of programs are stored in the memory, and are configured to be executed by the processor, described program packet It includes for executing the instruction such as the step in the described in any item methods of claim 6-10.
13. a kind of computer readable storage medium, which is characterized in that storage is used for the computer program of electronic data interchange, In, the computer program makes computer execute such as the described in any item methods of claim 6-10.
CN201810586804.2A 2018-06-08 2018-06-08 Electronic device, speed control method and related product Active CN108989491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810586804.2A CN108989491B (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
CN201810586804.2A CN108989491B (en) 2018-06-08 2018-06-08 Electronic device, speed control method and related product

Publications (2)

Publication Number Publication Date
CN108989491A true CN108989491A (en) 2018-12-11
CN108989491B CN108989491B (en) 2020-06-09

Family

ID=64541012

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN108989491B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806325A (en) * 2019-10-22 2020-02-18 Oppo(重庆)智能科技有限公司 Electronic equipment detection method and electronic equipment
WO2021139694A1 (en) * 2020-01-10 2021-07-15 维沃移动通信有限公司 Control method and device, and electronic apparatus
CN113329124A (en) * 2021-05-28 2021-08-31 北京小米移动软件有限公司 Camera control method, camera control device and storage medium
EP4213004A4 (en) * 2020-12-04 2024-03-13 Samsung Electronics Co., Ltd. Electronic device including flexible display and method for operating electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070048504A (en) * 2005-11-04 2007-05-09 엘지전자 주식회사 Detection apparatus for slide in mobile device
CN202309797U (en) * 2011-10-26 2012-07-04 杭州安费诺飞凤通信部品有限公司 Ejecting device of camera on portable electronic equipment terminal
CN107819907A (en) * 2017-11-14 2018-03-20 维沃移动通信有限公司 A kind of camera control method and mobile terminal
CN108111730A (en) * 2017-12-25 2018-06-01 维沃移动通信有限公司 A kind of camera module, control method and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070048504A (en) * 2005-11-04 2007-05-09 엘지전자 주식회사 Detection apparatus for slide in mobile device
CN202309797U (en) * 2011-10-26 2012-07-04 杭州安费诺飞凤通信部品有限公司 Ejecting device of camera on portable electronic equipment terminal
CN107819907A (en) * 2017-11-14 2018-03-20 维沃移动通信有限公司 A kind of camera control method and mobile terminal
CN108111730A (en) * 2017-12-25 2018-06-01 维沃移动通信有限公司 A kind of camera module, control method and mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806325A (en) * 2019-10-22 2020-02-18 Oppo(重庆)智能科技有限公司 Electronic equipment detection method and electronic equipment
WO2021139694A1 (en) * 2020-01-10 2021-07-15 维沃移动通信有限公司 Control method and device, and electronic apparatus
EP4213004A4 (en) * 2020-12-04 2024-03-13 Samsung Electronics Co., Ltd. Electronic device including flexible display and method for operating electronic device
CN113329124A (en) * 2021-05-28 2021-08-31 北京小米移动软件有限公司 Camera control method, camera control device and storage medium

Also Published As

Publication number Publication date
CN108989491B (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN108989491A (en) Electronic device, method for control speed and Related product
CN109040348A (en) electronic device, drive control method and related product
CN105940365B (en) A kind of notification information processing method, device and terminal
CN108829277A (en) Electronic device, method for control speed and Related product
CN105144067B (en) For adjusting the equipment, method and graphic user interface of the appearance of control
CN102981768B (en) A kind of method and system realizing floated overall situation button at touch screen terminal interface
CN104424221B (en) A kind of information processing method and electronic equipment
CN110006343A (en) Measurement method, device and the terminal of object geometric parameter
CN104463119B (en) Combined type gesture identification equipment and its control method based on ultrasound with vision
CN106794579A (en) Anthropomorphic robot with autonomous viability
CN109513208A (en) Display methods, device, storage medium and the electronic device of object
CN104883505A (en) Electronic equipment and photographing control method therefor
CN101598972A (en) Electronic installation and function change method thereof
CN106292991A (en) A kind of method and device reducing terminal unit power consumption
CN105426105B (en) A kind of alarm clock control method and mobile terminal
CN105242780B (en) A kind of interaction control method and device
CN110231871A (en) Page reading method, device, storage medium and electronic equipment
CN108427586B (en) Using push terminal, method and the computer readable storage medium of theme
CN109725699A (en) Recognition methods, device and the equipment of identification code
CN103823625B (en) Control method, device and the mobile terminal of mobile terminal median surface picture
CN110245250A (en) Image processing method and relevant apparatus
CN109129484A (en) robot control method, device and storage medium
CN110201387A (en) Object control method and apparatus, storage medium and electronic device
CN106896770A (en) A kind of dynamic slide rail display systems and its control method
CN103914415B (en) Regulating an input/output interface

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