CN113741782A - Method and device for generating control instruction, electronic equipment and storage medium - Google Patents

Method and device for generating control instruction, electronic equipment and storage medium Download PDF

Info

Publication number
CN113741782A
CN113741782A CN202110826970.7A CN202110826970A CN113741782A CN 113741782 A CN113741782 A CN 113741782A CN 202110826970 A CN202110826970 A CN 202110826970A CN 113741782 A CN113741782 A CN 113741782A
Authority
CN
China
Prior art keywords
electronic device
change
height
mapping relation
control operation
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.)
Pending
Application number
CN202110826970.7A
Other languages
Chinese (zh)
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.)
Xian Wingtech Information Technology Co Ltd
Original Assignee
Xian Wingtech Information Technology Co 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 Xian Wingtech Information Technology Co Ltd filed Critical Xian Wingtech Information Technology Co Ltd
Priority to CN202110826970.7A priority Critical patent/CN113741782A/en
Publication of CN113741782A publication Critical patent/CN113741782A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure relates to a method, apparatus, device and storage medium for generating control instructions, the method comprising: in response to detecting a first control operation for the electronic device, acquiring a change in height of the electronic device during the first control operation; and inquiring a pre-configured mapping relation table according to the height change to generate a control instruction for controlling the electronic equipment, wherein the mapping relation table stores the corresponding relation between the height change and the control instruction. By adopting the method, the electronic equipment can acquire the height change of the electronic equipment during the first control operation after detecting the first control operation, generate a corresponding control instruction according to the height change inquiry mapping relation table, and realize the quick triggering of corresponding quick operation through the control instruction.

Description

