WO2021227525A1 - Handle button mapping method and electronic device - Google Patents

Handle button mapping method and electronic device Download PDF

Info

Publication number
WO2021227525A1
WO2021227525A1 PCT/CN2020/140834 CN2020140834W WO2021227525A1 WO 2021227525 A1 WO2021227525 A1 WO 2021227525A1 CN 2020140834 W CN2020140834 W CN 2020140834W WO 2021227525 A1 WO2021227525 A1 WO 2021227525A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
handle
function
game
interface
Prior art date
Application number
PCT/CN2020/140834
Other languages
French (fr)
Chinese (zh)
Inventor
周晓鹏
代仁军
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080100683.1A priority Critical patent/CN115515690A/en
Publication of WO2021227525A1 publication Critical patent/WO2021227525A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types

Definitions

  • the present application relates to the field of terminals, and more specifically, to a method and electronic device for key mapping of a handle.
  • Mobile games refer to game software running 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, real-time playing of large-scale mobile games through the Internet has become a part of consumers' daily lives, and online game platforms have also become a brand-new social media.
  • the virtual key operation experience of mobile games has a large gap with the experience of keyboard, mouse or handle operation. Holding a screen and using virtual keys for a long time in the game lacks comfort, which can no longer meet the needs of players.
  • the handle is an auxiliary peripheral that effectively enhances the player's manipulation experience.
  • the present application provides a method and electronic device for mapping handle buttons, which helps to reduce the complexity of the user's operation, improve the degree of intelligence of the electronic device, and enhance the user experience.
  • the present technical solution provides a method for mapping handle buttons.
  • the method is applied to an electronic device with a display screen.
  • the electronic device and the handle are connected in a wired or wireless manner.
  • the handle includes one or more handle buttons.
  • 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 The position is the position of the first interface element on the first interface; the electronic device associates the first handle button with the first position, and the one or more handle buttons include the first handle button; in response to obtaining The first information sent by the handle, the electronic device performs a response operation to the first function at the first position, and the first information is used to indicate that the handle detects that the user presses the first handle button.
  • 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 the user's cumbersome operations, enhance the intelligence of the electronic device, and thereby enhance the user's gaming experience.
  • the electronic device stores a first mapping relationship between the first function and the feature point set corresponding to the first function, and the first interface element corresponding to the first interface element is determined
  • the first function includes: extracting the feature points of the first interface element; determining the first interface element when the matching degree 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
  • the interface elements correspond to the first function.
  • the electronic device may pre-store the mapping relationship between the first function and the feature point set corresponding to the first function, and the electronic device may match the feature point of the interface element with the feature point set.
  • the electronic device may determine that the first interface element corresponds to the first function, and thereby associate the first handle button with the first position.
  • Such a mapping relationship can ensure that the electronic device accurately recognizes the functions corresponding to the interface elements, thereby realizing the mapping between the handle buttons and the game buttons. This helps to avoid the user's cumbersome operations, enhance the intelligence of the electronic device, and thereby enhance the user's gaming experience.
  • 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 multiple functions. Associated with the location.
  • the method further 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 The first handle button is associated with the second position; in response to acquiring the first information, a response operation to the first function is performed at the second position.
  • the electronic device when the electronic device detects that the position of the interface element has changed, the electronic device can automatically update the association relationship between the handle button and the position of the interface element, thereby ensuring that the mobile phone can automatically perform a response operation after the user clicks the handle button . It avoids the user from manually adjusting the association relationship between the handle button and the location of the game function, improves the intelligence of the electronic device, and helps to improve the user's game experience.
  • a second mapping relationship between the first handle button and the first function is stored in the electronic device; the first handle button is associated with the first position , Including: associating the first handle button with the first position according to the second mapping relationship.
  • the mobile phone can save the mapping relationship between the handle buttons and the game buttons that the user is accustomed to in advance.
  • the X button in the PS4 game controller is the most easily controlled button.
  • the game function "shooting" is the most commonly used game button by users, so the phone can save the mapping relationship between the X button and the game function "shooting". In this way, the user can avoid the cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, which improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
  • the method further includes: in response to the user's operation of associating the second handle button with the first position, automatically updating the second mapping relationship to the first position The mapping relationship between the two handle buttons and the first function, and the one or more handle buttons include the second handle button.
  • the mobile phone 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, which is convenient for the user to experience the game next time At this 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 user's cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, and improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
  • the present technical solution provides a device for mapping handle buttons, which is included in an electronic device, and the device has the function of realizing the behavior of the electronic device in the foregoing first aspect and the possible implementation of the foregoing first aspect.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above-mentioned functions.
  • the technical solution provides an electronic device, including: a display screen; one or more processors; a memory; one or more application programs; and one or more computer programs.
  • one or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device is caused to execute the handle button mapping method in any possible implementation of the first aspect described above.
  • the present technical solution provides a computer storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the handle button mapping method in any one of the possible implementations of the first aspect above .
  • the present technical solution provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute the method for mapping the handle buttons in any one of the possible implementations of the first aspect described above.
  • Fig. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Figure 2 is a set of GUIs provided by an embodiment of the present application.
  • Figure 3 is another set of GUIs provided by an embodiment of the present application.
  • Figure 4 is another set of GUIs provided by an embodiment of the present application.
  • Figure 5 is another set of GUIs provided by an embodiment of the present application.
  • Fig. 6 is another set of GUIs provided by an embodiment of the present application.
  • Fig. 7 is a schematic diagram of the acquisition and learning stage provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a method for mapping keys on a handle provided in an embodiment of the present application.
  • references described in this specification to "one embodiment” or “some embodiments”, etc. mean that one or more embodiments of the present application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the sentences “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless it is specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
  • the electronic device may also include other functions such as portable electronic devices, such as mobile phones, tablet computers, wearable electronic devices with wireless communication functions (such as smart watches), and so on.
  • portable electronic devices include, but are not limited to, carrying Or portable electronic devices with other operating systems.
  • the aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • FIG. 1 shows a schematic structural diagram of an 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, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • 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 sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter/receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • Wi-Fi wireless fidelity
  • BT bluetooth
  • global navigation satellites System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from 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 digital image signals, it can also process other digital signals.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the electronic device can use the NPU to identify the function corresponding to the interface element on the interface displayed on the display screen.
  • the external memory interface 120 may 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 realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • 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 magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • UFS universal flash storage
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • LED light emitting diode
  • photodiode a light detector
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • 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 photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations applied on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • 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.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • Fig. 2 is a set of graphical user interfaces (GUI) provided by an embodiment of the present application.
  • GUI graphical user interfaces
  • the setting interface can display the device name "Huawei P40" and the paired device.
  • the paired device can be a Bluetooth device that the phone has previously connected to.
  • the mobile phone detects the user's operation of turning 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.
  • the Bluetooth devices searched by the mobile phone can be displayed among the available devices in the setting interface, including "gamepad” 202.
  • the mobile phone detects that the user clicks the "game controller” 202, the mobile phone can establish a Bluetooth connection with the game controller.
  • the game controller as shown in the figure includes a plurality of handle buttons, and the plurality of handle buttons include direction keys 203, Y keys 204, X keys 205, A keys 206, B keys 207, LB keys 208, and RB keys 209.
  • the game controller buttons in the embodiments of the present application are merely illustrative, and the controller buttons on the game controller may also include more or fewer buttons than those on the game controller shown in the figure, which is not limited in the embodiments of the present application.
  • the button setting reminder box 216 may automatically pop up on the battle interface.
  • the button setting reminder box 216 includes icon information of the gamepad buttons.
  • the mobile phone can determine the game function corresponding to the interface element according to the interface element on the battle interface, so as to determine that a certain handle button corresponds to the game function corresponding to the interface element.
  • the mobile phone can determine the location information of the interface element on the battle interface.
  • the mobile phone can establish the mapping relationship between the handle buttons and the position information, thereby completing the mapping of the game buttons and the game buttons.
  • the mobile phone can automatically move the icon of the LB button to the interface element 210 on the battle interface (the corresponding game function is "open aiming”); the mobile phone can automatically move the icon of the arrow keys Go to interface element 211 (the corresponding game function is "move up, down, left and right”); the mobile phone can automatically move the icon of the A key to the interface element 212 (the corresponding game function is "jump”); the mobile phone can automatically move the Y key The icon is moved to the interface element 213 (the corresponding game function is "change ammo”); the mobile phone can automatically move the icon of the X key to the interface element 214 (the corresponding game function is "shooting").
  • the mobile phone automatically completes the mapping between the handle buttons and the game buttons.
  • the interface elements described in the above embodiments may refer to the image information corresponding to the game functions of the game interface.
  • 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 then use the feature points. To determine the game function corresponding to the interface element.
  • Handle button Game features LB key Open aiming RB key Switch weapon X key shooting Y key Change ammunition A key jump B key Creeping ... ...
  • the mobile phone may not preset the corresponding relationship between the handle buttons and the game functions shown in Table 1 above. For example, after the mobile phone determines the game function corresponding to each interface element on the battle interface, it can randomly correspond the handle buttons to the game function corresponding to each interface element. If the user uses the corresponding relationship 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. The next time the mobile phone detects that the game is opened again, it can follow the previous mapping The relationship is mapped; or the mobile phone may not generate the mapping relationship between the handle buttons and the game functions.
  • the mobile phone detects that the game is opened again, it continues to randomly correspond the handle buttons to the game functions corresponding to each interface element. Further, for some special handle buttons (for example, the arrow keys 203), the mobile phone can save the correspondence between the arrow keys on the handle and the up, down, left, and right movement on the battle interface in advance; and for the X, Y, A, or B keys The keys, etc. may not save their corresponding relationships with specific game functions.
  • Table 2 shows the location information of each interface element and each interface element on the battle interface.
  • Interface elements location information Interface Elements 210 Position 1 Interface Elements 211 Position 2 Interface elements 212 Position 3 Interface elements 213 Position 4 Interface Elements 214 Position 5 ... ...
  • the mobile phone when it 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 according to the extracted feature points of each interface element and each game function saved by the mobile phone The corresponding feature point set is matched.
  • 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 the preset value, the mobile phone can 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.
  • the position corresponding to the interface element may be the absolute coordinate position of the interface element on the display screen under the current mobile phone size.
  • the mobile phone When the mobile phone detects that the user clicks on the application and saves the operation, it can display the GUI as shown in (e) in FIG. 2.
  • the mapping of the handle buttons and the game buttons can be completed. After completing the mapping between the handle buttons and the game buttons, the icons of the corresponding handle buttons can be reduced without blocking the game buttons. This ensures that the user can view the corresponding game buttons during the game experience, and also see the handle buttons and Correspondence of game buttons.
  • the game handle When the game handle detects the user's operation of clicking a certain handle button, the game handle can send the corresponding operation information to the mobile phone.
  • the mobile phone can generate a response at the position corresponding to the corresponding interface element according to the operation information. So as to realize the game experience using the game handle.
  • the electronic device can accurately complete the mapping of the handle buttons and the game buttons through the mapping between the handle buttons and the specific game functions, and the mapping relationship between the game functions and the location information of the interface elements where the game functions are located. This helps to avoid the user's cumbersome operations, enhance the intelligence of the electronic device, and thereby enhance the user's gaming experience.
  • Figure 3 is another set of GUIs provided by an embodiment of the present application.
  • 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 (for example, position 6) according to the sliding direction of the user's finger.
  • a new position for example, position 6
  • FIG. 3 is a display interface after adjusting the game buttons.
  • the interface element 212 is adjusted to position 6 by the user.
  • 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.
  • the mobile phone may first update the interface elements shown in Table 2 and the location information corresponding to the interface elements.
  • the updated interface elements and the corresponding location information of the interface elements are shown in Table 3.
  • 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 Position 5 ... ...
  • the mobile phone can update the mapping relationship between the A key and the position 3 to the mapping relationship between the A key and the position 6.
  • the electronic device when the electronic device detects that the user updates the position of a certain 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.
  • the user's cumbersome operation is avoided, the intelligence of the electronic device is improved, and the user's gaming experience is improved.
  • Figure 4 is another set of GUIs provided by an embodiment of the present application.
  • FIG. 4 is a battle interface of a game application.
  • the user wants to adjust the mapping relationship between a certain handle button and the game button while playing the game, the user can call up the button setting reminder box.
  • the mobile phone detects that the user has clicked the clear key position, it can display the GUI shown in Figure 4 (b).
  • FIG 4 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 their own wishes.
  • the mobile phone detects that the user has moved the RB key to the interface element 210 and the user's movement operation is not detected within the preset time, the mobile phone can complete the position where the RB key and the interface element 210 are located. Mapping.
  • the user can manually complete the mapping of the location of the arrow keys, LB key, A key, and B key and the corresponding interface elements.
  • the mobile phone when the mobile phone detects that the user has manually adjusted the mapping relationship between the handle buttons and the game buttons, the mobile phone may also update the mapping relationship between the handle buttons and the game functions shown in Table 1.
  • Table 4 shows the mapping relationship between the handle buttons and the game functions after the update.
  • Handle button Game features LB key jump RB key Open aiming X key Switch weapon Y key Creeping A key Change ammunition B key shooting ... ...
  • the mobile phone can update the mapping relationship between the controller buttons and the game functions saved by the user after detecting the mapping relationship between the user's updated handle buttons and the game buttons; or, the update may not be performed, then the next time the user plays the game During the experience, the mobile phone will still map the game buttons and the handle buttons according to the mapping relationship shown in Table 1.
  • the electronic device when the user wants to adjust the mapping relationship between the handle buttons and the game buttons automatically set by the electronic device, the electronic device can display the button setting reminder box, and the user can manually adjust the mapping relationship between the handle buttons and the game buttons, which is helpful To improve the user’s gaming experience.
  • Figure 5 is another set of GUIs provided by an embodiment of the present application.
  • the GUI shown in (a) in FIG. 5 is a battle interface of another game application.
  • the mobile phone detects that the user has clicked the automatic mapping key position, it can display the GUI as shown in Figure 5 (b).
  • buttons and game buttons can refer to the processes shown in Figure 2 (c) to Figure 2 (d).
  • the mobile phone can automatically move the icon of the LB button to the interface element 501 on the battle interface (the corresponding game function is "open aiming”); the mobile phone can automatically move the icon of the B button Go to interface element 502 (corresponding to the game function "switch weapon") on the battle interface; 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 is moved to the interface element 504 (the corresponding game function is "jump”); the mobile phone can automatically move the icon of the Y key to the interface element 505 (the corresponding game function is "change ammo”); the mobile phone can automatically Move the icon of the arrow key to the interface element 506 (the corresponding game function is "move up, down, left, and right”); thus, the mobile phone automatically completes the mapping between the handle buttons and the game buttons.
  • the mobile phone can automatically move the icon of the LB button Go to interface element 502 (corresponding to the game function "s
  • GUIs shown in FIGS. 2 to 5 are mainly introduced by first-person shooting games (FPS).
  • the interface elements corresponding to the game buttons in this type of game are basically similar.
  • the graphical shape of the game button “shoot” button shown in Figure 2 (c) and the game button “shoot” button shown in Figure 5 (a) Basically similar, except that the direction of the graphics is somewhat deviated.
  • the game button "jump” button shown in (c) of FIG. 2 has a similar graphic shape to the game button "jump” button shown in (a) of FIG. 5, except that the graphic direction is slightly different.
  • Figure 6 shows another set of GUIs provided by the implementation of this application.
  • the GUI shown in (a) in FIG. 6 is a battle interface of another game application.
  • the battle interface includes the interface element 601 corresponding to the game function "Skill 1", the interface element 602 corresponding to the game function "Skill 2", the interface element 603 corresponding to the game function "Skill 3", and the interface corresponding to the game function "Skill 4" Element 604, an interface element 605 corresponding to the game function "Skill 5", and an interface element 606 corresponding to the game function "Move up, down, left, and right”.
  • 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 A key to the interface element 605; The icon of the arrow key moves to the interface element 606.
  • the mobile phone automatically completes the mapping between the handle buttons and the game buttons.
  • the mobile phone can save multiple games (for example, The feature points extracted from the image corresponding to the game function under Game 1 and Game 2).
  • Table 5 shows the corresponding relationship between the handle buttons, the game functions corresponding to the game buttons, and the feature point set saved in a mobile phone.
  • the mobile phone can also randomly map the handle buttons to the corresponding game function, so the mobile phone only needs to save the corresponding relationship between the game function and the feature point set corresponding to the game function.
  • Table 6 shows the mapping relationship between a game function stored in the mobile phone and the feature point set.
  • the mobile phone can only save the image extraction corresponding to the game function under a specific game (for example, game 3) for the feature point set corresponding to a game function Characteristic points.
  • a specific game for example, game 3
  • Table 7 shows the corresponding relationship between the handle buttons, the game functions corresponding to the game buttons, and the feature point set saved in another mobile phone.
  • the mobile phone saves the corresponding relationship between the handle 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 handle buttons and the game buttons.
  • the mobile phone By providing users with a functional experience of automatic mapping, it helps to reduce the complexity of the user's operation and enhance the user's gaming experience.
  • FIG. 7 shows a schematic diagram of the acquisition and learning phase. As shown in Figure 7, the acquisition and learning stage may include the following processes:
  • the image information of the default location includes but is not limited to one or more of the following:
  • the image information when the user clicks the game button and the image information when the user does not click the game button may also be different.
  • the game button will have a global cool down (CD) game effect, then the image information collected at this time and the image information when the user did not click the game button will exist difference.
  • CD global cool down
  • S702 Customize the game buttons to other positions of the battle interface, and obtain image information of the game buttons at the adjusted positions.
  • the image information at the adjusted position includes but is not limited to one or more of the following:
  • S701-S702 may be implemented by the mobile phone based on its own processor.
  • the mobile phone can customize the game buttons to other positions of the battle interface, and then obtain the image information of the game buttons at the adjusted positions.
  • S701-S702 can also be implemented by game developers on the PC or other devices.
  • the process of custom adjustment in S702 can be done automatically by the device or manually by the game developer.
  • the mapping relationship between the above-mentioned game function and the image feature point set corresponding to the game function (or the image corresponding to the handle button, the game function and the game function
  • the mapping relationship of the feature point set is uploaded to the cloud server.
  • the mobile phone obtains the game from the cloud server, it can also obtain the mapping relationship between the game function and the image feature point set corresponding to the game function (or the mapping relationship between the handle buttons, the image feature point set corresponding to the game function and the game function).
  • S703 Repeat S701 to S702, and after collecting enough image data, complete the image data collection of the game button.
  • S704 Perform artificial intelligence (AI) training on the image data collected in S701 to S703, so as to obtain the mapping relationship shown in Table 4.
  • AI artificial intelligence
  • S703 and S704 may also be executed by a PC or a server.
  • the process of performing AI training on image data may refer to the process of collecting feature points of the face in advance when performing face recognition in the prior art.
  • the main purpose of collecting the feature points of the face is to accurately identify the user when performing face recognition.
  • the collection of the feature point set corresponding to the game buttons (or game functions) is mainly for the identification of interface elements on the battle interface At the same time, the game function corresponding to the interface element can be accurately identified.
  • the electronic device can perform automatic mapping no matter when opening a game that has collected data or a game that has not collected data, which can reduce the user's cumbersome operations and improve the user's gaming experience.
  • S701-S703 can be performed for the specific game, and certain games under the specific game can be collected.
  • the set of feature points corresponding to each game button is shown in Table 7. Then the electronic device can perform automatic mapping when starting this game, which can reduce the user's cumbersome operation and improve the user's game experience.
  • FIG. 8 shows a schematic flowchart of a method 800 for key mapping of a handle provided by an embodiment of the present application. As shown in FIG. 8, the method 800 is applied to an electronic device with a display screen. The electronic device and the handle are wired or For wireless connection, the method 800 includes:
  • the electronic device displays a first interface through a display screen, and the first interface includes a first interface element.
  • the mobile phone displays a battle interface through the display screen, and the battle interface includes interface elements 210 to 214.
  • the mobile phone displays another battle interface through the display screen, and the battle interface includes interface elements 601 to 605.
  • the electronic device determines a first function and a first position corresponding to the first interface element, where the first position is the position of the first interface element on the first interface.
  • the electronic device may store the first mapping relationship between the first function and the feature point set corresponding to the first function, and then the electronic device determines the first function corresponding to the first interface element, including:
  • the electronic device extracts the feature points of the first interface element
  • the electronic device determines that the first interface element corresponds to the first function when the matching degree of the feature point set corresponding to the first interface element and the first function is greater than or equal to a preset value.
  • the mapping relationship may be as shown in Table 6.
  • the electronic device may extract the characteristic points of the interface element 210; the electronic device may be based on The mapping relationship matches the feature points of the interface element 210 with all feature point sets. 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 "turn on aiming" is greater than or equal to the preset value, the electronic device can determine that the interface element 210 corresponds to the "turn on aiming" function .
  • the electronic device may determine that the first interface element corresponds to the first function through the saved mapping relationship between the game function and the feature point set; it may also determine that the first interface element corresponds to the first function in other ways. For example, an electronic device downloads a certain game App from a cloud server, and the game App may include the corresponding relationship between interface elements and 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, the graphic shape contained in the interface element 210 is "+", and the electronic device can use the mapping relationship between the game function and the graphic shape. It is determined that the interface element 210 corresponds to the "open aiming" function. In the embodiments of the present application, the manner in which the electronic device determines its corresponding first function through the first interface element is not specifically limited.
  • 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, as shown in Table 3 is obtained.
  • S803 The electronic device associates the first handle button with the first position, and the one or more handle buttons include the first handle button.
  • the mobile phone when it detects that the user has clicked the "automatic key mapping” operation, it can map the handle button to the location of the interface element, such as mapping the LB key to the interface The location of the element 210; the A key is mapped to the location of the interface element 212.
  • the electronic device may randomly map other handle buttons except for the direction key 203 to the location where each interface element is located.
  • the electronic device may not perform random mapping on the direction key 203. After determining that the interface element 211 corresponds to the game function "move up and down, left and right", the electronic device can map the handle button 203 to the location where the interface element 211 is located.
  • the electronic device may save a second mapping relationship between the first game button and the first function, and the electronic device associating the first handle button with the first position includes:
  • the electronic device associates the first handle button with the position according to the second mapping relationship.
  • the electronic device may save the second mapping relationship shown in Table 1.
  • the electronic device After the electronic device determines the first function corresponding to the first interface element, it can associate the first handle button 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 "enable aiming", and the game function "enable 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. Associated.
  • the mobile phone can save the mapping relationship between the handle buttons and the game buttons that the user is accustomed to in advance.
  • the X button in the PS4 game controller is the most easily controlled button.
  • the game function "shooting" is the most commonly used game button by users, so the phone can save the mapping relationship between the X button and the game function "shooting". In this way, the user can avoid the cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, which improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
  • the method 800 further includes:
  • the electronic device In response to the user's operation of associating the second handle button with the first function, the electronic device automatically updates the second mapping relationship to the mapping relationship between the second handle button and the first function, and the one or more handle buttons include the The second handle button.
  • the user can adjust the mapping relationship between the handle buttons and the game buttons that he wants. For example, when the mobile phone detects that the user has moved 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 the position 1 where the interface element 210 is located. Since the previous mobile phone saved the mapping relationship between the LB key and the game function "turn on aiming", the mobile phone can update the mapping relationship to the mapping relationship between the RB key and the game function "turn on aiming” at this time.
  • the mobile phone can update the mapping relationship shown in Table 1 to the mapping relationship shown in Table 4 after detecting that the user has clicked the "update and save" operation.
  • the mobile phone 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, which is convenient for the user to experience the game next time At this 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 user's cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, and improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
  • S804 In response to acquiring the first information sent by the handle, the electronic device performs a response operation to the first function at the first position, where the first information is used to indicate that the handle detects that the user presses the first handle button.
  • the electronic device 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 the information i 1 to the mobile phone. The first information indicates that the user has clicked the LB button. In response to receiving the information i 1 , the mobile phone performs a response operation at position 1 to complete the "turn on aiming" function.
  • the method 800 further includes:
  • the electronic device automatically associates the first handle button with the second position 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;
  • the electronic device In response to acquiring the first information, the electronic device performs a response operation to the first function at the second location.
  • the handle when the handle detects that the user has clicked the A button, the handle can send information i 2 to the mobile phone, and this information i 2 is used to indicate that the handle detects that the user has clicked A key. Then, in response to receiving the information i 2 , the mobile phone performs a response operation at position 1 to complete the "jumping" function.
  • the mobile phone detects that the user has moved the interface element 212 from position 1 to position 6 on the display screen.
  • the mobile phone may associate the A key with the position 6 in response to the operation for moving the interface element 212 from the position 1 to the position 6 on the display screen.
  • the handle detects that the user clicks the A button, the handle can send information i 3 to the mobile phone, and the information i 3 is used to indicate that the handle detects that the user has clicked the A button. Then, in response to receiving the information i 3 , the mobile phone performs a response operation at position 6 to complete the "jumping" function.
  • the electronic device when the electronic device detects that the position of the interface element has changed, the electronic device can automatically update the association relationship between the handle button and the position of the interface element, thereby ensuring that the mobile phone can automatically perform a response operation after the user clicks the handle button .
  • This helps to avoid the user from manually adjusting the association relationship between the handle button and the location of the game function, improves the degree of intelligence of the electronic device, and helps to improve the user's game experience.
  • the electronic device may save the third mapping relationship of the first handle button, the first function, and the feature point set corresponding to the first function.
  • the process of S802-S803 in the method 800 may be:
  • the electronic device extracts the feature points of the first interface element
  • the electronic device determines 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 feature point set corresponding to the first function is greater than or equal to a preset value according to the third mapping relationship;
  • the first electronic device associates the first handle button with the first position according to the third mapping relationship.
  • the first mapping relationship and the second mapping relationship in the foregoing embodiment may constitute the third mapping relationship.
  • the third mapping relationship may be as shown in Table 5 or Table 7.
  • the mobile phone can extract the feature points of the interface element 210, and the mobile phone determines the matching degree between the feature points of the interface element 210 and the feature point set corresponding to “on aiming” in Table 5 After the value is greater than or equal to the preset value, it is determined 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.
  • An embodiment of the present application also provides an electronic device, which may include a processor 110 and a memory as shown in FIG. 1, where 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 one or more processors, the electronic device is caused to execute the steps S801, S802, S803, and S804 in the method 800.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present application provides a handle button mapping method and an electronic device. Said method comprises: an electronic device displaying a first interface by means of a display screen, the first interface comprising a first interface element; the electronic device determining 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 associating a first handle button with the first position; and in response to the acquisition of first information sent by the handle, the electronic device executing, at the first position, a response operation for the first function, the first information being used to indicate that the handle detects that a user presses the first handle button. The embodiments of the present application help to reduce the operation complexity of a user, improve the degree of intelligence of an electronic device, and improve the user experience.

Description

一种手柄按键映射的方法和电子设备Method for mapping handle buttons and electronic equipment
本申请要求于2020年5月11日提交俄罗斯联邦专利局、申请号为RU2020115614、申请名称为“一种手柄按键映射的方法和电子设备”的俄罗斯专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Russian patent application filed with the Russian Federal Patent Office, the application number is RU2020115614, and the application name is "a method and electronic device for mapping handle buttons" on May 11, 2020, the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及终端领域,并且更具体地,涉及一种手柄按键映射的方法和电子设备。The present application relates to the field of terminals, and more specifically, to a method and electronic device for key mapping of a handle.
背景技术Background technique
手机游戏是指运行在手机上的游戏软件,简称“手游”。随着手机硬件能力的不断增强,以及网络通信技术飞速发展,实时通过网络玩大型的手游已经成为消费者日常生活的一部分,网络游戏平台也成为了一种崭新的社交媒体。Mobile games refer to game software running 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, real-time playing of large-scale mobile games through the Internet has become a part of consumers' daily lives, and online game platforms have also become a brand-new social media.
在手机游戏内容和操作方式越来越与个人计算机(personal computer,PC)游戏接近的同时,手游的虚拟按键操作体验却与键盘、鼠标或者手柄操作的体验具有较大差距。在游戏中长时间握持一块屏幕和使用虚拟键,缺乏舒适性,这已经不能满足玩家的需求。而手柄则是有效提升玩家操纵体验的辅助外设。While the content and operation methods of mobile games are getting closer to those of personal computer (PC) games, the virtual key operation experience of mobile games has a large gap with the experience of keyboard, mouse or handle operation. Holding a screen and using virtual keys for a long time in the game lacks comfort, which can no longer meet the needs of players. The handle is an auxiliary peripheral that effectively enhances the player's manipulation experience.
目前,用户需要手动完成手柄按键和游戏按键的映射,这样可能带来操作复杂等问题,导致用户体验不好。Currently, the user needs to manually complete the mapping between the handle buttons and the game buttons, which may cause problems such as complicated operations and lead to a bad user experience.
发明内容Summary of the invention
本申请提供一种手柄按键映射的方法和电子设备,有助于降低用户的操作复杂度,提高电子设备的智能化程度,提升用户体验。The present application provides a method and electronic device for mapping handle buttons, which helps to reduce the complexity of the user's operation, improve the degree of intelligence of the electronic device, and enhance the user experience.
第一方面,本技术方案提供了一种手柄按键映射的方法,该方法应用于具有显示屏的电子设备,该电子设备与手柄通过有线或者无线的方式连接,该手柄包括一个或者多个手柄按键,该方法包括:该电子设备通过该显示屏显示第一界面,该第一界面上包括第一界面元素;该电子设备确定该第一界面元素对应的第一功能以及第一位置,该第一位置为该第一界面元素在该第一界面上的位置;该电子设备将第一手柄按键与该第一位置相关联,该一个或者多个手柄按键包括该第一手柄按键;响应于获取到该手柄发送的第一信息,该电子设备在该第一位置执行对该第一功能的响应操作,该第一信息用于指示该手柄检测到用户按压该第一手柄按键。In the first aspect, the present technical solution provides a method for mapping handle buttons. The method is applied to an electronic device with a display screen. The electronic device and the handle are connected in a wired or wireless manner. The handle includes one or more handle buttons. , 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 The position is the position of the first interface element on the first interface; the electronic device associates the first handle button with the first position, and the one or more handle buttons include the first handle button; in response to obtaining The first information sent by the handle, the electronic device performs a response operation to the first function at the first position, and the first information is used to indicate that the handle detects that the user presses the first handle button.
本申请实施例中,电子设备通过确定界面元素的功能以及位置,电子设备可以准确完成手柄按键和游戏按键对应位置的映射。这样有助于避免用户繁琐的操作,提升电子设备的智能化程度,从而提升了用户的游戏体验。In the embodiments 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 the user's cumbersome operations, enhance the intelligence of the electronic device, and thereby enhance the user's gaming experience.
结合第一方面,在第一方面的某些实现方式中,该电子设备中保存该第一功能与该第一功能对应的特征点集合的第一映射关系,该确定该第一界面元素对应的第一功能,包括: 提取该第一界面元素的特征点;在该第一界面元素的特征点与该第一功能对应的特征点集合的匹配度大于或者等于预设值时,确定该第一界面元素对应该第一功能。With reference to the first aspect, in some implementations of the first aspect, the electronic device stores a first mapping relationship between the first function and the feature point set corresponding to the first function, and the first interface element corresponding to the first interface element is determined The first function includes: extracting the feature points of the first interface element; determining the first interface element when the matching degree 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 The interface elements correspond to the first function.
本申请实施例中,电子设备中可以预先保存第一功能与第一功能对应的特征点集合的映射关系,电子设备可以将界面元素的特征点与特征点集合进行匹配。当匹配度大于或者等于预设值时,电子设备可以确定第一界面元素对应第一功能,从而将第一手柄按键与第一位置相关联。这样的映射关系,可以保证电子设备准确识别界面元素对应的功能,从而实现手柄按键与游戏按键的映射。这样有助于避免用户繁琐的操作,提升电子设备的智能化程度,从而提升了用户的游戏体验。In the embodiment of the present application, the electronic device may pre-store the mapping relationship between the first function and the feature point set corresponding to the first function, and the electronic device may match the feature point of the interface element with the feature point set. When the matching degree is greater than or equal to the preset value, the electronic device may determine that the first interface element corresponds to the first function, and thereby associate the first handle button with the first position. Such a mapping relationship can ensure that the electronic device accurately recognizes the functions corresponding to the interface elements, thereby realizing the mapping between the handle buttons and the game buttons. This helps to avoid the user's cumbersome operations, enhance the intelligence of the electronic device, and thereby enhance the user's gaming experience.
在一些可能的实现方式中,该电子设备上包括多个界面元素,该电子设备可以确定该多个界面元素对应的多个功能,电子设备可以随机将多个手柄按键与该多个功能所处的位置进行关联。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 multiple functions. Associated with the location.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:响应于用户将该第一界面元素从该第一位置移动到该第一界面上的第二位置的操作,自动将该第一手柄按键与该第二位置相关联;响应于获取到该第一信息,在该第二位置执行对该第一功能的响应操作。With reference to the first aspect, in some implementations of the first aspect, the method further 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 The first handle button is associated with the second position; in response to acquiring the first information, a response operation to the first function is performed at the second position.
本申请实施例中,当电子设备检测到界面元素的位置发生变化后,电子设备可以自动更新手柄按键和界面元素的位置的关联关系,从而保证用户在点击手柄按键后,手机可以自动执行响应操作。避免了用户手动调整手柄按键与游戏功能所在位置的关联关系,提高了电子设备的智能化程度,有助于提升用户的游戏体验。In the embodiments of this application, when the electronic device detects that the position of the interface element has changed, the electronic device can automatically update the association relationship between the handle button and the position of the interface element, thereby ensuring that the mobile phone can automatically perform a response operation after the user clicks the handle button . It avoids the user from manually adjusting the association relationship between the handle button and the location of the game function, improves the intelligence of the electronic device, and helps to improve the user's game experience.
结合第一方面,在第一方面的某些实现方式中,该电子设备中保存该第一手柄按键与该第一功能的第二映射关系;该将第一手柄按键与该第一位置相关联,包括:根据该第二映射关系,将该第一手柄按键与该第一位置相关联。With reference to the first aspect, in some implementations of the first aspect, a second mapping relationship between the first handle button and the first function is stored in the electronic device; the first handle button is associated with the first position , Including: associating the first handle button with the first position according to the second mapping relationship.
本申请实施例中,手机可以提前保存用户习惯的手柄按键与游戏按键的映射关系。例如以Xbox、PS4等主流手柄为例,经过大量用户的实际体验可以得出PS4游戏手柄中的X键属于最容易被控制的按键。而对于FPS游戏中,游戏功能“射击”是用户最常使用的一个游戏按键,那么手机可以保存X键与游戏功能“射击”的映射关系。这样可以避免用户多次调整手柄按键与游戏按键的映射关系的繁琐操作,提高了电子设备的智能化程度,从而有助于提升用户体验。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 controllers such as Xbox and PS4 as an example, after a large number of users' actual experience, it can be concluded that the X button in the PS4 game controller is the most easily controlled button. For FPS games, the game function "shooting" is the most commonly used game button by users, so the phone can save the mapping relationship between the X button and the game function "shooting". In this way, the user can avoid the cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, which improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:响应于用户将第二手柄按键与该第一位置相关联的操作,自动将该第二映射关系更新为该第二手柄按键与该第一功能的映射关系,该一个或者多个手柄按键包括该第二手柄按键。With reference to the first aspect, in some implementations of the first aspect, the method further includes: in response to the user's operation of associating the second handle button with the first position, automatically updating the second mapping relationship to the first position The mapping relationship between the two handle buttons and the first function, and the one or more handle buttons include the second handle button.
本申请实施例中,当手机在检测到用户更新上一次保存的手柄按键与游戏按键的映射关系后,手机可以将用户调整后的手柄按键与游戏按键保存下来,这样方便用户下一次进行游戏体验时,电子设备直接根据调整后的映射关系进行手柄按键与界面元素位置的关联。这样有助于避免用户多次调整手柄按键与游戏按键的映射关系的繁琐操作,提高了电子设备的智能化程度,从而有助于提升用户体验。In the embodiment of this 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, which is convenient for the user to experience the game next time At this 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 user's cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, and improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
第二方面,本技术方案提供了一种手柄按键映射的装置,该装置包含在电子设备中,该装置具有实现上述第一方面及上述第一方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个 与上述功能相对应的模块或单元。In a second aspect, the present technical solution provides a device for mapping handle buttons, which is included in an electronic device, and the device has the function of realizing the behavior of the electronic device in the foregoing first aspect and the possible implementation of the foregoing first aspect. The function can be realized by hardware, or the corresponding software can be executed by hardware. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions.
第三方面,本技术方案提供了一种电子设备,包括:显示屏;一个或多个处理器;存储器;一个或者多个应用程序;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述第一方面任一项可能的实现中的手柄按键映射的方法。In a third aspect, the technical solution provides an electronic device, including: a display screen; one or more processors; a memory; one or more application programs; and one or more computer programs. Among them, one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instruction is executed by the electronic device, the electronic device is caused to execute the handle button mapping method in any possible implementation of the first aspect described above.
第四方面,本技术方案提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面任一项可能的实现中的手柄按键映射的方法。In a fourth aspect, the present technical solution provides a computer storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the handle button mapping method in any one of the possible implementations of the first aspect above .
第五方面,本技术方案提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面任一项可能的实现中的手柄按键映射的方法。In a fifth aspect, the present technical solution provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute the method for mapping the handle buttons in any one of the possible implementations of the first aspect described above.
附图说明Description of the drawings
图1是本申请实施例提供的电子设备的结构示意图。Fig. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图2是本申请实施例提供的一组GUI。Figure 2 is a set of GUIs provided by an embodiment of the present application.
图3是本申请实施例提供的另一组GUI。Figure 3 is another set of GUIs provided by an embodiment of the present application.
图4是本申请实施例提供的另一组GUI。Figure 4 is another set of GUIs provided by an embodiment of the present application.
图5是本申请实施例提供的另一组GUI。Figure 5 is another set of GUIs provided by an embodiment of the present application.
图6是本申请实施例提供的另一组GUI。Fig. 6 is another set of GUIs provided by an embodiment of the present application.
图7是本申请实施例提供的采集学习阶段的示意图。Fig. 7 is a schematic diagram of the acquisition and learning stage provided by an embodiment of the present application.
图8是本申请实施例提供的手柄按键映射的方法的示意性流程图。FIG. 8 is a schematic flowchart of a method for mapping keys on a handle provided in an embodiment of the present application.
具体实施方式Detailed ways
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个、两个或两个以上。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also This includes expressions such as "one or more" unless the context clearly indicates to the contrary. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" refer to one, two, or more than two. The term "and/or" is used to describe the association relationship of associated objects, indicating that there can be three types of relationships; for example, A and/or B can mean: A alone exists, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References described in this specification to "one embodiment" or "some embodiments", etc. mean that one or more embodiments of the present application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the sentences "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless it is specifically emphasized otherwise. The terms "including", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
以下介绍了本申请实施例提供设计的电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能 手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2020140834-appb-000001
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。
The following introduces the electronic device provided by the embodiments of the present application, the user interface for such electronic device, and the embodiment for using such electronic device. In some embodiments, the electronic device may also include other functions such as portable electronic devices, such as mobile phones, tablet computers, wearable electronic devices with wireless communication functions (such as smart watches), and so on. Exemplary embodiments of portable electronic devices include, but are not limited to, carrying
Figure PCTCN2020140834-appb-000001
Or portable electronic devices with other operating systems. The aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 1 shows a schematic structural diagram of an 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, and an antenna 2. , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc. 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 sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can 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 those shown in the figure, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。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 processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块140用于从充电器接收充电输入。The charging management module 140 is used to receive charging input from the charger.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。数字信 号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。The ISP is used to process the data fed back from 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 digital image signals, it can also process other digital signals. Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
本申请实施例中,电子设备可以利用NPU来识别显示屏所显示的界面上的界面元素对应的功能。In the embodiment of the present application, the electronic device can use the NPU to identify the function corresponding to the interface element on the interface displayed on the display screen.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may 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 realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. 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 magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。The gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。The magnetic sensor 180D includes a Hall sensor.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F, used to measure distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
环境光传感器180L用于感知环境光亮度。The ambient light sensor 180L is used to sense the brightness of the ambient light.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。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 photographs, fingerprint answering calls, and so on.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。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.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作 用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations applied on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。The bone conduction sensor 180M can acquire vibration signals.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The button 190 includes a power-on button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. 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.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
图2是本申请实施例提供的一组图形用户界面(graphical user interface,GUI)。Fig. 2 is a set of graphical user interfaces (GUI) provided by an embodiment of the present application.
参见图2中的(a)所示的GUI,该GUI为蓝牙设置界面。该设置界面可以显示设备名称“Huawei P40”和已配对设备,其中已配对设备可以为手机之前连接过的蓝牙设备。当手机检测到用户打开蓝牙功能201的操作后,手机可以搜索周围的蓝牙设备。手机可以将搜索到的蓝牙设备显示在“可用设备”列表中。Refer to the GUI shown in (a) in Figure 2, which is a Bluetooth setting interface. The setting interface can display the device name "Huawei P40" and the paired device. The paired device can be a Bluetooth device that the phone has previously connected to. When the mobile phone detects the user's operation of turning 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.
参见图2中的(b)所示的GUI,该GUI为蓝牙设置界面。该设置界面中可用设备中可以显示手机搜索到的蓝牙设备,其中包括“游戏手柄”202。当手机检测到用户点击“游戏手柄”202的操作后,手机可以和游戏手柄建立蓝牙连接。Refer to the GUI shown in (b) in Figure 2, which is a Bluetooth setting interface. The Bluetooth devices searched by the mobile phone can be displayed among the available devices in the setting interface, including "gamepad" 202. When the mobile phone detects that the user clicks the "game controller" 202, the mobile phone can establish a Bluetooth connection with the game controller.
应理解,以上仅仅是以手机和手柄之间通过蓝牙建立连接,还可以是手机和手柄通过Wi-Fi建立连接或者通过其他近场通信方式建立连接;或者,手机和手柄也可以通过有线的方式建立连接。It should be understood that the above is only to establish a connection between the mobile phone and the handle via Bluetooth, or the mobile phone and the handle establish a connection via Wi-Fi or other near field communication methods; or the mobile phone and the handle can also be connected via a wired method. establish connection.
如图所示的游戏手柄上包括多个手柄按键,其中多个手柄按键中包括方向键203、Y键204、X键205、A键206、B键207、LB键208和RB键209。应理解,本申请实施例中游戏手柄按键仅仅是示意性的,游戏手柄上的手柄按键还可以包括比图示游戏手柄上更多或者更少的按键,本申请实施例对此不作限定。The game controller as shown in the figure includes a plurality of handle buttons, and the plurality of handle buttons include direction keys 203, Y keys 204, X keys 205, A keys 206, B keys 207, LB keys 208, and RB keys 209. It should be understood that the game controller buttons in the embodiments of the present application are merely illustrative, and the controller buttons on the game controller may also include more or fewer buttons than those on the game controller shown in the figure, which is not limited in the embodiments of the present application.
参见图2中的(c)所示的GUI,该GUI为游戏应用的对战界面。当手机检测到用户启动某个游戏应用的对战界面时,可以在对战界面上自动弹出按键设置提醒框216。按键设置提醒框216中包括游戏手柄按键的图标信息。当手机检测到用户点击自动映射键位的操作时,可以显示如图2中的(d)所示的GUI。Refer to the GUI shown in (c) in FIG. 2, which is a battle interface of the game application. When the mobile phone detects that the user launches the battle interface of a certain game application, the button setting reminder box 216 may automatically pop up on the battle interface. The button setting reminder box 216 includes icon information of the gamepad buttons. When the mobile phone detects that the user has clicked the automatic mapping key position, it can display the GUI as shown in (d) in FIG. 2.
参见图2中的(d)所示的GUI,该GUI为游戏应用的另一对战界面。当手机检测到用户点击自动映射键位的操作时,手机可以根据对战界面上的界面元素确定该界面元素对应的游戏功能,从而确定某个手柄按键和该界面元素对应的游戏功能相对应。手机可以确定该界面元素在对战界面上的位置信息。最终手机可以建立手柄按键和该位置信息的映射关系,从而完成游戏按键和游戏按键的映射。Refer to the GUI shown in (d) in FIG. 2, which is another battle interface of the game application. When the mobile phone detects that the user clicks the operation of the automatic mapping key, the mobile phone can determine the game function corresponding to the interface element according to the interface element on the battle interface, so as to determine that a certain handle button corresponds to the game function corresponding to the interface element. The mobile phone can determine the location information of the interface element on the battle interface. Finally, the mobile phone can establish the mapping relationship between the handle buttons and the position information, thereby completing the mapping of the game buttons and the game buttons.
如图2中的(d)所示,手机可以自动将LB键的图标移动到对战界面上的界面元素210(对应的游戏功能为“开启瞄准”)处;手机可以自动将方向键的图标移动到界面元素211(对应的游戏功能为“上下左右移动”)处;手机可以自动将A键的图标移动到界面 元素212(对应的游戏功能为“跳跃”)处;手机可以自动将Y键的图标移动到界面元素213(对应的游戏功能为“换弹药”)处;手机可以自动将X键的图标移动到界面元素214(对应的游戏功能为“射击”)处。从而手机自动完成手柄按键与游戏按键的映射。As shown in Figure 2 (d), the mobile phone can automatically move the icon of the LB button to the interface element 210 on the battle interface (the corresponding game function is "open aiming"); the mobile phone can automatically move the icon of the arrow keys Go to interface element 211 (the corresponding game function is "move up, down, left and right"); the mobile phone can automatically move the icon of the A key to the interface element 212 (the corresponding game function is "jump"); the mobile phone can automatically move the Y key The icon is moved to the interface element 213 (the corresponding game function is "change ammo"); the mobile phone can automatically move the icon of the X key to the interface element 214 (the corresponding game function is "shooting"). Thus, the mobile phone automatically completes the mapping between the handle buttons and the game buttons.
应理解,上述实施例中所述的界面元素可以指游戏界面游戏功能对应的图像信息,手机确定手柄按键和游戏功能的映射关系时,可以是先分析每个界面元素的特征点,通过特征点来判断该界面元素对应的游戏功能。It should be understood that the interface elements described in the above embodiments may refer to the image information corresponding to the game functions of 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 then use the feature points. To determine the game function corresponding to the interface element.
还应理解,上述手机将各个手柄按键的图标移动到对战界面上的界面元素上时,可以提前在手机中预置各个手柄按键和游戏功能的对应关系。示例性的,表1示出了一种手机保存的手柄按键和游戏按键对应的游戏功能的对应关系。It should also be understood that when the aforementioned mobile phone moves the icon of each handle button to the interface element on the battle interface, the corresponding relationship between each handle button and the game function can be preset in the mobile phone in advance. Exemplarily, Table 1 shows the corresponding relationship between the handle buttons and the game functions corresponding to the game buttons saved in the mobile phone.
表1Table 1
手柄按键Handle button 游戏功能Game features
LB键LB key 开启瞄准Open aiming
RB键RB key 切换武器Switch weapon
X键X key 射击shooting
Y键Y key 换弹药Change ammunition
A键A key 跳跃jump
B键B key 匍匐Creeping
一个实施例中,手机也可以不预置上述表1所示的手柄按键和游戏功能的对应关系。例如,手机在确定对战界面上的各个界面元素对应的游戏功能后,可以将手柄按键随机对应到各个界面元素对应的游戏功能上。如果用户使用手机随机映射的手柄按键和游戏功能的对应关系进行游戏体验,那么手机可以生成该手柄按键和游戏功能的映射关系,下一次手机检测到再一次打开游戏后,可以按照上一次的映射关系进行映射;或者,手机也可以不生成手柄按键和游戏功能的映射关系,在下一次手机检测到再一次打开游戏后,继续将手柄按键随机对应到各个界面元素对应的游戏功能上。进一步地,对于一些特殊的手柄按键(例如,方向键203),手机可以提前保存手柄上的方向键与对战界面上的上下左右移动的对应关系;而对于X键、Y键、A键或者B键等等可以不保存其与具体游戏功能的对应关系。In an embodiment, the mobile phone may not preset the corresponding relationship between the handle buttons and the game functions shown in Table 1 above. For example, after the mobile phone determines the game function corresponding to each interface element on the battle interface, it can randomly correspond the handle buttons to the game function corresponding to each interface element. If the user uses the corresponding relationship 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. The next time the mobile phone detects that the game is opened again, it can follow the previous mapping The relationship is mapped; or the mobile phone may not generate the mapping relationship between the handle buttons and the game functions. 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 each interface element. Further, for some special handle buttons (for example, the arrow keys 203), the mobile phone can save the correspondence between the arrow keys on the handle and the up, down, left, and right movement on the battle interface in advance; and for the X, Y, A, or B keys The keys, etc. may not save their corresponding relationships with specific game functions.
示例性的,表2示出了对战界面上各个界面元素与每个界面元素对应的位置信息。Exemplarily, Table 2 shows the location information of each interface element and each interface element on the battle interface.
表2Table 2
界面元素Interface elements 位置信息location information
界面元素210Interface Elements 210 位置1Position 1
界面元素211 Interface Elements 211 位置2Position 2
界面元素212 Interface elements 212 位置3Position 3
界面元素213 Interface elements 213 位置4Position 4
界面元素214 Interface Elements 214 位置5Position 5
本申请实施例中,手机在确定某个手柄按键对应的游戏功能时,可以先提取对战界面 上各个界面元素的特征点,然后根据提取的每个界面元素的特征点与手机保存的各个游戏功能对应的特征点集合进行匹配。In the embodiment of this 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 according to the extracted feature points of each interface element and each game function saved by the mobile phone The corresponding feature point set is matched.
示例性的,手机在提取出界面元素214后,可以先确定界面元素214的特征点。如果界面元素214的特征点与手机保存的游戏功能“射击”对应的图像特征点集合的匹配度大于或者等于预设值,那么手机可以确定该界面元素214对应的游戏功能为“射击”。从而使得手机建立X键与该界面元素214对应的位置5的映射关系。Exemplarily, after the mobile phone extracts the interface element 214, it 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 the preset value, the mobile phone can 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.
一个实施例中,界面元素对应的位置可以为当前手机尺寸下该界面元素在显示屏上的绝对坐标位置。In an embodiment, the position corresponding to the interface element may be the absolute coordinate position of the interface element on the display screen under the current mobile phone size.
当手机检测到用户点击应用并保存的操作后,可以显示如图2中的(e)所示的GUI。When the mobile phone detects that the user clicks on the application and saves the operation, it can display the GUI as shown in (e) in FIG. 2.
参见图2中的(e)所示的GUI,当手机检测到用户点击应用并保存的操作后,可以完成手柄按键和游戏按键的映射。当完成手柄按键和游戏按键的映射后,相应的手柄按键的图标可以缩小且不遮挡游戏按键,这样可以保证用户在进行游戏体验时,可以查看相应的游戏按键,同时也可以看到手柄按键和游戏按键的对应关系。Referring to the GUI shown in (e) in Figure 2, when the mobile phone detects that the user clicks on the application and saves the operation, the mapping of the handle buttons and the game buttons can be completed. After completing the mapping between the handle buttons and the game buttons, the icons of the corresponding handle buttons can be reduced without blocking the game buttons. This ensures that the user can view the corresponding game buttons during the game experience, and also see the handle buttons and Correspondence of game buttons.
当游戏手柄检测到用户点击某个手柄按键的操作后,游戏手柄可以将相应的操作信息发送给手机。手机可以根据该操作信息,在相应的界面元素对应的位置处产生响应。从而实现使用游戏手柄进行游戏体验。When the game handle detects the user's operation of clicking a certain handle button, the game handle can send the corresponding operation information to the mobile phone. The mobile phone can generate a response at the position corresponding to the corresponding interface element according to the operation information. So as to realize the game experience using the game handle.
本申请实施例中,通过手柄按键和具体的游戏功能的映射,以及游戏功能和游戏功能所在界面元素的位置信息的映射关系,电子设备可以准确完成手柄按键和游戏按键的映射。这样有助于避免用户繁琐的操作,提升电子设备的智能化程度,从而提升了用户的游戏体验。In the embodiment of the present application, the electronic device can accurately complete the mapping of the handle buttons and the game buttons through the mapping between the handle buttons and the specific game functions, and the mapping relationship between the game functions and the location information of the interface elements where the game functions are located. This helps to avoid the user's cumbersome operations, enhance the intelligence of the electronic device, and thereby enhance the user's gaming experience.
图3是本申请实施例提供的另一组GUI。Figure 3 is another set of GUIs provided by an embodiment of the present application.
参见图3中的(a)所示的GUI,该GUI为游戏按键的调整界面。当手机检测到用户调整游戏按键对应的界面元素的位置时,手机可以根据用户手指滑动的方向将界面元素212调整到新的位置(例如,位置6)。Refer to the GUI shown in (a) in FIG. 3, which is an adjustment interface of the 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 (for example, position 6) according to the sliding direction of the user's finger.
参见图3中的(b)所示的GUI,该GUI为游戏按键调整后的显示界面。界面元素212被用户调整到位置6。此时,手机在确定界面元素被调整到位置6后,可以更新手柄按键中A键与界面元素212更新后的位置信息的映射关系。Refer to the GUI shown in (b) in FIG. 3, which is a display interface after adjusting the game buttons. 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.
示例性的,手机可以先更新表2所示的界面元素与界面元素对应的位置信息。更新后的界面元素与界面元素对应的位置信息如表3所示。Exemplarily, the mobile phone may first update the interface elements shown in Table 2 and the location information corresponding to the interface elements. The updated interface elements and the corresponding location information of the interface elements are shown in Table 3.
表3table 3
界面元素Interface elements 位置信息location information
界面元素210Interface Elements 210 位置1Position 1
界面元素211 Interface Elements 211 位置2Position 2
界面元素212 Interface elements 212 位置6Position 6
界面元素213 Interface elements 213 位置4Position 4
界面元素214 Interface Elements 214 位置5Position 5
从而手机可以将A键与位置3的映射关系更新为A键与位置6的映射关系。Therefore, the mobile phone can update the mapping relationship between the A key and the position 3 to the mapping relationship between the A key and the position 6.
本申请实施例中,当电子设备检测到用户更新某个游戏按键的位置后,电子设备可以 自动更新手柄按键与该游戏按键对应的界面元素的位置信息的映射关系,从而避免了用户手动调整,避免了用户繁琐的操作,提升电子设备的智能化程度,从而提升了用户的游戏体验。In the embodiment of the present application, when the electronic device detects that the user updates the position of a certain 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. The user's cumbersome operation is avoided, the intelligence of the electronic device is improved, and the user's gaming experience is improved.
图4是本申请实施例提供的另一组GUI。Figure 4 is another set of GUIs provided by an embodiment of the present application.
参见图4中的(a)所示的GUI,该GUI为游戏应用的对战界面。当用户在玩游戏的过程中希望调整某个手柄按键与游戏按键的映射关系时,用户可以调出按键设置提醒框。当手机检测到用户点击清空键位的操作后,可以显示如图4中的(b)所示的GUI。Refer to the GUI shown in (a) in FIG. 4, which is a battle interface of a game application. When the user wants to adjust the mapping relationship between a certain handle button and the game button while playing the game, the user can call up the button setting reminder box. When the mobile phone detects that the user has clicked the clear key position, it can display the GUI shown in Figure 4 (b).
参见图4中的(b)所示的GUI,该GUI为手动设置按键映射的界面。用户可以按照自己的意愿将手柄按键的图标移动到游戏按键对应的界面元素上。如图4中的(b),当手机检测到用户将RB键移动到界面元素210上并且预设时间内没有检测到用户的移动操作后,手机可以完成RB键与界面元素210所在的位置的映射。同样的,用户可以手动完成方向键、LB键、A键以及B键和相应的界面元素所在的位置的映射。Refer to the GUI shown in (b) in Figure 4, which 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 their own wishes. As shown in Figure 4 (b), when the mobile phone detects that the user has moved the RB key to the interface element 210 and the user's movement operation is not detected within the preset time, the mobile phone can complete the position where the RB key and the interface element 210 are located. Mapping. Similarly, the user can manually complete the mapping of the location of the arrow keys, LB key, A key, and B key and the corresponding interface elements.
一个实施例中,当手机检测到用户手动调整了手柄按键和游戏按键的映射关系后,手机也可以对表1所示的手柄按键和游戏功能的映射关系进行更新。示例性的,表4示出了更新后手柄按键和游戏功能的映射关系。In one embodiment, when the mobile phone detects that the user has manually adjusted the mapping relationship between the handle buttons and the game buttons, the mobile phone may also update the mapping relationship between the handle buttons and the game functions shown in Table 1. Exemplarily, Table 4 shows the mapping relationship between the handle buttons and the game functions after the update.
表4Table 4
手柄按键Handle button 游戏功能Game features
LB键LB key 跳跃jump
RB键RB key 开启瞄准Open aiming
X键X key 切换武器Switch weapon
Y键Y key 匍匐Creeping
A键A key 换弹药Change ammunition
B键B key 射击shooting
应理解,手机可以在检测到用户更新后的手柄按键和游戏按键的映射关系,对自己保存的手柄按键和游戏功能的映射关系进行更新;或者,也可以不进行更新,那么下一次用户进行游戏体验时,手机还是会根据表1所示的映射关系进行游戏按键和手柄按键的映射。It should be understood that the mobile phone can update the mapping relationship between the controller buttons and the game functions saved by the user after detecting the mapping relationship between the user's updated handle buttons and the game buttons; or, the update may not be performed, then the next time the user plays the game During the experience, the mobile phone will still map the game buttons and the handle buttons according to the mapping relationship shown in Table 1.
本申请实施例中,当用户希望调整电子设备自动设置的手柄按键与游戏按键的映射关系时,电子设备可以显示按键设置提醒框,用户可以通过手动调节手柄按键和游戏按键的映射关系,有助于提高用户的游戏体验。In the embodiment of this application, when the user wants to adjust the mapping relationship between the handle buttons and the game buttons automatically set by the electronic device, the electronic device can display the button setting reminder box, and the user can manually adjust the mapping relationship between the handle buttons and the game buttons, which is helpful To improve the user’s gaming experience.
图5是本申请实施例提供的另一组GUI。Figure 5 is another set of GUIs provided by an embodiment of the present application.
如图5中的(a)所示的GUI,该GUI为另一游戏应用的对战界面。当手机检测到用户点击自动映射键位的操作后,可以显示如图5中的(b)所示的GUI。The GUI shown in (a) in FIG. 5 is a battle interface of another game application. When the mobile phone detects that the user has clicked the automatic mapping key position, it can display the GUI as shown in Figure 5 (b).
如图5中的(a)所示的对战界面上的游戏按键对应的界面元素和图2中的(c)所示的对战界面上的游戏按键对应的界面元素形状类似,所以手机在进行手柄按键和游戏按键的映射过程可以参考上述图2中(c)至图2中的(d)所示的过程。The interface elements corresponding to the game buttons on the battle interface shown in Figure 5 (a) are similar in shape to the interface elements corresponding to the game buttons on the battle interface shown in Figure 2 (c), so the phone is in the handle The mapping process of buttons and game buttons can refer to the processes shown in Figure 2 (c) to Figure 2 (d).
参见图5中的(b)所示,手机可以自动将LB键的图标移动到对战界面上的界面元素501(对应的游戏功能为“开启瞄准”)处;手机可以自动将B键的图标移动到对战界面 上的界面元素502(对应的游戏功能为“切换武器”)处;手机可以自动将X键的图标移动到界面元素503(对应的游戏功能为“射击”)处;手机可以自动将A键的图标移动到界面元素504(对应的游戏功能为“跳跃”)处;手机可以自动将Y键的图标移动到界面元素505(对应的游戏功能为“换弹药”)处;手机可以自动将方向键的图标移动到界面元素506(对应的游戏功能为“上下左右移动”)处;从而手机自动完成手柄按键与游戏按键的映射。Refer to Figure 5 (b), the mobile phone can automatically move the icon of the LB button to the interface element 501 on the battle interface (the corresponding game function is "open aiming"); the mobile phone can automatically move the icon of the B button Go to interface element 502 (corresponding to the game function "switch weapon") on the battle interface; 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 is moved to the interface element 504 (the corresponding game function is "jump"); the mobile phone can automatically move the icon of the Y key to the interface element 505 (the corresponding game function is "change ammo"); the mobile phone can automatically Move the icon of the arrow key to the interface element 506 (the corresponding game function is "move up, down, left, and right"); thus, the mobile phone automatically completes the mapping between the handle buttons and the game buttons.
参见图5中的(c)所示,当手机检测到用户点击应用并保存的操作时,可以完成手柄按键和游戏按键的映射。当完成手柄按键和游戏按键的映射后,相应的手柄按键的图标可以缩小且不遮挡游戏按键,这样可以保证用户在进行游戏体验时,可以查看相应的游戏按键,同时也可以看到手柄按键和游戏按键的对应关系。As shown in (c) in Figure 5, when the mobile phone detects that the user clicks on the application and saves the operation, it can complete the mapping of the handle buttons and the game buttons. After completing the mapping between the handle buttons and the game buttons, the icons of the corresponding handle buttons can be reduced without blocking the game buttons. This ensures that the user can view the corresponding game buttons during the game experience, and also see the handle buttons and Correspondence of game buttons.
以上通过图2至图5介绍了几组GUI,图2至图5所示的GUI中主要是以第一人称射击类游戏(first person shooting game,FPS)介绍。这类游戏中游戏按键对应的界面元素基本类似,例如图2中的(c)所示的游戏按键“射击”键与图5中的(a)所示的游戏按键“射击”键的图形形状基本类似,只是图形方向有些偏差。又例如,例如图2中的(c)所示的游戏按键“跳跃”键与图5中的(a)所示的游戏按键“跳跃”键的图形形状基本类似,只是示图形方向有些偏差。对于此类游戏,手机内可以只保存部分FPS游戏中每个游戏功能对应的界面元素的特征点信息,从而形成游戏功能对应的特征点集合。由于FPS游戏中游戏按键对应的界面元素的图形形状基本类似,所以当手机启动一个新的FPS游戏时,也可以准确的完成手柄按键和游戏按键的映射。Several groups of GUIs have been introduced above through FIGS. 2 to 5. The GUIs shown in FIGS. 2 to 5 are mainly introduced by first-person shooting games (FPS). The interface elements corresponding to the game buttons in this type of game are basically similar. For example, the graphical shape of the game button "shoot" button shown in Figure 2 (c) and the game button "shoot" button shown in Figure 5 (a) Basically similar, except that the direction of the graphics is somewhat deviated. For another example, for example, the game button "jump" button shown in (c) of FIG. 2 has a similar graphic shape to the game button "jump" button shown in (a) of FIG. 5, except that the graphic direction is slightly different. For this type of game, only the feature point information of the interface element corresponding to each game function in some FPS games can be saved in the mobile phone, 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 the FPS game are basically similar, when the mobile phone starts a new FPS game, it can also accurately complete the mapping between the handle buttons and the game buttons.
对于其他类型的游戏,由于游戏之间界面元素的相差较大,所以也可以针对具体的游戏在电子设备中保存具体的游戏中游戏功能的特征点集合。例如,对于多人在线战术竞技游戏(multiplayer online battle arena games,MOBA),每一种MOBA游戏的游戏界面相差较大,那么针对每一款MOBA游戏,也可以在手机中提前保存对应的游戏功能对应的特征点集合。For other types of games, due to the large difference in interface elements between games, it is also possible to save a specific set of feature points of game functions in a specific game in an electronic device for a specific game. For example, for multiplayer online battle arena games (MOBA), the game interface of each MOBA game is quite different, so for each MOBA game, the corresponding game function can also be saved in the mobile phone in advance Corresponding feature point collection.
图6示出了本申请实施提供的另一组GUI。Figure 6 shows another set of GUIs provided by the implementation of this application.
如图6中的(a)所示的GUI,该GUI为另一游戏应用的对战界面。该对战界面上包括游戏功能“技能1”对应的界面元素601、游戏功能“技能2”对应的界面元素602、游戏功能“技能3”对应的界面元素603、游戏功能“技能4”对应的界面元素604、游戏功能“技能5”对应的界面元素605以及游戏功能“上下左右移动”对应的界面元素606。当手机检测到用户点击自动映射键位的操作后,手机可以显示如图6中的(b)所示的GUI。The GUI shown in (a) in FIG. 6 is a battle interface of another game application. The battle interface includes the interface element 601 corresponding to the game function "Skill 1", the interface element 602 corresponding to the game function "Skill 2", the interface element 603 corresponding to the game function "Skill 3", and the interface corresponding to the game function "Skill 4" Element 604, an interface element 605 corresponding to the game function "Skill 5", and an interface element 606 corresponding to the game function "Move up, down, left, and right". When the mobile phone detects that the user has clicked the operation of automatically mapping the key position, the mobile phone can display the GUI as shown in (b) in FIG. 6.
参见图6中的(b)所示的GUI,手机可以自动将LB键的图标移动到对战界面上的界面元素601处;手机可以自动将RB键的图标移动到对战界面上的界面元素602处;手机可以自动将X键的图标移动到界面元素603处;手机可以自动将Y键的图标移动到界面元素604处;手机可以自动将A键的图标移动到界面元素605处;手机可以自动将方向键的图标移动到界面元素606处。从而手机自动完成手柄按键与游戏按键的映射。Refer to the GUI shown in (b) in Figure 6, 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 A key to the interface element 605; The icon of the arrow key moves to the interface element 606. Thus, the mobile phone automatically completes the mapping between the handle buttons and the game buttons.
与上述图2所示的映射过程不同的地方在于,图2中的(c)至(d)的映射过程中,手机可以在一个游戏功能对应的特征点集合中保存对多个游戏(例如,游戏1和游戏2)下该游戏功能对应的图像提取的特征点。示例性的,表5示出了一种手机保存的手柄按键、游戏按键对应的游戏功能以及特征点集合的对应关系。The difference from the mapping process shown in Figure 2 above is that during the mapping process from (c) to (d) in Figure 2, the mobile phone can save multiple games (for example, The feature points extracted from the image corresponding to the game function under Game 1 and Game 2). Exemplarily, Table 5 shows the corresponding relationship between the handle buttons, the game functions corresponding to the game buttons, and the feature point set saved in a mobile phone.
表5table 5
Figure PCTCN2020140834-appb-000002
Figure PCTCN2020140834-appb-000002
或者,手机也可以进行随机将手柄按键映射到对应的游戏功能处,那么手机只需要保存游戏功能和游戏功能对应的特征点集合的对应关系。示例性的,表6示出了手机保存的一种游戏功能与特征点集合的映射关系。Alternatively, the mobile phone can also randomly map the handle buttons to the corresponding game function, so the mobile phone only needs to save the corresponding relationship between the game function and the feature point set corresponding to the game function. Exemplarily, Table 6 shows the mapping relationship between a game function stored in the mobile phone and the feature point set.
表6Table 6
Figure PCTCN2020140834-appb-000003
Figure PCTCN2020140834-appb-000003
而对于图6中的(a)至(b)所示的映射过程,手机对于一个游戏功能对应的特征点 集合可以只保存某个具体游戏(例如,游戏3)下该游戏功能对应的图像提取的特征点。示例性的,表7示出了另一种手机保存的手柄按键、游戏按键对应的游戏功能以及特征点集合的对应关系。For the mapping process shown in (a) to (b) in Figure 6, the mobile phone can only save the image extraction corresponding to the game function under a specific game (for example, game 3) for the feature point set corresponding to a game function Characteristic points. Exemplarily, Table 7 shows the corresponding relationship between the handle buttons, the game functions corresponding to the game buttons, and the feature point set saved in another mobile phone.
表7Table 7
Figure PCTCN2020140834-appb-000004
Figure PCTCN2020140834-appb-000004
这样,针对这一类具体的游戏,当手机提前保存了手柄按键和游戏功能的对应关系后,如果手机检测到该游戏启动时就可以自动完成手柄按键和游戏按键的匹配。通过为用户提供自动映射的功能体验,有助于降低用户的操作复杂度,提升了用户的游戏体验。In this way, for this type of specific game, after the mobile phone saves the corresponding relationship between the handle 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 handle buttons and the game buttons. By providing users with a functional experience of automatic mapping, it helps to reduce the complexity of the user's operation and enhance the user's gaming experience.
以上结合图2至图6介绍了本申请实施例中手机自动完成手柄按键和游戏按键映射的过程。下面介绍手柄按键、游戏功能与特征点集合之间的映射关系的获取过程。这一过程也可以称之为采集学习阶段。图7示出了采集学习阶段的示意图。如图7所示,采集学习阶段可以包括以下过程:The above describes the process of the mobile phone automatically completing the mapping between the handle buttons and the game buttons in the embodiment of the present application in conjunction with FIGS. 2 to 6. The following describes the process of acquiring the mapping relationship between the handle buttons, game functions, and feature point sets. This process can also be referred to as the acquisition and learning stage. Figure 7 shows a schematic diagram of the acquisition and learning phase. As shown in Figure 7, the acquisition and learning stage may include the following processes:
S701,从对战界面上获取游戏按键在默认位置上的图像信息。S701: Obtain image information of the game button at the default position from the battle interface.
一个实施例中,该默认位置的图像信息包括但不限于以下一种或者多种:In an embodiment, the image information of the default location includes but is not limited to one or more of the following:
(1)默认位置上采集的用户未点击该游戏按键时的图像信息;(1) The image information collected at the default location when the user did not click the game button;
(2)游戏过程中不同时间点,在默认位置上采集的用户未点击该游戏按键时的图像信息;(2) Image information collected at different time points during the game when the user did not click the game button at the default location;
(3)在游戏过程不同时间点,在默认位置上采集的用户点击了该游戏按键时的图像信息。(3) At different time points in the game process, the image information collected at the default position when the user clicks the game button.
应理解,对于一些游戏,由于游戏按键对应的图像信息(或者界面元素)是半透明的,那么在游戏的不同时间点采集的图像信息会有差异。It should be understood that for some games, since the image information (or interface elements) corresponding to the game buttons is translucent, the image information collected at different time points of the game will be different.
还应理解,对于一些游戏,用户点击该游戏按键时的图像信息和用户未点击该游戏按键时的图像信息也会存在差异。例如,当用户点击了该游戏按键后,游戏按键会出现转公共冷却时间(global cool down,CD)的游戏效果,那么此时采集的图像信息和用户未点击该游戏按键时的图像信息会存在差异。It should also be understood that for some games, the image information when the user clicks the game button and the image information when the user does not click the game button may also be different. For example, when the user clicks the game button, the game button will have a global cool down (CD) game effect, then the image information collected at this time and the image information when the user did not click the game button will exist difference.
S702,将游戏按键自定义调整到对战界面的其他位置,获取游戏按键在调整后的位置上的图像信息。S702: Customize the game buttons to other positions of the battle interface, and obtain image information of the game buttons at the adjusted positions.
一个实施例中,对于调整后的位置上的图像信息包括但不限于以下一种或者多种:In an embodiment, the image information at the adjusted position includes but is not limited to one or more of the following:
(1)在调整后的位置上采集的用户未点击该游戏按键时的图像信息;(1) The image information collected at the adjusted position when the user did not click the game button;
(2)游戏过程中不同时间点,在调整后的位置上采集的用户未点击该游戏按键时的图像信息;(2) Image information collected at different time points during the game when the user did not click the game button at the adjusted position;
(3)在游戏过程不同时间点,在调整后的位置上采集的用户点击了该游戏按键时的图像信息。(3) At different time points in the game process, the image information collected at the adjusted position when the user clicks the game button.
应理解,对于一些游戏,由于游戏按键对应的图像信息(或者界面元素)是半透明的,那么在对战界面不同位置上采集的图像信息会有差异。It should be understood that for some games, because the image information (or interface elements) corresponding to the game buttons is semi-transparent, the image information collected on different positions of the battle interface will be different.
应理解,上述S701-S702中可以是手机基于自己的处理器实现的,例如手机可以将游戏按键自定义调整到对战界面的其他位置后,获取游戏按键在调整后的位置上的图像信息。或者,S701-S702也可以是游戏开发人员在PC端或者其他设备上实现的,S702中自定义调整的过程可以是设备自动完成的,也可以是游戏开发人员手动完成的。当游戏开发人员采集了足够多的游戏功能对应的图像特征点集合后,可以将上述游戏功能与游戏功能对应的图像特征点集合的映射关系(或者,手柄按键、游戏功能与游戏功能对应的图像特征点集合的映射关系)上传到云端服务器。当手机从云端服务器获取到游戏后,可以一同获取游戏功能与游戏功能对应的图像特征点集合的映射关系(或者,手柄按键、游戏功能与游戏功能对应的图像特征点集合的映射关系)。It should be understood that the above S701-S702 may be implemented by the mobile phone based on its own processor. For example, the mobile phone can customize the game buttons to other positions of the battle interface, and then obtain the image information of the game buttons at the adjusted positions. Alternatively, S701-S702 can also be implemented by game developers on the PC or other devices. The process of custom adjustment in S702 can be done automatically by the device or manually by the game developer. After the game developer has collected enough image feature point sets corresponding to the game function, the mapping relationship between the above-mentioned game function and the image feature point set corresponding to the game function (or the image corresponding to the handle button, the game function and the game function The mapping relationship of the feature point set) is uploaded to the cloud server. After the mobile phone obtains the game from the cloud server, it can also obtain the mapping relationship between the game function and the image feature point set corresponding to the game function (or the mapping relationship between the handle buttons, the image feature point set corresponding to the game function and the game function).
S703,重复S701~S702,采集足够多的图像数据后,完成对该游戏按键的图像数据采集。S703: Repeat S701 to S702, and after collecting enough image data, complete the image data collection of the game button.
S704,对上述S701~S703采集的图像数据进行人工智能(artificial intelligence,AI)训练,从而得到如表4所示的映射关系。S704: Perform artificial intelligence (AI) training on the image data collected in S701 to S703, so as to obtain the mapping relationship shown in Table 4.
应理解,S703和S704也可以是PC或者服务器执行的。It should be understood that S703 and S704 may also be executed by a PC or a server.
一个实施例中,对图像数据进行AI训练的过程可以参考现有技术中进行人脸识别时提前采集人脸的特征点的过程。采集人脸的特征点主要是为了在进行人脸识别时可以准确的识别出用户,同样的,采集游戏按键(或者游戏功能)对应的特征点集合主要是为了在进行对战界面上的界面元素识别时,准确的识别出该界面元素对应的游戏功能。In an embodiment, the process of performing AI training on image data may refer to the process of collecting feature points of the face in advance when performing face recognition in the prior art. The main purpose of collecting the feature points of the face is to accurately identify the user when performing face recognition. Similarly, the collection of the feature point set corresponding to the game buttons (or game functions) is mainly for the identification of interface elements on the battle interface At the same time, the game function corresponding to the interface element can be accurately identified.
一个实施例中,对于某一类游戏(例如,FPS游戏)中,由于游戏按键对应的界面元素基本类似,那么可以针对不同游戏进行S701-S703,并将不同游戏下某个游戏按键对应的特征点集合放在一起,如表5所示。那么电子设备无论在打开采集过数据的游戏或者没有采集过数据的游戏时,都可以进行自动映射,从而可以降低用户繁琐的操作,提升用户的游戏体验。In one embodiment, for a certain type of game (for example, FPS game), since the interface elements corresponding to the game buttons are basically similar, S701-S703 can be performed for different games, and the characteristics of a certain game button under different games The points are grouped together, as shown in Table 5. Then the electronic device can perform automatic mapping no matter when opening a game that has collected data or a game that has not collected data, which can reduce the user's cumbersome operations and improve the user's gaming experience.
一个实施例中,对于某一具体游戏(例如,某一MOBA游戏)中,由于不同MOBA游戏中游戏按键对应的界面元素相差较大,那么可以针对具体游戏进行S701-S703,采集具体游戏下某个游戏按键对应的特征点集合,如表7所示。那么电子设备在开启这一游戏时,可以进行自动映射,从而可以降低用户繁琐的操作,提升用户的游戏体验。In one embodiment, for a specific game (for example, a certain MOBA game), because the interface elements corresponding to the game buttons in different MOBA games are quite different, then S701-S703 can be performed for the specific game, and certain games under the specific game can be collected. The set of feature points corresponding to each game button is shown in Table 7. Then the electronic device can perform automatic mapping when starting this game, which can reduce the user's cumbersome operation and improve the user's game experience.
图8示出了本申请实施例提供的手柄按键映射的方法800的示意性流程图,如图8所示,该方法800应用于具有显示屏的电子设备中,该电子设备与手柄通过有线或者无线的方式连接,该方法800包括:FIG. 8 shows a schematic flowchart of a method 800 for key mapping of a handle provided by an embodiment of the present application. As shown in FIG. 8, the method 800 is applied to an electronic device with a display screen. The electronic device and the handle are wired or For wireless connection, the method 800 includes:
S801,该电子设备通过显示屏显示第一界面,该第一界面上包括第一界面元素。S801: The electronic device displays a first interface through a display screen, and the first interface includes a first interface element.
示例性的,如图2中的(b)所示,手机通过显示屏显示对战界面,该对战界面上包 括界面元素210~214。Exemplarily, as shown in Figure 2(b), the mobile phone displays a battle interface through the display screen, and the battle interface includes interface elements 210 to 214.
示例性的,如图6中的(a)所示,手机通过显示屏显示另一对战界面,该对战界面上包括界面元素601~605。Exemplarily, as shown in FIG. 6(a), the mobile phone displays another battle interface through the display screen, and the battle interface includes interface elements 601 to 605.
S802,该电子设备确定该第一界面元素对应的第一功能以及第一位置,该第一位置为第一界面元素在该第一界面上的位置。S802. The electronic device determines a first function and a first position corresponding to the first interface element, where the first position is the position of the first interface element on the first interface.
可选地,该电子设备中可以保存第一功能与第一功能对应的特征点集合的第一映射关系,那么该电子设备确定该第一界面元素对应的第一功能,包括:Optionally, the electronic device may store the first mapping relationship between the first function and the feature point set corresponding to the first function, and then the electronic device determines the first function corresponding to the first interface element, including:
该电子设备提取第一界面元素的特征点;The electronic device extracts the feature points of the first interface element;
该电子设备在该第一界面元素与该第一功能对应的特征点集合的匹配度大于或者等于预设值时,确定该第一界面元素对应该第一功能。The electronic device determines that the first interface element corresponds to the first function when the matching degree of the feature point set corresponding to the first interface element and the first function is greater than or equal to a preset value.
示例性的,该映射关系可以如表6所示,对于图2中的(c)所示的界面元素210,电子设备可以提取该界面元素210的特征点;电子设备可以根据表6所示的映射关系,将界面元素210的特征点与所有的特征点集合进行匹配。例如,若电子设备确定界面元素210的特征点与游戏功能“开启瞄准”所对应的特征点集合的匹配度大于或者等于预设值,那么电子设备可以确定该界面元素210对应“开启瞄准”功能。Exemplarily, the mapping relationship may be as shown in Table 6. For the interface element 210 shown in (c) in FIG. 2, the electronic device may extract the characteristic points of the interface element 210; the electronic device may be based on The mapping relationship matches the feature points of the interface element 210 with all feature point sets. 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 "turn on aiming" is greater than or equal to the preset value, the electronic device can determine that the interface element 210 corresponds to the "turn on aiming" function .
应理解,电子设备可以通过保存的游戏功能与特征点集合的映射关系来确定第一界面元素对应第一功能;还可以通过其他方式来确定第一界面元素对应第一功能。例如,电子设备从云端服务器下载了某个游戏App,游戏App中可以包括界面元素和游戏功能的对应关系,电子设备在提取了某个界面元素后,可以直接确定该界面元素对应的游戏功能。又例如,电子设备还可以通过提取界面元素上的图形形状来判断其对应的游戏功能,如界面元素210中包含的图形形状为“+”,电子设备可以通过游戏功能与图形形状的映射关系来确定界面元素210对应“开启瞄准”功能。本申请实施例中,对电子设备如何通过第一界面元素来确定其对应的第一功能的方式并不作具体限定。It should be understood that the electronic device may determine that the first interface element corresponds to the first function through the saved mapping relationship between the game function and the feature point set; it may also determine that the first interface element corresponds to the first function in other ways. For example, an electronic device downloads a certain game App from a cloud server, and the game App may include the corresponding relationship between interface elements and 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, the graphic shape contained in the interface element 210 is "+", and the electronic device can use the mapping relationship between the game function and the graphic shape. It is determined that the interface element 210 corresponds to the "open aiming" function. In the embodiments of the present application, the manner in which the electronic device determines its corresponding first function through the first interface element is not specifically limited.
电子设备还可以确定第一界面元素的位置,例如,电子设备可以将第一界面元素与第一界面元素在显示屏上的绝对位置坐标信息进行关联,如得到表3所示的对应关系。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, as shown in Table 3 is obtained.
S803,该电子设备将第一手柄按键与第一位置相关联,该一个或者多个手柄按键包括第一手柄按键。S803: The electronic device associates the first handle button with the first position, and the one or more handle buttons include the first handle button.
示例性的,如图2中的(d)所示,当手机检测到用户点击“自动映射键位”的操作后,可以将手柄按键映射到界面元素所在的位置,如将LB键映射到界面元素210所在的位置;将A键映射到界面元素212所在的位置。Exemplarily, as shown in Figure 2(d), when the mobile phone detects that the user has clicked the "automatic key mapping" operation, it can map the handle button to the location of the interface element, such as mapping the LB key to the interface The location of the element 210; the A key is mapped to the location of the interface element 212.
可选地,电子设备可以将除方向键203以外的其他手柄按键随机映射到各个界面元素所在的位置处。Optionally, the electronic device may randomly map other handle buttons except for the direction key 203 to the location where each interface element is located.
本申请实施例中,电子设备可以不对方向键203进行随机映射。电子设备在确定界面元素211对应游戏功能“上下左右移动”后,可以将手柄按键203映射到界面元素211所在的位置。In the embodiment of the present application, the electronic device may not perform random mapping on the direction key 203. After determining that the interface element 211 corresponds to the game function "move up and down, left and right", the electronic device can map the handle button 203 to the location where the interface element 211 is located.
可选地,该电子设备可以保存第一游戏按键与第一功能的第二映射关系,该电子设备将第一手柄按键与第一位置相关联,包括:Optionally, the electronic device may save a second mapping relationship between the first game button and the first function, and the electronic device associating the first handle button with the first position includes:
该电子设备根据该第二映射关系,将该第一手柄按键与该一位置相关联。The electronic device associates the first handle button with the position according to the second mapping relationship.
示例性的,电子设备可以保存如表1所示的第二映射关系。Exemplarily, the electronic device may save the second mapping relationship shown in Table 1.
在电子设备确定第一界面元素对应的第一功能后,可以根据表1所示的映射关系,将第一手柄按键与第一位置相关联。例如,当电子设备确定界面元素210对应游戏功能“开启瞄准”,且游戏功能“开启瞄准”在对战界面上对应位置1,那么电子设备可以根据表1所示的映射关系将LB键与位置1相关联。After the electronic device determines the first function corresponding to the first interface element, it can associate the first handle button 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 "enable aiming", and the game function "enable 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. Associated.
本申请实施例中,手机可以提前保存用户习惯的手柄按键与游戏按键的映射关系。例如以Xbox、PS4等主流手柄为例,经过大量用户的实际体验可以得出PS4游戏手柄中的X键属于最容易被控制的按键。而对于FPS游戏中,游戏功能“射击”是用户最常使用的一个游戏按键,那么手机可以保存X键与游戏功能“射击”的映射关系。这样可以避免用户多次调整手柄按键与游戏按键的映射关系的繁琐操作,提高了电子设备的智能化程度,从而有助于提升用户体验。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 controllers such as Xbox and PS4 as an example, after a large number of users' actual experience, it can be concluded that the X button in the PS4 game controller is the most easily controlled button. For FPS games, the game function "shooting" is the most commonly used game button by users, so the phone can save the mapping relationship between the X button and the game function "shooting". In this way, the user can avoid the cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, which improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
可选地,该方法800还包括:Optionally, the method 800 further includes:
该电子设备响应于用户将第二手柄按键与第一功能相关联的操作,自动将该第二映射关系更新为第二手柄按键与第一功能的映射关系,该一个或者多个手柄按键包括该第二手柄按键。In response to the user's operation of associating the second handle button with the first function, the electronic device automatically updates the second mapping relationship to the mapping relationship between the second handle button and the first function, and the one or more handle buttons include the The second handle button.
示例性的,如图4中的(c)所示,当用户清空了手柄按键和游戏按键的映射关系后,可以调整自己希望的手柄按键和游戏按键的映射关系。如当手机检测到用户将RB键移动到界面元素210所在的位置1(对应的游戏功能为“开启瞄准”)后,可以将RB键与界面元素210所在的位置1相关联。由于之前手机中保存的是LB键与游戏功能“开启瞄准”的映射关系,那么此时手机可以将该映射关系更新为RB键与游戏功能“开启瞄准”的映射关系。Exemplarily, as shown in FIG. 4(c), after the user has cleared 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 that he wants. For example, when the mobile phone detects that the user has moved 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 the position 1 where the interface element 210 is located. Since the previous mobile phone saved the mapping relationship between the LB key and the game function "turn on aiming", the mobile phone can update the mapping relationship to the mapping relationship between the RB key and the game function "turn on aiming" at this time.
示例性的,如图4中的(c)所示,手机检测到用户点击“更新并保存”的操作后,可以将表1所示的映射关系更新为表4所示的映射关系。Exemplarily, as shown in (c) of FIG. 4, the mobile phone can update the mapping relationship shown in Table 1 to the mapping relationship shown in Table 4 after detecting that the user has clicked the "update and save" operation.
本申请实施例中,当手机在检测到用户更新上一次保存的手柄按键与游戏按键的映射关系后,手机可以将用户调整后的手柄按键与游戏按键保存下来,这样方便用户下一次进行游戏体验时,电子设备直接根据调整后的映射关系进行手柄按键与界面元素位置的关联。这样有助于避免用户多次调整手柄按键与游戏按键的映射关系的繁琐操作,提高了电子设备的智能化程度,从而有助于提升用户体验。In the embodiment of this 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, which is convenient for the user to experience the game next time At this 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 user's cumbersome operation of repeatedly adjusting the mapping relationship between the handle buttons and the game buttons, and improves the degree of intelligence of the electronic device, thereby helping to improve the user experience.
S804,该电子设备响应于获取到手柄发送的第一信息,在该第一位置执行对第一功能的响应操作,所述第一信息用于指示所述手柄检测到用户按压所述第一手柄按键。S804: In response to acquiring the first information sent by the handle, the electronic device performs a response operation to the first function at the first position, where the first information is used to indicate that the handle detects that the user presses the first handle button.
在电子设备完成将第一手柄按键与第一位置相关联后,电子设备接收到手柄按键发送的第一信息,电子设备可以在第一位置处执行对第一功能的响应操作。例如,用户点击了手柄上的LB键,手柄检测到用户点击了LB键后,可以向手机发送信息i 1,该第一信息指示用户点击了LB键。手机响应于接收到该信息i 1,在位置1执行响应操作,完成“开启瞄准”功能。 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 the information i 1 to the mobile phone. The first information indicates that the user has clicked the LB button. In response to receiving the information i 1 , the mobile phone performs a response operation at position 1 to complete the "turn on aiming" function.
可选地,该方法800还包括:Optionally, the method 800 further includes:
该电子设备响应于用户将该第一界面元素从该第一位置移动到该第一界面上的第二位置的操作,自动将该第一手柄按键与该第二位置相关联;The electronic device automatically associates the first handle button with the second position 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;
该电子设备响应于获取到该第一信息,在该第二位置执行对该第一功能的响应操作。In response to acquiring the first information, the electronic device performs a response operation to the first function at the second location.
示例性的,如图2中的(e)所示,当手柄检测到用户点击A键的操作后,手柄可以 向手机发送信息i 2,该信息i 2用于指示手柄检测到用户点击了A键。那么手机响应于接收到信息i 2,在位置1执行响应操作,完成“跳跃”功能。 Exemplarily, as shown in Figure 2(e), when the handle detects that the user has clicked the A button, the handle can send information i 2 to the mobile phone, and this information i 2 is used to indicate that the handle detects that the user has clicked A key. Then, in response to receiving the information i 2 , the mobile phone performs a response operation at position 1 to complete the "jumping" function.
如图3中的(a)所示,手机检测到用户将界面元素212从显示屏上的位置1移动到位置6。手机可以响应于用于将界面元素212从显示屏上的位置1移动到位置6的操作,将A键与位置6相关联。当手柄检测到用户点击A键的操作后,手柄可以向手机发送信息i 3,该信息i 3用于指示手柄检测到用户点击了A键。那么手机响应于接收到信息i 3,在位置6执行响应操作,完成“跳跃”功能。 As shown in Fig. 3(a), the mobile phone detects that the user has moved the interface element 212 from position 1 to position 6 on the display screen. The mobile phone may associate the A key with the position 6 in response to the operation for moving the interface element 212 from the position 1 to the position 6 on the display screen. When the handle detects that the user clicks the A button, the handle can send information i 3 to the mobile phone, and the information i 3 is used to indicate that the handle detects that the user has clicked the A button. Then, in response to receiving the information i 3 , the mobile phone performs a response operation at position 6 to complete the "jumping" function.
本申请实施例中,当电子设备检测到界面元素的位置发生变化后,电子设备可以自动更新手柄按键和界面元素的位置的关联关系,从而保证用户在点击手柄按键后,手机可以自动执行响应操作。这样有助于避免了用户手动调整手柄按键与游戏功能所在位置的关联关系,提高了电子设备的智能化程度,有助于提升用户的游戏体验。In the embodiments of this application, when the electronic device detects that the position of the interface element has changed, the electronic device can automatically update the association relationship between the handle button and the position of the interface element, thereby ensuring that the mobile phone can automatically perform a response operation after the user clicks the handle button . This helps to avoid the user from manually adjusting the association relationship between the handle button and the location of the game function, improves the degree of intelligence of the electronic device, and helps to improve the user's game experience.
一个实施例中,电子设备可以保存第一手柄按键、第一功能和第一功能对应的特征点集合的第三映射关系,该方法800中S802-S803的过程可以是:In an embodiment, the electronic device may save the third mapping relationship of the first handle button, the first function, and the feature point set corresponding to the first function. The process of S802-S803 in the method 800 may be:
电子设备提取第一界面元素的特征点;The electronic device extracts the feature points of the first interface element;
该电子设备根据第三映射关系,在第一界面元素的特征点与第一功能对应的特征点集合的匹配度大于或者等于预设值时,确定第一界面元素对应第一功能;The electronic device determines 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 feature point set corresponding to the first function is greater than or equal to a preset value according to the third mapping relationship;
该第一电子设备根据第三映射关系,将第一手柄按键与第一位置相关联。The first electronic device associates the first handle button with the first position according to the third mapping relationship.
应理解,上述实施例中的第一映射关系和第二映射关系可以组成该第三映射关系。该第三映射关系可以如表5或者表7所示。示例性的,如图2中的(d)所示,手机可以提取界面元素210的特征点,手机在确定界面元素210的特征点与表5中“开启瞄准”对应的特征点集合的匹配度大于或者等于预设值后,确定该界面元素210对应游戏功能“开启瞄准”。手机可以根据表5所示的映射关系,将LB键与界面元素210所在的位置1相关联。It should be understood that the first mapping relationship and the second mapping relationship in the foregoing embodiment may constitute the third mapping relationship. The third mapping relationship may be as shown in Table 5 or Table 7. Exemplarily, as shown in FIG. 2(d), the mobile phone can extract the feature points of the interface element 210, and the mobile phone determines the matching degree between the feature points of the interface element 210 and the feature point set corresponding to “on aiming” in Table 5 After the value is greater than or equal to the preset value, it is determined 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.
本申请实施例还提供了一种电子设备,该电子设备可以包括如图1所示的处理器110以及存储器,存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行方法800中S801、S802、S803和S804的步骤。An embodiment of the present application also provides an electronic device, which may include a processor 110 and a memory as shown in FIG. 1, where 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 one or more processors, the electronic device is caused to execute the steps S801, S802, S803, and S804 in the method 800.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (11)

  1. 一种手柄按键映射的方法,所述方法应用于具有显示屏的电子设备,所述电子设备与手柄通过有线或者无线的方式连接,所述手柄包括一个或者多个手柄按键,其特征在于,所述方法包括:A method for mapping handle buttons, the method is applied to an electronic device with a display screen, the electronic device and the handle are connected in a wired or wireless manner, the handle includes one or more handle buttons, and is characterized in that: The methods include:
    通过所述显示屏显示第一界面,所述第一界面上包括第一界面元素;Displaying a first interface through the display screen, and 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 the position of the first interface element on the first interface;
    将第一手柄按键与所述第一位置相关联,所述一个或者多个手柄按键包括所述第一手柄按键;Associating a first handle button with the first position, and the one or more handle buttons include the first handle button;
    响应于获取到所述手柄发送的第一信息,在所述第一位置执行对所述第一功能的响应操作,所述第一信息用于指示所述手柄检测到用户按压所述第一手柄按键。In response to acquiring the first information sent by the handle, a response operation to the first function is performed at the first position, and the first information is used to indicate that the handle detects that the user presses the first handle button.
  2. 如权利要求1所述的方法,其特征在于,所述电子设备中保存所述第一功能与所述第一功能对应的特征点集合的第一映射关系,所述确定所述第一界面元素对应的第一功能,包括:The method of claim 1, wherein the electronic device stores a first mapping relationship between the first function and the feature point set corresponding to the first function, and the first interface element is determined The corresponding first function includes:
    提取所述第一界面元素的特征点;Extracting feature points of the first interface element;
    在所述第一界面元素的特征点与所述第一功能对应的特征点集合的匹配度大于或者等于预设值时,确定所述第一界面元素对应所述第一功能。When the matching degree between the feature point 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.
  3. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    响应于用户将所述第一界面元素从所述第一位置移动到所述第一界面上的第二位置的操作,自动将所述第一手柄按键与所述第二位置相关联;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 acquiring the first information, a response operation to the first function is performed at the second location.
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述电子设备中保存所述第一手柄按键与所述第一功能的第二映射关系;The method according to any one of claims 1 to 3, wherein a second mapping relationship between the first handle button and the first function is stored in the electronic device;
    所述将第一手柄按键与所述第一位置相关联,包括:The associating the first handle button with the first position includes:
    根据所述第二映射关系,将所述第一手柄按键与所述第一位置相关联。According to the second mapping relationship, the first handle button is associated with the first position.
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, wherein the method further comprises:
    响应于用户将第二手柄按键与所述第一位置相关联的操作,自动将所述第二映射关系更新为所述第二手柄按键与所述第一功能的映射关系,所述一个或者多个手柄按键包括所述第二手柄按键。In response to the user's operation of associating the second handle button with the first position, the second mapping relationship is automatically updated to the mapping relationship between the second handle button and the first function, and the one or more The two handle buttons include the second handle button.
  6. 一种电子设备,所述电子设备与手柄通过有线或者无线的方式连接,所述手柄包括一个或者多个手柄按键,其特征在于,所述电子设备包括:An electronic device, wherein the electronic device and a handle are connected in a wired or wireless manner, the handle includes one or more handle buttons, and is characterized in that the electronic device includes:
    显示屏;Display screen
    一个或多个处理器;One or more processors;
    一个或多个存储器;One or more memories;
    所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行:The one or more memories stores one or more computer programs, and the one or more computer programs include instructions, which when executed by the one or more processors, cause the electronic device to execute:
    通过所述显示屏显示第一界面,所述第一界面上包括第一界面元素;Displaying a first interface through the display screen, and 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 the position of the first interface element on the first interface;
    将第一手柄按键与所述第一位置相关联,所述一个或者多个手柄按键包括所述第一手柄按键;Associating a first handle button with the first position, and the one or more handle buttons include the first handle button;
    响应于获取到所述手柄发送的第一信息,在所述第一位置执行对所述第一功能的响应操作,所述第一信息用于指示所述手柄检测到用户按压所述第一手柄按键。In response to acquiring the first information sent by the handle, a response operation to the first function is performed at the first position, and the first information is used to indicate that the handle detects that the user presses the first handle button.
  7. 如权利要求6所述的电子设备,其特征在于,所述电子设备中保存所述第一功能与所述第一功能对应的特征点集合的映射关系,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行:The electronic device of claim 6, wherein the electronic device stores the mapping relationship between the first function and the feature point set corresponding to the first function, and when the instruction is controlled by the one or more When each processor executes, the electronic device is caused to execute:
    提取所述第一界面元素的特征点;Extracting feature points of the first interface element;
    在所述第一界面元素的特征点与所述第一功能对应的特征点集合的匹配度大于或者等于预设值时,确定所述第一界面元素对应所述第一功能。When the matching degree between the feature point 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.
  8. 如权利要求6或7所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行:8. The electronic device of claim 6 or 7, wherein when the instruction is executed by the one or more processors, the electronic device is caused to execute:
    响应于用户将所述第一界面元素从所述第一位置移动到所述第一界面上的第二位置的操作,自动将所述第一手柄按键与所述第二位置相关联;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 acquiring the first information, a response operation to the first function is performed at the second location.
  9. 如权利要求6至8中任一项所述的电子设备,其特征在于,所述电子设备中保存所述第一手柄按键与所述第一功能的第二映射关系,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行:The electronic device according to any one of claims 6 to 8, wherein a second mapping relationship between the first handle button and the first function is stored in the electronic device, and when the instruction is When the one or more processors execute, the electronic device is caused to execute:
    根据所述第二映射关系,将所述第一手柄按键与所述第一位置相关联。According to the second mapping relationship, the first handle button is associated with the first position.
  10. 如权利要求9所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行:The electronic device of claim 9, wherein when the instruction is executed by the one or more processors, the electronic device is caused to execute:
    响应于用户将第二手柄按键与所述第一位置相关联的操作,自动将所述第二映射关系更新为所述第二手柄按键与所述第一功能的映射关系,所述一个或者多个手柄按键包括所述第二手柄按键。In response to the user's operation of associating the second handle button with the first position, the second mapping relationship is automatically updated to the mapping relationship between the second handle button and the first function, and the one or more The two handle buttons include the second handle button.
  11. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至5中任一项所述的手柄按键映射的方法。A computer-readable storage medium, characterized by comprising computer instructions, when the computer instructions run on an electronic device, cause the electronic device to execute the handle button mapping according to any one of claims 1 to 5 Methods.
PCT/CN2020/140834 2020-05-11 2020-12-29 Handle button mapping method and electronic device WO2021227525A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202080100683.1A CN115515690A (en) 2020-05-11 2020-12-29 Handle key mapping method and electronic equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
RU2020115614 2020-05-11
RU2020115614 2020-05-11

Publications (1)

Publication Number Publication Date
WO2021227525A1 true WO2021227525A1 (en) 2021-11-18

Family

ID=78526395

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/140834 WO2021227525A1 (en) 2020-05-11 2020-12-29 Handle button mapping method and electronic device

Country Status (2)

Country Link
CN (1) CN115515690A (en)
WO (1) WO2021227525A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130190083A1 (en) * 2010-06-03 2013-07-25 Michael Toy Graphical user interface, system and method for implementing a game controller on a touch-screen device
CN105477854A (en) * 2014-12-19 2016-04-13 广州爱九游信息技术有限公司 Handle control method, device and system applied in intelligent terminal
CN110102046A (en) * 2019-05-13 2019-08-09 原点显示(深圳)科技有限公司 The method of customized game peripheral matching game
CN110898424A (en) * 2019-10-21 2020-03-24 维沃移动通信有限公司 Display control method and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130190083A1 (en) * 2010-06-03 2013-07-25 Michael Toy Graphical user interface, system and method for implementing a game controller on a touch-screen device
CN105477854A (en) * 2014-12-19 2016-04-13 广州爱九游信息技术有限公司 Handle control method, device and system applied in intelligent terminal
CN110102046A (en) * 2019-05-13 2019-08-09 原点显示(深圳)科技有限公司 The method of customized game peripheral matching game
CN110898424A (en) * 2019-10-21 2020-03-24 维沃移动通信有限公司 Display control method and electronic equipment

Also Published As

Publication number Publication date
CN115515690A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
WO2020216156A1 (en) Screen projection method and computing device
CN110147805B (en) Image processing method, device, terminal and storage medium
CN109308727B (en) Virtual image model generation method and device and storage medium
WO2021244457A1 (en) Video generation method and related apparatus
CN110503959B (en) Voice recognition data distribution method and device, computer equipment and storage medium
WO2022179376A1 (en) Gesture control method and apparatus, and electronic device and storage medium
CN108288032B (en) Action characteristic acquisition method, device and storage medium
CN111445901B (en) Audio data acquisition method and device, electronic equipment and storage medium
WO2019149028A1 (en) Application download method and terminal
WO2022057435A1 (en) Search-based question answering method, and storage medium
CN110796248A (en) Data enhancement method, device, equipment and storage medium
CN110837858A (en) Network model training method and device, computer equipment and storage medium
CN113763931B (en) Waveform feature extraction method, waveform feature extraction device, computer equipment and storage medium
WO2021227525A1 (en) Handle button mapping method and electronic device
WO2023040603A1 (en) Search method, terminal, server and system
CN110990549A (en) Method and device for obtaining answers, electronic equipment and storage medium
CN113569894B (en) Training method of image classification model, image classification method, device and equipment
CN111310701B (en) Gesture recognition method, device, equipment and storage medium
CN111367492B (en) Webpage display method and device and storage medium
CN111597823B (en) Method, device, equipment and storage medium for extracting center word
CN110928913B (en) User display method, device, computer equipment and computer readable storage medium
CN112311652B (en) Message sending method, device, terminal and storage medium
CN114281937A (en) Training method of nested entity recognition model, and nested entity recognition method and device
CN113569052A (en) Knowledge graph representation learning method and device
CN113949936A (en) Screen interaction method and device of electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20935586

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20935586

Country of ref document: EP

Kind code of ref document: A1