Method and apparatus for adjusting virtual keys, electronic device, and storage medium

By adjusting the position of the virtual keys based on the user's historical operation information, the problem of key layout adaptation in game applications is solved, and the game experience and efficiency are improved.

WO2024183290A1PCT designated stage expired Publication Date: 2024-09-12NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/125994
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-06
Filing Date
2023-10-23
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

The button layout in game applications is difficult to adapt to the user's needs in game battles, resulting in operational errors and repeated adjustments, affecting the gaming experience.

Method used

By monitoring the user's historical operation information, the operation center of the virtual key is determined, and the key position is adjusted according to the center to shorten the distance between the key center and the operation center, ensuring that the keys are more in line with the user's personalized needs.

Benefits of technology

It simplifies the adjustment process of virtual keys, improves adjustment efficiency and user experience, and avoids the need for users to make repeated adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023125994_12092024_PF_FP
    Figure CN2023125994_12092024_PF_FP
Patent Text Reader

Abstract

Provided are a method and apparatus for adjusting virtual keys, an electronic device, and a storage medium. The method comprises: determining, according to historical operation information of a user, an operation center for each virtual key in a plurality of virtual keys displayed on a terminal device (201); and adjusting the corresponding virtual key according to the operation center, so as to reduce the distance between a key center of the virtual key and the corresponding operation center (202). The present disclosure achieves the adaptive adjustment of virtual keys according to the historical operation information of the user, thus adapting the virtual keys to the habit of a user in a practice scenario. Therefore, the present disclosure avoids repeated adjustment of virtual keys by a user, thus simplifying the adjustment of virtual keys by the user, and improving the adjustment efficiency of virtual keys and the user's experience.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual key adjustment method and device, electronic device, and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application filed on March 6, 2023, with application number 202310228162.X, entitled “Method and device for adjusting virtual keys, electronic device, and storage medium”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of computer technology, and in particular to a method and device for adjusting virtual keys, an electronic device, and a storage medium. Background Art

[0004] In related technologies, game applications often have a default button layout. Some game applications allow users to adjust the button positions in the settings. However, since these settings adjustments are difficult to simulate the actual combat scenarios, the set button positions still cannot be adapted to the user's actual combat needs, leading to operational errors in combat. This results in users having to repeatedly adjust the settings, affecting the gaming experience.

[0005] Summary of the Invention

[0006] The present disclosure provides a virtual key adjustment method, a virtual key adjustment device, an electronic device, and a computer-readable storage medium.

[0007] According to the first aspect of the present disclosure, a method for adjusting virtual keys is provided, wherein multiple virtual keys are displayed on a display screen of a terminal device, and the method comprises: determining an operation center of each of the virtual keys based on the user's historical operation information; and adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0008] According to the second aspect of the present disclosure, a virtual key adjustment device is provided, which displays multiple virtual keys through a display screen of a terminal device. The device includes: an operation center determination module, which is used to determine the operation center of each of the virtual keys based on the user's historical operation information; and a virtual key adjustment module, which is used to adjust the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0009] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the virtual key adjustment method of the first aspect described above is implemented.

[0010] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for adjusting the virtual key according to the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] FIG1 is a schematic diagram of a virtual key adjustment process in the related art;

[0012] FIG2 is a flowchart of a method for adjusting a virtual key according to one embodiment of the present disclosure;

[0013] FIG3 is a partial schematic diagram of a setting page according to one embodiment of the present disclosure;

[0014] FIG4 is a schematic diagram of a virtual key adjustment process according to one embodiment of the present disclosure;

[0015] FIG5 is a schematic diagram of a virtual key adjustment process according to one embodiment of the present disclosure;

[0016] FIG6 is a schematic diagram of a virtual key adjustment process according to one embodiment of the present disclosure;

[0017] FIG7 is a schematic diagram of a pop-up dialog box according to one embodiment of the present disclosure;

[0018] FIG8 is a structural block diagram of a device for adjusting a virtual key according to one embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] To make the above-mentioned purposes, features, and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments. It is apparent that the embodiments described are only a portion of the embodiments of the present disclosure, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without creative effort are also within the scope of protection of the present disclosure.

[0020] The main button layout in related mobile games often has a set of default solutions, but because everyone's hand shape, finger length, and usage habits are different, the default button layout is difficult to meet personalized needs.

[0021] Some gaming applications allow users to adjust button positions in the settings. However, because these adjustments don't simulate actual combat scenarios, the configured button positions often struggle to match the user's actual combat needs. This can lead to in-game operational errors, forcing users to repeatedly adjust settings, impacting their gaming experience.

[0022] In response to the shortcomings of the related art, the inventors have come up with the idea of ​​monitoring the user's target operation information on the target key to determine the optimal position of the target key in the actual usage scenario, and moving the key center of the target key to the optimal position. However, after the key center of the target key is moved to the optimal position, it may overlap with other keys. In this case, in order to ensure that the target key is in the optimal position, it is necessary to move the other keys that overlap with the target key. As shown in Figure 1, when there are keys 1 and 2 in the interface, key 1 is the target key, and the optimal position of key 1 is P (represented by a solid circle in the figure); when the key center of key 1 (represented by a hollow circle in the figure, where the hollow solid circle in the figure represents the current key center and the hollow dotted circle represents the original key center) is moved to position P, key 1 and key 2 overlap. At this time, the key center of key 2 is moved to position Q, so that key 1 and key 2 do not overlap. This method may cause the adjustment of other keys to widen the gap with the user's requirements for the other keys.

[0023] In view of this, an embodiment of the present disclosure provides a method for adjusting virtual keys, which adaptively adjusts each virtual key according to the user's historical operation information to shorten the distance between the key center of each virtual key and the corresponding operation center, so that the adjusted overall virtual key is more in line with the user's personalized needs in actual usage scenarios.