Method and device for generating control instruction, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic device operation control technologies, and in particular, to a method and an apparatus for generating a control instruction, an electronic device, and a storage medium.
Background
In the prior art, a physical key in an electronic device is used as a shortcut key for triggering certain operations, for example, as a shortcut key for triggering a camera to start quickly and take a picture. After a user needs to press the physical key, the corresponding shortcut operation can be triggered.
However, due to the large size of the electronic device or the inconvenience of holding the electronic device, the user may not conveniently press the shortcut key of the electronic device, and the corresponding shortcut operation may not be triggered.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a method, an apparatus, a device and a storage medium for generating a control instruction
In one aspect, the present disclosure provides a method for generating a control instruction, including:
in response to detecting a first control operation for an electronic device, acquiring a change in height of the electronic device during the first control operation;
and inquiring a pre-configured mapping relation table according to the height change to generate a control instruction for controlling the electronic equipment, wherein the mapping relation table stores the corresponding relation between the height change and the control instruction.
Optionally, the electronic device comprises a touch display screen;
the obtaining a change in height of the electronic device during a first control operation in response to detecting the first control operation for the electronic device comprises:
in response to detecting a long-press operation for the touch display screen, acquiring a height change of the electronic device during the long-press operation.
Optionally, after responding to the detection of the long press operation on the touch display screen, the method further comprises:
determining the area of the long-press operation acting on the touch display screen;
selecting one mapping relation table from a plurality of pre-configured mapping relation tables according to the area to serve as a selected mapping relation table;
the querying a preconfigured mapping relation table according to the altitude change includes: and querying the selected mapping relation table according to the height change.
Optionally, the electronic device comprises a barometric pressure sensor; the acquiring a change in height of the electronic device during the first control operation includes:
acquiring a change value of air pressure detected by the air pressure sensor during the first control operation;
and determining the height change of the electronic equipment according to the air pressure change value.
Optionally, the electronic device comprises an inertial sensor;
the acquiring a change in height of the electronic device during the first control operation includes: acquiring an acceleration output by the inertial sensor during the first control operation;
calculating the height change of the electronic equipment according to the acceleration and the execution time of the first control operation.
In another aspect, the present disclosure provides an apparatus for generating a control instruction, including: an altitude change determination unit configured to acquire, in response to detection of a first control operation for an electronic device, an altitude change of the electronic device during the first control operation;
and the control instruction generating unit is used for inquiring a pre-configured mapping relation table according to the height change and generating a control instruction for controlling the electronic equipment, wherein the mapping relation table stores the corresponding relation between the height change and the control instruction.
Optionally, the electronic device comprises a touch display screen; the height change determining unit is used for responding to the detection of the long-press operation aiming at the touch display screen and acquiring the height change of the electronic equipment during the long-press operation.
Optionally, the electronic device comprises a barometric pressure sensor; the height change determination unit includes:
an air pressure change value determining subunit operable to acquire an air pressure change value detected by the air pressure sensor during the first control operation;
and the height change determining subunit is used for determining the height change of the electronic equipment according to the air pressure change value.
In yet another aspect, the present disclosure provides an electronic device comprising a processor and a memory;
the processor is operative to perform the steps of the method as previously described by calling programs or instructions stored in the memory.
In yet another aspect, the present disclosure provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of the method as previously described.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: by adopting the method for generating the control instruction provided by the embodiment of the disclosure, if the user moves the electronic device in the height direction while executing the first control operation for the electronic device, the electronic device can acquire the height change during the first control operation after detecting the first control operation, and generate the corresponding control instruction according to the height change query mapping relation table, so as to realize convenient triggering of the corresponding shortcut operation.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flow diagram of a method for generating control instructions provided by some embodiments of the present disclosure;
FIG. 2 is a flow diagram of a method of generating control instructions provided by some embodiments of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for generating a control instruction according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a flowchart of a method for generating a control instruction according to some embodiments of the present disclosure. As shown in FIG. 1, in some embodiments of the present disclosure, a method for generating control instructions includes steps S101-S102.
Step S101: in response to detecting a first control operation for the electronic device, a change in height of the electronic device during the first control operation is acquired.
In the embodiment of the disclosure, the electronic device detects the operation of the user on the electronic device in real time. The operation of the user on the electronic device may be a first control operation or a control operation corresponding to another operation mode.
After the electronic device detects the first control operation, the electronic device acquires detection data generated by the internal sensor, and determines a change in height of the electronic device during execution of the first control operation based on the detection data generated by the sensor.
In some embodiments of the present disclosure, the electronic device may be an electronic device having a touch display screen. In this case, step S101 may include steps S1011-S1012.
Step S1011: detecting whether long-time pressing operation aiming at the touch display screen exists or not; if yes, go to step S1012.
In some embodiments of the present disclosure, detecting whether there is a long-press operation on the touch display screen may be to determine whether the touch operation moves and whether an operation duration of the touch operation reaches a set duration after detecting the touch operation on the touch display screen. And if the touch operation does not move and the operation time length of the touch operation reaches the set time length, determining that the touch operation is the long-press operation.
Step S1012: the height change of the electronic device during the long press operation is acquired.
The method for acquiring the height change of the electronic equipment during the long press operation is different according to the types of the sensors arranged in the electronic equipment.
In some embodiments of the present disclosure, the sensor in the electronic device comprises an air pressure sensor. Correspondingly, the method for acquiring the height change of the electronic equipment during the long press operation comprises the following steps A-B.
Step A: a value of a change in air pressure detected by the air pressure sensor during the first control operation is acquired.
And B: and determining the height change of the electronic equipment according to the air pressure change value.
From experimental tests it can be determined that atmospheric pressure varies with altitude. Within the normal altitude range, the atmospheric pressure drops by about 0.4Pa for every 3.4cm rise. The detection sensitivity of the air pressure sensor conventionally applied to the electronic equipment is 0.4Pa, so that the air pressure sensor in the conventional electronic equipment is adopted for air pressure detection, and the air pressure sensor can generate an air pressure change value as long as the moving distance of the electronic equipment in the height direction is greater than 3.4 cm. Conversely, a change in the height of the electronic device may also be determined based on a change in air pressure value generated by the air pressure sensor.
In some other embodiments of the present disclosure, the sensor in the electronic device is an inertial sensor, which may monitor the acceleration of the electronic device in real time. Correspondingly, the method for acquiring the height change of the electronic equipment during the long press operation based on the inertial sensor can comprise the following steps C-D.
And C: the acceleration output by the inertial sensor during the first control operation is acquired.
Step D: the height change of the electronic device is calculated according to the acceleration and the execution time of the first control operation.
In some other embodiments of the present disclosure, after acquiring the acceleration output by the inertial sensor during the first control operation, the electronic device performs an integration calculation according to the acceleration, the gravitational acceleration, and the initial velocity profile within the execution time of the first control operation to determine the change in height of the electronic device.
In some embodiments of the foregoing, a long-press operation on the touch display screen is used as the first control operation. In other embodiments of the present disclosure, other operations on the electronic device may also be taken as the first control operation, and the height change of the electronic device during the first control operation is acquired.
For example, in some embodiments, in a case where the electronic device is configured with a light intensity sensor, the blocking operation of the light intensity sensor may be taken as the first control operation. At this time, if the light intensity sensor detects a sudden decrease in the intensity of the incident light, it is determined that the first control operation for the electronic apparatus is detected.
After determining the change in the height of the electronic device during the first control operation, step S102 may be subsequently performed.
Step S102: and inquiring a pre-configured mapping relation table according to the height change to generate a control instruction for controlling the electronic equipment.
The preset mapping relation table stores the corresponding relation between the height change and the control instruction. After the height change is obtained, the corresponding relation in the mapping relation table is inquired according to the height change, and a corresponding control instruction can be determined. The electronic device then generates corresponding control instructions to control corresponding hardware or software to perform operations associated with such control instructions.
By adopting the method for generating the control instruction provided by the embodiment of the disclosure, if the user moves the electronic device in the height direction while executing the first control operation for the electronic device, the electronic device can acquire the height change of the electronic device during the first control operation after detecting the first control operation, query the mapping relation table according to the height change to generate the corresponding control instruction, and execute the control instruction to realize quick triggering of the shortcut operation.
Fig. 2 is a flowchart of a method for generating a control instruction according to some embodiments of the present disclosure. As shown in FIG. 2, in some embodiments of the present disclosure, a method of generating control instructions includes steps S201-S205.
Step S201: judging whether long-time pressing operation aiming at a touch display screen in the electronic equipment is detected; if yes, step S202 and step S203 are executed.
Step S202: a change in height of the electronic device during a first control operation is acquired.
Step S201 is the same as step S1011, and step S202 is the same as step S1012, and will not be repeated here, and the related contents can be referred to the above description.
Step S203: and determining the area of the touch display screen acted by the long-press operation.
In some embodiments of the present disclosure, when a user presses the touch display screen, the touch display screen generates a position coordinate signal representing a touch position. According to the position coordinate signal, the area of the touch display screen acted by the long-press operation can be determined.
Step S204: and selecting one mapping relation table from a plurality of pre-configured mapping relation tables according to the area to serve as the selected mapping relation table.
In the embodiment of the disclosure, a plurality of pre-configured mapping relation tables are stored in the electronic equipment, each mapping relation table corresponds to one area, and each mapping table comprises a corresponding relation between height change and a control instruction. After an area of the touch display screen is determined, a selected mapping relation table can be determined in the plurality of mapping relation tables according to the corresponding relation between the area and the mapping relation table.
Step S205: and inquiring the selected mapping relation table according to the height change to generate a control instruction for controlling the electronic equipment.
By adopting the method for generating the control instruction provided by the embodiment of the disclosure, when the long press operation acts on different areas of the touch display screen, the determined mapping relation tables are different, and the corresponding control instructions determined according to the same height change are also different. By adopting the method for generating the control instruction provided by the embodiment of the disclosure, different control instructions can be generated based on the same height change, and the association between a plurality of control instructions and the same height change is realized.
In order to more clearly illustrate the embodiments of the present disclosure, a specific method using the embodiments of the present disclosure is described below.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 3, in an embodiment of the present disclosure, the electronic device 30 includes a touch display screen 31, an air pressure sensor 32, and a processor 33 (the air pressure sensor 32 and the processor are hidden by the touch display screen 31 and indicated by dashed lines in the figure).
In one application of the electronic device shown in fig. 3, when playing a video, if the user presses the touch display screen 31 for a long time, the touch display screen 31 will detect the long press operation and send the long press operation to the processor 33. The processor 33 acquires a plurality of air pressure values generated by the air pressure sensor 32 during execution of the long press operation after receiving the long press operation for controlling the display screen, and determines an air pressure change value from the plurality of air pressure values. And finally, the controller inquires the mapping relation table according to the air pressure value and determines a control instruction.
In one application, the mapping table includes the following mappings: 1. the air pressure change value is a positive value and corresponds to a video fast forward instruction; 2. the air pressure change value is a negative value and corresponds to a video fast-backward instruction.
If the air pressure change value is a positive value, the electronic equipment generates a video fast-forward instruction so as to fast forward the played video; and if the air pressure change value is a negative value, the electronic equipment generates a video fast-backward instruction so as to fast backward the played video.
In another application, the touch display screen 31 is divided into three areas, i.e., a left area, a middle area and a right area, and the three areas correspond to three mapping tables respectively.
The left area corresponds to a first mapping relation table, and the mapping relation in the first mapping relation table includes: 1. the air pressure change value is a positive value, and corresponds to a control instruction for carrying out fast forwarding by taking 5s as a stepping length; and 2, the air pressure change value is a negative value, and the control instruction of fast backing is correspondingly carried out by taking 5s as the stepping length.
The middle area corresponds to a second mapping relation table, and the mapping relation in the second mapping relation table includes: 1. the air pressure change value is a positive value, and corresponds to a control instruction for performing fast forward by taking 1 minute as a step length. 2. The air pressure change value is a negative value and corresponds to a control instruction for performing fast backward taking 1 minute as a stepping length.
The right area corresponds to a third mapping relation table, and the mapping relation in the third mapping relation table includes: 1. the air pressure change value is a positive value, and corresponds to a control instruction for performing fast forward by taking 5 minutes as a step length. 2. The air pressure change value is a negative value and corresponds to a control instruction for performing fast backward taking 5 minutes as a stepping length.
When playing the video, if the user presses the left area of the touch display screen 31 for a long time, the touch display screen 31 sends the detected long press operation to the processor 33. The processor 33 acquires the air pressure value generated by the air pressure sensor 32 during the execution of the long press operation after receiving the long press operation for the control display screen, and determines the air pressure change value during the execution of the long press operation according to the air pressure value. The controller also selects the first mapping table as the selected mapping table based on the long press operation active region being the left region.
If the air pressure change value is determined to be a positive value, the processor 33 generates a control instruction for fast forwarding by taking 5s as a step length, so that the playing video is fast forwarded at the fast forwarding speed of 5 s; and if the air pressure change value is a negative value, the electronic equipment generates a control instruction for fast rewinding by taking 5s as a stepping length, so that the played video is fast rewound according to the fast rewinding speed of 5 s.
Similarly, if the user presses the middle area or the right area of the touch display screen 31 for a long time, the second mapping relation table or the third mapping relation table is used as the selected mapping relation table, and the control instruction is determined according to the air pressure change value.
In the foregoing application of the embodiment of the present disclosure, the video fast forward command and the video fast reverse command are used as the control commands corresponding to the altitude change, and in other applications of the embodiment of the present disclosure, the volume control command and the brightness control command may be used as the control commands corresponding to the altitude change.
The embodiment of the present disclosure further provides an apparatus 40 for generating a control instruction. Fig. 4 is a schematic structural diagram of an apparatus 40 for generating a control instruction according to an embodiment of the present disclosure, and as shown in fig. 4, the apparatus 40 for generating a control instruction includes a height change determining unit 41 and a control instruction generating unit 42.
The height change determination unit 41 is configured to acquire a change in height of the electronic device during a first control operation for the electronic device in response to detection of the first control operation.
The control instruction generating unit 42 is configured to query a pre-configured mapping relationship table according to the height change, and generate a control instruction for controlling the electronic device, where the mapping relationship table stores a corresponding relationship between the height change and the control instruction.
In some embodiments of the present disclosure, the electronic device includes a touch display screen; the height change determination unit 41 acquires a height change of the electronic device during a long-press operation in response to detection of the long-press operation for the touch display screen.
In some embodiments of the present disclosure, the electronic device includes an air pressure sensor. The altitude change determination unit 41 includes an air pressure change value determination subunit and an altitude change determination subunit. The air pressure change value determination subunit is configured to acquire an air pressure change value detected by the air pressure sensor during the first control operation. The height change determining subunit is configured to determine a height change of the electronic device according to the air pressure change value.
In some embodiments of the present disclosure, the apparatus further includes a region determining unit and a mapping relation table selecting unit. The area determination unit is used for determining the area of the touch display screen acted by the long-press operation. The mapping relation table selecting unit is used for selecting one mapping relation table from a plurality of pre-configured mapping relation tables according to the area to serve as a selected mapping relation table. Correspondingly, the height change determining subunit queries the selected mapping relation table according to the height change to generate a control instruction.
In some embodiments of the present disclosure, the electronic device includes an air pressure sensor; the altitude change determination unit 41 includes an air pressure change value determination subunit and an altitude change determination subunit. The air pressure change value determination subunit is configured to acquire an air pressure change value detected by the air pressure sensor during the first control operation. The height change determining subunit is configured to determine a height change of the electronic device according to the air pressure change value.
The device provided by the embodiment of the present disclosure can execute the method of any of the above method embodiments, and the execution mode and the beneficial effect are similar, and are not described herein again. The embodiment of the present disclosure further provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the method for generating the control instruction may be implemented.
For example, fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure. Referring now specifically to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown.
As shown in fig. 5, the electronic device 500 may include a processing means 501 (e.g., a central processing unit, a graphics processor, etc.) that may perform various appropriate actions and processes in accordance with a program stored in a read only memory ROM502 or a program loaded from a storage means 508 into a random access memory RAM 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch display screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, electronic devices may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to detecting a first control operation for the electronic device, acquiring a change in height of the electronic device during the first control operation; and inquiring a pre-configured mapping relation table according to the height change to generate a control instruction for controlling the electronic equipment.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or electronic device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method of any one of the embodiments in fig. 1 to fig. 2 may be implemented, and the execution manner and the beneficial effects are similar, and are not described herein again.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of generating control instructions, comprising:
in response to detecting a first control operation for an electronic device, acquiring a change in height of the electronic device during the first control operation;
and inquiring a pre-configured mapping relation table according to the height change to generate a control instruction for controlling the electronic equipment, wherein the mapping relation table stores the corresponding relation between the height change and the control instruction.
2. The method of claim 1, wherein the electronic device comprises a touch display screen;
the obtaining a change in height of the electronic device during a first control operation in response to detecting the first control operation for the electronic device comprises:
in response to detecting a long-press operation for the touch display screen, acquiring a height change of the electronic device during the long-press operation.
3. The method of claim 2, wherein after in response to detecting the long press operation for the touch display screen, the method further comprises:
determining the area of the long-press operation acting on the touch display screen;
selecting one mapping relation table from a plurality of pre-configured mapping relation tables according to the area to serve as a selected mapping relation table;
the querying a preconfigured mapping relation table according to the altitude change includes: and querying the selected mapping relation table according to the height change.
4. The method of any of claims 1-3, wherein the electronic device comprises a barometric pressure sensor; the acquiring a change in height of the electronic device during the first control operation includes:
acquiring a change value of air pressure detected by the air pressure sensor during the first control operation;
and determining the height change of the electronic equipment according to the air pressure change value.
5. The method of any of claims 1-3, wherein the electronic device comprises an inertial sensor;
the acquiring a change in height of the electronic device during the first control operation includes: acquiring an acceleration output by the inertial sensor during the first control operation;
calculating the height change of the electronic equipment according to the acceleration and the execution time of the first control operation.
6. An apparatus for generating control instructions, comprising:
an altitude change determination unit configured to acquire, in response to detection of a first control operation for an electronic device, an altitude change of the electronic device during the first control operation;
and the control instruction generating unit is used for inquiring a pre-configured mapping relation table according to the height change and generating a control instruction for controlling the electronic equipment, wherein the mapping relation table stores the corresponding relation between the height change and the control instruction.
7. The apparatus of claim 6, wherein the electronic device comprises a touch display screen;
the height change determining unit is used for responding to the detection of the long-press operation aiming at the touch display screen and acquiring the height change of the electronic equipment during the long-press operation.
8. The apparatus of claim 6, wherein the electronic device comprises a barometric pressure sensor; the height change determination unit includes:
an air pressure change value determining subunit operable to acquire an air pressure change value detected by the air pressure sensor during the first control operation;
and the height change determining subunit is used for determining the height change of the electronic equipment according to the air pressure change value.
9. An electronic device comprising a processor and a memory;
the processor is adapted to perform the steps of the method of any one of claims 1 to 5 by calling a program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 5.
CN202110826970.7A 2021-07-21 2021-07-21 Method and device for generating control instruction, electronic equipment and storage medium Pending CN113741782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110826970.7A CN113741782A (en) 2021-07-21 2021-07-21 Method and device for generating control instruction, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110826970.7A CN113741782A (en) 2021-07-21 2021-07-21 Method and device for generating control instruction, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113741782A true CN113741782A (en) 2021-12-03

