A method for mapping handle buttons and electronic device

By automatically determining the functions and locations of interface elements on electronic devices and associating the handle keys with the corresponding positions of the game keys, the problem of users needing to manually map the handle keys and game keys is solved, achieving a simpler operation process and a better user experience.

CN115515690BActive Publication Date: 2025-04-04HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080100683.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-05-11
Filing Date
2020-12-29
Publication Date
2025-04-04
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

In the prior art, users need to manually complete the mapping of handle keys and game keys, resulting in complex operations and poor user experience.

Method used

By displaying the interface on an electronic device, the functions and positions of interface elements are determined, and the handle keys and the corresponding positions of the game keys are automatically associated, so that the handle keys and game keys are automatically mapped.

Benefits of technology

It reduces the user's operation complexity, improves the intelligence of electronic devices, and improves the user's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515690B_ABST
    Figure CN115515690B_ABST
Patent Text Reader

Abstract

The present application provides a method for mapping handle buttons and an electronic device, the method comprising: the electronic device displays a first interface through a display screen, the first interface including a first interface element; the electronic device determines a first function and a first position corresponding to the first interface element, the first position being the position of the first interface element on the first interface; the electronic device associates a first handle button with the first position; in response to obtaining first information sent by the handle, the electronic device performs a response operation to the first function at the first position, the first information being used to indicate that the handle detects that the user has pressed the first handle button. The embodiments of the present application help reduce the complexity of user operations, improve the intelligence of electronic devices, and enhance user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Russian patent application number RU2020115614 filed with the Russian Federal Patent Office on May 11, 2020, application name “A method and electronic device for mapping handle buttons”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] The present application relates to the field of terminals, and more specifically, to a method for mapping handle buttons and an electronic device. Background Art

[0003] Mobile games refer to game software that runs on mobile phones, referred to as "mobile games". With the continuous enhancement of mobile phone hardware capabilities and the rapid development of network communication technology, playing large-scale mobile games in real time through the Internet has become a part of consumers' daily lives, and online game platforms have also become a new social media.

[0004] While the content and operation methods of mobile games are becoming more and more similar to those of personal computer (PC) games, the virtual key operation experience of mobile games is quite different from that of keyboard, mouse or controller operation. Holding a screen and using virtual keys for a long time in the game is not comfortable and can no longer meet the needs of players. The controller is an auxiliary peripheral that effectively improves the player's control experience.

[0005] Currently, users need to manually complete the mapping of controller buttons and game buttons, which may cause problems such as complicated operations and lead to a poor user experience. Summary of the invention

[0006] The present application provides a method for mapping handle buttons and an electronic device, which helps to reduce the complexity of user operations, improve the intelligence of the electronic device, and enhance the user experience.

[0007] In a first aspect, the technical solution provides a method for mapping handle buttons, which is applied to an electronic device with a display screen, the electronic device is connected to the handle by wired or wireless means, the handle includes one or more handle buttons, and the method includes: the electronic device displays a first interface through the display screen, the first interface includes a first interface element; the electronic device determines a first function and a first position corresponding to the first interface element, the first position being the position of the first interface element on the first interface; the electronic device associates a first handle button with the first position, the one or more handle buttons including the first handle button; in response to obtaining first information sent by the handle, the electronic device performs a response operation to the first function at the first position, the first information being used to indicate that the handle detects that a user has pressed the first handle button.

[0008] In the embodiment of the present application, the electronic device can accurately complete the mapping of the corresponding positions of the handle buttons and the game buttons by determining the functions and positions of the interface elements. This helps to avoid tedious operations for the user, improves the intelligence of the electronic device, and thus improves the user's gaming experience.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the electronic device stores a first mapping relationship between the first function and a set of feature points corresponding to the first function, and determining the first function corresponding to the first interface element includes: extracting feature points of the first interface element; and determining that the first interface element corresponds to the first function when a degree of matching between the feature points of the first interface element and the set of feature points corresponding to the first function is greater than or equal to a preset value.

[0010] In an embodiment of the present application, a mapping relationship between a first function and a set of feature points corresponding to the first function may be pre-saved in the electronic device, and the electronic device may match the feature points of the interface element with the set of feature points. When the degree of matching is greater than or equal to a preset value, the electronic device may determine that the first interface element corresponds to the first function, thereby associating the first handle button with the first position. Such a mapping relationship can ensure that the electronic device accurately identifies the function corresponding to the interface element, thereby realizing the mapping of the handle button to the game button. This helps to avoid cumbersome operations for the user, improves the intelligence of the electronic device, and thus improves the user's gaming experience.

[0011] In some possible implementations, the electronic device includes multiple interface elements, the electronic device can determine multiple functions corresponding to the multiple interface elements, and the electronic device can randomly associate multiple handle buttons with the positions of the multiple functions.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: in response to the user's operation of moving the first interface element from the first position to the second position on the first interface, automatically associating the first handle button with the second position; in response to obtaining the first information, performing a response operation to the first function at the second position.

[0013] In the embodiment of the present application, when the electronic device detects that the position of the interface element has changed, the electronic device can automatically update the association between the handle button and the position of the interface element, thereby ensuring that after the user clicks the handle button, the mobile phone can automatically perform a response operation. This avoids the user manually adjusting the association between the handle button and the position of the game function, improves the intelligence of the electronic device, and helps to enhance the user's gaming experience.

[0014] In combination with the first aspect, in certain implementations of the first aspect, a second mapping relationship between the first handle button and the first function is stored in the electronic device; and associating the first handle button with the first position includes: associating the first handle button with the first position according to the second mapping relationship.

