Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A control method, apparatus, and electronic device of a sliding mechanism according to an embodiment of the present invention are described below with reference to the drawings.
Fig. 1 is a schematic flow chart of a control method of a sliding mechanism according to an embodiment of the present invention.
The method provided by the embodiment of the invention is applied to the electronic equipment, the electronic equipment comprises a body and a sliding mechanism, the sliding mechanism is provided with the light supplementing lamp, and the sliding mechanism can move relative to the body so as to protrude out of the body or be accommodated in the body. The electronic equipment can be a mobile terminal, and the mobile terminal comprises a mobile phone, an ipad, a palm computer, a notebook computer and the like.
As shown in fig. 1, the method comprises the steps of:
step 101, calling of a target interface is monitored, and the target interface is used for controlling a light supplement lamp.
The supplementary lighting lamp is used for supplementary lighting in different application scenes of the electronic device, for example, as a flashlight to provide lighting supplementary lighting, as a flash lamp to provide supplementary lighting during photographing, or as an emergency call lamp to provide flashing and the like.
Specifically, the calling of a target interface for controlling the light supplement lamp in the electronic device is monitored, and the called specific target interface is monitored.
And 102, determining a corresponding control strategy according to the called target interface.
The purpose of the control strategy is to perform sliding control on a sliding mechanism provided with the light supplement lamp.
Specifically, the number of target interfaces is at least two, and if the called target interfaces are different, the corresponding control strategies are different, in the embodiment of the present invention, 2 target interfaces are taken as an example and are respectively a system control interface for singly controlling the fill light and a camera service interface for controlling the camera and the fill light, and when 2 different interfaces are called, the corresponding control strategies are not described in detail.
And 103, performing sliding control on the sliding mechanism provided with the light supplement lamp by adopting a control strategy.
As a possible implementation manner, if the target interface is a system control interface for controlling the light supplement lamp singly, a control strategy is adopted to perform sliding control on the sliding mechanism provided with the light supplement lamp, specifically, a calling parameter adopted by calling the system control interface is determined, the calling parameter is used for indicating the on-off state of the light supplement lamp, a state flag bit of the light supplement lamp is set according to the on-off state indicated by the calling parameter, and when the state flag bit indicates that the light supplement lamp is in the on state, if an instruction for controlling the sliding mechanism to be accommodated in the body is obtained, the instruction is prohibited from being executed. And controlling the sliding mechanism to move to protrude out of the body or be accommodated in the body according to the switch state indicated by the calling parameter. For clarity, in a case that the target interface is a system control interface for controlling a light supplement lamp, the control strategy adopted will be described in detail in the embodiment corresponding to fig. 2, and will not be described herein again.
As another possible implementation manner, the sliding mechanism is further provided with a camera, and the target interface includes a camera service interface for controlling the camera and the light supplement lamp. Under the condition of calling a camera service interface, the adopted control strategy is specifically that the sliding mechanism is controlled to move to protrude out of the body, the adopted calling parameter for indicating the on-off state of the light supplement lamp is determined according to the control function of the light supplement lamp in the camera service interface, the state flag bit of the light supplement lamp is set according to the on-off state indicated by the calling parameter, and when the state flag bit indicates that the light supplement lamp is in the on state, if the instruction for controlling the sliding mechanism to be accommodated in the body is obtained, the instruction is forbidden to be executed; if the parameter is called to indicate that the light supplement lamp is in the off state, the sliding mechanism is controlled to move so as to be contained in the body. For clarity, the control strategy adopted in the case that the target interface is the camera service interface will be described in detail in the embodiment corresponding to fig. 3, and will not be described herein again.
According to the control method of the sliding mechanism, calling of the target interface is monitored, the target interface is used for controlling the light supplement lamp, the corresponding control strategy is determined according to the called target interface, the control strategy is adopted to perform sliding control on the sliding mechanism with the light supplement lamp, different control strategies are determined by calling different interfaces, sliding control on the sliding mechanism with the light supplement lamp is achieved, the control strategy is more targeted, and user requirements under corresponding scenes are met.
To clearly illustrate the previous embodiment, this embodiment provides a possible implementation manner of another control method for a sliding mechanism, and fig. 2 is a schematic flow chart of the control method for another sliding mechanism provided in the embodiment of the present invention, and further clearly illustrates that when a called interface is a system control interface, different control strategies are correspondingly adopted in different application scene types to realize sliding control over the sliding mechanism provided with a fill light, so that the control strategies are more targeted, and the sliding mechanism can be controlled to slide out or reset in time according to a calling parameter when the called interface is the system control interface.
As shown in fig. 2, the method provided by the present embodiment, executed by a control program of the sliding mechanism, may include the following steps:
step 201, it is monitored that the called target application program interface is a system control interface for singly controlling the fill light.
Specifically, according to different application programs, at least two interface calling modes can be provided to realize the flashlight function, and one mode is to call a system control interface for singly controlling the light supplement lamp, which is generally a google native interface; the other is through a camera service interface for controlling the camera and the fill light.
In this embodiment, how to control the sliding out and resetting of the sliding mechanism under the condition that the flashlight function is achieved by controlling the on and off of the light supplement lamp through the system control interface by the application program will be described in detail, and how to control the sliding mechanism under the condition that the light supplement lamp is controlled by calling the camera service interface by the application program in the subsequent embodiments.
Step 202, determining a calling parameter used for calling the system control interface.
And calling parameters for indicating the on-off state of the light supplement lamp.
Step 203, determining whether the switch state indicated by the calling parameter is an on state, if so, executing step 204, and if not, executing step 207.
Specifically, a status flag bit of the light supplement lamp is set according to the on-off status indicated by the calling parameter, if the on-off status indicated by the calling parameter is an on status, the status flag bit of the light supplement lamp in the on status is set, and if the on-off status indicated by the calling parameter is an off status, the status flag bit of the light supplement lamp in the off status is set. The status flag bit is used for controlling the program to judge whether the sliding mechanism can be reset to be accommodated in the body, so that the situation that the sliding mechanism is mistakenly moved to be accommodated in the body when the light supplement lamp is in an on state, namely the application program still uses the light supplement lamp, is avoided.
And step 204, setting a status flag bit of the light supplement lamp in an on state.
For example, the fill light is turned on, and the status flag is set to "1".
Step 205, controlling the sliding structure to move to protrude from the body.
Specifically, after the light supplement lamp is turned on, the sliding mechanism is controlled to move to protrude out of the body.
In step 206, if the command for controlling the sliding mechanism to be accommodated in the body is obtained, the command is prohibited from being executed.
Specifically, when the light supplement lamp is in an on state, if an instruction for controlling the sliding mechanism to be accommodated in the body by other application programs is acquired, the instruction is prohibited from being executed, because the sliding mechanism provided with the flash lamp cannot be slidably accommodated in the body in any scene when the light supplement lamp is in the on state, so that the normal use of the light supplement lamp is not affected.
And step 207, setting a status flag bit of the light supplement lamp in a closed state.
For example, the fill-in light is turned off, and the status flag is set to "0"
And 208, if the calling parameter for indicating the opening state is not acquired within the preset delay time, controlling the sliding mechanism to move to be contained in the body.
If the system control interface is called, and an SOS (Save ourer Souls) mode is adopted, when the SOS mode is adopted, the light supplement lamp can be frequently switched between the on state and the off state, the flash of the light supplement lamp is realized, and the SOS reminding function is played. When the light filling lamp twinkles, the status flag bit of the light filling lamp also can be correspondingly set back and forth between the indication opening state and the closing state, the sliding mechanism can be correspondingly frequently lifted and lowered, and the user experience is poor.
In order to solve the problem, in a scene, when the state flag bit of the light supplement lamp indicates an off state, when the sliding mechanism needs to be controlled to move to be accommodated in the body, whether the light supplement lamp is currently in the SOS mode needs to be determined, a delay time length can be preset, if a calling parameter for indicating an on state is not obtained within the preset delay time length, it indicates that the light supplement lamp is not currently in the SOS mode, after the preset time length is finished, the sliding mechanism is controlled to move to be accommodated in the body, and meanwhile, the state flag bit is set to be in the off state.
In another scenario, if a calling parameter for indicating an on state is acquired within a preset delay time, it is indicated that the light supplement lamp is currently in an SOS mode, and the frequent movement of the sliding mechanism protrudes from and is moved to be accommodated in the body due to the SOS mode, so that the user experience is poor, a delay message needs to be sent to enable the sliding mechanism to be accommodated in the body in a delayed manner, so that only the light supplement lamp flickers, the off state is indicated at a state flag bit of the light supplement lamp, and when it is monitored that the calling parameter for indicating the on state is not acquired within the preset delay time, the SOS mode of the light supplement lamp is considered to be ended, after the preset time is ended, the sliding mechanism is controlled to be moved to be accommodated in the body, and meanwhile, the state flag bit is set to be.
In the control method of the sliding mechanism, when a called target application program interface is a system control interface for singly controlling the light supplement lamp, calling parameters adopted by the calling system control interface are determined, a state flag bit of the light supplement lamp is set according to the calling parameters, when the light supplement lamp is in an on state, the sliding mechanism is controlled to move to protrude out of the body, the sliding mechanism is timely moved to protrude out of the body after the light supplement lamp is turned on, and in the on state of the light supplement lamp, the obtained instruction for controlling the sliding mechanism to be accommodated in the body is forbidden to be executed to prevent other application processes from being executed, so that the sliding mechanism slides back to the body when the light supplement lamp is turned on, and the normal use of the light supplement lamp is influenced; when the light supplement lamp is in the closed state, the preset time is set, and if the calling parameter for indicating the open state is not obtained in the preset time, the sliding mechanism is controlled to move to be contained in the body, so that the frequent descending and lifting of the sliding mechanism under the scene where the light supplement lamp is required to flicker are avoided, and the light supplement lamp is more suitable for the requirements of various scenes.
In the above embodiment, when a system interface for performing single control on the light supplement lamp is called, a control method for the sliding mechanism in different scenes is described, and in practical application, a camera may be further disposed in the sliding mechanism of the electronic device, and a target interface may be a camera service interface for controlling the camera and the light supplement lamp, so that this embodiment provides yet another possible implementation manner for the control method for the sliding mechanism, fig. 3 is a flowchart of the control method for the sliding mechanism provided in the embodiment of the present invention, which further clearly illustrates that when the called interface is the camera service interface, in different application scene types, different control strategies are correspondingly employed to realize sliding control on the sliding mechanism provided with the light supplement lamp, so that the control strategies are more targeted.
As shown in fig. 3, the method comprises the following steps:
step 301, it is monitored that the called target application program interface is a camera service interface.
The camera service interface writes calling parameters in a light supplement lamp interface in the camera service interface to control the sliding mechanism to move to protrude out of the body and turn on the light supplement lamp or move to be contained in the body and turn off the light supplement lamp.
Step 302, controlling the sliding mechanism to move to protrude from the body.
Specifically, when the called target interface is the camera service interface, the sliding mechanism is directly controlled to move to protrude out of the body, and therefore the sliding mechanism can be quickly moved to protrude out of the body when the camera service interface is called.
And step 303, if a calling parameter indicating the on state is monitored, setting a state flag bit of the light supplement lamp to be in the on state.
And calling parameters for indicating the on-off state of the light supplement lamp.
In an application scene, an application program only has a flashlight function, the flashlight function can be triggered by a separately arranged light supplement lamp switch touch key, a camera service interface is not called immediately after the light supplement lamp application program is started, but the camera service interface is called in response to the operation of a user on the switch touch key, a calling parameter for indicating the turn-on of a light supplement lamp is written in a control function of the light supplement lamp in the camera service interface, when the calling parameter for indicating the turn-on of the light supplement lamp is monitored, a state flag bit of the light supplement lamp is set to be in an on state, that is, in the application scene, the calling parameter for indicating the turn-on or turn-off of the light supplement lamp is written in the control function of the light supplement lamp in the camera service interface according to the operation of the user on the switch touch key, and the light supplement lamp is correspondingly turned on or turned off according to.
In another application scenario, the application program only has a flashlight function, but after the application program is started, the application program executes an interface for calling the camera service, writes a calling parameter for indicating the turn-on of the fill-in light into a control function of the fill-in light in the camera service interface so as to turn on the fill-in light; when the application program exits or the application program is switched to the background operation, the control on the camera service interface is released, and in the application scene, the control function of the light supplement lamp is not called by using a call parameter for controlling the closing, but the call on the camera service interface is directly released, and the status flag bit of the light supplement lamp cannot be set to be in the closed state, so that when the control on the camera service interface is needed to be released, whether the status flag bit of the light supplement lamp is in the closed state is monitored, namely, the sliding mechanism is logically controlled corresponding to the judgment and control method in the step 304 and the step 306, so that the control strategy is more in line with the requirement of the application scene.
In another application scenario, the fill-in light application program has a flashlight function and a camera function, and after the application program is started, the camera service interface is called to hold the camera and control the sliding mechanism to move so as to protrude out of the body. Generally, the application programs are provided with a switch touch key of the light supplement lamp, and corresponding calling parameters are adopted to call the flashlight interface nodes, namely control functions of the light supplement lamp, in response to user operation so as to turn on or turn off the light supplement lamp. When the calling parameter indicating the turn-off of the light supplement lamp is monitored, the sliding mechanism is controlled to move to be contained in the body, when the calling parameter which is turned on is monitored, the sliding mechanism is controlled to move to protrude out of the body, and before the application program exits, the camera service interface is released.
Furthermore, when the light supplement lamp is in the on state, if an instruction for controlling the sliding mechanism to be accommodated in the body by other application programs is acquired, the instruction is forbidden to be executed, because the sliding mechanism provided with the flash lamp cannot be slidingly accommodated in the body in any scene when the light supplement lamp is in the on state, so that the normal use of the light supplement lamp is not influenced.
Step 304, determining whether a call parameter indicating a closed state is monitored, if so, executing step 307, and if not, executing step 305.
It should be noted that, in the application scenarios listed in the above steps, some irregular application programs do not call the control function of the fill-in light by using a call parameter for controlling closing after the camera service interface is released, that is, the status flag of the fill-in light is not set to be in the closed state, and the sliding mechanism is controlled to move to be accommodated in the body, so that after the call of the camera service interface is released by monitoring the call parameter for indicating the closed state, if the call parameter for indicating that the status flag of the fill-in light is in the closed state is not monitored, the control method in step 305 and step 306 is executed, so that logic control over the sliding mechanism can be implemented under various application programs, and the control strategy better meets the requirements of the application scenarios.
Step 305, when the operating state of the electronic device meets the preset condition, the calling of the camera service interface is released, and the status flag bit of the light supplement lamp is set to indicate that the light supplement lamp is in the off state.
And step 306, controlling the sliding mechanism to move so as to be accommodated in the body.
Wherein the preset conditions include: the electronic equipment is switched to a screen-off state; calling an application program of the camera service interface, and removing the calling of the camera service interface; and calling the application program of the camera service interface to switch to a background running state.
Specifically, when the electronic device monitors that the operation state meets any one of the preset conditions, the calling of the camera service interface is released, the light supplement lamp is turned off, the state flag bit of the light supplement lamp is set to indicate that the light supplement lamp is in the off state, and the sliding mechanism is controlled to move to be contained in the body, so that after the light supplement lamp is turned off, the sliding mechanism is controlled to move to be contained in the body, and after the calling of the camera service interface is released, the light supplement lamp is turned off, and the sliding mechanism is controlled to move to be contained in the body, so that the requirements of an application scene are met.
And 307, setting a status flag bit of the light supplement lamp in an off state.
Specifically, if the on-off state indicated by the calling parameter is the off state, the light supplement lamp is turned off, and the state flag bit of the light supplement lamp in the off state is set, for example, the light supplement lamp is turned off, and the state flag bit is set to "0".
And step 308, determining that the calling parameter for indicating the opening state is not acquired within the preset delay time.
Step 309, controlling the sliding mechanism to move to be accommodated in the body.
Specifically, when the status flag of the fill-in light is in an off state, the sliding mechanism needs to be controlled to move to be accommodated in the body, and in practical applications, in some scenarios, it needs to be determined by a delay time, and whether the sliding mechanism can be controlled to move to be accommodated in the body when the status flag of the fill-in light is in the off state or not.
The utility model provides an application scene, when the light filling lamp frequently flickers, in the light filling lamp application, generally be provided with light filling lamp scintillation function, a scintillation warning function for emergency's warning or user-defined, under this mode, the light filling lamp can frequently switch between two kinds of states of bright and going out, the state flag bit of light filling lamp also can correspond and make a round trip to switch between instructing the state of opening and closing, and the sliding mechanism can correspond frequently rise and fall, user experience is relatively poor. Therefore, when the status flag bit of the light supplement lamp indicates an off status, when the sliding mechanism needs to be controlled to move to be accommodated in the body, whether the light supplement lamp is currently in the SOS mode needs to be determined, a delay time can be preset, if a calling parameter for indicating an on status is not obtained within the preset delay time, it indicates that the light supplement lamp is not currently in the frequent flashing mode of the light supplement lamp, and after the preset time is over, the sliding mechanism is controlled to move to be accommodated in the body, and meanwhile, the status flag bit is set to be in the off status.
If a calling parameter for indicating an on state is acquired within a preset delay time, it is indicated that the light supplement lamp is currently in a frequent flashing mode, and due to the frequent flashing mode, frequent movement of the sliding mechanism protrudes out of the body and moves to be accommodated in the body, so that user experience is poor, a delay message needs to be sent, so that the sliding mechanism is delayed to move to be accommodated in the body, only the light supplement lamp flashes, the off state is indicated at a state flag bit of the light supplement lamp, and when the calling parameter for indicating the on state is not acquired within the preset delay time, the frequent flashing mode of the light supplement lamp is considered to be ended, after the preset delay time is monitored, the sliding mechanism is controlled to move to be accommodated in the body, and meanwhile, the state flag bit is set to be in the off state.
Another application scenario is that when the light of the current camera shooting environment is insufficient, the light supplement lamp is turned on to supplement light for shooting, and when the user switches between the front camera and the rear camera, after the corresponding light supplement lamp is turned off, it needs to be determined whether the sliding mechanism needs to be immediately controlled to move to be accommodated in the body by a set delay time length, for example, when the current camera shooting mode is the front camera shooting mode and the user needs to switch to the rear camera for shooting when the front camera shooting mode is finished, when the user switches the camera shooting mode, the front light supplement lamp corresponding to the front camera shooting mode is turned off, the rear camera is turned on, and the rear light supplement lamp is turned on, a certain time is spent in the switching process, at this time, the determination needs to be performed by the preset delay time length, so as to ensure that the sliding structure does not immediately move to be accommodated in the body due to the turning off of the light in the switching process of the front camera and the rear camera, the control strategy under the application scene meets the actual requirements of the scene, and the user satisfaction is high.
According to the control method of the sliding mechanism, when the called target application program interface is the camera service interface, the sliding mechanism is controlled to move to protrude out of the body, when the camera service interface is called, the sliding mechanism is controlled to move fast to protrude out of the body, fast response is achieved, the state flag bit of the light supplement lamp is set according to the calling function adopted in the camera service interface, meanwhile, the sliding mechanism is controlled to move to protrude out of the body or be contained in the body, different control under different application scenes is achieved, and the control strategy is enabled to better meet the requirements of the scenes. Meanwhile, according to the comparison between the running state of the electronic equipment and the preset condition, when the preset condition is met, the calling of the camera service interface is closed, the light supplementing lamp is closed, the flag bit is set to be in the closed state, the sliding mechanism is controlled to be contained in the body, and after the camera service interface is removed, the sliding mechanism is controlled to move rapidly to be contained in the body.
In order to implement the above embodiments, the present invention further provides a control device for a sliding mechanism, where the control device is applied to an electronic device, the electronic device includes a body and the sliding mechanism, the sliding mechanism is provided with a light supplement lamp, and the sliding mechanism can move relative to the body to protrude from the body or be accommodated in the body.
Fig. 4 is a schematic structural diagram of a control device of a sliding mechanism according to an embodiment of the present invention.
As shown in fig. 4, the apparatus includes: a calling module 41, a determining module 42 and a control module 43.
And the calling module 41 is configured to monitor calling of a target interface, where the target interface is used to control the light supplement lamp.
And the determining module 42 is configured to determine a corresponding control policy according to the called target interface.
And the control module 43 is configured to perform sliding control on the sliding mechanism provided with the light supplement lamp by using a control strategy.
Further, in a possible implementation manner of the embodiment of the present invention, the target interface includes a system control interface for singly controlling the fill light.
The control module 43 includes: a determination unit and a control unit.
The determining unit is used for determining a calling parameter adopted by calling the system control interface if the called target interface is the system control interface; calling parameters to indicate the on-off state of the light supplement lamp;
and the control unit is used for controlling the sliding mechanism to move to protrude out of the body or be accommodated in the body according to the switch state indicated by the calling parameter.
As a possible implementation manner, the control module may further include: a setting unit and a prohibiting unit.
And the setting unit is used for setting the status flag bit of the light supplement lamp according to the on-off state indicated by the calling parameter.
And the forbidding unit is used for forbidding to execute the command if the command for controlling the sliding mechanism to be accommodated in the body is obtained when the status flag bit indicates that the light supplement lamp is in the on state.
As a possible implementation manner, the control unit is specifically configured to:
if the calling parameter indicates the opening state, the sliding mechanism is controlled to move to protrude out of the body;
and if the calling parameter indicates the closing state and the calling parameter for indicating the opening state is determined not to be acquired within the preset delay time, controlling the sliding mechanism to move to be contained in the body.
Further, as a possible implementation manner, the sliding mechanism is further provided with a camera, and the target interface includes a camera service interface for controlling the camera and the light supplement lamp.
In the control module 43 described above:
and the control unit is also used for controlling the sliding mechanism to move to protrude out of the body if the called target interface is the camera service interface.
And the determining unit is also used for determining the adopted calling parameter for the control function of the light supplement lamp in the camera service interface, and the calling parameter is used for indicating the on-off state of the light supplement lamp.
And the setting unit is also used for setting the status flag bit of the light supplement lamp according to the on-off state indicated by the calling parameter.
And the prohibiting unit is also used for prohibiting the execution of the instruction if the instruction for controlling the sliding mechanism to be accommodated in the body is obtained when the status flag bit indicates that the light supplement lamp is in the on state.
As a possible implementation manner, the control unit may be further configured to control the sliding mechanism to move to be accommodated in the body if the parameter is called to indicate the closed state.
As a possible implementation manner, the control module 43 may be further configured to:
and determining that the calling parameter for indicating the opening state is not acquired within the preset delay time.
As a possible implementation manner, the control module 43 may be further configured to:
when the running state of the electronic equipment meets any preset condition, releasing the call of the camera service interface;
setting the status flag bit of the light supplement lamp to indicate that the light supplement lamp is in a closed state;
controlling the sliding mechanism to move so as to be accommodated in the body;
wherein the preset conditions include:
the electronic equipment is switched to a screen-off state;
calling an application program of the camera service interface, and removing the calling of the camera service interface;
and calling the application program of the camera service interface to switch to a background running state.
As a possible implementation manner, the control module 43 may be further configured to:
the sliding-out interface of the sliding mechanism is adopted to control the sliding mechanism to move to protrude out of the body;
the reset interface of the sliding mechanism is adopted to control the sliding mechanism to move so as to be contained in the body.
It should be noted that the foregoing explanation of the method embodiment is also applicable to the apparatus of this embodiment, and is not repeated herein.
The above-mentioned division of the modules of the control device of the sliding mechanism is only used for illustration, and in other embodiments, the control device of the sliding mechanism may be divided into other modules to implement all or part of the functions of the control device of the sliding mechanism.
In the control device of the sliding mechanism, the calling of the target interface is monitored, the target interface is used for controlling the light supplement lamp, the corresponding control strategy is determined according to the called target interface, the control strategy is adopted to perform sliding control on the sliding mechanism with the light supplement lamp, different control strategies are determined by calling different interfaces, and the sliding control on the sliding mechanism with the light supplement lamp is realized, so that the control strategy is more targeted and meets the user requirements in the corresponding scene.
Based on the foregoing embodiments, the embodiments of the present invention further provide a possible implementation manner of an electronic device, and fig. 5 is a schematic structural diagram of the electronic device provided in the embodiments of the present invention, and as shown in fig. 5, the electronic device includes: the device comprises a body 10, a sliding mechanism 20, a supplementary lighting lamp 21, a memory 31 and a processor 32.
The electronic device 100 includes: the light supplement lamp comprises a body 10 and a sliding mechanism 20, wherein the sliding mechanism 20 is provided with a light supplement lamp 21, and the sliding mechanism 20 can move relative to the body 10 to protrude out of the side wall of the body 10 or be accommodated in the body 10.
The sliding mechanism 20 is electrically connected to the processor 32, and the memory 31 stores a computer program that can be run on the processor 32, and when the processor 32 executes the computer program, the method for controlling the sliding mechanism according to the foregoing method embodiment is implemented.
In order to implement the above embodiments, the present invention also proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the control method of the sliding mechanism described in the foregoing method embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.