[0024] The virtual key adjustment method provided by the embodiments of the present disclosure can be run on a local terminal device or a server. When the virtual key adjustment method is run on the server, the virtual key adjustment method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0025] In an optional embodiment, various cloud applications, such as cloud games, can be run under the cloud interaction system. Taking cloud games as an example, cloud games refer to a gaming method based on cloud computing. In the cloud game operation mode, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the virtual key adjustment method are completed on the cloud game server. The role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a first terminal device, a TV, a computer, a handheld computer, etc.; however, the virtual key adjustment method is performed by the cloud game server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses the data including the game screen of the virtual keys, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0026] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading and installing the game program through an electronic device and running it. The local terminal device can provide the graphical user interface to the player in a variety of ways, for example, it can be rendered and displayed on the terminal's display screen, or provided to the player through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present the graphical user interface, the graphical user interface includes the game screen, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0027] Referring to FIG2 , a method for adjusting virtual keys provided by an embodiment of the present disclosure is shown. By running an application, multiple virtual keys can be displayed on the display screen of a terminal device. The terminal device can be an electronic device such as a smartphone, tablet computer, game console, e-book reader, multimedia player, wearable device, etc. The application can be run on the terminal device, for example, running a game program on the processor of the terminal device and displaying the game screen and virtual keys for controlling the game on the display screen of the terminal device. The application can also be run on another terminal device connected to the terminal device by wire or wireless connection, for example, running a game program on the processor of the other terminal device connected to the terminal device and displaying the game screen on the display screen of the other terminal device, while also displaying virtual keys for controlling the game on the display screen of the terminal device. The application can also be run on a server connected to the terminal device by communication, for example, running a game program on the server and displaying the game screen and virtual keys for controlling the game on the display screen of the terminal device. For another example, running a game program on the server and displaying the game screen on the display screen of the other terminal device and displaying virtual keys for controlling the game on the display screen of the terminal device.

[0028] The method may include the following steps 201 and 202:

[0029] Step 201: Determine the operation center of each virtual key according to the user's historical operation information.

[0030] Taking games as an example, after the game starts, the user can play the game by triggering a virtual button. Therefore, the trigger position information when the user triggers the virtual button during the game can be obtained. The trigger position information is the historical operation information.

[0031] The historical operation information includes the single-key historical operation information of each virtual key. According to the single-key historical operation information corresponding to each virtual key, the operation center of each virtual key can be obtained.

[0032] Step 202: Adjust the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0033] After obtaining the operation center of each virtual key, the corresponding virtual key can be adjusted according to the position of the operation center, including adjusting the position of the virtual key and / or adjusting the shape of the virtual key; so that the distance between the key center of the virtual key and the corresponding operation center is shortened, that is, the distance between the new key center of each adjusted virtual key and the corresponding operation center is less than the distance between the original key center of the virtual key and the operation center.

[0034] The disclosed embodiment determines the operation center of each virtual key based on the user's historical operation information; adjusts the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center; realizes that the virtual key can be adaptively adjusted according to the user's historical operation information, and makes the adjusted virtual key more suitable for the user's usage habits in actual usage scenarios. Therefore, the user can avoid repeatedly adjusting the virtual key, that is, simplifies the way the user adjusts the virtual key, improves the efficiency of virtual key adjustment, and improves the user experience.

[0035] Next, the method for adjusting the virtual keys in this exemplary embodiment will be further described.

[0036] In some optional embodiments of the present disclosure, while an application is running, a user can adjust the position and / or shape of a virtual key corresponding to the application to obtain multiple virtual keys displayed on the display screen of a terminal device. It is understood that the multiple virtual keys displayed on the display screen of the terminal device may be virtual keys adjusted by the user.

[0037] In step 201, the operation center of each virtual key is determined according to the user's historical operation information.

[0038] Each virtual key has a corresponding function and triggering method. The triggering method can include touch operations that contact the virtual key, such as single-clicking, sliding, double-clicking, and long-pressing. The triggering method can also include non-contact operations on the virtual key, such as operations where the projection point of the operating medium is on the virtual key. Historical operation information refers to the operation information that the user has performed to trigger the virtual key. The user's historical operation information can be obtained by monitoring the trigger position information of the operating medium on the display screen when the function of the virtual key is triggered. The operating medium can be a finger, a stylus, etc.

[0039] The historical operation information includes the single-key historical operation information of each virtual key. According to the single-key historical operation information corresponding to each virtual key, the operation center of each virtual key can be obtained. It can be understood that for each virtual key, its single-key historical operation information includes at least one trigger position information related to the virtual key. For example, for a virtual key triggered by sliding, the trigger position information may include the click position information obtained by quantifying the sliding trajectory of the sliding operation, or include the start and end position information of the sliding operation. For a virtual key triggered by long pressing, the trigger position information may include the contact point position information of the long pressing operation. By processing all the trigger position information in the single-key historical operation information, the center point of all the trigger position information can be obtained, and the center point is the operation center of the virtual key. In other words, the operation center of the virtual key is used to represent the user's usage habits when triggering the virtual key in the actual usage scenario, and can more accurately reflect the position where the virtual key actually needs to be set, so that the virtual key can be adaptively adjusted based on the operation center of the virtual key in the future, so as to obtain a virtual key that better meets the user's personalized needs.

[0040] In some optional embodiments of the present disclosure, a switch control for controlling the adjustment function of the virtual key can be added to the settings page of the application. As shown in Figure 3, a switch control for the key adaptive position can be set on the settings page of the application, and the switch control for the key adaptive position is a switch control for controlling the adjustment function of the virtual key. When the switch control for the key adaptive position is in the on state, the above-mentioned step of determining the operation center of each of the virtual keys based on the user's historical operation information is executed; when the switch control for the key adaptive position is in the off state, the above-mentioned step of determining the operation center of each of the virtual keys based on the user's historical operation information is not executed. It can be understood that in some optional embodiments of the present disclosure, the above-mentioned step 201 may include:

[0041] In response to the start-up operation of the key adjustment control, the operation center of each virtual key is determined according to the user's historical operation information.