[0015] In the embodiment of the present application, the mobile phone can save the mapping relationship between the handle buttons and the game buttons that the user is accustomed to in advance. For example, taking mainstream handles such as Xbox and PS4 as examples, it can be concluded through the actual experience of a large number of users that the X key in the PS4 game controller is the easiest key to control. For FPS games, the game function "shooting" is the most commonly used game button by users, so the mobile phone can save the mapping relationship between the X key and the game function "shooting". This can avoid the tedious operation of users repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, improve the intelligence of electronic devices, and thus help improve user experience.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: in response to a user operation of associating a second handle button with the first position, automatically updating the second mapping relationship to a mapping relationship between the second handle button and the first function, the one or more handle buttons including the second handle button.

[0017] In the embodiment of the present application, when the mobile phone detects that the user has updated the mapping relationship between the handle buttons and the game buttons saved last time, the mobile phone can save the handle buttons and the game buttons adjusted by the user, so that when the user plays the game next time, the electronic device directly associates the handle buttons with the positions of the interface elements according to the adjusted mapping relationship. This helps to avoid the tedious operation of the user adjusting the mapping relationship between the handle buttons and the game buttons multiple times, improves the intelligence of the electronic device, and thus helps to improve the user experience.

[0018] In a second aspect, the technical solution provides a device for mapping handle buttons, which is included in an electronic device, and has the function of implementing the electronic device behavior in the above-mentioned first aspect and the possible implementation of the above-mentioned first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions.

[0019] In a third aspect, the technical solution provides an electronic device, comprising: a display screen; one or more processors; a memory; one or more applications; and one or more computer programs. Among them, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the method for mapping handle buttons in any possible implementation of the first aspect.

[0020] In a fourth aspect, the present technical solution provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method for mapping handle buttons in any possible implementation of the first aspect.

[0021] In a fifth aspect, the present technical solution provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method for mapping handle buttons in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0023] Figure 2 It is a set of GUIs provided by the embodiments of the present application.

[0024] Figure 3 This is another set of GUIs provided by an embodiment of the present application.

[0025] Figure 4 This is another set of GUIs provided by an embodiment of the present application.

[0026] Figure 5 This is another set of GUIs provided by an embodiment of the present application.

[0027] Figure 6 This is another set of GUIs provided by an embodiment of the present application.

[0028] Figure 7 It is a schematic diagram of the acquisition and learning phase provided in an embodiment of the present application.

[0029] Figure 8 It is a schematic flowchart of the method for mapping handle buttons provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0031] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0032] The following describes an electronic device designed by the embodiments of the present application, a user interface for such an electronic device, and an embodiment for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to carrying Or a portable electronic device with other operating systems. The portable electronic device may also be other portable electronic devices, such as a laptop computer, etc. It should also be understood that in some other embodiments, the electronic device may not be a portable electronic device, but a desktop computer.

[0033] For example, Figure 11 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0034] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0035] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0036] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0037] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0038] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0039] The I2S interface may be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses.

[0040] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0041] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.

[0042] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .

[0043] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal.

[0044] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.

[0045] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0046] The charging management module 140 is used to receive charging input from a charger.

[0047] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .

[0048] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0049] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0050] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .

[0051] The modulation and demodulation processor may include a modulator and a demodulator, wherein the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal, and the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0052] The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0053] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0054] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0055] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0056] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0057] The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture still images or videos. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple coding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0058] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0059] In an embodiment of the present application, the electronic device can use the NPU to identify the functions corresponding to the interface elements on the interface displayed on the display screen.

[0060] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0061] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0062] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0063] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.

[0064] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .

[0065] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0066] The magnetic sensor 180D includes a Hall sensor.

[0067] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).

[0068] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0069] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.

[0070] The ambient light sensor 180L is used to sense the brightness of ambient light.

[0071] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0072] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

[0073] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0074] Bone conduction sensor 180M can obtain vibration signals.

[0075] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0076] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0077] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0078] Figure 2 It is a set of graphical user interfaces (GUI) provided in the embodiments of the present application.

[0079] See also Figure 2 The GUI shown in (a) is a Bluetooth setting interface. The setting interface can display the device name "Huawei P40" and paired devices, where the paired devices can be Bluetooth devices that the mobile phone has previously connected to. When the mobile phone detects that the user turns on the Bluetooth function 201, the mobile phone can search for surrounding Bluetooth devices. The mobile phone can display the searched Bluetooth devices in the "Available Devices" list.

[0080] See also Figure 2 The GUI shown in (b) of FIG. 1 is a Bluetooth setting interface. The available devices in the setting interface can display the Bluetooth devices searched by the mobile phone, including "game controller" 202. When the mobile phone detects that the user clicks "game controller" 202, the mobile phone can establish a Bluetooth connection with the game controller.

[0081] It should be understood that the above is only a connection between the mobile phone and the handle via Bluetooth, and the mobile phone and the handle can also be connected via Wi-Fi or other near-field communication methods; or, the mobile phone and the handle can also be connected via a wired method.

[0082] As shown in the figure, the game controller includes multiple handle buttons, wherein the multiple handle buttons include direction keys 203, Y key 204, X key 205, A key 206, B key 207, LB key 208 and RB key 209. It should be understood that the game controller buttons in the embodiment of the present application are only exemplary, and the handle buttons on the game controller may also include more or fewer buttons than those on the illustrated game controller, and the embodiment of the present application is not limited to this.

