CN111399920B - Method, device and storage medium for automatic configuration of mobile terminal application program keys - Google Patents

Method, device and storage medium for automatic configuration of mobile terminal application program keys Download PDF

Info

Publication number
CN111399920B
CN111399920B CN202010166407.7A CN202010166407A CN111399920B CN 111399920 B CN111399920 B CN 111399920B CN 202010166407 A CN202010166407 A CN 202010166407A CN 111399920 B CN111399920 B CN 111399920B
Authority
CN
China
Prior art keywords
application program
keys
virtual
virtual key
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010166407.7A
Other languages
Chinese (zh)
Other versions
CN111399920A (en
Inventor
罗彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Handscape Technologies Inc
Original Assignee
Shenzhen Handscape Technologies Inc
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 Shenzhen Handscape Technologies Inc filed Critical Shenzhen Handscape Technologies Inc
Priority to CN202010166407.7A priority Critical patent/CN111399920B/en
Publication of CN111399920A publication Critical patent/CN111399920A/en
Application granted granted Critical
Publication of CN111399920B publication Critical patent/CN111399920B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Abstract

The invention discloses a method, a device and a storage medium for automatically configuring an application program key of a mobile terminal, wherein the method comprises the following steps: opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program; acquiring hardware information of the mobile terminal, wherein the hardware information comprises the model, version, screen size and resolution of the mobile terminal; according to a preset rule, establishing a mapping relation between physical keys of the external equipment and virtual keys of the second application program; and sending the information of the mapping relation to the external equipment. Compared with the prior art, the technical scheme reduces the learning cost of using the peripheral equipment by the user.

Description

Method, device and storage medium for automatic configuration of mobile terminal application program keys
Technical Field
The present invention relates to the field of mobile devices, and in particular, to a method, an apparatus, and a storage medium for automatically configuring an application key of a mobile terminal.
Background
Along with the improvement of the physical living standard of people, the pursuit of people on mental demands is higher and higher, and the mobile terminals such as mobile phones are used as leisure tools, so that the mental demands of people are well met. Limited to limited screens and application program interfaces, users are connected to the mobile terminal through external devices (hereinafter referred to as peripherals) in order to pursue better operations on the mobile terminal, such as small video shooting and game playing, so as to realize that the user operates the application program of the mobile phone on the peripherals. However, in the prior art, the user needs to spend a lot of learning cost to learn how to correspond the peripheral operation with the application operation. In this process, a soft heart state is easily generated, and the use of the peripheral devices is abandoned. Therefore, how to reduce the learning cost of the user using the peripheral is important.
Disclosure of Invention
The invention mainly aims to provide a method for automatically configuring application program keys of a mobile terminal, aiming at reducing the technical problem of learning cost of a user using peripheral equipment.
The invention provides a method for automatically configuring an application program key of a mobile terminal, which comprises the following steps:
opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program;
Acquiring hardware information of the mobile terminal, wherein the hardware information comprises the model, version, screen size and resolution of the mobile terminal;
according to a preset rule, establishing a mapping relation between physical keys of the external equipment and virtual keys of the second application program;
and sending the information of the mapping relation to the external equipment.
Preferably, the step of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program according to a preset rule includes:
acquiring coordinate information of a virtual key of a second application program pre-stored in a database in the database;
and establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
Preferably, the step of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program according to a preset rule includes:
obtaining a graphic mode of each virtual key of the second application program;
acquiring a screen image of a second application program;
scanning and searching the position of each second application virtual key according to the graphic mode, and generating coordinate information corresponding to each second application virtual key;
And establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
Preferably, the step of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program according to a preset rule includes:
classifying the mobile terminal according to the hardware information of the mobile terminal, and generating classification information, wherein the first class is contained in any one class of the classification information;
establishing a two-dimensional coordinate axis by taking a screen of a mobile terminal in a first category as a quadrant;
respectively acquiring coordinate information of each appointed first virtual key, wherein the first virtual keys are virtual keys of a second application program;
mapping each physical key of the external equipment to a second application program using interface, generating a plurality of second virtual keys, and acquiring coordinate information of each second virtual key;
calculating a coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key;
and mapping each second virtual key to each appointed first virtual key according to the coordinate offset.
Preferably, after the step of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
According to the operation instruction information of the user, each second virtual key is respectively moved to a designated single first virtual key;
and storing the current second virtual key configuration, and modifying the previous second virtual key configuration into the current second virtual key configuration.
Preferably, after the step of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
acquiring type labels corresponding to all second application programs in the first application program;
according to the type labels, the second application programs of the same type are divided into the same group;
dividing the second application program in each group into two types of key configuration and key configuration to be used;
selecting a second application program from the second application programs with key configuration, and storing the mapping relation between the first virtual keys of the second application programs with key configuration and the physical keys of the external equipment into the second application programs to be key configured.
Preferably, the first application program may call the second application program, and after the step of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
and receiving user operation instruction information, and starting a second application program in the first application program.
Preferably, after the step of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
marking the starting time of the second application program as the first time;
judging whether the time difference between the first moment and the current moment accords with a time threshold value or not in real time;
if not, closing the communication connection with the external equipment.
The invention also provides a device for automatically configuring the application program keys of the mobile terminal, which comprises:
the first execution module is used for opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program;
the mobile terminal comprises a first acquisition module, a second acquisition module and a first control module, wherein the first acquisition module is used for acquiring hardware information of the mobile terminal, and the hardware information comprises a model, a version, a screen size and resolution of the mobile terminal;
the mapping module is used for establishing a mapping relation between the physical keys of the external equipment and the virtual keys of the second application program according to a preset rule;
and the sending module is used for storing the information of the mapping relation to the external equipment.
The invention also provides a storage medium which is a computer readable storage medium and is stored with a computer program, and the computer program is executed to realize the method for automatically configuring the mobile terminal application program key.
The invention has the beneficial effects that: according to the technical scheme, the manual setting links of the physical keys of the external equipment and the application program functions on the mobile terminal are reduced, the automatic configuration of the physical keys of the external equipment and the application program functions on the mobile terminal is realized, the learning cost of using the peripheral equipment by a user is reduced, and the using steps of the external equipment are simplified. In addition, the learning cost of using the peripheral by the user is reduced, so that the popularization of the external equipment by the peripheral manufacturer is facilitated, and the economic benefit of the peripheral manufacturer is improved.
Drawings
FIG. 1 is a flowchart of a method for automatically configuring keys of a mobile terminal application according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of the touch panel structure of FIG. 1;
FIG. 3 is a schematic diagram illustrating the adaptation of a first virtual key and a second virtual key of a second application of the method for automatically configuring keys of an application program of the mobile terminal in FIG. 1;
FIG. 4 is a schematic diagram of a mechanism of a first embodiment of an automatic configuration of mobile terminal application keys according to the present invention;
Fig. 5 is a block diagram illustrating an embodiment of a storage medium according to the present application.
Description of the reference numerals:
1. a first execution module; 2. a first acquisition module; 3. a mapping module; 4. a transmitting module;
100. a storage medium; 200. computer program.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, the present invention provides a method for automatically configuring an application key of a mobile terminal, which includes:
s1: opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program;
s2: acquiring hardware information of the mobile terminal, wherein the hardware information comprises the model, version, screen size and resolution of the mobile terminal;
s3: according to a preset rule, establishing a mapping relation between physical keys of the external equipment and virtual keys of the second application program;
S4: and sending the information of the mapping relation to the external equipment.
In the embodiment of the invention, the mobile terminal comprises a smart phone, as shown in fig. 2, the external device comprises a touch pad, the touch pad is arranged on the back of the smart phone, and a user touches different touch areas to realize different functions, wherein the physical keys comprise traditional entity keys and touch keys. The mobile terminal is communicatively coupled to external devices in the form of wireless transmissions, including but not limited to bluetooth and WiFi. The smart phone opens a first application program, selects a second application program needing to automatically configure keys from the first application program, and converts an interface of the first application program into a use interface of the second application program, wherein the first application program comprises a plurality of second application programs (such as tremble sound and peace elite), and the first application program is used for configuring a touch pad touch area and virtual keys of the second application program. The first application program obtains hardware information of the mobile terminal, wherein the hardware information comprises a model number, a version number, a screen size and resolution of the mobile terminal. In the embodiment of the invention, the mapping relation between the physical key of the external device and the virtual key of the second application program is established mainly in three ways: firstly, coordinate information of each virtual key in a second application program is obtained in a calculation mode, so that a mapping relation is established between a physical key and the virtual key of the second application program; secondly, acquiring coordinate information of each virtual key in the second application program in the mobile phones with different models through a database, so that a mapping relation is established between the physical keys and the virtual keys of the second application program; and thirdly, scanning a screen picture of the second application program according to the graphic mode of each virtual key, so as to obtain the coordinate information of each virtual key in the second application program, and establishing a mapping relation between the physical key and each virtual key of the second application program. The three modes are automatically configured by the first application program of the mobile terminal, and the smart phone sends the information of the mapping relation to the external equipment, wherein the process of establishing the mapping relation between the physical key and each virtual key of the second application program is as follows: the first application program calculates, codes and converts the coordinate information of each virtual key in the second application program, and writes the coordinate information into the external equipment through Bluetooth. The external equipment receives the configuration data sent by the mobile terminal and converts the configuration data into information such as coordinates, time and area according to the agreed communication protocol format. And storing the converted configuration data into a specific array, checking and encrypting the array, and then storing the array in a specific address of the Bluetooth chip, thereby completing the mapping of the physical keys of the external equipment and the virtual keys of the second application program. Through the arrangement, the manual setting links of the physical keys of the external equipment and the application program functions on the mobile terminal are reduced, the automatic configuration of the physical keys of the external equipment and the application program functions on the mobile terminal is realized, the learning cost of using the peripheral equipment by a user is reduced, and the using steps of the external equipment are simplified. In addition, the learning cost of using the peripheral by the user is reduced, so that the popularization of the external equipment by the peripheral manufacturer is facilitated, and the economic benefit of the peripheral manufacturer is improved.
Further, according to a preset rule, the step S3 of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program includes:
s31: acquiring coordinate information of a virtual key of a second application program pre-stored in a database in the database;
s32: and establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
In the embodiment of the invention, after the first application program reads the hardware information of the smart phone, the first application program is used for reading the hardware information of the smart phone according to the model of the smart phone, the screen size of the smart phone and the resolution information. According to the hardware information of the smart phone, the actual coordinates of the virtual keys which need to be adapted in the second application program (such as 'peaceful elite') are queried in the database. For example, firing coordinates are (x 1, y 1), mirror opening coordinates are (x 2, y 2), squatting coordinates are (x 3, y 3), and jumping coordinates are (x 4, y 4). The data of the database can be measured by the first application program on different model systems, and the database exists in the first application program. And establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key. For example, physical keys include L1, L2, R1, and R2. After the mapping relation is established, the coordinates of the L1 are (x 1, y 1), and the user realizes the firing function by touching the physical key L1. The coordinates of L2 are (x 2, y 2), and the user realizes the mirror opening function by touching the physical key L2. The coordinates of R1 are (x 3, y 3), and the user realizes the squatting function through R1. The coordinates of R2 are (x 4, y 4), and the user realizes the jump function by touching the physical key R2. Through the technical scheme, the virtual key automatic configuration method is simple in logic, easy to execute and beneficial to improving the efficiency of virtual key automatic configuration.
Further, according to a preset rule, the step S3 of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program includes:
S3A: obtaining a graphic mode of each virtual key of the second application program;
S3B: acquiring a screen image of a second application program;
S3C: scanning and searching the position of each second application virtual key according to the graphic mode, and generating coordinate information corresponding to each second application virtual key;
S4D: and establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
In the embodiment of the present invention, shooting game and flat elite are taken as examples. The first application obtains the pattern patterns of "fire", "mirror", "squat" and "jump". The first application program obtains screen images of 'peaceful elite', searches for the positions of scanning 'fire', 'mirror open', 'squat' and 'jump' according to the graph mode corresponding to each virtual key, and generates corresponding coordinate information. And establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key. By the arrangement, the automatic configuration of the virtual keys of the second application program can be realized without pre-storing the virtual key coordinate information of the second application program in a database.
Further, according to a preset rule, the step S3 of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program includes:
s3a: classifying the mobile terminal according to the hardware information of the mobile terminal, and generating classification information, wherein the first class is contained in any one class of the classification information;
s3b: establishing a two-dimensional coordinate axis by taking a screen of a mobile terminal in a first category as a quadrant;
s3c: respectively acquiring coordinate information of each appointed first virtual key, wherein the first virtual keys are virtual keys of the second application program;
s3d: mapping each physical key of the external equipment to a second application program using interface, generating a plurality of second virtual keys, and acquiring coordinate information of each second virtual key;
s3e: calculating a coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key;
s3f: and mapping each second virtual key to each appointed first virtual key according to the coordinate offset.
In the embodiment of the invention, the first application program classifies the mobile terminal according to the hardware information of the mobile terminal to generate classification information. iPhone8 was classified as "non-Liu Haibing" if iPhoneX was classified as "Liu Haibing". Taking iPhone8 in "non Liu Haibing class" as an example, the smart phone opens a first application program, selects a second application program needing to automatically configure keys from the first application program, and converts an interface of the first application program into a use interface of the second application program, wherein the first application program comprises a plurality of second application programs (such as tremble and peaceful elite), and the first application program is used for configuring a touch area of the touch pad and virtual keys of the second application program. The first application program obtains hardware information of the mobile terminal, wherein the hardware information comprises a model number, a version number, a screen size and resolution of the mobile terminal. And establishing a two-dimensional coordinate axis by taking the screen of the smart phone as a quadrant. As shown in fig. 3, the first application program obtains coordinate information of each specified first virtual key, where the first virtual key is a virtual key of the second application program, that is, the virtual key 1, the virtual key 2, the virtual key 3, and the virtual key 4 in fig. 3, and the corresponding coordinates are (X1, Y1), (X2, Y2), (X3, Y3), and (X4, Y4), respectively. The first application program maps each touch area of the touch pad to a second application program using interface to generate a plurality of second virtual keys, and obtains coordinate information of each second virtual key, namely, generates a virtual key A, a virtual key B, a virtual key C and a virtual key D, and the corresponding coordinates are (XA, YA), (XB, YB), (XC, YC) and (XD, YD) respectively. The smart phone calculates the coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key, namely, calculates the coordinate offset of the virtual key 1 and the virtual key A, the virtual key 2 and the virtual key B, the virtual key 3 and the virtual key C and the coordinate offset of the virtual key 4 and the virtual key D. According to the coordinate offset, the virtual key A is mapped to the virtual key 1, the virtual key B is mapped to the virtual key 2, the virtual key C is mapped to the virtual key 3, and the virtual key D is mapped to the virtual key 4, so that the coordinates of each second virtual key and the corresponding first virtual key are kept consistent, and the automatic configuration of the touch area of the touch pad and the virtual keys of the second application program is completed. Specifically, taking a tremble APP as an example, a user selects "tremble" in a first application program as an application program to be automatically configured with a key, an interface of the first application program is converted into a tremble use interface, and virtual keys "photographing", "video recording", "flip camera" and "countdown" are selected as a virtual key 1, a virtual key 2, a virtual key 3 and a virtual key 4. Mapping the touch area of the touch pad to a second application program using interface to respectively generate a virtual key A, a virtual key B, a virtual key C and a virtual key D. And the intelligent mobile phone calculates the coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key. The smart phone maps each second virtual key to each appointed first virtual key according to the coordinate offset, and completes automatic configuration of the touch control area of the touch control panel and the virtual keys of the 'tremble tone', so that a user realizes the corresponding functions on the second application program by touching the touch control area. If the touch area A realizes the photographing function of 'tremble sound', the touch area B realizes the video recording function of 'tremble sound'. In other embodiments of the invention, the iPhone7 Plus is another style of "non-Liu Haibing class" handset. When the external equipment needs to be automatically configured with the virtual keys of the 'flat elite' in the iPhone7 Plus, the virtual key coordinate information of the 'flat elite' generated by the iPhone8 is only needed to be directly converted into the virtual key coordinate information of the second application program needed by the iPhone7 Plus according to the screen size and resolution, and the efficiency of the automatic configuration of the virtual keys of the external equipment and the mobile terminal application program is improved.
Further, after the step S3f of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
s3f1: according to the operation instruction information of the user, each second virtual key is respectively moved to a designated single first virtual key;
s3f2: and storing the current second virtual key configuration, and modifying the previous second virtual key configuration into the current second virtual key configuration.
In the embodiment of the invention, when the user uses the second application program and the first application program automatically configures the physical key of the external device and the virtual key of the second application program are not in line with the habit of the user. The user manually changes the mapping relation between the physical key of the external device and the virtual key of the second application program. Specifically, the first application program moves each second virtual key to a specified single virtual key according to the operation instruction information of the user. The first application program stores the current second virtual key configuration, and modifies the previous second key configuration into the current second virtual key configuration, so that the user can set the mapping relation between the physical keys of the external device according to the operation habit of the user through the operation.
Further, after the step S3f of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
s3fA, obtaining type labels corresponding to all second application programs in the first application program;
s3fB, dividing the second application programs of the same type into the same group according to the type label;
s3fC, dividing the second application programs in each group into two types of pressed configuration and to-be-pressed configuration;
s3fD, selecting a second application program from the second application programs configured by the keys, and storing the mapping relation between the first virtual keys of the second application programs configured by the keys and the physical keys of the external equipment into the second application programs to be configured by the keys.
In the embodiment of the invention, a plurality of second application programs are listed in the selection list in the first application program, and the type labels corresponding to the second application programs are listed in the selection list. For example, the first application program includes a second application program such as "tremble sound", "fast hand", "peaceful elite" and "stimulated battlefield", and the corresponding type labels are short video, shooting game and shooting game, respectively. The first application groups "tremble" and "fast hands" into the same group, and "peace elite" and "stimulated battlefield" into another group. The first application program divides the second application programs in each group into two types of pressed configuration and to-be-pressed configuration, for example, a "tremble sound" and a "peaceful elite" are the pressed configuration types, and a "fast hand" and a "stimulated battlefield" are to-be-pressed configuration types. The first application program stores the mapping relation between the first virtual key of the 'tremble sound' and the physical key of the peripheral equipment into the 'fast hand', so that the mapping relation between the first virtual key of the 'fast hand' and the physical key of the peripheral equipment is the same as the mapping relation between the first virtual key of the 'fast hand' and the physical key of the peripheral equipment. The key configuration process of the "stimulating battlefield" is the same as the "quick hand", so that the description thereof is omitted. Through the arrangement, the second application programs are classified, so that the mapping relation between the virtual keys of the second application programs in the same type and the peripheral physical keys is the same, and the efficiency of automatic configuration of the keys of the second application programs is improved. In addition, through the setting, when the user uses the peripheral to operate the application programs of the same type, the original operation habit is not required to be changed, and the operation habit of the user is met.
Further, the first application may call the second application, and after the step S3f of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
s3fE, receiving user operation instruction information and starting a second application program in the first application program.
In embodiments of the present invention, a user may launch a second application in a first application, such as launching "tremble" or "flat elite" in the first application. Through the setting, the user does not need to return to the desktop of the mobile terminal to start the second application program, so that the operation steps of the user are simplified, and the use experience of the user is improved.
Further, after the step S3f of mapping each second virtual key to each designated first virtual key according to the coordinate offset, the method includes:
s3fa: marking the starting time of the second application program as the first time;
s3fb: judging whether the time difference between the first moment and the current moment accords with a time threshold value or not in real time;
s3fc: if not, closing the communication connection with the external equipment.
In the embodiment of the invention, the first application program marks the starting time of the second program as the first time and judges whether the time difference between the first time and the current time accords with the time threshold in real time. If not, closing the communication connection between the mobile terminal and the external equipment. For example, when the first application program starts the shooting game "peaceful elite", the time when the first application program starts the peaceful elite "is marked as the first time, and whether the time difference between the first time and the current time accords with the time threshold is judged in real time, for example, 1 hour. When the user uses the 'peaceful elite' through the peripheral for more than 1 hour, the mobile terminal breaks the communication connection with the peripheral, and the user cannot play the game through the peripheral. Through the arrangement, the use time of the peripheral is limited, the communication connection between the mobile terminal and the peripheral is disconnected after the use time is reached, the user is reminded of not using the mobile terminal any more, and the effect of preventing addiction is achieved.
Referring to fig. 4, the present invention provides a method for automatically configuring an application key of a mobile terminal, which includes:
the first execution module 1 is used for opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program;
a first obtaining module 2, configured to obtain hardware information of a mobile terminal, where the hardware information includes a model number, a version number, a screen size, and a resolution of the mobile terminal;
the mapping module 3 is used for establishing a mapping relation between the physical keys of the external equipment and the virtual keys of the second application program according to a preset rule;
and the sending module 4 is used for sending the information of the mapping relation to the external equipment.
In the embodiment of the invention, the mobile terminal comprises a smart phone, as shown in fig. 2, the external device comprises a touch pad, the touch pad is arranged on the back of the smart phone, and a user touches different touch areas to realize different functions, wherein the physical keys comprise traditional entity keys and touch keys. The mobile terminal is communicatively coupled to external devices in the form of wireless transmissions, including but not limited to bluetooth and WiFi. The smart phone opens a first application program, selects a second application program needing to automatically configure keys from the first application program, and converts an interface of the first application program into a use interface of the second application program, wherein the first application program comprises a plurality of second application programs (such as tremble sound and peace elite), and the first application program is used for configuring a touch pad touch area and virtual keys of the second application program. The first application program obtains hardware information of the mobile terminal, wherein the hardware information comprises a model number, a version number, a screen size and resolution of the mobile terminal. In the embodiment of the invention, the mapping relation between the physical key of the external device and the virtual key of the second application program is established mainly in three ways: firstly, coordinate information of each virtual key in a second application program is obtained in a calculation mode, so that a mapping relation is established between a physical key and the virtual key of the second application program; secondly, acquiring coordinate information of each virtual key in the second application program in the mobile phones with different models through a database, so that a mapping relation is established between the physical keys and the virtual keys of the second application program; and thirdly, scanning a screen picture of the second application program according to the graphic mode of each virtual key, so as to obtain the coordinate information of each virtual key in the second application program, and establishing a mapping relation between the physical key and each virtual key of the second application program. The three modes are automatically configured by the first application program of the mobile terminal, and the smart phone sends the information of the mapping relation to the external equipment, wherein the process of establishing the mapping relation between the physical key and each virtual key of the second application program is as follows: the first application program calculates, codes and converts the coordinate information of each virtual key in the second application program, and writes the coordinate information into the external equipment through Bluetooth. The external equipment receives the configuration data sent by the mobile terminal and converts the configuration data into information such as coordinates, time and area according to the agreed communication protocol format. And storing the converted configuration data into a specific array, checking and encrypting the array, and then storing the array in a specific address of the Bluetooth chip, thereby completing the mapping of the physical keys of the external equipment and the virtual keys of the second application program. Through the arrangement, the manual setting links of the physical keys of the external equipment and the application program functions on the mobile terminal are reduced, the automatic configuration of the physical keys of the external equipment and the application program functions on the mobile terminal is realized, the learning cost of using the peripheral equipment by a user is reduced, and the using steps of the external equipment are simplified. In addition, the learning cost of using the peripheral by the user is reduced, so that the popularization of the external equipment by the peripheral manufacturer is facilitated, and the economic benefit of the peripheral manufacturer is improved.
Further, the mapping module 3 includes:
the first acquisition sub-module is used for acquiring coordinate information of a virtual key of a second application program pre-stored in the database;
the first establishing sub-module is used for establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
In the embodiment of the invention, after the first application program reads the hardware information of the smart phone, the first application program is used for reading the hardware information of the smart phone according to the model of the smart phone, the screen size of the smart phone and the resolution information. According to the hardware information of the smart phone, the actual coordinates of the virtual keys which need to be adapted in the second application program (such as 'peaceful elite') are queried in the database. For example, firing coordinates are (x 1, y 1), mirror opening coordinates are (x 2, y 2), squatting coordinates are (x 3, y 3), and jumping coordinates are (x 4, y 4). The data of the database can be measured by the first application program on different model systems, and the database exists in the first application program. And establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key. For example, physical keys include L1, L2, R1, and R2. After the mapping relation is established, the coordinates of the L1 are (x 1, y 1), and the user realizes the firing function by touching the physical key L1. The coordinates of L2 are (x 2, y 2), and the user realizes the mirror opening function by touching the physical key L2. The coordinates of R1 are (x 3, y 3), and the user realizes the squatting function through R1. The coordinates of R2 are (x 4, y 4), and the user realizes the jump function by touching the physical key R2. Through the technical scheme, the virtual key automatic configuration method is simple in logic, easy to execute and beneficial to improving the efficiency of virtual key automatic configuration.
Further, the mapping module 3 further includes:
the second acquisition sub-module is used for acquiring the graphic mode of each second application virtual key;
a third obtaining sub-module, configured to obtain a screen image of the second application program;
the scanning sub-module is used for scanning and searching the position of each second application program virtual key according to the graphic mode and generating coordinate information corresponding to each second application program virtual key;
and the second building sub-module is used for building the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
In the embodiment of the present invention, shooting game and flat elite are taken as examples. The first application obtains the pattern patterns of "fire", "mirror", "squat" and "jump". The first application program obtains screen images of 'peaceful elite', searches for the positions of scanning 'fire', 'mirror open', 'squat' and 'jump' according to the graph mode corresponding to each virtual key, and generates corresponding coordinate information. And establishing the mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key. By the arrangement, the automatic configuration of the virtual keys of the second application program can be realized without pre-storing the virtual key coordinate information of the second application program in a database.
Further, the mapping module 3 further includes:
the classifying sub-module is used for classifying the mobile terminal according to the hardware information of the mobile terminal, generating classifying information, wherein the first class is contained in any one class of the classifying information;
the third establishing sub-module is used for establishing a two-dimensional coordinate axis by taking a screen of a mobile terminal in the first category as a quadrant;
the third obtaining submodule is used for respectively obtaining coordinate information of each appointed first virtual key, wherein the first virtual keys are virtual keys of the second application program;
the mapping sub-module is used for mapping each physical key of the external equipment to a second application program using interface, generating a plurality of second virtual keys and acquiring coordinate information of each second virtual key;
the calculating sub-module is used for calculating the coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key;
and the fourth building sub-module is used for mapping each second virtual key to each appointed first virtual key according to the coordinate offset.
In the embodiment of the invention, the first application program classifies the mobile terminal according to the hardware information of the mobile terminal to generate classification information. iPhone8 was classified as "non-Liu Haibing" if iPhoneX was classified as "Liu Haibing". Taking iPhone8 in "non Liu Haibing class" as an example, the smart phone opens a first application program, selects a second application program needing to automatically configure keys from the first application program, and converts an interface of the first application program into a use interface of the second application program, wherein the first application program comprises a plurality of second application programs (such as tremble and peaceful elite), and the first application program is used for configuring a touch area of the touch pad and virtual keys of the second application program. The first application program obtains hardware information of the mobile terminal, wherein the hardware information comprises a model number, a version number, a screen size and resolution of the mobile terminal. And establishing a two-dimensional coordinate axis by taking the screen of the smart phone as a quadrant. As shown in fig. 3, the first application program obtains coordinate information of each specified first virtual key, where the first virtual key is a virtual key of the second application program, that is, the virtual key 1, the virtual key 2, the virtual key 3, and the virtual key 4 in fig. 3, and the corresponding coordinates are (X1, Y1), (X2, Y2), (X3, Y3), and (X4, Y4), respectively. The first application program maps each touch area of the touch pad to a second application program using interface to generate a plurality of second virtual keys, and obtains coordinate information of each second virtual key, namely, generates a virtual key A, a virtual key B, a virtual key C and a virtual key D, and the corresponding coordinates are (XA, YA), (XB, YB), (XC, YC) and (XD, YD) respectively. The smart phone calculates the coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key, namely, calculates the coordinate offset of the virtual key 1 and the virtual key A, the virtual key 2 and the virtual key B, the virtual key 3 and the virtual key C and the coordinate offset of the virtual key 4 and the virtual key D. According to the coordinate offset, the virtual key A is mapped to the virtual key 1, the virtual key B is mapped to the virtual key 2, the virtual key C is mapped to the virtual key 3, and the virtual key D is mapped to the virtual key 4, so that the coordinates of each second virtual key and the corresponding first virtual key are kept consistent, and the automatic configuration of the touch area of the touch pad and the virtual keys of the second application program is completed. Specifically, taking a tremble APP as an example, a user selects "tremble" in a first application program as an application program to be automatically configured with a key, an interface of the first application program is converted into a tremble use interface, and virtual keys "photographing", "video recording", "flip camera" and "countdown" are selected as a virtual key 1, a virtual key 2, a virtual key 3 and a virtual key 4. Mapping the touch area of the touch pad to a second application program using interface to respectively generate a virtual key A, a virtual key B, a virtual key C and a virtual key D. And the intelligent mobile phone calculates the coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key. The smart phone maps each second virtual key to each appointed first virtual key according to the coordinate offset, and completes automatic configuration of the touch control area of the touch control panel and the virtual keys of the 'tremble tone', so that a user realizes the corresponding functions on the second application program by touching the touch control area. If the touch area A realizes the photographing function of 'tremble sound', the touch area B realizes the video recording function of 'tremble sound'. In other embodiments of the invention, the iPhone7 Plus is another style of "non-Liu Haibing class" handset. When the external equipment needs to be automatically configured with the virtual keys of the 'flat elite' in the iPhone7 Plus, the virtual key coordinate information of the 'flat elite' generated by the iPhone8 is only needed to be directly converted into the virtual key coordinate information of the second application program needed by the iPhone7 Plus according to the screen size and resolution, and the efficiency of the automatic configuration of the virtual keys of the external equipment and the mobile terminal application program is improved.
Further, the mapping module 3 further includes:
the first execution sub-module is used for respectively moving each second virtual key to a designated single first virtual key according to the operation instruction information of the user;
and the second execution sub-module is used for saving the current second virtual key configuration and modifying the previous second virtual key configuration into the current second virtual key configuration.
In the embodiment of the invention, when the user uses the second application program and the first application program automatically configures the physical key of the external device and the virtual key of the second application program are not in line with the habit of the user. The user manually changes the mapping relation between the physical key of the external device and the virtual key of the second application program. Specifically, the first application program moves each second virtual key to a specified single virtual key according to the operation instruction information of the user. The first application program stores the current second virtual key configuration, and modifies the previous second key configuration into the current second virtual key configuration, so that the user can set the mapping relation between the physical keys of the external device according to the operation habit of the user through the operation.
Further, the mapping module 3 further includes:
A fourth obtaining sub-module, configured to obtain type tags corresponding to all second application programs in the first application program;
the third execution sub-module is used for dividing the second application programs of the same type into the same group according to the type label;
the fourth execution sub-module is used for dividing the second application program in each group into two types of key configuration and key configuration to be used;
and a fifth building sub-module, configured to select a second application program from the second application programs configured by keys, and store the mapping relationship between the first virtual keys configured by keys of the second application program and the physical keys of the external device into the second application programs to be configured by keys.
In the embodiment of the invention, a plurality of second application programs are listed in the selection list in the first application program, and the type labels corresponding to the second application programs are listed in the selection list. For example, the first application program includes a second application program such as "tremble sound", "fast hand", "peaceful elite" and "stimulated battlefield", and the corresponding type labels are short video, shooting game and shooting game, respectively. The first application groups "tremble" and "fast hands" into the same group, and "peace elite" and "stimulated battlefield" into another group. The first application program divides the second application programs in each group into two types of pressed configuration and to-be-pressed configuration, for example, a "tremble sound" and a "peaceful elite" are the pressed configuration types, and a "fast hand" and a "stimulated battlefield" are to-be-pressed configuration types. The first application program stores the mapping relation between the first virtual key of the 'tremble sound' and the physical key of the peripheral equipment into the 'fast hand', so that the mapping relation between the first virtual key of the 'fast hand' and the physical key of the peripheral equipment is the same as the mapping relation between the first virtual key of the 'fast hand' and the physical key of the peripheral equipment. The key configuration process of the "stimulating battlefield" is the same as the "quick hand", so that the description thereof is omitted. Through the arrangement, the second application programs are classified, so that the mapping relation between the virtual keys of the second application programs in the same type and the peripheral physical keys is the same, and the efficiency of automatic configuration of the keys of the second application programs is improved. In addition, through the setting, when the user uses the peripheral to operate the application programs of the same type, the original operation habit is not required to be changed, and the operation habit of the user is met.
Further, the mapping module 3 further includes:
and the fourth execution sub-module is used for receiving the user operation instruction information and starting the second application program in the first application program.
In embodiments of the present invention, a user may launch a second application in a first application, such as launching "tremble" or "flat elite" in the first application. Through the setting, the user does not need to return to the desktop of the mobile terminal to start the second application program, so that the operation steps of the user are simplified, and the use experience of the user is improved.
Further, the mapping module 3 further includes:
a fifth execution sub-module, configured to mark a second application program start time as a first time;
the judging sub-module is used for judging whether the time difference between the first moment and the current moment accords with a time threshold value or not in real time;
and the sixth execution sub-module is used for closing communication connection with the external equipment if not.
In the embodiment of the invention, the first application program marks the starting time of the second program as the first time and judges whether the time difference between the first time and the current time accords with the time threshold in real time. If not, closing the communication connection between the mobile terminal and the external equipment. For example, when the first application program starts the shooting game "peaceful elite", the time when the first application program starts the peaceful elite "is marked as the first time, and whether the time difference between the first time and the current time accords with the time threshold is judged in real time, for example, 1 hour. When the user uses the 'peaceful elite' through the peripheral for more than 1 hour, the mobile terminal breaks the communication connection with the peripheral, and the user cannot play the game through the peripheral. Through the arrangement, the use time of the peripheral is limited, the communication connection between the mobile terminal and the peripheral is disconnected after the use time is reached, the user is reminded of not using the mobile terminal any more, and the effect of preventing addiction is achieved.
Referring to fig. 5, the present application further provides a storage medium 100, in which a computer program 200 is stored, which when run on a computer, causes the computer to perform the method for automatically configuring the mobile terminal application keys described in the above embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and drawings of the present invention or directly or indirectly applied to other related technical fields are included in the scope of the invention.

Claims (9)

1. A method for automatically configuring an application key of a mobile terminal, comprising:
opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program;
acquiring hardware information of the mobile terminal, wherein the hardware information comprises a mobile terminal model, a version, a screen size and resolution;
According to a preset rule, establishing a mapping relation between the physical key of the external device and the virtual key of the second application program;
transmitting the information of the mapping relation to the external equipment;
the step of establishing a mapping relationship between the physical key of the external device and the virtual key of the second application program according to a preset rule includes:
classifying the mobile terminal according to the hardware information of the mobile terminal, and generating classification information, wherein the first class is contained in any one class of the classification information;
establishing a two-dimensional coordinate axis by taking a screen of a mobile terminal in the first category as a quadrant;
respectively acquiring coordinate information of each appointed first virtual key, wherein the first virtual keys are virtual keys of the second application program;
mapping each physical key of the external device to the second application program use interface, generating a plurality of second virtual keys, and acquiring coordinate information of each second virtual key;
calculating a coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key;
and mapping each second virtual key to each appointed first virtual key according to the coordinate offset.
2. The method for automatically configuring keys of a mobile terminal application according to claim 1, wherein the step of establishing a mapping relationship between physical keys of the external device and virtual keys of the second application according to a preset rule comprises:
acquiring coordinate information of the virtual key of the second application program pre-stored in a database;
and establishing a mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
3. The method for automatically configuring keys of a mobile terminal application according to claim 1, wherein the step of establishing a mapping relationship between physical keys of the external device and virtual keys of the second application according to a preset rule comprises:
obtaining a graphic mode of each virtual key of the second application program;
acquiring a screen image of the second application program;
scanning and searching the position of each second application virtual key according to the graphic mode, and generating coordinate information corresponding to each second application virtual key;
And establishing a mapping relation between each physical key and each second application virtual key according to the coordinate information of each second application virtual key.
4. The method according to claim 1, wherein after the step of mapping each of the second virtual keys to each of the specified first virtual keys according to the coordinate offset, the method comprises:
according to the operation instruction information of the user, each second virtual key is moved to a designated single first virtual key;
and storing the current second virtual key configuration, and modifying the previous second virtual key configuration into the current second virtual key configuration.
5. The method according to claim 1, wherein after the step of mapping each of the second virtual keys to each of the specified first virtual keys according to the coordinate offset, the method comprises:
acquiring type labels corresponding to all second application programs in the first application program;
according to the type labels, the second application programs of the same type are divided into the same group;
Dividing the second application program areas in each group into two types of key configuration and key configuration to be pressed;
selecting one second application program from the second application programs configured by the keys, and storing the mapping relation between the first virtual keys of the second application programs configured by the keys and the physical keys of the external equipment into the second application programs to be configured by the keys.
6. The method according to claim 1, wherein the first application can call the second application, and the step of mapping each of the second virtual keys to each of the designated first virtual keys according to the coordinate offset includes:
and receiving user operation instruction information, and starting the second application program in the first application program.
7. The method according to claim 6, wherein after the step of mapping each of the second virtual keys to each of the specified first virtual keys according to the coordinate offset, the method further comprises:
marking the starting time of the second application program as a first time;
Judging whether the time difference between the first moment and the current moment accords with a time threshold value or not in real time;
if not, closing the communication connection with the external equipment.
8. An apparatus for automatically configuring an application key of a mobile terminal, comprising:
the first execution module is used for opening a first application program, selecting a second application program needing to automatically configure keys from the first application program, and converting an interface of the first application program into a use interface of the second application program, wherein the first application program is used for configuring the mapping relation between physical keys of external equipment and virtual keys of the second application program;
the mobile terminal comprises a first acquisition module, a second acquisition module and a first processing module, wherein the first acquisition module is used for acquiring hardware information of the mobile terminal, and the hardware information comprises a mobile terminal model, a version, a screen size and resolution;
the mapping module is used for establishing a mapping relation between the physical keys of the external equipment and the virtual keys of the second application program according to a preset rule;
the sending module is used for storing the information of the mapping relation to the external equipment;
the step of establishing the mapping relation between the physical key of the external device and the virtual key of the second application program by the mapping module according to a preset rule comprises the following steps:
Classifying the mobile terminal according to the hardware information of the mobile terminal, and generating classification information, wherein the first class is contained in any one class of the classification information;
establishing a two-dimensional coordinate axis by taking a screen of a mobile terminal in the first category as a quadrant;
respectively acquiring coordinate information of each appointed first virtual key, wherein the first virtual keys are virtual keys of the second application program;
mapping each physical key of the external device to the second application program use interface, generating a plurality of second virtual keys, and acquiring coordinate information of each second virtual key;
calculating a coordinate offset according to the coordinate information of each second virtual key and the coordinate information of each appointed first virtual key;
and mapping each second virtual key to each appointed first virtual key according to the coordinate offset.
9. A storage medium, characterized in that it is a computer-readable storage medium, on which a computer program is stored, which computer program, when executed, implements a method for automatic configuration of mobile terminal application keys according to any one of claims 1-7.
CN202010166407.7A 2020-03-11 2020-03-11 Method, device and storage medium for automatic configuration of mobile terminal application program keys Active CN111399920B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010166407.7A CN111399920B (en) 2020-03-11 2020-03-11 Method, device and storage medium for automatic configuration of mobile terminal application program keys

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010166407.7A CN111399920B (en) 2020-03-11 2020-03-11 Method, device and storage medium for automatic configuration of mobile terminal application program keys

Publications (2)

Publication Number Publication Date
CN111399920A CN111399920A (en) 2020-07-10
CN111399920B true CN111399920B (en) 2024-03-19

Family

ID=71436079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010166407.7A Active CN111399920B (en) 2020-03-11 2020-03-11 Method, device and storage medium for automatic configuration of mobile terminal application program keys

Country Status (1)

Country Link
CN (1) CN111399920B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111773674A (en) * 2020-07-15 2020-10-16 网易(杭州)网络有限公司 Instruction processing method in game and electronic equipment
CN114527903A (en) * 2020-11-05 2022-05-24 华为技术有限公司 Key mapping method, electronic equipment and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729065A (en) * 2013-12-17 2014-04-16 深圳市慧为智能科技有限公司 System and method for mapping touch operations to entity keys
WO2014180358A1 (en) * 2013-11-05 2014-11-13 中兴通讯股份有限公司 Method and apparatus for automatically adjusting position of virtual keyboard
CN107329793A (en) * 2017-07-06 2017-11-07 苏州蜗牛数字科技股份有限公司 The method of game terminal physical button is mapped based on remote nature location parameter
CN110102046A (en) * 2019-05-13 2019-08-09 原点显示(深圳)科技有限公司 The method of customized game peripheral matching game

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014180358A1 (en) * 2013-11-05 2014-11-13 中兴通讯股份有限公司 Method and apparatus for automatically adjusting position of virtual keyboard
CN103729065A (en) * 2013-12-17 2014-04-16 深圳市慧为智能科技有限公司 System and method for mapping touch operations to entity keys
CN107329793A (en) * 2017-07-06 2017-11-07 苏州蜗牛数字科技股份有限公司 The method of game terminal physical button is mapped based on remote nature location parameter
CN110102046A (en) * 2019-05-13 2019-08-09 原点显示(深圳)科技有限公司 The method of customized game peripheral matching game

Also Published As

Publication number Publication date
CN111399920A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
US10831436B2 (en) Object display system, user communication device, and object display method and program
CN111399920B (en) Method, device and storage medium for automatic configuration of mobile terminal application program keys
US20180075736A1 (en) Method and Apparatus for Configuring Wireless Remote Control Terminal by Third-party Terminal
CN105118019B (en) A kind of image processing method and user terminal
CN106254848A (en) A kind of learning method based on augmented reality and terminal
CN109325450A (en) Image processing method, device, storage medium and electronic equipment
KR20100013539A (en) User interface apparatus and method for using pattern recognition in handy terminal
KR20120107109A (en) Method and mobile terminal for processing contacts
CN106898329B (en) A kind of method, device and mobile terminal handling brightness of display screen
CN107087137B (en) Method and device for presenting video and terminal equipment
US20080256447A1 (en) Method and system for mapping a virtual human machine interface for a mobile device
US9875565B2 (en) Information processing device, information processing system, and information processing method for sharing image and drawing information to an external terminal device
CN106412291A (en) Equipment control method and mobile terminal
CN108304070A (en) The bright screen method of mobile terminal, mobile terminal and computer readable storage medium
CN106781419A (en) A kind of mobile terminal and remotely controlled method
CN107809531A (en) A kind of schedule creation method, mobile terminal
CN107967056A (en) Control method, terminal and the computer-readable recording medium of flexible screen
CN100543651C (en) Selectable data element is transferred to with being subjected to health control method, system and the equipment of terminal device
CN107450996B (en) Information prompting method, mobile terminal and computer readable storage medium
CN110222567B (en) Image processing method and device
CN107885450B (en) Realize the method and mobile terminal of mouse action
JP2008501169A (en) Data transmission system by tactile control
US10270963B2 (en) Angle switching method and apparatus for image captured in electronic terminal
WO2020238496A1 (en) Icon management method and terminal device
CN109189313A (en) Mobile device and its control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant