Virtual key adjustment method and device, electronic device, and storage medium
By adjusting the operation center of the virtual buttons based on the user's historical operation information, the problem of button layouts in existing technologies being difficult to adapt to user needs has been solved, resulting in more efficient button optimization and a better gaming experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-03-06
- Publication Date
- 2026-04-28
AI Technical Summary
In existing game applications, users find it difficult to adaptively adjust button positions in the settings to meet in-game combat needs, leading to operational errors and repeated adjustments, which affects the gaming experience.
By monitoring users' historical operation information, the operation center of the virtual buttons is determined, and the button center is adjusted to shorten its distance from the operation center, thus optimizing the button layout to meet users' personalized needs.
It simplifies the virtual button adjustment process, improves adjustment efficiency, and enhances the user's gaming experience.
Smart Images

Figure CN116159301B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to methods and apparatus for adjusting virtual keys, electronic devices, and storage media. Background Technology
[0002] In existing technologies, game applications often have a default button layout. Some game applications allow users to adjust the button positions in the settings. However, because adjusting the settings cannot accurately simulate the actual combat scenario, the pre-set button positions may still not match the user's needs during in-game combat, leading to operational errors. Consequently, users may need to repeatedly adjust the settings, impacting the gaming experience.
[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] In view of the above problems, this application is made to provide a method and apparatus, electronic device, and storage medium for adjusting virtual buttons to overcome or at least partially solve the above problems, including:
[0005] A method for adjusting virtual buttons, wherein multiple virtual buttons are displayed on the screen of a terminal device, the method comprising:
[0006] Based on the user's historical operation information, determine the operation center of each virtual button;
[0007] Adjust the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center.
[0008] A virtual button adjustment device displays multiple virtual buttons on a terminal device's display screen. The device includes:
[0009] The operation center determination module is used to determine the operation center of each virtual button based on the user's historical operation information;
[0010] The virtual button adjustment module is used to adjust the corresponding virtual buttons according to the operation center, so as to shorten the distance between the button center of the virtual button and the corresponding operation center.
[0011] An electronic device includes 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 button adjustment method described above.
[0012] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the virtual button adjustment method described above.
[0013] This application has the following advantages:
[0014] In the embodiments of this application, the operation center of each virtual button is determined based on the user's historical operation information; the corresponding virtual button is adjusted according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center; this enables the virtual buttons to be adaptively adjusted according to the user's historical operation information, making the adjusted virtual buttons more suitable for the user's usage habits in actual usage scenarios. Therefore, it can avoid the user repeatedly adjusting the virtual buttons, which simplifies the way the user adjusts the virtual buttons, improves the efficiency of virtual button adjustment, and enhances the user experience. Attached Figure Description
[0015] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram illustrating the adjustment process of virtual buttons in related technologies;
[0017] Figure 2 This is a flowchart illustrating the steps of a method for adjusting virtual buttons according to an embodiment of this application.
[0018] Figure 3 This is a partial schematic diagram of a settings page according to an embodiment of this application;
[0019] Figure 4 This is a schematic diagram illustrating the adjustment process of a virtual button according to an embodiment of this application;
[0020] Figure 5 This is a schematic diagram illustrating another virtual button adjustment process according to an embodiment of this application;
[0021] Figure 6 This is a schematic diagram illustrating the adjustment process of another virtual button according to an embodiment of this application;
[0022] Figure 7 This is a schematic diagram of a pop-up dialog box according to an embodiment of this application;
[0023] Figure 8 This is a structural block diagram of a virtual button adjustment device according to an embodiment of this application. Detailed Implementation
[0024] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0025] The main button layout in existing mobile games often has a default scheme, but because everyone's hand shape, finger length, and usage habits are different, the default button layout is difficult to meet personalized needs.
[0026] Some gaming applications allow users to adjust button positions in the settings. However, because adjusting the settings doesn't accurately simulate the combat scenarios in a game, the pre-set button positions often don't match the user's actual needs during gameplay. This can lead to operational errors and require users to repeatedly adjust settings, negatively impacting the gaming experience.
[0027] To address the shortcomings of existing technologies, the inventors conceived of determining the optimal position of a target button in a real-world usage scenario by monitoring user input to that button and then moving the button's center to that optimal position. However, after moving the target button's center to the optimal position, it may overlap with other buttons. In this case, to ensure the target button remains in the optimal position, it is necessary to move the other buttons that overlap with it, such as... Figure 1 As shown, when there are buttons 1 and 2 on the interface, button 1 is the target button, and its optimal position is P (represented by a solid circle in the diagram). When the center of button 1 (represented by a hollow circle in the diagram, where the solid hollow circle represents the current button center and the dashed hollow circle represents the original button center) is moved to position P, button 1 and button 2 coincide. At this point, moving the center of button 2 to position Q will prevent button 1 and button 2 from coinciding. This method may cause adjustments to other buttons to widen the gap between the user's needs for those other buttons and the actual user's requirements.
[0028] In view of this, this application provides a method for adjusting virtual buttons, which adaptively adjusts each virtual button according to the user's historical operation information to shorten the distance between the button center of each virtual button and the corresponding operation center, so that the adjusted overall virtual buttons better meet the user's personalized needs in actual use scenarios.
[0029] The virtual button adjustment method provided in this application can run on a local terminal device or a server. When the virtual button adjustment method runs on a server, it can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0030] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of virtual button adjustment methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a first terminal device, television, computer, or PDA; however, the virtual button adjustment methods are performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen data including virtual buttons, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0031] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0032] Reference Figure 2This application illustrates a method for adjusting virtual buttons according to an embodiment of the present application. By running an application, multiple virtual buttons can be displayed on the screen of a terminal device. The terminal device can be an electronic device such as a smartphone, tablet, game console, e-book reader, multimedia playback device, or wearable device. The application can run on the terminal device; for example, it can run a game program on the processor of the terminal device and display the game screen and virtual buttons for controlling the game on the terminal device's screen. The application can also run on other terminal devices connected to the terminal device via wired or wireless means; for example, it can run a game program on the processor of another terminal device connected to the terminal device and display the game screen on that other terminal device, while simultaneously displaying virtual buttons for controlling the game on the terminal device's screen. The application can also run on a server communicatively connected to the terminal device; for example, it can run a game program on the server and display the game screen and virtual buttons for controlling the game on the terminal device's screen; or, for instance, it can run a game program on the server and display the game screen on another terminal device, while simultaneously displaying virtual buttons for controlling the game on the terminal device's screen.
[0033] The method may include the following steps:
[0034] Step 201: Determine the operation center of each virtual button based on the user's historical operation information.
[0035] Taking games as an example, after the game starts, users can play the game by triggering virtual buttons. Therefore, it is possible to obtain the trigger position information when the user triggers the virtual buttons during the game, and this trigger position information is the historical operation information.
[0036] Historical operation information includes the single-key historical operation information of each virtual button. Based on the single-key historical operation information corresponding to each virtual button, the operation center of each virtual button can be obtained.
[0037] Step 202: Adjust the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual buttons and the corresponding operation center.
[0038] After obtaining the operation center of each virtual button, the corresponding virtual button can be adjusted according to the location of the operation center, including adjusting the position and / or shape of the virtual button; so that the distance between the button center of the virtual button and the corresponding operation center is shortened, that is, the distance between the new button center of each virtual button and the corresponding operation center after adjustment is smaller than the distance between the original button center of the virtual button and the operation center.
[0039] This application embodiment determines the operation center of each virtual button based on the user's historical operation information; adjusts the corresponding virtual button according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center; it realizes that the virtual button can be adaptively adjusted according to the user's historical operation information, and makes the adjusted virtual button more suitable for the user's usage habits in actual use scenarios. Therefore, it can avoid the user from repeatedly adjusting the virtual button, which simplifies the way the user adjusts the virtual button, improves the efficiency of virtual button adjustment, and improves the user experience.
[0040] The method for adjusting the virtual buttons in this exemplary embodiment will now be further explained.
[0041] In some optional embodiments of this application, during application runtime, the user can adjust the position and / or shape of the virtual buttons corresponding to the application to obtain multiple virtual buttons displayed on the terminal device's screen. It is understood that the multiple virtual buttons displayed on the terminal device's screen can be virtual buttons adjusted by the user.
[0042] In step 201, the operation center of each virtual button is determined based on the user's historical operation information.
[0043] Each virtual button has a corresponding function and triggering method. The triggering method can include touch operations that interact with the virtual button, such as single-click, swipe, double-click, and long-press. It can also include non-contact operations, such as operations where the projection point of an operating medium is on the virtual button. Historical operation information refers to the user's past actions that trigger virtual buttons. This information can be obtained by monitoring the trigger position of the operating medium on the display screen when the virtual button's function is activated. The operating medium can be a finger, stylus, etc.
[0044] Historical operation information includes the single-key historical operation information of each virtual button. Based on the single-key historical operation information corresponding to each virtual button, the operation center of each virtual button can be obtained. It can be understood that for each virtual button, its single-key historical operation information includes at least one trigger position information related to that virtual button. For example, for a virtual button triggered by a slide, the trigger position information may include the click position information obtained by quantizing the slide trajectory, or the start and end position information of the slide operation. For a virtual button triggered by a long press, the trigger position information may include the contact point position information of the long press operation. By analyzing all the trigger position information in the single-key historical operation information, the center point among all trigger position information can be obtained, and this center point is the operation center of the virtual button. In other words, the operation center of the virtual button is used to represent the user's usage habits when triggering the virtual button in actual usage scenarios. It can more accurately reflect the actual position that the virtual button needs to be set, so that the virtual button can be adaptively adjusted based on the operation center to obtain a virtual button that better meets the user's personalized needs.
[0045] In some optional embodiments of this application, a switch control for adjusting the virtual button settings can be added to the application's settings page. For example... Figure 3 As shown, a switch control for the adaptive button position can be set on the application's settings page. This switch control is used to control the adjustment function of the virtual buttons. When the switch control for the adaptive button position is in the on state, the step of determining the operation center of each virtual button based on the user's historical operation information is executed; when the switch control for the adaptive button position is in the off state, the step of determining the operation center of each virtual button based on the user's historical operation information is not executed. It can be understood that in some optional embodiments of this application, the above step 201 may include:
[0046] In response to the activation operation of the button adjustment control, the operation center of each virtual button is determined based on the user's historical operation information.
[0047] In this embodiment, after detecting that a user has enabled the switch control for adaptive button position, the system acquires the user's historical operation information and determines the operation center of each virtual button based on this information. Users can then decide whether to allow the buttons to adaptively adjust their positions to meet the needs of different users in different scenarios. For example, when a user (the owner) temporarily lends the terminal device to someone else, since the current user (the other person) is not the owner, they generally do not want the terminal device to adaptively adjust the button positions. Therefore, the adaptive button position function can be disabled by turning off the switch control.
[0048] Furthermore, in some optional embodiments of this application, while adding a switch control for controlling the adjustment function of virtual buttons to the application's settings page, a period setting input box for indicating the adaptive adjustment period of virtual buttons can also be added, or multiple different adjustment period options for indicating the adaptive adjustment period of virtual buttons can be added, so that the user can independently determine the adaptive adjustment period of virtual buttons. It can be understood that, in some optional embodiments of this application, the above-mentioned response to the activation operation of the button adjustment control, determining the operation center of each virtual button based on the user's historical operation information, may include:
[0049] In response to the activation operation of the button adjustment control, a target adjustment period is determined. When the target adjustment period is reached, the operation center of each virtual button is determined based on the user's historical operation information within the adjustment period.
[0050] In this embodiment, before activating the switch control for adaptive button position, the user can set or select an adjustment period. Once the user activates the switch control, the user-set or selected adjustment period is obtained, thus determining the target adjustment period. Within the target adjustment period, the user's operation information is collected. Furthermore, upon reaching the target adjustment period, the button center of each virtual button is determined based on the user's historical operation information collected within that period. If the user does not set or select an adjustment period, the user's historical operation information can be collected according to the default adjustment period.
[0051] Taking games as an example, when the target adjustment cycle is 10 games, after the switch control for the adaptive button position is turned on, the user's operation information during the subsequent 10 games is obtained. After the 10th game ends, the operation center of each virtual button is determined based on the historical operation information obtained at the moment.
[0052] In step 202, the corresponding virtual buttons are adjusted according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center.
[0053] Since the operation center can more accurately reflect the user's needs for virtual buttons in actual usage scenarios, after determining the operation center of each virtual button, the position and / or shape of the corresponding virtual button can be adjusted according to the operation center to shorten the distance between the button center of each virtual button and the corresponding operation center, so that all virtual buttons can better meet the user's personalized needs.
[0054] In some optional embodiments of this application, the above-mentioned adjustment of the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual buttons and the corresponding operation center may include:
[0055] Move the virtual button toward the corresponding operation center so that the center of the virtual button coincides with the corresponding operation center.
[0056] In this embodiment, when adjusting the virtual buttons, each virtual button can be moved sequentially or simultaneously towards the direction of its corresponding operation center. Movement stops when the center of a virtual button coincides with its corresponding operation center, thus placing the operation center at the center of the moved virtual button. If there are no conflicts between the moved virtual buttons (i.e., no overlapping areas between their button areas), the current position of the moved virtual button is taken as its final position. If there are conflicts between the moved virtual buttons, further processing is required. Various processing methods are provided later and will not be elaborated here.
[0057] In some optional embodiments of this application, after moving the virtual button toward the corresponding operation center so that the button center of the virtual button coincides with the corresponding operation center, the method may further include:
[0058] If there is a conflict between the moved virtual buttons, then an adjustment vector for each conflicting button is determined based on the operation center and the original button center of each conflicting button. The starting point of the adjustment vector is the operation center of the corresponding conflicting button, and the ending point is the original button center of the corresponding conflicting button.
[0059] Move each of the conflicting buttons along the direction of its corresponding adjustment vector until the conflict disappears.
[0060] After the virtual buttons are moved to a position where their center coincides with the corresponding operation center, the positions of each virtual button after movement can be obtained. When there is a conflict between the moved virtual buttons, that is, when there is an overlap between the button areas of the moved virtual buttons, the conflicting virtual buttons are identified. For easy differentiation, these identified virtual buttons are recorded as conflicting buttons. Based on the operation center and the original button center of each conflicting button, an adjustment vector is determined for each conflicting button. In other words, for each conflicting button, a corresponding adjustment vector is generated starting from its operation center and ending at the original button center.
[0061] Then, move each conflicting button along the direction of its corresponding adjustment vector, stopping when the conflict disappears. During the movement, the conflicting buttons can be pressed simultaneously or sequentially; when pressed simultaneously, the distance each conflicting button moves per unit time can be equal, or the ratio of the distance each conflicting button moves per unit time to its corresponding adjustment vector can be equal; when pressed sequentially, the single movement distance of each conflicting button is equal, or the ratio of the single movement distance of each conflicting button to its corresponding adjustment vector can be equal.
[0062] In some optional embodiments of this application, moving each of the conflicting buttons along the direction of the corresponding adjustment vector until the conflict disappears includes:
[0063] Determine the movement speed of each of the conflicting keys;
[0064] Each of the conflicting buttons is moved simultaneously along the direction of its corresponding adjustment vector at its corresponding movement speed.
[0065] When the conflict of the target conflict button disappears, stop moving the target conflict button.
[0066] The target conflicting button can be any conflicting button. In this embodiment, during the movement of the conflicting buttons, the movement speed of each conflicting button can be determined first. The movement speed of different conflicting buttons can be different; for example, the movement speed can be related to the length of the adjustment vector corresponding to the conflicting button, or it can be related to the priority of the conflicting button. For example, the higher the priority of the conflicting button, the smaller its movement speed, thus ensuring that the higher priority conflicting button is closer to the corresponding operation center when the conflict is resolved. Furthermore, multiple conflicting buttons can move simultaneously to improve the efficiency of button adaptive adjustment. For each conflicting button, during the movement process, when it no longer conflicts with other virtual buttons (excluding itself), the movement of that conflicting button can be stopped.
[0067] like Figure 4 As shown, after virtual buttons 1, 2, 3, and 4 are moved to a position where their center (represented by a hollow circle in the diagram, where a solid hollow circle represents the current center and a dashed hollow circle represents the original center) coincides with the corresponding operation center (represented by a solid circle in the diagram), virtual buttons 1 and 2 conflict, and virtual button 2 also conflicts with virtual button 3. Therefore, virtual buttons 1, 2, and 3 are respectively designated as conflicting buttons 1, 2, and 3. Virtual button 4, which does not conflict, can remain unchanged. Moving conflicting buttons 1, 2, and 3 along their corresponding adjustment vector directions, the conflict of button 1 disappears first. When the conflict of button 1 disappears, moving button 1 stops. Since the conflict between button 2 and 3 still exists when the conflict of button 1 disappears, moving button 2 and 3 continues. When the conflict between button 2 and 3 disappears, moving button 2 and 3 stops, thus achieving adaptive button adjustment.
[0068] Furthermore, in some optional embodiments of this application, determining the movement speed of each conflicting key may include:
[0069] The movement speed corresponding to each conflicting key is determined based on 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 their corresponding adjustment vectors.
[0070] In this embodiment, the corresponding movement speed can be determined based on the length of the adjustment vector of each conflicting key. It can be understood that in this embodiment, conflicting keys with different adjustment vector lengths will have different movement speeds. Specifically, the movement speed is directly 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 their 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 proportionally according to the length of its corresponding adjustment vector.
[0071] For example, if the length of the adjustment vector of conflict button 1 is a and the length of the adjustment vector of conflict button 2 is b, then the movement speed of conflict button 1 can be a / c, and correspondingly, the movement speed of conflict button 2 is b / c.
[0072] In some alternative embodiments of this application, after moving the virtual button toward the corresponding operation center so that the button center of the virtual button coincides with the corresponding operation center, the following may be further included:
[0073] If there are conflicts between the moved virtual keys, then each conflicting key is cut off to separate the conflicting keys.
[0074] In this embodiment, when there is a conflict between the moved virtual buttons, the conflicting virtual buttons can be identified, and the conflicting buttons can be separated by cutting to resolve the conflict. The cutting method may include cutting based on the overlapping area between the conflicting buttons, or cutting based on the perpendicular bisector of the line connecting the operation centers of the conflicting buttons, etc.
[0075] In some optional embodiments of this application, the above-mentioned segmentation of conflicting keys to separate the conflicting keys may include:
[0076] The connection between the two conflicting buttons is determined based on their operation centers.
[0077] The two conflicting buttons are cut according to the perpendicular bisector of the connecting line to separate them.
[0078] In this embodiment, the operation centers of two conflicting buttons are connected by a line, thus creating a connection between them. The operation centers of the conflicting buttons are then connected in pairs. The two conflicting buttons connected by this line can be separated by the perpendicular bisector of the connection line, thereby resolving the conflict.
[0079] Furthermore, in some optional embodiments of this application, the above-mentioned cutting of the two conflicting buttons according to the perpendicular bisector of the connecting line to separate the two conflicting buttons may include:
[0080] The perpendicular bisector is shifted a predetermined distance toward the operation center of the first conflicting button among the two conflicting buttons to obtain the first parallel line.
[0081] The perpendicular bisector is shifted a predetermined distance toward the operation center of the second conflicting button among the two conflicting buttons to obtain the second parallel line.
[0082] The first conflicting button is cut according to the first parallel line, and the second conflicting button is cut according to the second parallel line, so as to separate the first conflicting button and the second conflicting button.
[0083] In this embodiment, after determining the line connecting two conflicting buttons, the perpendicular bisector of the line can be further determined. The perpendicular bisector is then translated a predetermined distance along the operation center direction of one of the conflicting buttons to obtain a first parallel line. The perpendicular bisector is also translated the same distance along the operation center direction of the other conflicting button to obtain a second parallel line. For ease of distinction, one of the conflicting buttons is designated as the first conflicting button, and the other as the second conflicting button. The first conflicting button is separated by cutting it with the first parallel line, retaining the portion where its operation center is located. Similarly, the second conflicting button is separated by cutting it with the second parallel line, retaining the portion where its operation center is located, thus resolving the conflict.
[0084] like Figure 5 As shown, after virtual buttons 5, 6, 7, and 8 are moved to a position where the button center (represented by a hollow circle in the figure, where the hollow solid circle represents the current button center and the hollow dashed circle represents the original button center) coincides with the corresponding operation center (represented by a solid circle in the figure), virtual buttons 5 and 6 conflict, and virtual button 6 also conflicts with virtual button 7. Therefore, virtual buttons 5, 6, and 7 are respectively denoted as conflicting button 5, conflicting button 6, and conflicting button 7.
[0085] For conflicting buttons 5 and 6, line 1 connecting the operation centers of conflicting buttons 5 and 6 can be obtained; for conflicting buttons 6 and 7, line 2 connecting the operation centers of conflicting buttons 6 and 7 can be obtained. Based on lines 1 and 2, corresponding perpendicular bisectors 3 and 4 can be determined. Perpendicular bisector 3 is shifted 10 pixels towards both conflicting buttons 5 and 6 to obtain the first parallel line 5 and the second parallel line 6. Similarly, perpendicular bisector 4 is shifted 10 pixels towards both conflicting buttons 6 and 7 to obtain the first parallel line 7 and the second parallel line 8.
[0086] The conflict button 5 is cut using a first parallel line 5, dividing it into two parts. The part containing the operation center of the conflict button 5 is retained, while the part that does not contain the operation center is discarded. Correspondingly, the conflict button 6 is cut using a second parallel line 6, dividing it into two parts. The part containing the operation center of the conflict button 6 is retained, while the part that does not contain the operation center is discarded. At this point, the conflict button 5 and conflict button 6 are separated.
[0087] Similarly, the first parallel line 7 is used to cut the conflict button 6, retaining the part where the operation center of the conflict button 6 is located; the second parallel line 8 is used to cut the conflict button 7, retaining the part where the operation center of the conflict button 7 is located. At this time, the conflict button 6 and the conflict button 7 are separated after being cut.
[0088] In some alternative embodiments of this application, the above-mentioned adjustment of the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual buttons and the corresponding operation center may include:
[0089] Based on the original button center and operation center of each virtual button, the movement vector of each virtual button is determined. The starting point of the movement vector is the original button center of the corresponding virtual button, and the ending point is the operation center of the corresponding virtual button.
[0090] Move each virtual button along the direction of its corresponding movement vector, ensuring that the adjusted virtual buttons do not conflict with each other.
[0091] In this embodiment, when adjusting the virtual buttons, each virtual button can be moved sequentially or simultaneously towards the direction of its corresponding operation center, and the movement can be stopped when a conflict is imminent. The adjusted virtual button position obtained at this time can be considered as the position where the center of the button is closest to the operation center without changing the original shape of the virtual button.
[0092] For example, for each virtual button, a corresponding movement vector can be generated, starting from the original button center and ending at the corresponding operation center. The virtual button is then moved along the direction of the corresponding movement vector, while simultaneously detecting the edge positions of each virtual button. Movement of those two virtual buttons stops when the distance between them equals a preset distance. The preset distance can be set according to actual needs; for example, it can be 10 pixels or 20 pixels.
[0093] During movement, the virtual buttons can be pressed simultaneously or sequentially. When pressed simultaneously, the distance each virtual button moves per unit time can be equal, or the ratio of the distance moved by each virtual button per unit time to its corresponding movement vector can be equal. When pressed sequentially, the distance moved by each virtual button in a single movement is equal, or the ratio of the distance moved by each virtual button in a single movement to its corresponding movement vector can be equal.
[0094] In some optional embodiments of this application, moving each virtual button along the direction of its corresponding movement vector to shorten the distance between the button center and the corresponding operation center may include:
[0095] Determine the adjustment speed of each of the virtual buttons;
[0096] Each virtual button is moved simultaneously along the direction of its corresponding movement vector at its corresponding adjustment speed, ensuring that the adjusted virtual buttons do not conflict with each other.
[0097] In this embodiment, during the adjustment of virtual buttons, the adjustment speed of each virtual button can be determined first. The adjustment speed indicates how fast the corresponding virtual button moves along the direction of the movement vector. Different virtual buttons can have different adjustment speeds. For example, the adjustment speed can be related to the length of the movement vector corresponding to the virtual button, or it can be related to the priority of the virtual button. For example, the adjustment speed of a virtual button with higher priority is relatively larger, so that a virtual button with higher priority is relatively closer to the corresponding operation center when it stops moving. Furthermore, multiple virtual buttons can move simultaneously to improve the efficiency of button adaptive adjustment. For each virtual button, during the adjustment process, when its distance from other virtual buttons (excluding itself) is equal to a preset distance, the virtual button can be stopped, as can other virtual buttons with a distance equal to the preset distance. Alternatively, for each virtual button, during the adjustment process, when its distance from other virtual buttons is less than or equal to 0, a rollback operation can be performed, that is, the virtual button and other virtual buttons are moved in the opposite direction until the distance between the virtual button and other virtual buttons is greater than 0, at which point the movement stops.
[0098] Furthermore, in some optional embodiments of this application, determining the adjustment speed of each of the virtual buttons may include:
[0099] The adjustment speed corresponding to each virtual button is determined based on the length of the movement vector of each virtual button; the adjustment speed is proportional to the length of the corresponding movement vector, and the ratio of the adjustment speeds of different virtual buttons is equal to the ratio of the lengths of their corresponding movement vectors.
[0100] In this embodiment, the adjustment speed can be determined based on the length of the movement vector of each virtual button. Specifically, the adjustment speed is directly proportional to the length of the corresponding movement vector, and the ratio of the adjustment speeds of different virtual buttons is equal to the ratio of the lengths of their corresponding movement vectors; that is, the ratio of the adjustment speed of each virtual button to the length of its corresponding movement vector is the same, meaning that each virtual button moves proportionally according to the length of its corresponding movement vector.
[0101] In some optional embodiments of this application, before adjusting the corresponding virtual button according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center, it can be first determined whether the distance between the operation center and the original button center of the corresponding virtual button is greater than a preset distance threshold. When the distance between the original button center of the virtual button and the corresponding operation center is not greater than the preset distance threshold, it can be considered that the virtual button can meet the user's personalized needs, and the virtual button does not need to be adjusted. When the distance between the original button center of the virtual button and the corresponding operation center is greater than the preset distance threshold, the corresponding virtual button is adjusted according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center.
[0102] In some alternative embodiments of this application, the above-mentioned adjustment of the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual buttons and the corresponding operation center may include:
[0103] When the operation area corresponding to the operation center is not within the corresponding virtual button, the virtual button and the operation area are merged to obtain a new virtual button.
[0104] In this embodiment, when adjusting the virtual buttons, 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 the operation center as the center and a preset length as the radius, or an area with the operation center as the center point and a preset area. It is then determined whether the operation area corresponding to the operation center is within the corresponding virtual button. If so, it means that the virtual button can meet the user's usage habits. If not, the virtual button and the operation area need to be merged to obtain a new virtual button. That is, the union of the original button area of the virtual button and the corresponding operation area is taken as the new button area of the new virtual button.
[0105] like Figure 6 As shown, the operation area corresponding to the operation center of virtual button 9 (represented by a solid circle in the figure) is region a, and the original button area of virtual button 9 is region A. Since part of region a is not within region A, region a and region A are merged to obtain region B, that is, region B = region a. ∪ Area A and Area B are the new button areas of the adjusted virtual button 9; the new button center of virtual button 9 (represented by a hollow circle in the figure, where the hollow solid circle in the figure represents the current button center and the hollow dashed circle represents the original button center) is closer to the operation center than the original button center, that is, the distance between the new button center and the operation center is less than the distance between the original button center and the operation center.
[0106] Optionally, when there is a conflict between new virtual buttons, i.e., when there is overlap between new virtual buttons, the method for resolving the conflict can be determined based on the relationship between the conflicting area and the corresponding operation areas of the two conflicting new virtual buttons. Here, a new virtual button refers to a virtual button whose button area includes its corresponding operation area, and the conflicting area refers to the overlapping area of the two new virtual buttons.
[0107] For example, a new virtual button can be divided into an operation area and an original area, where the original area refers to the area outside the operation area of the new button. When the conflict area is an area where the operation area of a new virtual button overlaps with the original area of another new virtual button, the original area of the other new virtual button can be segmented according to the conflict area, discarding the portion of the other new virtual button located in the conflict area, thus separating the two new virtual buttons and resolving the conflict. When the conflict area is the operation area of two new virtual buttons, the operation area of the two new virtual buttons can be divided according to the perpendicular bisector of the line connecting the operation centers of the two new virtual buttons, thus separating the two new virtual buttons and resolving the conflict.
[0108] Further, see Figure 7In some optional embodiments of this application, after performing the above-described adjustment of the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual buttons and the corresponding operation center, the method may further include:
[0109] A pop-up dialog box is displayed on the screen; the pop-up dialog box includes the relative position of the adjusted virtual button to the screen, or the positional relationship between the adjusted virtual button and the corresponding original virtual button, and the pop-up dialog box also includes an accept control and a reject control;
[0110] In response to a trigger operation on the accept control, the adjusted virtual buttons are displayed on the screen;
[0111] In response to a triggering operation on the rejection control, the original virtual buttons are displayed on the screen.
[0112] In this embodiment, after the virtual buttons have been adjusted, a pop-up dialog box can be displayed on the terminal device's screen. This dialog box displays the relative positions of the adjusted virtual buttons to the screen, such as... Figure 7 The system displays a scaled-down version of the displayable interface and adjusted virtual buttons on the screen, or it displays the positional relationship between the adjusted virtual buttons and their corresponding original virtual buttons. For example, the adjusted virtual buttons can be displayed in a different color than the original virtual buttons, or they can be indicated by arrows or other indicators. The pop-up dialog box can also display accept and reject controls. The accept control indicates that the adjusted virtual buttons should be used subsequently, i.e., accepting the current adaptive adjustment result; the reject control indicates that the original virtual buttons should be maintained, i.e., rejecting the current adaptive adjustment result. When the user selects the accept control, the adjusted virtual buttons are displayed on the screen; when the user selects the reject control, the original virtual buttons are displayed on the screen.
[0113] A pop-up dialog box can display information about the adjusted virtual buttons to users, allowing them to choose whether to use the adjusted virtual buttons as their preferred virtual buttons, thus making the virtual buttons displayed later more in line with user needs.
[0114] Furthermore, the information of virtual buttons obtained from adaptive adjustments by multiple different users can be aggregated, and the target information of at least some virtual buttons can be determined based on the aggregated data. The target information may include the shape and / or position information of the virtual buttons, and then the target information is used as the default information of the corresponding virtual buttons. The default information refers to the shape and / or position information of the virtual buttons before the user makes personalized adjustments.
[0115] The embodiments of this application determine the operation center of each virtual button based on the user's historical operation information; adjust the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center; specifically, adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center can be done by moving the button center of the virtual button to coincide with the corresponding operation center, and when there is a conflict between the moved virtual buttons, moving each conflicting button along the corresponding adjustment vector direction, or cutting each conflicting button to resolve the conflict; or, adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center can be done by moving each virtual button along the direction of the corresponding movement vector, ensuring that the adjusted virtual buttons do not conflict with each other; or, merging the button area of the virtual button with the operation area corresponding to the operation center; this enables the virtual buttons to be adaptively adjusted according to the user's historical operation information, making the adjusted virtual buttons more suitable for the user's usage habits in actual use scenarios. Therefore, it can avoid the user repeatedly adjusting the virtual buttons, thus simplifying the way the user adjusts the virtual buttons, improving the efficiency of virtual button adjustment, and improving the user experience.
[0116] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0117] Reference Figure 8 This diagram illustrates a structural block diagram of an embodiment of a virtual button adjustment device according to this application. Corresponding to an embodiment of a virtual button adjustment method, multiple virtual buttons can be displayed on the screen of a terminal device by running an application. The device may include the following modules:
[0118] The operation center determination module 801 is used to determine the operation center of each virtual button based on the user's historical operation information;
[0119] The virtual button adjustment module 802 is used to adjust the corresponding virtual buttons according to the operation center, so as to shorten the distance between the button center of the virtual button and the corresponding operation center.
[0120] In some optional embodiments of this application, the virtual button adjustment module 802 may include:
[0121] The first moving module is used to move the virtual button toward the corresponding operation center, so that the button center of the virtual button coincides with the corresponding operation center.
[0122] In some optional embodiments of this application, the virtual button adjustment module 802 may further include:
[0123] The first conflict determination module is used to determine the adjustment vector of each conflicting key based on the operation center and the original key center of each conflicting key if there is a conflict between the moved virtual keys. The starting point of the adjustment vector is the operation center of the corresponding conflicting key, and the ending point is the original key center of the corresponding conflicting key.
[0124] The first conflict handling module is used to move each of the conflicting buttons along the direction of the corresponding adjustment vector until the conflict disappears.
[0125] In some optional embodiments of this application, the first conflict handling module may include:
[0126] A movement speed determination module is used to determine the movement speed of each of the conflicting keys;
[0127] The movement module based on movement speed is used to move each of the conflicting buttons simultaneously along the direction of the corresponding adjustment vector according to the corresponding movement speed.
[0128] The stop-move module is used to stop moving the target conflicting button when the conflict of the target conflicting button disappears.
[0129] In some optional embodiments of this application, the movement speed determination module can be specifically used to determine the movement speed corresponding to each conflicting key based on 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.
[0130] In some optional embodiments of this application, the virtual button adjustment module 802 may further include:
[0131] The second conflict handling module is used to separate the conflicting virtual keys if there is a conflict between them after the keys are moved.
[0132] In some optional embodiments of this application, the second conflict handling module may include:
[0133] The connection determination module is used to determine the connection between the two conflicting buttons based on their operation centers.
[0134] A connection-based cutting module is used to cut the two conflicting buttons according to the perpendicular bisector of the connection line, thereby separating the two conflicting buttons. The connection-based cutting module may include:
[0135] The first parallel line determination module is used to translate the perpendicular bisector towards the operation center of the first conflicting button among the two conflicting buttons by a preset distance to obtain the first parallel line.
[0136] The second parallel line determination module is used to translate the perpendicular bisector towards the operation center of the second conflicting key of the two conflicting keys by a preset distance to obtain the second parallel line.
[0137] The cutting and separating module is used to cut the first conflicting button according to the first parallel line and to cut the second conflicting button according to the second parallel line, so as to separate the first conflicting button and the second conflicting button.
[0138] In some optional embodiments of this application, the virtual button adjustment module 802 may include:
[0139] The movement vector determination module is used to determine the movement vector of each virtual button based on the original button center and operation center of each virtual button. The starting point of the movement vector is the original button center of the corresponding virtual button, and the ending point is the operation center of the corresponding virtual button.
[0140] The movement vector adjustment module is used to move each virtual button along the direction of the corresponding movement vector, and to ensure that the adjusted virtual buttons do not conflict with each other.
[0141] In some optional embodiments of this application, the movement vector-based adjustment module may include:
[0142] The speed adjustment determination module is used to determine the adjustment speed of each of the virtual buttons;
[0143] The speed adjustment module is used to move each virtual button simultaneously along the direction of its corresponding movement vector at the corresponding adjustment speed, and to ensure that the adjusted virtual buttons do not conflict with each other.
[0144] In some optional embodiments of this application, 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 ratio of the adjustment speeds of different virtual keys is equal to the ratio of the lengths of their corresponding movement vectors.
[0145] In some optional embodiments of this application, the virtual button adjustment module 802 may specifically adjust the corresponding virtual button according to the operation center when the distance between the original button center of the virtual button and the corresponding operation center is greater than a preset distance threshold, so as to shorten the distance between the button center of the virtual button and the corresponding operation center.
[0146] In some optional embodiments of this application, the virtual button adjustment module 802 may include:
[0147] The merging processing module is used to merge the virtual button and the operation area when the operation area corresponding to the operation center is not within the corresponding virtual button, so as to obtain a new virtual button.
[0148] In some optional embodiments of this application, the operation center determination module 801 may specifically determine the operation center of each virtual button in response to the start operation of the button adjustment control, based on the user's historical operation information.
[0149] In some optional embodiments of this application, the operation center determination module 801 may specifically respond to the start operation of the button adjustment control, determine the target adjustment period, and when the target adjustment period is reached, determine the operation center of each virtual button based on the user's historical operation information within the adjustment period.
[0150] In some optional embodiments of this application, the apparatus may further include:
[0151] A dialog box display module is used to display a pop-up dialog box on the display screen; the pop-up dialog box includes the relative position of the adjusted virtual buttons to the display screen, or the positional relationship between the adjusted virtual buttons and the corresponding original virtual buttons, and the pop-up dialog box also includes an accept control and a reject control;
[0152] A first response module is configured to display the adjusted virtual buttons on the display screen in response to a trigger operation on the receiving control.
[0153] The second response module is used to display the original virtual buttons on the display screen in response to a trigger operation on the rejection control.
[0154] This application embodiment determines the operation center of each virtual button based on the user's historical operation information; adjusts the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center. Specifically, adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center can involve moving the button center of the virtual button to coincide with the corresponding operation center, and if there are conflicts between the moved virtual buttons, moving each conflicting button along the corresponding adjustment vector direction, or cutting each conflicting button to resolve the conflict; or, adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center can specifically involve moving each virtual button along the direction of the corresponding movement vector, ensuring that the adjusted virtual buttons do not conflict with each other; or, merging the button area of the virtual button with the operation area corresponding to the operation center. This enables the virtual buttons to be adaptively adjusted according to the user's historical operation information, making the adjusted virtual buttons more suitable for the user's usage habits in actual usage scenarios. Therefore, it can avoid users repeatedly adjusting virtual buttons, simplifying the way users adjust virtual buttons, improving the efficiency of virtual button adjustment, and improving the user experience.
[0155] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0156] This application 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, wherein the computer program, when executed by the processor, implements the steps of the virtual button adjustment method as described above.
[0157] This application also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the virtual button adjustment method described above.
[0158] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0159] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0163] All information acquisition actions described in this application embodiment are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with authorization from the owner of the corresponding device.
[0164] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0165] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0166] The above provides a detailed description of the virtual button adjustment method, device, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for adjusting virtual buttons, characterized in that, The method of displaying multiple virtual buttons on a terminal device's screen includes: Based on the user's historical operation information, the operation center of each virtual button is determined. The operation center of the virtual button is used to represent the user's usage habits when triggering the virtual button in actual use scenarios. Adjust the corresponding virtual buttons according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center; The historical operation information includes single-key historical operation information for each virtual button. Determining the operation center for each virtual button based on the user's historical operation information includes: By analyzing all the trigger position information in the single-key history operation information, the center point of all the trigger position information is obtained, and the center point is used as the operation center of the virtual key. The step of adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the center of the virtual buttons and the corresponding operation center includes: Move the virtual button toward the corresponding operation center so that the button center of the virtual button coincides with the corresponding operation center; If there are conflicts between the moved virtual keys, then each conflicting key is cut off to separate the conflicting keys.
2. The method according to claim 1, characterized in that, After moving the virtual button toward the corresponding operation center so that the center of the virtual button coincides with the corresponding operation center, the method further includes: If there is a conflict between the moved virtual buttons, an adjustment vector is determined for each conflicting button based on the operation center and the original button center of each conflicting button. The starting point of the adjustment vector is the operation center of the corresponding conflicting button, and the ending point is the original button center of the corresponding conflicting button. Move each of the conflicting buttons along the direction of its corresponding adjustment vector until the conflict disappears.
3. The method according to claim 2, characterized in that, Moving each of the conflicting buttons along the direction of its corresponding adjustment vector until the conflict disappears includes: Determine the movement speed of each of the conflicting keys; Each of the conflicting buttons is moved simultaneously along the direction of its corresponding adjustment vector at its corresponding movement speed. When the conflict of the target conflict button disappears, stop moving the target conflict button.
4. The method according to claim 3, characterized in that, Determining the movement speed of each conflicting key includes: The movement speed corresponding to each conflicting key is determined based on 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 their corresponding adjustment vectors.
5. The method according to claim 1, characterized in that, The step of separating conflicting keys includes: The connection between the two conflicting buttons is determined based on their operation centers. The two conflicting buttons are cut according to the perpendicular bisector of the connecting line to separate them.
6. The method according to claim 5, characterized in that, The step of cutting the two conflicting buttons according to the perpendicular bisector of the connecting line to separate the two conflicting buttons includes: The perpendicular bisector is shifted a predetermined distance toward the operation center of the first conflicting button among the two conflicting buttons to obtain the first parallel line. The perpendicular bisector is shifted a predetermined distance toward the operation center of the second conflicting button among the two conflicting buttons to obtain the second parallel line. The first conflicting button is cut according to the first parallel line, and the second conflicting button is cut according to the second parallel line, so as to separate the first conflicting button and the second conflicting button.
7. The method according to claim 1, characterized in that, The step of adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the center of the virtual buttons and the corresponding operation center includes: Based on the original button center and operation center of each virtual button, the movement vector of each virtual button is determined. The starting point of the movement vector is the original button center of the corresponding virtual button, and the ending point is the operation center of the corresponding virtual button. Move each virtual button along the direction of its corresponding movement vector, ensuring that the adjusted virtual buttons do not conflict with each other.
8. The method according to claim 7, characterized in that, Moving each of the virtual buttons along the direction of its corresponding movement vector to shorten the distance between the button center and the corresponding operation center includes: Determine the adjustment speed of each of the virtual buttons; Each virtual button is moved simultaneously along the direction of its corresponding movement vector at its corresponding adjustment speed, ensuring that the adjusted virtual buttons do not conflict with each other.
9. The method according to claim 8, characterized in that, Determining the adjustment speed of each of the virtual buttons includes: The adjustment speed corresponding to each virtual button is determined based on the length of the movement vector of each virtual button; the adjustment speed is proportional to the length of the corresponding movement vector, and the ratio of the adjustment speeds of different virtual buttons is equal to the ratio of the lengths of their corresponding movement vectors.
10. The method according to any one of claims 1-9, characterized in that, The step of adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the center of the virtual buttons and the corresponding operation center includes: When the distance between the original button center of the virtual button and the corresponding operation center is greater than a preset distance threshold, the corresponding virtual button is adjusted according to the operation center to shorten the distance between the button center of the virtual button and the corresponding operation center.
11. The method according to claim 1, characterized in that, The step of adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the center of the virtual buttons and the corresponding operation center includes: When the operation area corresponding to the operation center is not within the corresponding virtual button, the virtual button and the operation area are merged to obtain a new virtual button.
12. The method according to claim 1, characterized in that, The step of determining the operation center of each virtual button based on the user's historical operation information includes: In response to the activation operation of the button adjustment control, the operation center of each virtual button is determined based on the user's historical operation information.
13. The method according to claim 12, characterized in that, The method of responding to the activation operation of the button adjustment control, and determining the operation center of each virtual button based on the user's historical operation information, includes: In response to the activation operation of the button adjustment control, a target adjustment period is determined. When the target adjustment period is reached, the operation center of each virtual button is determined based on the user's historical operation information within the adjustment period.
14. The method according to claim 1, characterized in that, After adjusting the corresponding virtual buttons according to the operation center to shorten the distance between the center of the virtual buttons and the corresponding operation center, the method further includes: A pop-up dialog box is displayed on the screen; the pop-up dialog box includes the relative position of the adjusted virtual button to the screen, or the positional relationship between the adjusted virtual button and the corresponding original virtual button, and the pop-up dialog box also includes an accept control and a reject control; In response to a trigger operation on the accept control, the adjusted virtual buttons are displayed on the screen; In response to a triggering operation on the rejection control, the original virtual buttons are displayed on the screen.
15. A virtual button adjustment device, characterized in that, The device displays multiple virtual buttons on the screen of a terminal device, and includes: The operation center determination module is used to determine the operation center of each virtual button based on the user's historical operation information. The operation center of the virtual button is used to represent the user's usage habits when triggering the virtual button in actual use scenarios. The virtual button adjustment module is used to adjust the corresponding virtual buttons according to the operation center, so as to shorten the distance between the button center of the virtual button and the corresponding operation center; The historical operation information includes single-key historical operation information for each of the virtual keys, and the operation center determination module is specifically used for: By analyzing all the trigger position information in the single-key history operation information, the center point of all the trigger position information is obtained, and the center point is used as the operation center of the virtual key. The virtual button adjustment module includes: The first moving module is used to move the virtual button toward the corresponding operation center, so that the button center of the virtual button coincides with the corresponding operation center. The second conflict handling module is used to separate the conflicting virtual keys if there is a conflict between them after the keys are moved.
16. An electronic device, characterized in that, It includes 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 button adjustment method as described in any one of claims 1-14.
17. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the virtual button adjustment method as described in any one of claims 1-14.
Citation Information
Patent Citations
Virtual key configuration method and device, electronic equipment and storage medium
CN112882620A
Virtual keyboard display adjusting method and device, electronic equipment and storage medium
CN115599284A
Systems and methods for providing an anatomically adaptable keyboard
US20160085440A1