[0083] See also Figure 2 The GUI shown in (c) in the figure is a battle interface of a game application. When the mobile phone detects that the user starts the battle interface of a game application, a key setting reminder box 216 can be automatically popped up on the battle interface. The key setting reminder box 216 includes icon information of the game controller keys. When the mobile phone detects that the user clicks the automatic mapping key position, it can display the following Figure 2 GUI shown in (d).

[0084] See also Figure 2The GUI shown in (d) in the figure is another battle interface of the game application. When the mobile phone detects that the user clicks the operation of the automatically mapped key position, the mobile phone can determine the game function corresponding to the interface element based on the interface element on the battle interface, thereby determining that a certain handle button corresponds to the game function corresponding to the interface element. The mobile phone can determine the position information of the interface element on the battle interface. Finally, the mobile phone can establish a mapping relationship between the handle button and the position information, thereby completing the mapping of the game button and the game button.

[0085] like Figure 2 As shown in (d), the mobile phone can automatically move the icon of the LB key to the interface element 210 (corresponding to the game function "start aiming") on the battle interface; the mobile phone can automatically move the icon of the direction key to the interface element 211 (corresponding to the game function "up, down, left, and right movement"); the mobile phone can automatically move the icon of the A key to the interface element 212 (corresponding to the game function "jump"); the mobile phone can automatically move the icon of the Y key to the interface element 213 (corresponding to the game function "change ammunition"); the mobile phone can automatically move the icon of the X key to the interface element 214 (corresponding to the game function "shooting"). Thus, the mobile phone automatically completes the mapping of the handle buttons and the game buttons.

[0086] It should be understood that the interface elements described in the above embodiments may refer to image information corresponding to game functions in the game interface. When the mobile phone determines the mapping relationship between the handle buttons and the game functions, it may first analyze the feature points of each interface element and determine the game function corresponding to the interface element through the feature points.

[0087] It should also be understood that when the mobile phone moves the icons of each handle button to the interface elements on the battle interface, the corresponding relationship between each handle button and the game function can be preset in the mobile phone in advance. For example, Table 1 shows a corresponding relationship between the game functions corresponding to the handle buttons and the game buttons stored in the mobile phone.

[0088] Table 1

[0089] Controller buttons Game Features LB key Turn on aiming RB key Switch weapons X Key shooting Y Key Change ammunition A jump B Key Prostrate … …

[0090] In one embodiment, the mobile phone may not preset the correspondence between the handle buttons and the game functions shown in Table 1 above. For example, after determining the game functions corresponding to the various interface elements on the battle interface, the mobile phone may randomly correspond the handle buttons to the game functions corresponding to the various interface elements. If the user uses the correspondence between the handle buttons and the game functions randomly mapped by the mobile phone to experience the game, the mobile phone can generate the mapping relationship between the handle buttons and the game functions, and the next time the mobile phone detects that the game is opened again, it can be mapped according to the last mapping relationship; or, the mobile phone may not generate the mapping relationship between the handle buttons and the game functions, and the next time the mobile phone detects that the game is opened again, it continues to randomly correspond the handle buttons to the game functions corresponding to the various interface elements. Further, for some special handle buttons (for example, the direction key 203), the mobile phone can save the correspondence between the direction keys on the handle and the up, down, left, and right movements on the battle interface in advance; and for the X key, Y key, A key or B key, etc., the correspondence between them and the specific game functions may not be saved.

[0091] Exemplarily, Table 2 shows various interface elements on the battle interface and the position information corresponding to each interface element.

[0092] Table 2

[0093] Interface Elements Location Information Interface elements 210 Position 1 Interface Elements 211 Position 2 Interface elements 212 Location 3 Interface elements 213 Position 4 Interface elements 214 Location 5 … …

[0094] In an embodiment of the present application, when the mobile phone determines the game function corresponding to a certain handle button, it can first extract the feature points of each interface element on the battle interface, and then match the extracted feature points of each interface element with the feature point set corresponding to each game function saved by the mobile phone.

[0095] For example, after extracting the interface element 214, the mobile phone may first determine the feature points of the interface element 214. If the matching degree between the feature points of the interface element 214 and the image feature point set corresponding to the game function "shooting" saved by the mobile phone is greater than or equal to a preset value, the mobile phone may determine that the game function corresponding to the interface element 214 is "shooting". Thus, the mobile phone establishes a mapping relationship between the X key and the position 5 corresponding to the interface element 214.

[0096] In one embodiment, the position corresponding to the interface element may be the absolute coordinate position of the interface element on the display screen at the current mobile phone size.

[0097] When the phone detects that the user clicks on the application and saves the operation, it can display the following Figure 2 GUI shown in (e) in .

[0098] See also Figure 2In the GUI shown in (e), when the mobile phone detects that the user clicks on the application and saves the operation, the mapping of the handle button and the game button can be completed. After the mapping of the handle button and the game button is completed, the icon of the corresponding handle button can be reduced and does not cover the game button, so that the user can view the corresponding game button while playing the game, and can also see the corresponding relationship between the handle button and the game button.

[0099] When the game controller detects that the user clicks a button on the controller, the game controller can send the corresponding operation information to the mobile phone. The mobile phone can respond at the position corresponding to the corresponding interface element according to the operation information, thereby realizing the gaming experience using the game controller.