[0042] In this embodiment, when a user activates the switch for adaptive key positions, the user's historical operation information is obtained and, based on this information, the operation center of each virtual key is determined. The user can then independently decide whether to allow adaptive key position adjustment to meet the needs of different users in different scenarios. For example, when a user (device owner) temporarily lends a terminal device to another person, since the current user (other person) is not the owner, the user generally does not want the terminal device to adaptively adjust the key positions. Therefore, the adaptive key position adjustment function can be disabled by turning off the switch for adaptive key positions.

[0043] Furthermore, in some optional embodiments of the present disclosure, while adding a switch control for controlling the adjustment function of the virtual key to the settings page of the application, a period setting input box for indicating the virtual key adaptive adjustment period can also be added, or multiple different adjustment period options for indicating the virtual key adaptive adjustment period can be added, so that the user can independently determine the virtual key adaptive adjustment period. It is understood that in some optional embodiments of the present disclosure, the above-mentioned determination of the operation center of each virtual key based on the user's historical operation information in response to the activation operation of the key adjustment control can include:

[0044] In response to a start-up operation of the key adjustment control, a target adjustment period is determined. When the target adjustment period is reached, an operation center of each virtual key is determined according to historical operation information of the user within the adjustment period.

[0045] In this embodiment, before enabling the switch control for key adaptive position, the user can set or select an adjustment period. After the user enables the switch control for key adaptive position, the user's set or selected adjustment period is obtained, i.e., a target adjustment period is determined, and user operation information is collected within the target adjustment period. When the target adjustment period is reached, the key center of each virtual key is determined based on the user's historical operation information collected within the target adjustment period. If the user does not set or select an adjustment period, the user's historical operation information is collected according to the default adjustment period.

[0046] Taking games as an example, when the target adjustment cycle is determined to be 10 games, after the switch control of the button adaptive position is turned on, the user's operation information during the next 10 games is obtained. When the 10th game is over, the operation center of each virtual button is determined based on the currently obtained historical operation information.

[0047] In step 202 , the corresponding virtual key is adjusted according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0048] Since the operation center can more accurately reflect the user's needs for virtual keys in actual usage scenarios, after determining the operation center of each virtual key, the position and / or shape of the corresponding virtual key can be adjusted according to the operation center to shorten the distance between the key center of each virtual key and the corresponding operation center, so that all virtual keys can better meet the user's personalized needs.

[0049] In some optional embodiments of the present disclosure, adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center may include:

[0050] The virtual key is moved toward the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center.

[0051] In this embodiment, when adjusting the virtual keys, each virtual key can be moved sequentially or simultaneously in the direction of the corresponding operation center, and the movement is stopped when the key center of the virtual key coincides with the corresponding operation center, so that the operation center is located at the center position of the moved virtual key. If there is no conflict between the moved virtual keys, that is, there is no overlapping between the key areas of the moved virtual keys, the position of the moved virtual key at this time is used as the final position of the virtual key. If there is a conflict between the moved virtual keys, the moved virtual keys need to be further processed. Various processing methods are provided later, which will not be repeated here.

[0052] In some optional embodiments of the present disclosure, after moving the virtual key toward the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center, the method may further include:

[0053] If there is a conflict between the moved virtual keys, an adjustment vector is determined for each conflicting key based on the operation center and the original key center of each conflicting key, where the starting point of the adjustment vector is the operation center of the corresponding conflicting key and the end point is the original key center of the corresponding conflicting key;

[0054] Move each of the conflicting keys along the direction of the corresponding adjustment vector until the conflict disappears.

[0055] After the virtual keys are moved to a position where the key center coincides with the corresponding operation center, the position of each virtual key after movement can be obtained. When there is a conflict between the moved virtual keys, that is, when there is an overlapping portion between the key areas of the moved virtual keys, the conflicting virtual keys are obtained. For easy distinction, the virtual keys obtained at this time are recorded as conflicting keys, and the adjustment vectors of each conflicting key are determined based on the operation center and the original key center of each conflicting key. It can be understood that for each conflicting key, the corresponding adjustment vector is generated with its operation center as the starting point and the original key center as the end point.

[0056] Then, each conflicting key is moved in the direction of the corresponding adjustment vector, and the movement stops when the conflict disappears. During the movement process, each conflicting key can be moved simultaneously or sequentially. When moving simultaneously, the movement distance of each conflicting key per unit time can be equal, or the ratio of the movement distance of each conflicting key per unit time to its corresponding adjustment vector is equal. When moving sequentially, the single movement distance of each conflicting key is equal, or the ratio of the single movement distance of each conflicting key to its corresponding adjustment vector is equal.

[0057] In some optional embodiments of the present disclosure, the step of moving each of the conflicting keys along the direction of the corresponding adjustment vector until the conflict disappears includes:

[0058] Determining the movement speed of each of the conflicting keys;

[0059] Moving each of the conflicting keys simultaneously along the direction of the corresponding adjustment vector at a corresponding movement speed;

[0060] When the conflict of the target conflicting key disappears, the movement of the target conflicting key is stopped.

[0061] Among them, the target conflict key can be any conflict key. In the process of moving the conflict keys, this embodiment can first determine the moving speed of each conflict key, and the moving speed of different conflict keys can be different. For example, the moving speed can be related to the length of the adjustment vector corresponding to the conflict key, or it can also be related to the priority of the conflict key. For example, the higher the priority of the conflict key, the smaller the corresponding moving speed, so that the conflict key with a higher priority is relatively closer to the corresponding operation center when the conflict is resolved. And multiple conflict keys can move at the same time to improve the efficiency of key adaptive adjustment. For each conflict key, during the movement process, when it no longer conflicts with other virtual keys (virtual keys other than itself), the movement of the conflict key can be stopped.