Family

ID=78728820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110826970.7A Pending CN113741782A (en) 2021-07-21 2021-07-21 Method and device for generating control instruction, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113741782A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104735544A (en) * 2015-03-31 2015-06-24 上海摩软通讯技术有限公司 Video guidance method for mobile terminal
JP6483306B1 (en) * 2018-03-30 2019-03-13 ピーシーフェーズ株式会社 Video playback control system
CN110633044A (en) * 2019-08-27 2019-12-31 联想(北京)有限公司 Control method, control device, electronic equipment and storage medium
CN111327936A (en) * 2020-02-11 2020-06-23 上海闻泰电子科技有限公司 Video playing shortcut control method and device, electronic equipment and storage medium
CN112383827A (en) * 2020-11-10 2021-02-19 北京乐学帮网络技术有限公司 Video playing control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104735544A (en) * 2015-03-31 2015-06-24 上海摩软通讯技术有限公司 Video guidance method for mobile terminal
JP6483306B1 (en) * 2018-03-30 2019-03-13 ピーシーフェーズ株式会社 Video playback control system
CN110633044A (en) * 2019-08-27 2019-12-31 联想(北京)有限公司 Control method, control device, electronic equipment and storage medium
CN111327936A (en) * 2020-02-11 2020-06-23 上海闻泰电子科技有限公司 Video playing shortcut control method and device, electronic equipment and storage medium
CN112383827A (en) * 2020-11-10 2021-02-19 北京乐学帮网络技术有限公司 Video playing control method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电脑报编: "《iPhone 4S玩家活用手册》", 重庆:电脑报电子音像出版社, pages: 91 *