[0100] In the embodiment of the present application, through the mapping of the handle buttons and specific game functions, and the mapping relationship between the game functions and the position information of the interface elements where the game functions are located, the electronic device can accurately complete the mapping of the handle buttons and the game buttons. This helps to avoid tedious operations for users, improves the intelligence of the electronic device, and thus improves the user's gaming experience.

[0101] Figure 3 This is another set of GUIs provided by an embodiment of the present application.

[0102] See also Figure 3 The GUI shown in (a) is an adjustment interface for game buttons. When the mobile phone detects that the user adjusts the position of the interface element corresponding to the game button, the mobile phone can adjust the interface element 212 to a new position (e.g., position 6) according to the direction of the user's finger sliding.

[0103] See also Figure 3 The GUI shown in (b) is the display interface after the game button is adjusted. The interface element 212 is adjusted to position 6 by the user. At this time, after determining that the interface element is adjusted to position 6, the mobile phone can update the mapping relationship between the A key in the handle button and the updated position information of the interface element 212.

[0104] Exemplarily, the mobile phone may first update the interface elements and the position information corresponding to the interface elements shown in Table 2. The updated interface elements and the position information corresponding to the interface elements are shown in Table 3.

[0105] Table 3

[0106] Interface Elements Location Information Interface elements 210 Position 1 Interface Elements 211 Position 2 Interface elements 212 Position 6 Interface elements 213 Position 4 Interface elements 214 Location 5 … …

[0107] Thus, the mobile phone can update the mapping relationship between the A key and position 3 to the mapping relationship between the A key and position 6.

[0108] In an embodiment of the present application, when the electronic device detects that the user has updated the position of a game button, the electronic device can automatically update the mapping relationship between the handle button and the position information of the interface element corresponding to the game button, thereby avoiding manual adjustment by the user, avoiding tedious operations by the user, improving the intelligence of the electronic device, and thus improving the user's gaming experience.

[0109] Figure 4 This is another set of GUIs provided by an embodiment of the present application.

[0110] See also Figure 4 The GUI shown in (a) is the battle interface of the game application. When the user wants to adjust the mapping relationship between a certain handle button and a game button during the game, the user can call up the button setting reminder box. When the mobile phone detects that the user clicks the clear key operation, it can display the following Figure 4 GUI shown in (b) in .

[0111] See also Figure 4 The GUI shown in (b) is an interface for manually setting key mapping. The user can move the icon of the handle button to the interface element corresponding to the game button according to his own wishes. Figure 4 In (b), when the mobile phone detects that the user moves the RB key to the interface element 210 and no user movement operation is detected within a preset time, the mobile phone can complete the mapping of the RB key to the location of the interface element 210. Similarly, the user can manually complete the mapping of the direction key, LB key, A key, and B key to the location of the corresponding interface element.

[0112] In one embodiment, when the mobile phone detects that the user manually adjusts the mapping relationship between the handle buttons and the game buttons, the mobile phone can also update the mapping relationship between the handle buttons and the game functions shown in Table 1. For example, Table 4 shows the updated mapping relationship between the handle buttons and the game functions.

[0113] Table 4

[0114] Controller buttons Game Features LB key jump RB key Turn on aiming X Key Switch weapons Y Key Prostrate A Change ammunition B Key shooting … …

[0115] It should be understood that the mobile phone can update the mapping relationship between the handle buttons and the game functions that it has saved when detecting the mapping relationship between the handle buttons and the game buttons updated by the user; or, it can not update it. In this case, the next time the user experiences the game, the mobile phone will still map the game buttons and the handle buttons according to the mapping relationship shown in Table 1.

[0116] In an embodiment of the present application, when a user wishes to adjust the mapping relationship between the handle buttons and the game buttons automatically set by the electronic device, the electronic device can display a button setting reminder box, and the user can manually adjust the mapping relationship between the handle buttons and the game buttons, which helps to improve the user's gaming experience.

[0117] Figure 5 This is another set of GUIs provided by an embodiment of the present application.

[0118] like Figure 5 The GUI shown in (a) is a battle interface of another game application. When the mobile phone detects that the user clicks the automatic mapping key position, the following may be displayed: Figure 5 GUI shown in (b) in .

[0119] like Figure 5 The interface elements corresponding to the game buttons on the battle interface shown in (a) and Figure 2 The shapes of the interface elements corresponding to the game buttons on the battle interface shown in (c) are similar, so the mapping process of the handle buttons and game buttons on the mobile phone can refer to the above Figure 2 Medium (c) to Figure 2 The process shown in (d) in .

[0120] See also Figure 5 As shown in (b), the mobile phone can automatically move the icon of the LB key to interface element 501 on the battle interface (the corresponding game function is "start aiming"); the mobile phone can automatically move the icon of the B key to interface element 502 on the battle interface (the corresponding game function is "switch weapons"); the mobile phone can automatically move the icon of the X key to interface element 503 (the corresponding game function is "shooting"); the mobile phone can automatically move the icon of the A key to interface element 504 (the corresponding game function is "jumping"); the mobile phone can automatically move the icon of the Y key to interface element 505 (the corresponding game function is "changing ammunition"); the mobile phone can automatically move the icon of the direction key to interface element 506 (the corresponding game function is "moving up, down, left, and right"); thereby the mobile phone automatically completes the mapping of the handle buttons and the game buttons.

[0121] See also Figure 5 As shown in (c) in the figure, when the mobile phone detects that the user clicks on the application and saves the operation, the mapping of the handle button and the game button can be completed. After the mapping of the handle button and the game button is completed, the icon of the corresponding handle button can be reduced and does not cover the game button, so that the user can view the corresponding game button when experiencing the game, and can also see the corresponding relationship between the handle button and the game button.

[0122] Above through Figures 2 to 5 Introduced several groups of GUIs, Figures 2 to 5 The GUI shown is mainly based on the first person shooting game (FPS). The interface elements corresponding to the game buttons in this type of game are basically similar, for example Figure 2 The game button "shooting" shown in (c) is the same as Figure 5 The graphic shape of the game button "shooting" shown in (a) is basically similar, but the direction of the graphic is slightly different. Figure 2 The game button "jump" shown in (c) is the same as Figure 5 The graphic shape of the game button "Jump" shown in (a) is basically similar, except that the direction of the graphic is slightly deviated. For such games, the mobile phone can only save the feature point information of the interface elements corresponding to each game function in some FPS games, thereby forming a feature point set corresponding to the game function. Since the graphic shapes of the interface elements corresponding to the game buttons in FPS games are basically similar, when the mobile phone starts a new FPS game, the mapping of the handle buttons and the game buttons can also be accurately completed.

[0123] For other types of games, since the interface elements of different games vary greatly, a feature point set of a specific game function may be saved in the electronic device for a specific game. For example, for multiplayer online battle arena games (MOBA), the game interface of each MOBA game varies greatly, so for each MOBA game, a feature point set corresponding to the corresponding game function may be saved in advance in the mobile phone.

[0124] Figure 6 Another set of GUIs provided by the implementation of the present application is shown.

[0125] like Figure 6 The GUI shown in (a) is a battle interface of another game application. The battle interface includes interface element 601 corresponding to the game function "Skill 1", interface element 602 corresponding to the game function "Skill 2", interface element 603 corresponding to the game function "Skill 3", interface element 604 corresponding to the game function "Skill 4", interface element 605 corresponding to the game function "Skill 5", and interface element 606 corresponding to the game function "Move up, down, left, and right". When the mobile phone detects that the user clicks the automatic mapping key operation, the mobile phone can display the following Figure 6 GUI shown in (b) in .

[0126] See also Figure 6In the GUI shown in (b), the mobile phone can automatically move the icon of the LB key to the interface element 601 on the battle interface; the mobile phone can automatically move the icon of the RB key to the interface element 602 on the battle interface; the mobile phone can automatically move the icon of the X key to the interface element 603; the mobile phone can automatically move the icon of the Y key to the interface element 604; the mobile phone can automatically move the icon of the A key to the interface element 605; the mobile phone can automatically move the icon of the direction key to the interface element 606. Thus, the mobile phone automatically completes the mapping of the handle buttons and the game buttons.

[0127] With the above Figure 2 The mapping process shown differs in that Figure 2 In the mapping process from (c) to (d), the mobile phone can save the feature points extracted from the images corresponding to the game function in multiple games (for example, Game 1 and Game 2) in the feature point set corresponding to the game function. For example, Table 5 shows the correspondence between the game function corresponding to the game button and the feature point set saved by the mobile phone.

[0128] Table 5

[0129]

[0130] Alternatively, the mobile phone can also randomly map the handle buttons to the corresponding game functions, so the mobile phone only needs to save the corresponding relationship between the game functions and the feature point sets corresponding to the game functions. For example, Table 6 shows a mapping relationship between a game function and a feature point set saved by the mobile phone.

[0131] Table 6

[0132]

[0133] And for Figure 6 In the mapping process shown in (a) to (b), the mobile phone can only save the feature points extracted from the image corresponding to a game function in a specific game (for example, Game 3) for the feature point set corresponding to the game function. For example, Table 7 shows the correspondence between the game function corresponding to the handle buttons and the game buttons and the feature point set saved by another mobile phone.

[0134] Table 7

[0135]

[0136] In this way, for this type of specific game, when the mobile phone saves the correspondence between the controller buttons and the game functions in advance, if the mobile phone detects that the game is started, it can automatically complete the matching of the controller buttons and the game buttons. By providing users with the functional experience of automatic mapping, it helps to reduce the user's operation complexity and improve the user's gaming experience.

[0137] Combination of the above Figures 2 to 6 The process of automatically completing the mapping of the handle buttons and the game buttons by the mobile phone in the embodiment of the present application is introduced. The following describes the process of obtaining the mapping relationship between the handle buttons, the game functions and the feature point set. This process can also be called the acquisition learning stage. Figure 7 Figure 2 shows a schematic diagram of the acquisition and learning phase. Figure 7 As shown, the acquisition and learning phase may include the following processes:

[0138] S701, obtaining image information of game buttons at default positions from the battle interface.

[0139] In one embodiment, the image information of the default position includes but is not limited to one or more of the following:

[0140] (1) Image information collected at the default position when the user does not click the game button;

[0141] (2) Image information collected at different time points during the game at the default position when the user does not click the game button;

[0142] (3) Image information collected at different time points during the game when the user clicks the game button at the default position.

[0143] It should be understood that for some games, since the image information (or interface elements) corresponding to the game buttons are semi-transparent, the image information collected at different time points in the game will be different.

[0144] It should also be understood that for some games, there may be differences between the image information when the user clicks the game button and the image information when the user does not click the game button. For example, when the user clicks the game button, the game button will have a game effect of switching to a global cool down (CD), and the image information collected at this time will be different from the image information when the user does not click the game button.

[0145] S702, custom-adjust the game button to another position on the battle interface, and obtain image information of the game button at the adjusted position.