[0062] As shown in FIG4 , after virtual keys 1, 2, 3, and 4 are moved to a position where the key center (in the figure, the hollow circle represents the key center, where the hollow solid circle represents the current key center and the hollow dashed circle represents the original key center) coincides with the corresponding operation center (in the figure, the solid circle represents the operation center), there is a conflict between virtual key 1 and virtual key 2, and there is also a conflict between virtual key 2 and virtual key 3. Therefore, virtual keys 1, 2, and 3 are respectively recorded as conflict key 1, conflict key 2, and conflict key 3. Virtual key 4, which does not conflict, remains unchanged. Conflicting keys 1, 2, and 3 are moved along the corresponding adjustment vector directions. The conflict with conflict key 1 disappears first. When the conflict with conflict key 1 disappears, the movement of conflict key 1 is stopped. Since the conflict between conflict key 2 and conflict key 3 still exists when the conflict with conflict key 1 disappears, the movement of conflict key 2 and conflict key 3 continues. When the conflict between conflict key 2 and conflict key 3 disappears, the movement of conflict key 2 and conflict key 3 stops, thereby achieving adaptive key adjustment.

[0063] Furthermore, in some optional embodiments of the present disclosure, the above-mentioned determining the movement speed of each of the conflicting keys may include:

[0064] The movement speed corresponding to each conflicting key is determined according to the length of the adjustment vector of each conflicting key; the movement speed is proportional to the length of the corresponding adjustment vector, and the ratio of the movement speeds of different conflicting keys is equal to the ratio of the lengths of the corresponding adjustment vectors.

[0065] In this embodiment, the corresponding movement speed can be determined based on the length of the adjustment vector for each conflicting key. It will be appreciated that, in this embodiment, conflicting keys with different adjustment vector lengths have corresponding movement speeds that are different. Specifically, the movement speed is proportional to the length of the corresponding adjustment vector, and the ratio of the movement speeds of different conflicting keys is equal to the ratio of the lengths of the corresponding adjustment vectors. That is, the ratio of the movement speed of each conflicting key to the length of its corresponding adjustment vector is the same, meaning that each conflicting key moves in equal proportion to the length of its corresponding adjustment vector.

[0066] For example, the adjustment vector length of the conflicting key 1 is a, and the adjustment vector length of the conflicting key 2 is b. Then, the moving speed of the conflicting key 1 may be a / c, and correspondingly, the moving speed of the conflicting key 2 is b / c.

[0067] In some optional embodiments of the present disclosure, after moving the virtual key toward the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center, the method may further include:

[0068] If there is a conflict between the moved virtual keys, each conflicting key is cut to separate the conflicting keys.

[0069] In this embodiment, when there is a conflict between the moved virtual keys, the conflicting virtual keys, i.e., the conflicting keys, can be obtained and separated by cutting to resolve the conflict. Cutting methods may include cutting based on the overlapping area between the conflicting keys, cutting based on the perpendicular median of the line connecting the operation centers of the conflicting keys, and so on.

[0070] In some optional embodiments of the present disclosure, the above-mentioned cutting of the conflicting keys to separate the conflicting keys may include:

[0071] determining a connection line between the two conflicting keys according to the operation centers of the two conflicting keys;

[0072] The two conflicting keys are cut according to the perpendicular midline of the connecting line to separate the two conflicting keys.

[0073] In this embodiment, the operation centers of two conflicting keys are connected to obtain a connection line between the two conflicting keys, that is, the operation centers of the conflicting keys are connected in pairs. The two conflicting keys connected by the connection line can be cut along the perpendicular median of the connection line to separate the two conflicting keys to resolve the conflict.

[0074] Furthermore, in some optional embodiments of the present disclosure, the above-mentioned cutting of the two conflicting keys according to the perpendicular midline of the connecting line to separate the two conflicting keys may include:

[0075] translating the perpendicular median line toward the operation center of the first conflicting key of the two conflicting keys by a preset distance to obtain a first parallel line;

[0076] translating the perpendicular bisector toward the operation center of the second conflicting key of the two conflicting keys by a preset distance to obtain a second parallel line;

[0077] The first conflicting key is cut along the first parallel lines, and the second conflicting key is cut along the second parallel lines, so that the first conflicting key and the second conflicting key are separated.

[0078] After determining the line connecting the two conflicting keys, this embodiment can further determine the perpendicular midline of the line, translate the perpendicular midline along the direction of the operation center of one of the conflicting keys by a preset distance to obtain a first parallel line, and translate the perpendicular midline along the direction of the operation center of the other conflicting key by the same distance to obtain a second parallel line. For ease of distinction, one of the conflicting keys is referred to as the first conflicting key, and the other conflicting key is referred to as the second conflicting key. The first conflicting key is cut along the first parallel line, retaining the portion where the operation center of the first conflicting key is located, and the second conflicting key is cut along the second parallel line, retaining the portion where the operation center of the second conflicting key is located, thereby separating the first conflicting key and the second conflicting key to resolve the conflict.

[0079] As shown in Figure 5, after virtual key 5, virtual key 6, virtual key 7 and virtual key 8 move to the position where the key center (the key center is represented by a hollow circle in the figure, where the hollow solid circle in the figure represents the current key center and the hollow dotted circle represents the original key center) coincides with the corresponding operation center (the operation center is represented by a solid circle in the figure), there is a conflict between virtual key 5 and virtual key 6, and there is also a conflict between virtual key 6 and virtual key 7. Therefore, virtual key 5, virtual key 6 and virtual key 7 are respectively recorded as conflict key 5, conflict key 6 and conflict key 7.

[0080] For conflicting keys 5 and 6, a line 1 can be obtained between the operation centers of conflicting keys 5 and 6; for conflicting keys 6 and 7, a line 2 can be obtained between the operation centers of conflicting keys 6 and 7. Based on line 1 and line 2, the corresponding perpendicular midline 3 and perpendicular midline 4 can be determined, respectively. The perpendicular midline 3 is translated 10 pixels toward the direction of conflicting keys 5 and 6, respectively, to obtain the first parallel line 5 and the second parallel line 6. The perpendicular midline 4 is translated 10 pixels toward the direction of conflicting keys 6 and 7, respectively, to obtain the first parallel line 7 and the second parallel line 8.

[0081] The conflict button 5 is cut into two parts using the first parallel line 5, retaining the part where the operation center of the conflict button 5 is located and discarding the part that does not contain the operation center. Accordingly, the conflict button 6 is cut into two parts using the second parallel line 6, retaining the part where the operation center of the conflict button 6 is located and discarding the part that does not contain the operation center. The conflict buttons 5 and 6 are now separated.

[0082] Similarly, the first parallel line 7 is used to cut the conflict key 6, retaining the part where the operation center of the conflict key 6 is located; the second parallel line 8 is used to cut the conflict key 7, retaining the part where the operation center of the conflict key 7 is located. At this time, the cut conflict key 6 and conflict key 7 are separated.

[0083] In some optional embodiments of the present disclosure, adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center may include:

[0084] Determining a movement vector of each virtual key according to an original key center and an operation center of each virtual key, where a starting point of the movement vector is the original key center of the corresponding virtual key and an end point is the operation center of the corresponding virtual key;

[0085] Each of the virtual keys is moved along the direction of the corresponding movement vector, and it is ensured that the adjusted virtual keys do not conflict with each other.

[0086] In this embodiment, when adjusting the virtual keys, each virtual key can be moved sequentially or simultaneously toward the corresponding operation center, and the movement stops when a conflict is approaching. The adjusted virtual key position obtained in this case can be considered as the position where the key center is closest to the operation center without changing the original shape of the virtual key.

[0087] For example, for each virtual key, a corresponding movement vector can be generated, starting from the original center of the virtual key and ending at the corresponding operation center. The virtual key is then moved along the direction of the corresponding movement vector while simultaneously detecting the edge positions of each virtual key. When the distance between any two virtual keys equals a preset distance, the movement of those two virtual keys stops. The preset distance can be set based on actual needs, for example, 10 pixels or 20 pixels.

[0088] During the movement process, each virtual key can be moved simultaneously or sequentially. When moving simultaneously, the movement distance of each virtual key per unit time can be equal, or the ratio of the movement distance of each virtual key per unit time to its corresponding movement vector is equal. When moving sequentially, the single movement distance of each virtual key is equal, or the ratio of the single movement distance of each virtual key to its corresponding movement vector is equal.

[0089] In some optional embodiments of the present disclosure, moving each virtual key along the direction of the corresponding movement vector to shorten the distance between the key center of the virtual key and the corresponding operation center may include:

[0090] determining an adjustment speed of each of the virtual keys;

[0091] Each of the virtual keys is moved simultaneously along the direction of the corresponding movement vector at the corresponding adjustment speed, and it is ensured that the adjusted virtual keys do not conflict with each other.

[0092] In this embodiment, during the adjustment of virtual keys, an adjustment speed for each virtual key can be determined. The adjustment speed indicates how fast the corresponding virtual key moves along the direction of the movement vector. The adjustment speeds for different virtual keys can be different. For example, the adjustment speed can be related to the length of the movement vector corresponding to the virtual key, or it can be related to the priority of the virtual key. For example, virtual keys with higher priorities have correspondingly faster adjustment speeds, so that virtual keys with higher priorities are relatively closer to the corresponding operation center when they stop moving. Multiple virtual keys can also move simultaneously to improve the efficiency of adaptive key adjustment. For each virtual key, during the adjustment process, when the distance between it and other virtual keys (excluding itself) reaches a preset distance, the virtual key and other virtual keys with the same distance from it can be stopped. Alternatively, for each virtual key, during the adjustment process, when the distance between it and other virtual keys is less than or equal to 0, a retraction operation can be performed, i.e., the virtual key and the other virtual keys are moved in the opposite direction, so that the distance between the virtual key and the other virtual keys is greater than 0, and then the movement stops.

[0093] Furthermore, in some optional embodiments of the present disclosure, the above-mentioned determining the adjustment speed of each virtual key may include:

[0094] The adjustment speed corresponding to each virtual key is determined according to the length of the movement vector of each virtual key; the adjustment speed is proportional to the length of the corresponding movement vector, and the adjustment speed ratio of different virtual keys is equal to the length ratio of the corresponding movement vector.

[0095] In this embodiment, the corresponding adjustment speed can be determined based on the length of the motion vector of each virtual key. Specifically, the adjustment speed is proportional to the length of the corresponding motion vector, and the ratio of the adjustment speeds of different virtual keys is equal to the ratio of the lengths of the corresponding motion vectors. That is, the ratio of the adjustment speed of each virtual key to the length of the corresponding motion vector is the same, that is, each virtual key moves in equal proportion to the length of its corresponding motion vector.

[0096] In some optional embodiments of the present disclosure, before adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center, it can be determined whether the distance between the operation center and the original key center of the corresponding virtual key is greater than a preset distance threshold. When the distance between the original key center of the virtual key and the corresponding operation center is not greater than the preset distance threshold, it can be considered that the virtual key can meet the user's personalized needs and the virtual key does not need to be adjusted. When the distance between the original key center of the virtual key and the corresponding operation center is greater than the preset distance threshold, the corresponding virtual key is adjusted according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0097] In some optional embodiments of the present disclosure, adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center may include:

[0098] When the operation area corresponding to the operation center is not within the corresponding virtual key, the virtual key and the operation area are merged to obtain a new virtual key.

[0099] When adjusting a virtual key in this embodiment, the operation area corresponding to each operation center is first determined based on each operation center. The operation area can be a circular area with a preset radius and the operation center as the center, or a region with a preset area and the operation center as the center point. A determination is then made as to whether the operation area corresponding to the operation center is within the corresponding virtual key. If so, the virtual key can meet the user's usage requirements. If not, the virtual key and the operation area need to be merged to obtain a new virtual key. That is, the union of the original key area of ​​the virtual key and the corresponding operation area is taken as the new key area of ​​the new virtual key.

[0100] As shown in Figure 6, the operation area corresponding to the operation center of the virtual key 9 (the operation center is represented by a solid circle in the figure) is area a, and the original key area of ​​the virtual key 9 is area A. Since part of area a is not within area A, area a and area A are merged to obtain area B, that is, area B = area a ∪ area A, and area B is the new key area of ​​the adjusted virtual key 9; the new key center of the virtual key 9 (the key center is represented by a hollow circle in the figure, where the hollow solid circle in the figure represents the current key center, and the hollow dotted circle represents the original key center) is closer to the operation center than the original key center, that is, the distance between the new key center and the operation center is smaller than the distance between the original key center and the operation center.

[0101] Optionally, when there is a conflict between the new virtual keys, that is, when there is overlap between the new virtual keys, a method for resolving the conflict can be determined based on the relationship between the conflicting area and the operation areas corresponding to the two conflicting new virtual keys. A new virtual key is a virtual key whose key area includes a corresponding operation area, and the conflicting area is the area where the two new virtual keys overlap.

[0102] Exemplarily, the new virtual key can be divided into an operation area portion and an original area portion, wherein the original area portion refers to the other area in the new key area except the operation area. When the conflicting area is the area where the operation area portion of a new virtual key overlaps with the original area portion of another new virtual key, the original area portion of the other new virtual key can be cut according to the conflicting area, and the portion of the other new virtual key located in the conflicting area can be discarded, so that the two new virtual keys are separated to resolve the conflict. When the conflicting area is the operation area portion of two new virtual keys, the operation area portions of the two new virtual keys can be divided according to the perpendicular bisector of the line connecting the operation centers of the two new virtual keys, so that the two new virtual keys are separated to resolve the conflict.

[0103] Further, referring to FIG. 7 , in some optional embodiments of the present disclosure, after performing the above-mentioned adjustment of the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center, the method may further include:

[0104] Displaying a pop-up dialog box on the display screen; the pop-up dialog box includes a relative position of the adjusted virtual key and the display screen, or a positional relationship between the adjusted virtual key and the corresponding original virtual key, and the pop-up dialog box also includes an accept control and a reject control;

[0105] In response to a triggering operation on the accepting control, displaying the adjusted virtual key on the display screen;

[0106] In response to the triggering operation on the rejection control, an original virtual key is displayed on the display screen.

[0107] In this embodiment, after the adjustment of each virtual key is completed, a pop-up dialog box can be displayed on the display screen of the terminal device. The pop-up dialog box displays the relative position of the adjusted virtual key and the display screen. For example, in FIG7 , a proportionally reduced display screen display interface and the adjusted virtual key are displayed on the display screen, or the positional relationship between the adjusted virtual key and the corresponding original virtual key is displayed. For example, the adjusted virtual key can be displayed in a different color from the original virtual key, or an arrow or other indicator can be used to indicate the relationship between the adjusted virtual key and the corresponding original virtual key. The pop-up dialog box can also display an accept control and a reject control. The accept control is used to indicate that the adjusted virtual key will be used as the virtual key for subsequent use, that is, to accept the result of the current adaptive adjustment; the reject control is used to indicate that the original virtual key will be maintained, that is, to reject the result of the current adaptive adjustment. When the user selects the accept control, the adjusted virtual key is displayed on the display screen; when the user selects the reject control, the original virtual key is displayed on the display screen.

[0108] The information of the adjusted virtual keys can be displayed to the user through a pop-up dialog box, so that the user can choose whether to use the adjusted virtual keys as virtual keys for subsequent use according to personal needs, so that the virtual keys displayed subsequently can better meet user needs.

[0109] Furthermore, the information of virtual keys obtained through adaptive adjustments of multiple different users can be summarized, and then the target information of at least part of the virtual keys can be determined based on the summarized data. The target information may include the shape and / or position information of the virtual keys, and then the target information can be used as the default information of the corresponding virtual keys. The default information refers to the shape and / or position information of the virtual keys before the user makes personalized adjustments.

[0110] The embodiments of the present disclosure determine the operation center of each virtual key based on the user's historical operation information; adjust the corresponding virtual key based on the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center; wherein, adjusting the corresponding virtual key based on the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center can specifically be moving the key center of the virtual key to coincide with the corresponding operation center, and when there is a conflict between the virtual keys after the movement, each conflicting key is moved along the direction of the corresponding adjustment vector, or each conflicting key is cut to resolve the conflict; or, adjusting the corresponding virtual key based on the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center can specifically be moving each virtual key along the direction of the corresponding movement vector and ensuring that the adjusted virtual keys do not conflict with each other; or, merging the key area of ​​the virtual key with the operation area corresponding to the operation center; realizes that the virtual key can be adaptively adjusted according to the user's historical operation information, and makes the adjusted virtual key more suitable for the user's usage habits in actual usage scenarios, thereby avoiding the user from repeatedly adjusting the virtual key, that is, simplifying the user's adjustment method for the virtual key, improving the efficiency of virtual key adjustment, and improving the user's usage experience.

[0111] It should be noted that for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present disclosure are not limited by the order of the actions described, because according to the embodiments of the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present disclosure.

[0112] 8 shows a block diagram of an embodiment of a virtual key adjustment device according to the present disclosure. Corresponding to the embodiment of the virtual key adjustment method, multiple virtual keys can be displayed on a display screen of a terminal device by running an application. The device may include the following modules:

[0113] An operation center determination module 801 is configured to determine an operation center for each virtual key based on historical operation information of the user;

[0114] The virtual key adjustment module 802 is configured to adjust the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0115] In some optional embodiments of the present disclosure, the virtual key adjustment module 802 may include:

[0116] The first moving module is used to move the virtual key to the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center.

[0117] In some optional embodiments of the present disclosure, the virtual key adjustment module 802 may further include:

[0118] a first conflict determination module, configured to determine, if there is a conflict between the moved virtual keys, an adjustment vector for each conflicting key based on the operation center and the original key center of each conflicting key, wherein the starting point of the adjustment vector is the operation center of the corresponding conflicting key and the end point is the original key center of the corresponding conflicting key;

[0119] The first conflict processing module is used to move each of the conflicting keys along the direction of the corresponding adjustment vector until the conflict disappears.

[0120] In some optional embodiments of the present disclosure, the first conflict handling module may include:

[0121] A movement speed determination module, configured to determine the movement speed of each of the conflicting keys;

[0122] A movement speed-based movement module is configured to move each of the conflicting keys simultaneously along a direction of a corresponding adjustment vector at a corresponding movement speed;

[0123] The movement stopping module is used to stop moving the target conflicting key when the conflict of the target conflicting key disappears.