Similar Documents

Publication Publication Date Title
KR102593824B1 (en) Method for controlling a camera and electronic device thereof
JP6062608B2 (en) Web page access method, apparatus, server, terminal, program, and recording medium
JP6240363B2 (en) Number marking method, apparatus, program, and recording medium
CN109286727B (en) Operation control method and terminal equipment
CN109164477B (en) Application positioning method and mobile terminal
US9733144B2 (en) Electronic device, control method, and control program
CN107613146B (en) Volume adjustment method and device and mobile terminal
KR20180090696A (en) Sensor for capturing image and method for controlling thereof
KR20180090120A (en) System and method for providing sensing data to electronic device
CN110908582A (en) Control method, touch control pen and electronic assembly
KR20180116843A (en) Method for detecting motion and electronic device implementing the same
CN109522278B (en) File storage method and terminal equipment
EP3288299A1 (en) Operation triggering method and portable electronic device
CN107800869B (en) Split screen display method, mobile terminal and storage medium
KR102124197B1 (en) System for controlling in-vehicle-infortainment apparatus using mobile terminal and method for the same
JP7472281B2 (en) Electronic device and focusing method
CN110837333A (en) Method, device, terminal and storage medium for adjusting playing progress of multimedia file
US20140267023A1 (en) Method for displaying dynamic image and electronic device therefor
KR102585873B1 (en) Method and apparatus for executing application using a barometer
CN113741782A (en) Method and device for generating control instruction, electronic equipment and storage medium
CN113766293B (en) Information display method, device, terminal and storage medium
US10572308B2 (en) Method and apparatus for monitoring virtual document object model
CN108986508B (en) Method and terminal for displaying route information
CN110278232B (en) Method, device and system for controlling data downloading
US20210065004A1 (en) Method and device for subnetwork sampling, and method and device for building a hypernetwork topology

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