[0146] In one embodiment, the image information at the adjusted position includes but is not limited to one or more of the following:

[0147] (1) Image information collected at the adjusted position when the user does not click the game button;

[0148] (2) image information collected at different time points during the game at the adjusted position when the user does not click the game button;

[0149] (3) Image information collected at different time points during the game when the user clicks the game button at the adjusted position.

[0150] It should be understood that for some games, since the image information (or interface elements) corresponding to the game buttons are semi-transparent, the image information collected at different positions of the battle interface will be different.

[0151] It should be understood that the above S701-S702 can be implemented by the mobile phone based on its own processor. For example, the mobile phone can customize the game button to other positions of the battle interface and obtain the image information of the game button at the adjusted position. Alternatively, S701-S702 can also be implemented by the game developer on the PC or other devices. The process of custom adjustment in S702 can be completed automatically by the device or manually by the game developer. After the game developer has collected enough sets of image feature points corresponding to game functions, the mapping relationship between the above game functions and the sets of image feature points corresponding to the game functions (or the mapping relationship between the handle buttons, the game functions and the sets of image feature points corresponding to the game functions) can be uploaded to the cloud server. After the mobile phone obtains the game from the cloud server, the mapping relationship between the game function and the set of image feature points corresponding to the game function (or the mapping relationship between the handle buttons, the game function and the sets of image feature points corresponding to the game function) can be obtained together.

[0152] S703, repeat S701 to S702, and after collecting enough image data, complete the image data collection of the game button.

[0153] S704, performing artificial intelligence (AI) training on the image data collected in S701 to S703, so as to obtain a mapping relationship as shown in Table 4.

[0154] It should be understood that S703 and S704 may also be executed by a PC or a server.

[0155] In one embodiment, the process of AI training image data can refer to the process of collecting facial feature points in advance when performing face recognition in the prior art. The main purpose of collecting facial feature points is to accurately identify the user when performing face recognition. Similarly, the main purpose of collecting the feature point set corresponding to the game button (or game function) is to accurately identify the game function corresponding to the interface element when performing interface element recognition on the battle interface.

[0156] In one embodiment, for a certain type of game (e.g., FPS game), since the interface elements corresponding to the game buttons are basically similar, S701-S703 can be performed for different games, and the feature point sets corresponding to certain game buttons in different games are put together, as shown in Table 5. Then, the electronic device can automatically map when opening a game for which data has been collected or a game for which data has not been collected, thereby reducing the user's cumbersome operations and improving the user's gaming experience.

[0157] In one embodiment, for a specific game (e.g., a MOBA game), since the interface elements corresponding to game buttons in different MOBA games are quite different, S701-S703 can be performed for the specific game to collect a set of feature points corresponding to a game button in the specific game, as shown in Table 7. Then, when the electronic device starts the game, it can automatically map, thereby reducing the user's cumbersome operations and improving the user's gaming experience.

[0158] Figure 8 A schematic flow chart of a method 800 for mapping handle buttons provided in an embodiment of the present application is shown. Figure 8 As shown, the method 800 is applied to an electronic device with a display screen, the electronic device is connected to a handle in a wired or wireless manner, and the method 800 includes:

[0159] S801, the electronic device displays a first interface through a display screen, and the first interface includes a first interface element.

[0160] For example, Figure 2 As shown in (b) , the mobile phone displays a battle interface through a display screen, and the battle interface includes interface elements 210 - 214 .

[0161] For example, Figure 6 As shown in (a) in FIG. 8 , the mobile phone displays another battle interface through the display screen, and the battle interface includes interface elements 601 to 605 .

[0162] S802, the electronic device determines a first function and a first position corresponding to the first interface element, where the first position is a position of the first interface element on the first interface.

[0163] Optionally, the electronic device may store a first mapping relationship between the first function and a set of feature points corresponding to the first function, and the electronic device determines the first function corresponding to the first interface element, including:

[0164] The electronic device extracts a feature point of a first interface element;

[0165] The electronic device determines that the first interface element corresponds to the first function when the matching degree between the first interface element and the feature point set corresponding to the first function is greater than or equal to a preset value.

[0166] For example, the mapping relationship may be as shown in Table 6. Figure 2 For the interface element 210 shown in (c) in the figure, the electronic device can extract the feature points of the interface element 210; the electronic device can match the feature points of the interface element 210 with all feature point sets according to the mapping relationship shown in Table 6. For example, if the electronic device determines that the matching degree between the feature points of the interface element 210 and the feature point set corresponding to the game function "open aiming" is greater than or equal to a preset value, then the electronic device can determine that the interface element 210 corresponds to the "open aiming" function.

[0167] It should be understood that the electronic device can determine that the first interface element corresponds to the first function by the mapping relationship between the saved game function and the feature point set; it can also determine that the first interface element corresponds to the first function by other means. For example, the electronic device downloads a game app from a cloud server, and the game app may include the correspondence between the interface elements and the game functions. After extracting a certain interface element, the electronic device can directly determine the game function corresponding to the interface element. For another example, the electronic device can also determine the corresponding game function by extracting the graphic shape on the interface element. For example, if the graphic shape contained in the interface element 210 is "+", the electronic device can determine that the interface element 210 corresponds to the "turn on aiming" function through the mapping relationship between the game function and the graphic shape. In the embodiment of the present application, there is no specific limitation on how the electronic device determines the corresponding first function through the first interface element.

[0168] The electronic device may also determine the position of the first interface element. For example, the electronic device may associate the first interface element with the absolute position coordinate information of the first interface element on the display screen, such as obtaining the corresponding relationship shown in Table 3.