[0124] In some optional embodiments of the present disclosure, the movement speed determination module can be specifically used to determine the movement speed corresponding to each of the conflicting keys based on the length of the adjustment vector of each of the conflicting keys; the movement speed is proportional to the length of the corresponding adjustment vector, and the movement speed ratio of different conflicting keys is equal to the length ratio of the corresponding adjustment vectors.

[0125] In some optional embodiments of the present disclosure, the virtual key adjustment module 802 may further include:

[0126] The second conflict processing module is configured to cut each conflicting key if there is a conflict between the moved virtual keys, so as to separate the conflicting keys.

[0127] In some optional embodiments of the present disclosure, the second conflict handling module may include:

[0128] A connection determination module, configured to determine a connection between two conflicting keys according to the operation centers of the two conflicting keys;

[0129] A line-based cutting module is configured to cut the two conflicting keys according to the perpendicular midline of the line, so as to separate the two conflicting keys. The line-based cutting module may include:

[0130] A first parallel line determining module, configured to translate the perpendicular bisector toward the operation center of the first conflicting key of the two conflicting keys by a preset distance to obtain a first parallel line;

[0131] A second parallel line determining module, configured to translate the perpendicular bisector toward the operation center of the second conflicting key of the two conflicting keys by a preset distance to obtain a second parallel line;

[0132] The cutting and separating module is used to cut the first conflicting key along the first parallel lines and cut the second conflicting key along the second parallel lines, so as to separate the first conflicting key from the second conflicting key.

[0133] In some optional embodiments of the present disclosure, the virtual key adjustment module 802 may include:

[0134] a movement vector determination module, configured to determine a movement vector of each virtual key based on an original key center and an operation center of each virtual key, wherein a starting point of the movement vector is the original key center of the corresponding virtual key and an end point is the operation center of the corresponding virtual key;

[0135] Based on the motion vector adjustment module, it is used to move each of the virtual keys along the direction of the corresponding motion vector and ensure that the adjusted virtual keys do not conflict with each other.

[0136] In some optional embodiments of the present disclosure, the motion vector-based adjustment module may include:

[0137] An adjustment speed determining module, configured to determine an adjustment speed of each of the virtual keys;

[0138] Based on the adjustment speed adjustment module, it is used to move each of the virtual keys simultaneously along the direction of the corresponding movement vector according to the corresponding adjustment speed, and ensure that the adjusted virtual keys do not conflict with each other.

[0139] In some optional embodiments of the present disclosure, the adjustment speed determination module is specifically used to determine the adjustment speed corresponding to each virtual key based on the length of the movement vector of each virtual key; the adjustment speed is proportional to the length of the corresponding movement vector, and the adjustment speed ratio of different virtual keys is equal to the length ratio of the corresponding movement vectors.

[0140] In some optional embodiments of the present disclosure, the virtual key adjustment module 802 may specifically adjust the corresponding virtual key according to the operation center when the distance between the original key center of the virtual key and the corresponding operation center is greater than a preset distance threshold, so as to shorten the distance between the key center of the virtual key and the corresponding operation center.

[0141] In some optional embodiments of the present disclosure, the virtual key adjustment module 802 may include:

[0142] The merging processing module is used to merge the virtual key with the operation area to obtain a new virtual key when the operation area corresponding to the operation center is not within the corresponding virtual key.

[0143] In some optional embodiments of the present disclosure, the operation center determination module 801 may specifically determine the operation center of each virtual key according to historical operation information of the user in response to a startup operation of the key adjustment control.

[0144] In some optional embodiments of the present disclosure, the operation center determination module 801 can specifically determine the target adjustment cycle in response to the startup operation of the key adjustment control, and when the target adjustment cycle is reached, determine the operation center of each virtual key based on the user's historical operation information within the adjustment cycle.

[0145] In some optional embodiments of the present disclosure, the apparatus may further include:

[0146] a dialog box display module, configured to display a pop-up dialog box on the display screen; the pop-up dialog box includes the relative position of the adjusted virtual key and the display screen, or the positional relationship between the adjusted virtual key and the corresponding original virtual key, and the pop-up dialog box also includes an accept control and a reject control;

[0147] a first response module, configured to display the adjusted virtual key on the display screen in response to a triggering operation on the accept control;

[0148] The second response module is configured to display the original virtual button on the display screen in response to a trigger operation on the rejection control.

[0149] The disclosed embodiment determines the operation center of each virtual key based on the user's historical operation information; adjusts the corresponding virtual key based on the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center; wherein, adjusting the corresponding virtual key based on the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center can specifically be moving the key center of the virtual key to coincide with the corresponding operation center, and when there is a conflict between the virtual keys after the movement, each conflicting key is moved along the direction of the corresponding adjustment vector, or each conflicting key is cut to resolve the conflict; or, adjusting the corresponding virtual key based on the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center can specifically be moving each virtual key along the direction of the corresponding movement vector and ensuring that the adjusted virtual keys do not conflict with each other; or, merging the key area of ​​the virtual key with the operation area corresponding to the operation center; thereby achieving adaptive adjustment of the virtual key based on the user's historical operation information, and making the adjusted virtual key more suitable for the user's usage habits in actual usage scenarios, thereby avoiding the user from repeatedly adjusting the virtual key, that is, simplifying the user's adjustment method for the virtual key, improving the efficiency of virtual key adjustment, and improving the user's usage experience.

[0150] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0151] An embodiment of the present disclosure also discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of the virtual key adjustment method as described above are implemented.

[0152] The embodiment of the present disclosure further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the virtual key adjustment method described above are implemented.

[0153] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0154] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0155] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0156] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0158] All actions of obtaining information proposed in the embodiments of the present disclosure are performed in compliance with the corresponding data protection laws and policies of the country of location and with the authorization given by the owner of the corresponding device.

[0159] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.