[0169] S803, the electronic device associates a first handle button with a first position, the one or more handle buttons including the first handle button.

[0170] For example, Figure 2As shown in (d), when the mobile phone detects that the user clicks the "automatically map key positions" operation, the handle buttons can be mapped to the locations of the interface elements, such as mapping the LB key to the location of the interface element 210; and mapping the A key to the location of the interface element 212.

[0171] Optionally, the electronic device may randomly map other handle buttons except the direction button 203 to the positions of various interface elements.

[0172] In the embodiment of the present application, the electronic device may not randomly map the direction key 203. After determining that the interface element 211 corresponds to the game function "up, down, left, and right", the electronic device may map the handle button 203 to the location of the interface element 211.

[0173] Optionally, the electronic device may store a second mapping relationship between the first game button and the first function, and the electronic device associates the first handle button with the first position, including:

[0174] The electronic device associates the first handle button with the position according to the second mapping relationship.

[0175] Exemplarily, the electronic device may store the second mapping relationship as shown in Table 1.

[0176] After the electronic device determines the first function corresponding to the first interface element, the first handle button can be associated with the first position according to the mapping relationship shown in Table 1. For example, when the electronic device determines that the interface element 210 corresponds to the game function "turn on aiming", and the game function "turn on aiming" corresponds to position 1 on the battle interface, the electronic device can associate the LB key with position 1 according to the mapping relationship shown in Table 1.

[0177] In the embodiment of the present application, the mobile phone can save the mapping relationship between the handle buttons and the game buttons that the user is accustomed to in advance. For example, taking mainstream handles such as Xbox and PS4 as examples, it can be concluded through the actual experience of a large number of users that the X key in the PS4 game controller is the easiest key to control. For FPS games, the game function "shooting" is the most commonly used game button by users, so the mobile phone can save the mapping relationship between the X key and the game function "shooting". This can avoid the tedious operation of users repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, improve the intelligence of electronic devices, and thus help improve user experience.

[0178] Optionally, the method 800 further includes:

[0179] The electronic device automatically updates the second mapping relationship to a mapping relationship between the second handle button and the first function in response to a user's operation of associating the second handle button with the first function, and the one or more handle buttons include the second handle button.

[0180] For example, Figure 4 As shown in (c), after the user clears the mapping relationship between the handle buttons and the game buttons, the user can adjust the mapping relationship between the handle buttons and the game buttons as desired. For example, when the mobile phone detects that the user moves the RB key to position 1 where the interface element 210 is located (the corresponding game function is "turn on aiming"), the RB key can be associated with position 1 where the interface element 210 is located. Since the mapping relationship between the LB key and the game function "turn on aiming" was previously saved in the mobile phone, the mobile phone can update the mapping relationship to the mapping relationship between the RB key and the game function "turn on aiming".

[0181] For example, Figure 4 As shown in (c) in FIG. 1 , after the mobile phone detects that the user clicks the “update and save” operation, the mapping relationship shown in Table 1 can be updated to the mapping relationship shown in Table 4.

[0182] In the embodiment of the present application, when the mobile phone detects that the user has updated the mapping relationship between the handle buttons and the game buttons saved last time, the mobile phone can save the handle buttons and the game buttons adjusted by the user, so that when the user plays the game next time, the electronic device directly associates the handle buttons with the positions of the interface elements according to the adjusted mapping relationship. This helps to avoid the tedious operation of the user adjusting the mapping relationship between the handle buttons and the game buttons multiple times, improves the intelligence of the electronic device, and thus helps to improve the user experience.

[0183] S804, the electronic device performs a response operation to the first function at the first position in response to obtaining first information sent by the handle, wherein the first information is used to indicate that the handle detects that the user presses the first handle button.

[0184] After the electronic device completes associating the first handle button with the first position, the electronic device receives the first information sent by the handle button, and the electronic device can perform a response operation to the first function at the first position. For example, the user clicks the LB button on the handle, and after the handle detects that the user has clicked the LB button, it can send information i1 to the mobile phone, and the first information indicates that the user has clicked the LB button. In response to receiving the information i1, the mobile phone performs a response operation at position 1 to complete the "start aiming" function.

[0185] Optionally, the method 800 further includes:

[0186] The electronic device automatically associates the first handle button with the second position in response to a user's operation of moving the first interface element from the first position to a second position on the first interface;

[0187] In response to acquiring the first information, the electronic device performs a response operation to the first function at the second position.

[0188] For example, Figure 2 As shown in (e) in FIG. 1 , when the handle detects that the user clicks the A key, the handle can send information i2 to the mobile phone, and the information i2 is used to indicate that the handle detects that the user clicks the A key. Then, in response to receiving the information i2, the mobile phone performs a response operation at position 1 to complete the "jump" function.

[0189] like Figure 3 As shown in (a), the mobile phone detects that the user moves the interface element 212 from position 1 on the display screen to position 6. In response to the operation for moving the interface element 212 from position 1 on the display screen to position 6, the mobile phone can associate the A key with position 6. When the handle detects that the user clicks the A key, the handle can send information i3 to the mobile phone, and the information i3 is used to indicate that the handle detects that the user clicks the A key. Then, in response to receiving the information i3, the mobile phone performs a response operation at position 6 to complete the "jump" function.

[0190] In the embodiment of the present application, when the electronic device detects that the position of the interface element has changed, the electronic device can automatically update the association between the handle button and the position of the interface element, thereby ensuring that after the user clicks the handle button, the mobile phone can automatically perform a response operation. This helps to avoid the user manually adjusting the association between the handle button and the position of the game function, improves the intelligence of the electronic device, and helps to enhance the user's gaming experience.

[0191] In one embodiment, the electronic device may store a third mapping relationship between the first handle button, the first function, and the set of feature points corresponding to the first function. The process of S802-S803 in the method 800 may be:

[0192] The electronic device extracts feature points of the first interface element;

[0193] The electronic device determines, according to the third mapping relationship, that the first interface element corresponds to the first function when the matching degree between the feature point of the first interface element and the set of feature points corresponding to the first function is greater than or equal to a preset value;

[0194] The first electronic device associates the first handle button with the first position according to the third mapping relationship.

[0195] It should be understood that the first mapping relationship and the second mapping relationship in the above embodiment can constitute the third mapping relationship. The third mapping relationship can be shown in Table 5 or Table 7. For example, Figure 2 As shown in (d) in FIG. 5 , the mobile phone can extract the feature points of the interface element 210. After determining that the matching degree between the feature points of the interface element 210 and the feature point set corresponding to “open aiming” in Table 5 is greater than or equal to a preset value, the mobile phone determines that the interface element 210 corresponds to the game function “open aiming”. The mobile phone can associate the LB key with the position 1 where the interface element 210 is located according to the mapping relationship shown in Table 5.

[0196] The present application also provides an electronic device, which may include: Figure 1 The processor 110 and the memory shown store one or more computer programs, wherein the one or more computer programs include instructions, which, when executed by the one or more processors, enable the electronic device to execute steps S801, S802, S803 and S804 in method 800.

[0197] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0198] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0199] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0202] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0203] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for mapping handle buttons, the method being applied to an electronic device having a display screen, the electronic device being connected to a handle via a wired or wireless method, the handle comprising one or more handle buttons, characterized in that: The method comprises: Displaying a first interface through the display screen, wherein the first interface includes a first interface element; Determine a first function and a first position corresponding to the first interface element, where the first position is a position of the first interface element on the first interface; associating a first handle button with the first position, the one or more handle buttons including the first handle button; In response to acquiring first information sent by the handle, performing a response operation to the first function at the first position, the first information being used to indicate that the handle detects that a user presses the first handle button; The electronic device stores a first mapping relationship between the first function and a set of feature points corresponding to the first function, and the determining the first function corresponding to the first interface element includes: Extracting feature points of the first interface element; When the degree of matching between the feature points of the first interface element and the feature point set corresponding to the first function is greater than or equal to a preset value, it is determined that the first interface element corresponds to the first function.

2. The method according to claim 1, characterized in that The method further comprises: In response to a user's operation of moving the first interface element from the first position to a second position on the first interface, automatically associating the first handle button with the second position; In response to acquiring the first information, a response operation to the first function is performed at the second position.

3. The method according to claim 1 or 2, characterized in that The electronic device stores a second mapping relationship between the first handle button and the first function; The associating the first handle button with the first position comprises: According to the second mapping relationship, the first handle button is associated with the first position.

4. The method according to claim 3, characterized in that The method further comprises: In response to a user's operation of associating a second handle button with the first position, the second mapping relationship is automatically updated to a mapping relationship between the second handle button and the first function, and the one or more handle buttons include the second handle button.

5. An electronic device, wherein the electronic device is connected to a handle via a wired or wireless method, and the handle comprises one or more handle buttons, wherein: The electronic device comprises: Display screen; one or more processors; one or more memories; The one or more memories store one or more computer programs, and the one or more computer programs include instructions, and when the instructions are executed by the one or more processors, the electronic device performs: Displaying a first interface through the display screen, wherein the first interface includes a first interface element; Determine a first function and a first position corresponding to the first interface element, where the first position is a position of the first interface element on the first interface; associating a first handle button with the first position, the one or more handle buttons including the first handle button; In response to acquiring first information sent by the handle, performing a response operation to the first function at the first position, the first information being used to indicate that the handle detects that a user presses the first handle button; The electronic device stores a mapping relationship between the first function and a set of feature points corresponding to the first function, and when the instruction is executed by the one or more processors, the electronic device executes: Extracting feature points of the first interface element; When the degree of matching between the feature points of the first interface element and the feature point set corresponding to the first function is greater than or equal to a preset value, it is determined that the first interface element corresponds to the first function.

6. The electronic device according to claim 5, characterized in that: When the instructions are executed by the one or more processors, the electronic device is caused to execute: In response to a user's operation of moving the first interface element from the first position to a second position on the first interface, automatically associating the first handle button with the second position; In response to acquiring the first information, a response operation to the first function is performed at the second position.

7. The electronic device according to claim 5 or 6, characterized in that: The electronic device stores a second mapping relationship between the first handle button and the first function, and when the instruction is executed by the one or more processors, the electronic device executes: According to the second mapping relationship, the first handle button is associated with the first position.

8. The electronic device according to claim 7, characterized in that: When the instructions are executed by the one or more processors, the electronic device is caused to execute: In response to a user's operation of associating a second handle button with the first position, the second mapping relationship is automatically updated to a mapping relationship between the second handle button and the first function, and the one or more handle buttons include the second handle button.

9. A computer-readable storage medium, characterized in that: It comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method for joystick button mapping as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Handle control method, device and system applied in intelligent terminal

    CN105477854A

  • Display control method and electronic device

    CN110898424A