[0160] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0161] The above is a detailed introduction to the virtual key adjustment method and device, electronic device, and storage medium provided by the present disclosure. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core ideas. At the same time, for general technical personnel in this field, based on the ideas of the present disclosure, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A method for adjusting a virtual key, wherein a plurality of virtual keys are displayed on a display screen of a terminal device, the method comprising: Determining the operation center of each virtual key according to the user's historical operation information; The corresponding virtual key is adjusted according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

2. The method according to claim 1, wherein: The adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center includes: The virtual key is moved toward the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center.

3. The method according to claim 2, wherein: After moving the virtual key to the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center, the method further includes: If there is a conflict between the moved virtual keys, an adjustment vector of each conflicting key is determined according to the operation center and the original key center of each conflicting key, wherein the starting point of the adjustment vector is the operation center of the corresponding conflicting key and the end point is the original key center of the corresponding conflicting key; Each of the conflicting keys is moved along the direction of the corresponding adjustment vector until the conflict disappears.

4. The method according to claim 3, wherein: The step of moving each of the conflicting keys along the direction of the corresponding adjustment vector until the conflict disappears includes: Determining the moving speed of each of the conflicting keys; Moving each of the conflicting keys simultaneously along the direction of the corresponding adjustment vector at a corresponding moving speed; When the conflict of the target conflicting key disappears, the moving of the target conflicting key is stopped.

5. The method according to claim 4, wherein: The step of determining the moving speed of each of the conflicting keys comprises: The moving speed corresponding to each conflicting key is determined according to the length of the adjustment vector of each conflicting key; the moving speed is proportional to the length of the corresponding adjustment vector, and the moving speed ratio of different conflicting keys is equal to the length ratio of the corresponding adjustment vector.

6. The method according to claim 2, wherein: After moving the virtual key to the corresponding operation center so that the key center of the virtual key coincides with the corresponding operation center, the method further includes: If there is a conflict between the moved virtual keys, each conflicting key is cut to separate the conflicting keys.

7. The method according to claim 6, wherein: The step of cutting each conflicting key to separate the conflicting keys includes: Determining a connection line between the two conflicting keys according to the operation centers of the two conflicting keys; The two conflicting keys are cut according to the perpendicular midline of the connecting line to separate the two conflicting keys.

8. The method according to claim 7, wherein: The step of cutting the two conflicting keys according to the perpendicular midline of the connecting line to separate the two conflicting keys includes: The perpendicular midline is translated by a preset distance toward the operation center direction of the first conflicting key of the two conflicting keys to obtain a first parallel line; The perpendicular midline is translated by a preset distance toward the operation center direction of the second conflicting key of the two conflicting keys to obtain a second parallel line; The first conflicting key is cut according to the first parallel lines, and the second conflicting key is cut according to the second parallel lines, so that the first conflicting key and the second conflicting key are separated.

9. The method according to claim 1, wherein: The adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center includes: Determine a movement vector of each virtual key according to an original key center and an operation center of each virtual key, wherein a starting point of the movement vector is an original key center of the corresponding virtual key, and an end point is an operation center of the corresponding virtual key; Each of the virtual keys is moved along the direction of the corresponding movement vector, and it is ensured that the adjusted virtual keys do not conflict with each other.

10. The method according to claim 9, wherein: The step of moving each of the virtual keys along the direction of the corresponding movement vector to shorten the distance between the key center of the virtual key and the corresponding operation center includes: Determining an adjustment speed of each of the virtual keys; Each of the virtual keys is moved simultaneously along the direction of the corresponding movement vector at a corresponding adjustment speed, and it is ensured that the adjusted virtual keys do not conflict with each other.

11. The method according to claim 10, wherein: The determining the adjustment speed of each of the virtual keys includes: According to the length of the movement vector of each virtual key, the adjustment speed corresponding to each virtual key is determined; the adjustment speed is proportional to the length of the corresponding movement vector, and the adjustment speed ratio of different virtual keys is equal to the length ratio of the corresponding movement vector.

12. The method according to any one of claims 1 to 11, wherein: The adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center includes: When the distance between the original key center of the virtual key and the corresponding operation center is greater than a preset distance threshold, the corresponding virtual key is adjusted according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

13. The method according to claim 1, wherein: The adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center includes: When the operation area corresponding to the operation center is not within the corresponding virtual key, the virtual key and the operation area are merged to obtain a new virtual key.

14. The method according to claim 1, wherein: The step of determining the operation center of each virtual key according to the historical operation information of the user includes: In response to the start-up operation of the key adjustment control, the virtual keys are determined according to the historical operation information of the user. Operation center.

15. The method according to claim 14, wherein: The step of responding to the start-up operation of the key adjustment control and determining the operation center of each virtual key according to the historical operation information of the user includes: In response to the start-up operation of the key adjustment control, a target adjustment period is determined, and when the target adjustment period is reached, the operation center of each virtual key is determined according to the historical operation information of the user within the adjustment period.

16. The method according to claim 1, wherein: After adjusting the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center, the method further includes: Displaying a pop-up dialog box on the display screen; the pop-up dialog box includes a relative position of the adjusted virtual key and the display screen, or a positional relationship between the adjusted virtual key and a corresponding original virtual key, and the pop-up dialog box also includes an accept control and a reject control; In response to a trigger operation on the accepting control, displaying the adjusted virtual key on the display screen; In response to a trigger operation on the rejection control, an original virtual key is displayed on the display screen.

17. A virtual key adjustment device, which displays a plurality of virtual keys on a display screen of a terminal device, the device comprising: An operation center determination module, used to determine the operation center of each virtual key according to the user's historical operation information; The virtual key adjustment module is used to adjust the corresponding virtual key according to the operation center to shorten the distance between the key center of the virtual key and the corresponding operation center.

18. An electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the virtual key adjustment method according to any one of claims 1 to 16.

19. A computer-readable storage medium storing a computer program, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for adjusting a virtual key according to any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Game application program control method and device

    CN107890667A

  • Virtual key display method and terminal

    CN108279957A

  • Display control method and device in game

    CN111399743A

  • Virtual key adjustment method and device, electronic equipment and storage medium

    CN116159301A

  • Virtual key adjustment method and device, electronic equipment and storage medium

    CN116637356A