Key position setting method and device, equipment and storage medium
By recording the position information of the user triggering operations multiple times in the key setting interface, the control position and outline that conforms to the user's operating habits is generated, and the problem that the key layout in the prior art cannot adapt to individual differences is solved, and the accuracy of key operation is improved.
Patent Information
- Application Number
- CN202510437879.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the key layout lacks precise consideration of the individual differences of each user, which makes it difficult for the key layout selected by the user to adapt to their own operating habits, resulting in inaccurate key operation.
By displaying the first identification area in the key setting interface, recording the position information of multiple triggering operations by the user in the area, and generating the position and outline of the first control based on these position information, ensuring that it conforms to the user's operating habits.
It realizes personalized settings of the control, improves the accuracy of subsequent key operations, and meets user's operation expectations.
Smart Images

Figure CN120371192A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer and Internet technologies, and particularly relates to a key position setting method, device, equipment, and storage medium. Background Art
[0002] In an application, the key position layout refers to the arrangement and distribution of controls with different functions in the interface. Through the controls, users can implement various functions in the application. Exemplarily, taking the application as a game application, the user can move the virtual character's position by moving the control.
[0003] In the related art, the user can select a target key position layout from at least one preset key position layout to set the key positions. The preset key position layout can be used to indicate the position distribution of at least one control in the interface.
[0004] In the above key position setting method, since the preset key position layout is designed in advance by the developer according to general situations or some user habits, and lacks precise consideration of each user's individual differences, it is difficult for the subsequent selected key position layout to adapt to the user's own operation habits, resulting in inaccurate subsequent key position operations. Summary of the Invention
[0005] Embodiments of this application provide a key position setting method, device, equipment, and storage medium. The technical solutions provided by this application include the following aspects.
[0006] According to one aspect of the embodiments of this application, a key position setting method is provided. The method includes:
[0007] In a key position setting interface, display a first recognition area, where the first recognition area is an effective area for a first trigger operation, and the first trigger operation is used to trigger the function corresponding to a first control to be generated;
[0008] In response to N first trigger operations performed in the first recognition area, record the position information of the N first trigger operations, where the position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, and N is a positive integer;
[0009] Display the first control generated based on the position information of the N first trigger operations, where at least one of the position and contour of the first control is determined based on the position information of the N first trigger operations.
[0010] According to one aspect of the embodiments of this application, a key position setting device is provided. The device includes:
[0011] The first display module is used to display a first recognition area in the key position setting interface. The first recognition area is the effective area of a first trigger operation, and the first trigger operation is used to trigger the function corresponding to the to-be-generated first control.
[0012] The recording module is configured to record the position information of N first trigger operations in response to the execution of N first trigger operations in the first recognition area. The position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, and N is a positive integer.
[0013] The second display module is used to display the first control generated based on the position information of the N first trigger operations. At least one of the position and the outline of the first control is determined based on the position information of the N first trigger operations.
[0014] According to one aspect of the embodiments of the present application, a terminal device is provided. The terminal device includes a processor and a memory. A computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above key position setting method.
[0015] According to one aspect of the embodiments of the present application, a computer-readable storage medium is provided. A computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above key position setting method.
[0016] According to one aspect of the embodiments of the present application, a computer program product is provided. The computer program product includes a computer program. The computer program is stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the above key position setting method.
[0017] The technical solutions provided by the embodiments of the present application can bring the following beneficial effects:
[0018] It is possible to determine at least one of the position and the outline of the first control according to the operation positions corresponding to multiple trigger operations (such as multiple click operations) performed by the user in the recognition area. The position and the outline of the generated first control conform to the user's operation habits and expectations, realizing personalized setting of the control, thereby improving the accuracy of subsequent key position operations. Description of the Drawings
[0019] Figure 1 is a schematic diagram of a computer system provided by an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a key position setting interface provided by an embodiment of the present application;
[0021] Figure 3 It is a flowchart of a key position setting method provided by an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of the display hierarchy of the generated control and the first recognition area provided by an embodiment of the present application;
[0023] Figure 5 It is a schematic diagram of a key position display interface provided by an embodiment of the present application;
[0024] Figure 6 It is a flowchart of a key position setting method provided by another embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of a key position preview interface provided by an embodiment of the present application;
[0026] Figure 8 It is a schematic diagram of a novice interface provided by an embodiment of the present application;
[0027] Figure 9 It is a schematic diagram of a control selection interface provided by an embodiment of the present application;
[0028] Figure 10 It is a schematic diagram of a convex hull determination method provided by an embodiment of the present application;
[0029] Figure 11 It is a block diagram of a key position setting device provided by an embodiment of the present application;
[0030] Figure 12 It is a structural block diagram of a terminal device provided by an embodiment of the present application. Detailed implementation manners
[0031] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0032] Please refer to Figure 1 , which shows a schematic diagram of a computer system provided by an embodiment of the present application. The computer system may include: a terminal device 10 and a server 20.
[0033] The terminal device 10 includes, but is not limited to, electronic devices such as mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances, AR (Augmented Reality) devices, VR (Virtual Reality) devices, etc. The terminal device 10 can run the client of the target application. Optionally, the target application can be an application that needs to be downloaded and installed, or in the form of a web page or a mini-program, and the embodiments of the present application do not limit this.
[0034] In the embodiments of the present application, the target application can be a game application. The game application can be, but is not limited to, a First-Person Shooter (FPS) application, an open-world game application, a level-breaking game application, a war strategy game application, a tower defense game application, a Real-Time Strategy (RTS) application, a turn-based strategy game application, a grand strategy game application, a city construction and management game application, a war strategy game application, a business strategy game application, a Simulation Game (SLG) application, a virtual reality game application, an augmented reality game application, a party game application, or any other type. In some embodiments, the target application can also be a social application, a video application, a music application, a video conferencing application, or any application that includes buttons (also referred to as controls), and the present application does not limit this.
[0035] In some embodiments, the target application (such as a game application) includes a key position setting function. Here, the key position refers to the position and layout of each interaction control included in the game application. In the present application, based on the position information corresponding to multiple trigger operations (such as multiple click operations) performed by the user (player) in the recognition area, the position and / or contour of the first control can be determined. So that the position and contour of the generated first control conform to the user's operation habits and expectations, realizing the personalized setting of the control.
[0036] Server 20 is used to provide background services for the client of the target application in the terminal device 10. For example, the server 20 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto.
[0037] The terminal device 10 and the server 20 can communicate with each other through a network. The network can be a wired network or a wireless network.
[0038] This application proposes a key position setting method, which can determine the position of a control in the interface based on the position information (such as the coordinates of the click position) corresponding to multiple trigger operations (such as multiple click operations) performed by the user in the recognition area. On the other hand, it can determine the outline of the control according to the position information, so as to realize the personalized setting of the control.
[0039] Please refer to Figure 2 which shows a schematic diagram of the key position setting interface 20 provided by an embodiment of this application. The following combines Figure 2 to introduce the key position setting method proposed in this application, which can include the following steps S1 to S4.
[0040] Step S1, as Figure 2 shown, in the key position setting interface 20, a first recognition area 25 is displayed. The first recognition area 25 is the effective area of the first trigger operation, and the first trigger operation is used to trigger the function corresponding to the to-be-generated first control.
[0041] The first recognition area refers to a specific area divided in the key position setting interface for receiving and recognizing the first trigger operation performed by the user. In some embodiments, the shape of the first recognition area can be a rectangle, a circle, or other regular or irregular shapes, and this application does not limit this.
[0042] The first trigger operation refers to a specific operation behavior performed by the user within the first recognition area for triggering the function corresponding to the to-be-generated first control, including but not limited to click operations (such as single-click operations, double-click operations), swipe operations, long-press operations, multi-finger gesture operations, etc.
[0043] Step S2, as Figure 2As shown, in response to N first trigger operations performed in the first recognition area 25, the position information of the N first trigger operations is recorded. The position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, and N is a positive integer.
[0044] Exemplarily, if the first trigger operation is a click operation, the position information is the coordinates of the click position. This position information reflects the trigger range of the user during the key operation. By recording the position information of the N first trigger operations, it is convenient to accurately determine the position and contour of the first control later.
[0045] Step S3, as Figure 2 shown, a display screen 22 of a virtual scene is displayed in the key setting interface 20. The first control is used to control the first virtual object to perform a first behavior in the virtual scene. In response to the first trigger operation, the first virtual object is controlled to perform the first behavior in the virtual scene.
[0046] Exemplarily, the first control can be used for skill release, and the first control is used to perform a shooting operation. As Figure 2 shown, a target 23 is displayed in the display screen 22 of the virtual scene. The first control is used to control the first virtual character to perform a shooting behavior in the virtual scene.
[0047] In the above step S3, a virtual scene can be displayed in the key setting interface and the first virtual object can be controlled to perform the first behavior in the virtual scene. By simulating the real game scene, the subsequent generated first control conforms to the real operation habits of the user in the actual game scene.
[0048] Step S4, display the first control generated based on the position information of the N first trigger operations. At least one of the position and contour of the first control is determined based on the position information of the N first trigger operations.
[0049] The contour of the first control is used to indicate the boundary shape of the range occupied by the first control in the interface, and is used to clarify the operable area of the first control. The contour of the first control can be a regular geometric figure, such as a rectangle, a circle, an ellipse, a regular polygon, etc., or an irregular figure, which is not limited in this application.
[0050] In some embodiments, the steps of determining the position and contour of the first control may include: determining a set of coordinate points corresponding to the N first trigger operations, and each coordinate point in the set of coordinate points is used to indicate the operation position of the first trigger operation in the first recognition area; determining the convex hull corresponding to the set of coordinate points; and determining at least one of the position and contour of the first control according to the convex hull.
[0051] In some embodiments, the position of the first control can be determined according to the position of the convex hull, and the outline of the first control can be determined according to the outline of the convex hull. Since the convex hull is the smallest convex polygon that contains all coordinate points, the position and outline of the finally determined first control can completely cover the area corresponding to the user's trigger operation without exceeding the boundary range of the area. Thus, the accuracy of the user's subsequent key operations is ensured.
[0052] Please refer to Figure 3 , which shows a flowchart of a key position setting method provided by an embodiment of the present application. The execution subject of each step of this method can be Figure 1 the terminal device 10 in the computer system shown. For example, the execution subject of each step can be the client of the target application (such as a game application). In the following method embodiments, for the convenience of description, only the execution subject of each step being the "client" is introduced and described. This method may include at least one of the following steps (310 to 330).
[0053] Step 310, in the key position setting interface, display a first recognition area, where the first recognition area is the effective area of the first trigger operation, and the first trigger operation is used to trigger the function corresponding to the to-be-generated first control.
[0054] The first recognition area refers to a specific area divided in the key position setting interface for receiving and recognizing the first trigger operation performed by the user. In some embodiments, the shape of the first recognition area can be a rectangle, a circle, or other regular or irregular shapes, and the present application does not limit this. The first recognition area can be a continuous area or at least two discontinuous sub-areas. Among them, a continuous area means that the area is an uninterrupted and completely connected range on the interface, and any two points within this area can be connected by a continuous path that does not exceed the area. At least two discontinuous sub-areas mean that the first recognition area is composed of two or more mutually separated and non-directly connected sub-areas. These sub-areas exist independently on the interface, with a certain interval between them or separated by other elements. The present application does not limit this.
[0055] The first trigger operation refers to a specific operation behavior performed by the user within the first recognition area for triggering the function corresponding to the to-be-generated first control, including but not limited to click operations (such as single-click operations, double-click operations), swipe operations, long-press operations, multi-finger gesture operations, etc. Among them, the multi-finger gesture operation refers to an operation performed by using multiple fingers simultaneously within the first recognition area, such as two-finger pinch, two-finger rotation, three-finger swipe, etc. It can be understood that the first trigger operation can be a contact operation directly performed by the user on the touch screen of the terminal device. For example, the user can directly use a finger to touch the screen to complete the first trigger operation. It can also be an indirect operation performed by the user through external input devices such as a mouse, keyboard, touchpad, handle, remote control, etc. For example, the user can move the mouse pointer to a specific position within the first recognition area and then perform operations such as click, double-click, drag, etc. to execute the first trigger operation. This application does not make any limitations in this regard.
[0056] The effective area refers to a specific range where only when the first trigger operation occurs within the range of the first recognition area, the system will recognize, process the first trigger operation, and trigger the corresponding function. A control, also known as a button, refers to an interface element used to interact with a target application (such as a game application). The function corresponding to the control refers to the specific role that the control can achieve in the target application. Exemplarily, when the target application is a game application, the first control can be used for skill release, and its function is to trigger a specific skill of the virtual character, such as firing a bullet. Exemplarily, the target application can be a video application, and the first control can be a play or pause button, and its function is to control the play and pause of the video. This application does not make any limitations in this regard.
[0057] Step 320: In response to N first trigger operations performed in the first recognition area, record the position information of the N first trigger operations. The position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, and N is a positive integer.
[0058] The position information of the first trigger operation refers to relevant data that can describe the operation position of the first trigger operation within the first recognition area. Optionally, if the first trigger operation is a click operation, the position information is the coordinates of the click position. Optionally, if the first trigger operation is a swipe operation, the position information can be the coordinates of the starting position and the ending position of the swipe operation, or the position information can be the coordinates of the starting position and the swipe direction of the swipe operation, or the position information can be the coordinates of the starting position, the swipe direction, and the swipe distance of the swipe operation, or the position information can be multiple coordinates on the swipe trajectory. This application does not make any limitations in this regard.
[0059] Step 330: Display a first control generated based on the position information of N first trigger operations, where at least one of the position and the contour of the first control is determined based on the position information of the N first trigger operations.
[0060] In some embodiments, the position of the first control is determined based on the position information of the N first trigger operations. It can be understood that in this way, the contour of the first control can be a preset contour or an arbitrarily assigned random contour. For example, the preset contour can be a circular graph with a first value as the radius, and the first value can be set based on the experience of those skilled in the art. This application does not make any limitations in this regard.
[0061] In some embodiments, the position information may include Q coordinates corresponding to the N first trigger operations, where Q is a positive integer. When the first trigger operation is a click operation, the coordinate is the coordinate of the click position. If the first trigger operation is a swipe operation, the coordinate is the coordinate of the starting position of the swipe operation or the coordinate of the ending position of the swipe operation or a coordinate on the swipe trajectory. This application does not make any limitations in this regard. Optionally, according to P coordinates among the Q coordinates, the position corresponding to the first control is determined, where P is a positive integer less than or equal to Q. Specifically, the geometric center coordinates of the P coordinates are determined; and the geometric center coordinates are determined as the position corresponding to the first control. Among them, the abscissa of the geometric center coordinates is the average value of the abscissas of the P coordinates respectively, and the ordinate of the geometric center coordinates is the average value of the ordinates of the P coordinates respectively.
[0062] Optionally, for the above example, the first recognition area can be divided into several grids, and the number of occurrences of the P coordinates in each grid is counted; according to the number of occurrences corresponding to each grid, the position corresponding to the first control is determined. Exemplarily, based on the grid with the most occurrences, the position of the first control is determined. For example, the center position of the grid is used as the position of the first control. Among them, the above grid can be circular, polygonal, or of any shape. This application does not make any limitations in this regard. Optionally, the above P coordinates are the coordinates among the Q coordinates that meet the preset conditions. The preset conditions may include at least one of the following: the degree of dispersion of the P coordinates is less than a certain threshold value, the P coordinates are the coordinates with a smaller degree of dispersion among the Q coordinates, and the P coordinates are located in a specific area within the first recognition area, and the specific area can be the central area of the first recognition area, such as a circular area with a certain threshold value as the radius. The above threshold value can be set based on the experience of those skilled in the art. This application does not make any limitations in this regard.
[0063] In some embodiments, the position information may include the coordinates of the starting position of N sliding operations and the sliding direction. Optionally, the method for determining the position of the first control may include the following steps: determining the geometric center coordinates of the starting position of the sliding operation, for which the determination method can be found above and will not be elaborated here; based on the geometric center coordinates and the sliding direction, determining the position of the first control. In some embodiments, the number of operations in at least two direction intervals may be counted, and the central direction of the direction interval with the highest occurrence frequency may be determined as the first sliding direction; according to the geometric center coordinates of the starting position, the first sliding direction, and the first offset value, determining the first sliding trajectory; setting the position of the first control at the central coordinates of the first sliding trajectory. Wherein, the starting point of the first sliding trajectory is the geometric center coordinates of the starting position, the end point is the position obtained by moving the geometric center coordinates as the starting point in the first sliding direction by the first offset value, and the first sliding trajectory is the line connecting the starting point and the end point. Optionally, for the above example, when the position information includes the sliding distance, the above first offset value may be further determined. For example, the first offset value may be the average value of the sliding distance.
[0064] Exemplarily, for the first sliding direction, the entire circumference (360°) may be divided into several direction intervals, each interval having a certain angular range. For example, it may be divided into 4 direction intervals, each interval being 90°, corresponding to the upper interval, the right interval, the lower interval, and the left interval respectively. When counting, as long as the sliding direction falls within a certain interval, it is classified into the direction corresponding to that interval. After the counting is completed, the number of operations in these 4 direction intervals is compared. Suppose the number of operations in the right interval is the largest, then the direction interval with the highest occurrence frequency is the right interval. Suppose the central direction of the right interval is 0°, that is, the first sliding direction is the direction indicated by 0°.
[0065] The contour of the first control is used to indicate the boundary shape of the range occupied by the first control in the interface, and is used to clarify the operable area of the first control. The contour of the first control is a closed figure enclosed by a closed curve, which may be a regular geometric figure, such as a rectangle, a circle, an ellipse, a regular polygon, etc., or an irregular figure, which is not limited in this application.
[0066] In some embodiments, the contour of the first control is determined based on the position information of N first trigger operations. It can be understood that in this way, the position of the first control can be a preset position or a random position. The preset position can be set based on the experience of relevant technicians, and the present application does not limit this. Optionally, for the above example, the above P coordinate points are included within the contour of the first control. In other words, the area determined by these P coordinate points is completely enclosed by the contour of the first control. Exemplarily, the central position corresponding to the first control can be determined first (such as the above geometric center coordinates); the first coordinate point that is the farthest from the central position among the P coordinates is determined; the contour of the first control can be a circle determined with the central position as the center and the distance between the central position and the first coordinate point as the radius. This description is only exemplary, and the present application does not limit the shape of the contour of the first control.
[0067] In some embodiments, both the position and the contour of the first control are determined based on the position information of N first trigger operations.
[0068] In some embodiments, one first control or at least two first controls generated based on the position information of N first trigger operations can be displayed. When the first recognition area is a continuous area, one first control generated based on the position information of N first trigger operations is displayed. When the first recognition area is at least two non - continuous sub - areas, at least two first controls generated based on the position information of N first trigger operations are displayed, where each sub - area corresponds to one first control.
[0069] Of course, when the first recognition area is a continuous area, at least two first controls generated based on the position information of N first trigger operations can also be displayed. Exemplarily, the first recognition area can be a continuous rectangular area. The user performs click operations multiple times within this rectangular area, and the click positions of the multiple click operations can be concentrated in the upper - left corner and the lower - right corner. The system can generate one first control in the upper - left corner and one first control in the lower - right corner according to the click position information. When the first recognition area is at least two non - continuous sub - areas, one first control generated based on the position information of N first trigger operations is displayed. Exemplarily, assume that the user performs N click operations in two non - continuous sub - areas, but the click positions of each of the N click operations are relatively concentrated. In this case, one first control can still be generated, and it is possible that the range that is not included in the first recognition area is covered within the contour of this first control. The present application does not limit this.
[0070] In summary, the technical solution provided by the embodiments of the present application can determine the position and / or contour of the first control according to the operation positions corresponding to multiple trigger operations (such as multiple click operations) performed by the user in the recognition area. The position and contour of the generated first control conform to the user's operation habits and expectations, realizing personalized setting of the control, thereby improving the accuracy of subsequent key operations.
[0071] The following introduces the implementation method of visually displaying the operation position of the first trigger operation in the first recognition area.
[0072] In some embodiments, the method further includes: displaying operation marks corresponding to N first trigger operations respectively, and the operation marks are used to visually display the operation positions of the first trigger operations in the first recognition area.
[0073] The operation marks include but are not limited to graphics, animations, and texts. At least one of the colors and filling patterns corresponding to the graphics, animations, and texts. Optionally, the operation mark can be a graphic, such as Figure 2 As shown, exemplarily, the operation mark 21 can be a circle, the center of the circle can be the position coordinates of the trigger operation, and the radius can be a preset value, which can be set by the experience of relevant technicians, and the present application does not limit this. The graphics of the above operation marks can also be small squares, triangles, etc., and the present application does not limit this.
[0074] Optionally, the operation mark can also be an animation. Exemplarily, the operation mark can be a flashing light point. Specifically, a light point is displayed at the coordinates of the operation position and flashes at a certain frequency. Optionally, the operation mark can be a digital number. Specifically, according to the order of the first trigger operations, the corresponding digital numbers are displayed at the operation positions. This method can not only intuitively see the operation positions, but also understand the order of the N first trigger operations. For example, the user clicks different positions in sequence, and the corresponding digital numbers are displayed at each click position.
[0075] The above method facilitates the user to view the operation positions corresponding to the trigger operations by visually displaying the operation marks corresponding to each first trigger operation.
[0076] In some embodiments, displaying the operation marks corresponding to N first trigger operations respectively includes: for each first trigger operation among the N first trigger operations, after the first trigger operation is recognized, displaying the operation mark corresponding to the first trigger operation.
[0077] Exemplarily, the first trigger operation can be a click operation. In response to the click operation, after the click operation is recognized, the operation mark corresponding to the click operation is displayed.
[0078] In the above method, the operation tags corresponding to the first trigger operation are displayed one by one each time. This display method with timely response can enhance the user experience.
[0079] In some embodiments, the first trigger operation may be a click operation or a swipe operation. In some embodiments, when the first trigger operation is a click operation, the operation tag corresponding to the first trigger operation is a position tag, and the position tag is used to visually display the click position of the first trigger operation in the first recognition area.
[0080] The position tag refers to an identifier that indicates the click position within the first recognition area with specific graphic elements, colors, or visual effects. Similarly, the position identifier includes but is not limited to graphics, animations, and text. For specific details, please refer to the description of the operation tag above.
[0081] In some embodiments, when the first trigger operation is a swipe operation, the operation tag corresponding to the first trigger operation is a trajectory tag, and the trajectory tag is used to visually display the swipe trajectory of the first trigger operation in the first recognition area.
[0082] The swipe trajectory refers to the continuous path passed by a finger, a stylus, a mouse, or other operation media in the first recognition area during the execution of the swipe operation. The trajectory tag refers to an identifier that visually presents the swipe trajectory within the first recognition area with specific graphics, lines, colors, or visual effects. The trajectory tag includes but is not limited to a smooth line, the thickness and transparency of which can be adjusted according to the speed and strength of the swipe; a line with an arrow to clearly indicate the direction of the swipe; a path composed of multiple small icons, which can represent the position coordinates on the swipe trajectory; or it can also be an area with a gradient color effect, where the change in color reflects certain property changes during the swipe process, such as the speed or pressure.
[0083] In the above method, by visually displaying the position identifier, the user can intuitively and clearly understand the specific position of the click operation in the first recognition area. Through the trajectory identifier, the user can clearly understand the specific path and range of the swipe operation.
[0084] The implementation method of the key position setting interface also displaying a virtual scene is introduced below.
[0085] In some embodiments, as Figure 2 shown, a display screen 22 of the virtual scene is displayed in the key position setting interface 20, and the first control is used to control the first virtual object to perform a first behavior in the virtual scene; the method further includes: in response to the first trigger operation, controlling the first virtual object to perform the first behavior in the virtual scene.
[0086] A virtual object refers to an interactive element in a target application. Taking the target application as a game application for example, a virtual object refers to a virtual character controlled by a user in the game application. The virtual object can be in the form of a human, an animal, a cartoon, or other forms, and the embodiments of the present application do not limit this. The virtual object can be displayed in three dimensions or two dimensions, and the embodiments of the present application do not limit this. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object is a three-dimensional solid model, such as a three-dimensional solid model created based on animation skeleton technology. Each virtual object has its own shape and volume in the three-dimensional virtual scene and occupies a part of the space in the three-dimensional virtual scene. Schematically, the virtual object is a virtual person, such as a simulated human character or an anime character. In some implementation manners, the virtual object can also be implemented using a 2.5D or 2D model, and the embodiments of the present application do not limit this.
[0087] The first behavior refers to an interactive operation with a specific function or purpose performed by the first virtual object in the virtual scene of the target application (taking the game application as an example) based on program rules, gameplay mechanisms, plot settings, etc., including but not limited to specific action performances of various types such as movement, interaction, combat, skill casting, resource management, etc. Exemplarily, the first control can be used for skill release, such as the first control is used to perform a shooting operation, as Figure 2 shown, a target 23 is displayed in the display screen 22 of the virtual scene. The first control is used to control the first virtual character to perform a shooting behavior in the virtual scene.
[0088] The above method can display the virtual scene in the key mapping setting interface and control the first virtual object to perform the first behavior in the virtual scene. By simulating the real game scene, the subsequently generated first control conforms to the real operation habits of the user in the actual game scene.
[0089] In some embodiments, as Figure 2 shown, at least one generated control 24 is also displayed in the key mapping setting interface 20, and the display level of the generated control 24 is higher than the display level of the first recognition area; the method further includes: for the first generated control among the at least one generated control, in the case where the display area of the first generated control and the display area of the first recognition area overlap, in response to a trigger operation on the first generated control, controlling the first virtual object to perform the behavior corresponding to the first generated control in the virtual scene; wherein, the trigger operation on the first generated control is not recognized as the first trigger operation.
[0090] The display level of the generated control is higher than that of the first recognition area, which means that in the visual presentation of the key position setting interface, when the generated control and the first recognition area overlap in spatial position, the generated control will block part or all of the content of the first recognition area and be preferentially displayed in the user's field of vision. For example Figure 4 As shown, it shows a schematic diagram of the display levels of the generated control and the first recognition area provided by an embodiment of the present application. Among them, the display level of the generated control is higher than that of the first recognition area.
[0091] The overlap between the display area of the first generated control and the display area of the first recognition area means that in the key position setting interface, the area occupied by the first generated control on the interface partially or completely coincides with the first recognition area. In this case, the trigger operation for the first generated control is not recognized as the first trigger operation. That is to say, when the first trigger operation occurs in the overlapping part of the two areas, the system will clearly distinguish that this is an operation on the first generated control, rather than an operation on the first recognition area. For example, the first recognition area can be used to perform a shooting operation, and the first generated control is used to perform a squatting operation. When the player clicks on the first generated control within the overlapping area, the system will recognize it as the squatting operation corresponding to the first generated control, rather than the shooting operation.
[0092] In the above method, when the generated control is also displayed in the key position setting interface, the display level of the generated control is higher than that of the first recognition area. This method ensures that the trigger operation for the first generated control is not recognized as the first trigger operation in the case where the display areas of the first generated control and the first recognition area overlap, thereby ensuring that the subsequently generated first control does not overlap with the generated control.
[0093] The implementation method of displaying the first control is introduced below.
[0094] In some embodiments, displaying the first control generated based on the position information of N first trigger operations includes: displaying the control icon of the first control according to at least one of the position and contour of the first control determined based on the position information of N first trigger operations; in the control icon of the first control, displaying the function icon corresponding to the first control.
[0095] The control icon of the first control refers to a visual graphic identifier that indicates the existence of the first control in the interface and has a specific position and contour. In some embodiments, the control icon of the first control is displayed according to the position of the first control determined based on the position information of N first trigger operations. In this way, the position information of the N first trigger operations can only determine the position of the control icon. At this time, the contour of the control icon can be a preset contour. For example, the preset contour can be a circular graphic with a first value as the radius. The present application does not limit this.
[0096] In some embodiments, the control icon of the first control is displayed according to the contour of the first control determined based on the position information of N first trigger operations. In this way, the position information of the N first trigger operations can only determine the contour of the control icon. At this time, the position of the control icon can be a preset position. For example, the preset position can be the boundary position of the interface. The present application does not limit this.
[0097] The function icon refers to a graphic symbol displayed inside the control icon of the first control and used to intuitively express the specific function corresponding to the control. It is a visualized display of the function of the first control, enabling the user to quickly understand the purpose of the first control after seeing the function icon. There can be a one-to-one correspondence between the control and the function icon. One control corresponds to one function icon, and controls with different functions can correspond to different function icons. Exemplarily, as Figure 5 shown, it shows a schematic diagram of the key display interface 50 provided by an embodiment of the present application. Taking a game application as an example, if the function of the control icon 51 is shooting, its function icon 52 can be a bullet icon. If the function of the control icon 51 is to open the scope (that is, open the lens), its function icon 52 can be a aiming icon.
[0098] In the above method, by displaying the control icon, the interaction area and position of the trigger operation are clarified, and by displaying the function icon, the functions corresponding to different controls are clarified, facilitating the user to distinguish different controls. Thus, the efficiency and convenience of the user's interaction with the controls in the interface are improved.
[0099] The following introduces the specific implementation manner of displaying the first recognition area.
[0100] In some embodiments, as Figure 2 shown, in the key setting interface 20, the first recognition area 25 is displayed, including: in the key setting interface 20, the first recognition area 25 is displayed differently from other areas in the key setting interface except the first recognition area.
[0101] Other areas refer to the areas in the key setting interface 20 except the first recognition area 25, and may include the areas where the generated controls 24 are located, the areas of the display screen 22 of the virtual scene, etc.
[0102] In some embodiments, the differential display may include at least one of the following: color differentiation, transparency differentiation, line style differentiation, icon or logo differentiation, and animation effect differentiation. Among them, color differentiation is used to indicate that there is a color difference between the first recognition area and other areas. Transparency differentiation is used to indicate that there is a transparency difference between the first recognition area and other areas. Line style differentiation is used to indicate that there is a difference in the style of the filled lines between the first recognition area and other areas. Icon or logo differentiation is used to indicate that there is a difference in the icons or logos between the first recognition area and other areas. For example, a specific icon may be added inside or around the first recognition area. Specifically, a prominent small icon, such as a flashing star or a special arrow icon, may be placed at the corner of the first recognition area. It may also include a text logo. For example, a short text description, such as "First Recognition Area", may be added near the first recognition area, and the color, size, and font style of the text may be set to distinguish it from other areas of the interface. Animation effect differentiation is used to indicate that there is a difference in the animation effects between the first recognition area and other areas. Exemplarily, a flashing animation, a gradient animation, etc. may be added to the first recognition area, and the present application does not limit this.
[0103] Through the above method, by differentially displaying the first recognition area and other areas in the key position setting interface, it is convenient for the user to accurately and quickly identify the first recognition area.
[0104] In some embodiments, at least two recognition areas are displayed in the key position setting interface. The at least two recognition areas include the first recognition area, and different recognition areas correspond to different controls to be generated. The method further includes: after the operation recognition stage of the first control is started, displaying a first prompt message, where the first prompt message is used to indicate that the system is in the operation recognition stage of the first control; differentially displaying the first recognition area and other recognition areas in the at least two recognition areas except the first recognition area.
[0105] After the operation recognition stage of the first control is started, the first prompt message is used to indicate to the user that the current system is in the operation recognition of the first control. In the case where there are multiple recognition areas in the key position setting interface and different areas correspond to different controls to be generated, the user may perform multiple operation attempts simultaneously. The first prompt message can enable the user to clearly know the current operation stage and avoid operation confusion.
[0106] The first prompt message may include at least one of the following: text prompt, voice prompt, graphic or animation prompt. For example, a piece of text pops up at a prominent position on the interface, showing "Currently in the operation recognition stage of the first control, please operate in the first recognition area". Users can clearly understand the current operation status by reading the text. For example, the system can convey the first prompt message by voice broadcast. For example, a voice like "Now start recognizing the operation of the first control, please operate in the corresponding first recognition area" is issued. For example, specific graphics or animations can also be used to indicate the start of the operation recognition stage of the first control. For example, a flashing halo appears around the first recognition area, or a dynamic arrow is displayed on the interface pointing to the first recognition area. Such an intuitive visual prompt can quickly attract the user's attention and convey operation information. Exemplarily, as Figure 2 shown, after the operation recognition stage of the first control is started, the first prompt message 27 is displayed, and the first prompt message 27 is used to indicate that it is in the operation recognition stage of the first control.
[0107] Exemplarily, as Figure 2 shown, at least two recognition areas are displayed in the key position setting interface 20, which may include a first recognition area 25 and a third recognition area 26. The first recognition area 25 and the third recognition area 26 correspond to different controls to be generated. The first recognition area 25 and the third recognition area 26 are displayed differently.
[0108] In the above method, through the first prompt message, it is convenient for the user to clarify the current operation recognition stage. By displaying the first recognition area and other recognition areas except the first recognition area in at least two recognition areas differently, it is convenient for the user to quickly distinguish the first recognition area from at least two recognition areas.
[0109] In some embodiments, at least two recognition areas are displayed in the key position setting interface. The at least two recognition areas may include a first recognition area and a third recognition area, and different recognition areas correspond to different controls to be generated. The method further includes: in the key position setting interface, displaying the first recognition area and the third recognition area. The third recognition area is the effective area of the third trigger operation, and the third trigger operation is used to trigger the function corresponding to the third control to be generated; in response to N first trigger operations performed in the first recognition area and in response to T third trigger operations performed in the third recognition area, recording the position information of the N first trigger operations and the T third trigger operations. The position information of the third trigger operation is used to indicate the operation position of the third trigger operation in the third recognition area, and T is a positive integer; displaying the first control generated based on the position information of the N first trigger operations and the third control generated based on the position information of the T third trigger operations. At least one of the position and contour of the third control is determined based on the position information of the T third trigger operations.
[0110] That is, in the above method, the user can perform triggering operations on different controls in different recognition areas respectively. For example, in the key mapping setting interface of a game application, the first recognition area can be used to set the movement control of the virtual character (i.e., the first control), and the third recognition area is used to set the skill release control of the virtual character (i.e., the third control). The user can flexibly perform triggering operations in their respective corresponding recognition areas according to their own operation habits and needs, without being restricted by a single recognition area, so as to flexibly and quickly complete the setting of multiple controls. The above example can only recognize two controls (i.e., the first control and the third control) in the interface at the same time. It should be noted that this example is only exemplary, and the user can recognize at least two controls in the interface according to their needs. The present application does not limit the number of controls that the user can recognize at the same time.
[0111] In some embodiments, the method further includes: after the operation recognition stage of the first control ends, if there is a second control to be generated, start the operation recognition stage of the second control, and display a second prompt message, where the second prompt message is used to indicate that it is in the operation recognition stage of the second control; distinguish and display the second recognition area and other recognition areas except the second recognition area among at least two recognition areas; in response to M second trigger operations performed in the second recognition area, record the position information of the M second trigger operations, where the position information of the second trigger operation is used to indicate the operation position of the second trigger operation in the second recognition area, and M is a positive integer; display the second control generated based on the position information of the M second trigger operations, where at least one of the position and contour of the second control is determined based on the position information of the M second trigger operations.
[0112] The generation principle of the second control is similar to that of the first control. For the content not described in detail here, please refer to the corresponding description above. In some embodiments, when the system includes multiple controls to be generated, the operation recognition order of the multiple controls to be generated can be specified by the user or set randomly. The present application does not limit this.
[0113] In the above method, when the system includes multiple controls to be recognized, the method supports starting the operation recognition stage of the second control in an orderly manner after the operation recognition of the first control is completed, so that the system can process the recognition tasks of multiple controls in an orderly manner.
[0114] As Figure 6 shown, it shows a flowchart of a key mapping setting method provided by another embodiment of the present application. It may include the following steps 610 to 650.
[0115] Step 610, i = i + 1, where the initial value of i is 0.
[0116] Step 620: Enter the operation recognition stage of the i-th control to be generated. In the key position setting interface, the recognition area corresponding to the i-th control to be generated is displayed.
[0117] Step 630: In response to multiple trigger operations performed in the recognition area corresponding to the i-th control to be generated, record the position information of the multiple trigger operations.
[0118] Step 640: Determine whether i is less than S, where S refers to the number of controls to be generated. When i is less than S, loop through the above steps 610 to 630. When i is equal to or greater than S, perform the following step 650.
[0119] Step 650: Display each control generated based on the position information of the multiple trigger operations. It can be understood that the i-th control generated by the multiple trigger operations performed in the recognition area corresponding to the i-th control to be generated is displayed.
[0120] The following introduces two implementation methods for determining the control to be generated. In Method 1, the control to be generated is also called the preselected control. In Method 2, the control to be generated is also called the target control.
[0121] Method 1
[0122] In some embodiments, in response to a selection operation for a target key layout in at least one key layout, a key preview interface is displayed. The target key layout includes at least one preselected control, and the recognition areas corresponding to the at least one preselected control are displayed in the key preview interface.
[0123] The key layout refers to the arrangement and distribution of controls with different functions on the interface in a target application (such as a game application). Different key layouts are used to provide different operation experiences and efficiencies for users to meet the diverse usage needs of users. It can be understood that the types of controls, the number of controls, and the arrangement and distribution methods of controls included in different key layouts can be different. Exemplarily, the key layout can include two-finger key layout, three-finger key layout, four-finger key layout, etc. Among them, the two-finger key layout is used to indicate that when the player operates the touch screen, mainly two fingers are used to control each button on the screen. Generally, one finger is responsible for moving the perspective, and the other finger is responsible for other operations such as moving the character, shooting, and aiming. The three-finger key layout is used to indicate that the player uses three fingers for triggering operations. A common allocation method is that one finger controls the movement of the perspective, and the other two fingers are respectively responsible for actions such as moving the character and shooting. Some players will use the thumb to control the movement, the index finger to control aiming and shooting, and the other finger (such as the middle finger) to assist in some additional operations such as jumping and crouching. The four-finger key layout is used to indicate that the player uses four fingers to operate the screen. The usual operation method is that two fingers control the movement of the perspective and the character, and the other two fingers are respectively responsible for important operations such as shooting and aiming. For example, the player may use two thumbs to control the movement and the perspective respectively, and two index fingers to control aiming and shooting respectively. This application does not limit the number and type of controls included in the key layout.
[0124] In some embodiments, after the user selects the target key layout, all the controls in the target key layout can be used as preselected controls. Or some of the controls in all the controls in the target key layout can be used as preselected controls. This application does not limit this.
[0125] The key preview interface displays at least one recognition area corresponding to each preselected control. The positions, shapes, and sizes of the recognition areas corresponding to each preselected control can be predefined or randomly displayed. This application does not limit this. Exemplarily, as Figure 7 shown, it shows a schematic diagram of the key preview interface 70 provided by an embodiment of this application. For Figure 7 subfigure (1) in, the key preview interface 70 displays at least one recognition area 71 corresponding to each preselected control.
[0126] The above method 1 determines the controls to be generated based on the selected target key layout. In this way, it is convenient for the user to quickly determine the controls to be generated.
[0127] In some embodiments, such as Figure 8As shown, it is a schematic diagram of the novice interface 80 provided by an embodiment of the present application. The method further includes: when the local user account is a new user, displaying the novice interface 80, and the novice interface 80 displays a layout selection control 81; in response to an operation on the layout selection control 81, displaying at least one key layout.
[0128] In the above method, when the user is a novice, at least one key layout can be quickly and conveniently obtained through the layout selection control visually presented in the novice interface, which is convenient for the user to quickly determine the button to be recognized subsequently.
[0129] Way 2
[0130] In some embodiments, in response to a selection operation on at least one target control among at least one candidate control, a key preview interface is displayed, and recognition regions corresponding to at least one target control are displayed in the key preview interface.
[0131] Exemplarily, as Figure 9 shown, it is a schematic diagram of a control selection interface 90 provided by an embodiment of the present application. The control selection interface 90 displays at least one candidate control 91. In response to a selection operation on at least one target control, a key preview interface is displayed.
[0132] In the above Way 2, the to-be-generated control is determined based on the selected target control. In this way, the user can accurately select the to-be-generated control they want to generate.
[0133] In some embodiments, after determining the to-be-generated control, it further includes: in response to an adjustment operation on the recognition region corresponding to the first control, displaying the adjusted recognition region corresponding to the first control, and the adjusted recognition region corresponding to the first control is used as the first recognition region; where the first control is any one of at least one preselected control or at least one target control, and the adjustment operation is used to adjust at least one of the following of the recognition region: position, size, shape.
[0134] In some embodiments, the user can perform an adjustment operation on the initial recognition region corresponding to each to-be-generated control, display the adjusted recognition region corresponding to each control, and the adjusted recognition region corresponding to each control is used as its corresponding recognition region.
[0135] Exemplarily, as Figure 7 shown in sub - figure (2) of, in response to an adjustment operation on the recognition region 71 corresponding to the first control, displaying the adjusted recognition region corresponding to the first control, and the adjusted recognition region corresponding to the first control is used as the first recognition region 25.
[0136] In the above method, the user can flexibly adjust the recognition area corresponding to the first control according to needs to determine the corresponding first recognition area.
[0137] The following introduces the technical implementation method for determining the position and contour of the first control. The execution subject of each method on the technical side can also be Figure 1 the server 20 in the computer system shown. In this case, the terminal device is used to send the position information of the N first trigger operations to the server 20. The server 20 determines the position and / or contour of the first control based on the position information of the N first trigger operations and sends it to Figure 1 the terminal device 10 in
[0138] In some embodiments, the method further includes: determining a set of coordinate points corresponding to the N first trigger operations, where each coordinate point in the set of coordinate points is used to indicate the operation position of the first trigger operation in the first recognition area; determining the convex hull corresponding to the set of coordinate points; and determining at least one of the position and contour of the first control according to the convex hull.
[0139] In a two-dimensional plane, the convex hull is the smallest convex polygon that contains each coordinate point in the set of coordinate points. In some embodiments, the position of the first control is determined according to the position of the convex hull. The contour of the first control is determined according to the contour of the convex hull.
[0140] In the above method, based on the set of coordinate points corresponding to the N first trigger operations, the corresponding convex hull is determined, and the position and contour of the first control are determined according to the convex hull. Since the convex hull is the smallest convex polygon that contains all coordinate points, the finally determined position and contour of the first control can not only completely cover the area corresponding to the user's trigger operation, but also not exceed the boundary range of this area.
[0141] In some embodiments, determining the convex hull corresponding to the set of coordinate points includes: for each coordinate point in the set of coordinate points, determining the average distance of the coordinate point according to the distance between the coordinate point and other coordinate points in the set of coordinate points, where the average distance is used to characterize the degree of dispersion of the coordinate point; removing K coordinate points from the set of coordinate points to obtain an updated set of coordinate points, where the minimum value of the average distance of the K coordinate points is greater than or equal to the maximum value of the average distance of each coordinate point in the updated set of coordinate points, and K is a preset positive integer; and determining the convex hull based on the updated set of coordinate points, where the convex hull is the smallest convex polygon that contains each coordinate point in the updated set of coordinate points.
[0142] In some embodiments, the coordinate points can be two-dimensional coordinate points (x, y).
[0143] Exemplarily, the distance between a coordinate point and other coordinate points in the set of coordinate points can refer to the Euclidean distance.
[0144] As shown in Formula 1 below:
[0145]
[0146] Where d(p i , p j ) is the distance between the coordinate points p i (x i , y i ) and p j (x j , y j ), C is the number of coordinate points included in the set of coordinate points, is the average distance corresponding to the i-th coordinate point.
[0147] In some embodiments, the smaller the average distance of the coordinate points, the smaller the degree of dispersion of the coordinate points is characterized. The larger the average distance of the coordinate points, the greater the degree of dispersion of the coordinate points is characterized. That is, the K coordinate points are the K coordinate points with a larger degree of dispersion in the set of coordinate points.
[0148] In some embodiments, based on the updated set of coordinate points, the convex hull is determined by the Graham scan method. Specifically, it may include the following steps 1 to 5. Step 1, select a reference point. Select a reference point from the updated set of coordinate points. Usually, the point with the smallest ordinate is selected. If there are multiple points with the same ordinate, then select the coordinate point with the smallest abscissa among them. This reference point will be used as the starting point for subsequent calculations and is denoted as P0. Because in the construction process of the convex hull, this reference point is in a relatively "bottom" or "most marginal" position, which is conducive to determining the angular relationship of other points relative to it. Step 2, calculate the polar angle. For each coordinate point P1 in the updated set of coordinate points except the reference point P0, calculate its polar angle relative to the reference point P0. The polar angle refers to the angle between the line connecting the point P1 and the reference point P0 and the polar axis with the reference point P0 as the origin and the horizontal right as the polar axis. The arctangent function can be used to calculate the polar angle. These points are sorted in ascending order of the polar angle. If multiple points have the same polar angle, then select the point farther from the reference point P0 to retain and remove the closer points, because in the construction of the convex hull, the points farther away are more likely to be the vertices of the convex hull. Step 3, initialize the stack. Create a stack structure and push the reference point P0 and the point with the smallest polar angle into the stack in sequence. The elements in the stack will gradually form the vertices of the convex hull. Step 4, traverse the sorted points. Starting from the point with the third smallest polar angle, traverse the sorted set of points in sequence. Step 5, obtain the convex hull. After traversing all the coordinate points, the remaining elements in the stack are the vertices of the convex hull corresponding to the updated set of coordinate points. Connect these vertices in the order of the elements in the stack, and the smallest convex polygon containing each coordinate point in the updated set of coordinate points, that is, the convex hull, can be obtained.
[0149] Exemplarily, as Figure 10 shown, it shows a schematic diagram of the convex hull determination method provided by an embodiment of the present application. As Figure 10 shown in sub-diagram (1) in Figure 10 it, it shows a set of coordinate points corresponding to N first trigger operations, and this coordinate set may include several coordinate points. As Figure 10 shown in sub-diagram (2) in
[0150] it, it shows the updated set of coordinate points, and two coordinate points 101 with a relatively large degree of dispersion are removed from the updated coordinate set. As
[0151] In some embodiments, as Figure 10 shown in sub-diagram (3) in
[0152] it, the convex hull is composed of vertex 102 and the edges 103 between the vertices. Based on the convex hull, determining at least one of the position and contour of the first control includes: for each edge in the convex hull, determining the normal line corresponding to the edge, and the first direction of the normal line is the direction of expanding the convex hull; for each vertex in the convex hull, based on the first directions of the normal lines respectively corresponding to the two edges connected to the vertex, determining the moving direction corresponding to the vertex; for each edge, moving the edge a first distance along the first direction of the normal line corresponding to the edge to obtain the moved edge; for each vertex, moving the vertex a first distance along the moving direction corresponding to the vertex to obtain the moved vertex; connecting the boundary points of two adjacent moved edges through an arc to obtain the expanded convex hull, and the center of the arc is the moved vertex located between the two adjacent moved edges; determining at least one of the position and contour of the expanded convex hull as at least one of the position and contour of the first control.
[0153] In some embodiments, based on the first directions of the normal vectors respectively corresponding to two edges connected to a vertex, an average direction is determined, and the average direction is determined as the movement direction corresponding to the vertex. The method for determining the average direction is as follows: Assume that two edges connected to a certain vertex are edge e1 and edge e2 respectively, and the first directions of their corresponding normal vectors are represented by vectors n1 and n2 respectively. Calculate the sum of vectors n1 and n2. Vector addition follows the parallelogram rule or the triangle rule. Geometrically speaking, it means connecting the two normal - direction vectors end - to - end, and the sum vector is from the starting point of the first vector to the ending point of the second vector, thereby determining the average direction.
[0154] In some embodiments, the first distance can be d, and the specific value depends on the experience of those skilled in the art. This application does not limit it.
[0155] In some embodiments, the position of the expanded convex hull is determined as the position of the first control. The contour of the expanded convex hull is determined as the position of the first control. The position and contour of the expanded convex hull are determined as the position and contour of the first control. Exemplarily, as Figure 10 shown in sub - figure (4) of [], which shows the expanded convex hull, and the position and contour of this expanded convex hull can be determined as the position and contour of the first control.
[0156] In the above - mentioned method, since direct expansion may generate sharp corners at the vertices, these corners need to be smoothed. The boundary points of two adjacent moved edges are connected by an arc. This method can ensure the coherence and smoothness of the edge. And by determining the position and contour of the expanded convex hull as the position and contour of the first control, the method of determining the first control based on the expanded convex hull reasonably expands the operable range of the first control. Even if the subsequent user's trigger operation exceeds the boundary of the convex hull, a response can still be obtained, improving the fault tolerance of the operation.
[0157] In some embodiments, the method further includes: determining the position and size of the function icon corresponding to the first control according to the contour of the first control, and the minimum distance between the function icon and the contour of the first control is not less than a preset threshold. The preset threshold can be set based on the experience of the staff. This application does not limit it.
[0158] The minimum distance between the function icon and the contour of the first control refers to the shortest distance value among all the distances from any point on the boundary of the function icon to any point on the contour of the first control. For the function icon, it has its own shape and boundary range, and the first control also has its clear contour. Each point on the boundary of the function icon can be regarded as a starting point, and a connection line is drawn to the contour of the first control, and the lengths of these connection lines are calculated. Among all the numerical sets of the lengths of these connection lines, the smallest numerical value is the minimum distance between the function icon and the contour of the first control. Exemplarily, the function icon can be a circle, and the contour of the first control is an irregular polygon. An infinite number of points can be selected from the circumference of the circle, and the distances from these points to each point on the polygon contour are calculated respectively. The shortest distance obtained after comparison is the required minimum distance. Ensuring that this minimum distance is not less than the preset threshold can ensure that there is enough space between the function icon and the contour of the first control, avoiding the two being too close visually and affecting the user's recognition and operation experience, and also meeting the layout specifications and aesthetic requirements in design.
[0159] In the above method, by displaying the corresponding function icon at the center of the contour of the first control and setting the minimum distance between the function icon and the contour of the first control to be not less than the preset distance, the function icon will not exceed the boundary of the first control, thus making the visual effect more harmonious and beautiful.
[0160] In some embodiments, according to the contour of the first control, determining the position and size of the function icon corresponding to the first control includes: shrinking the contour of the first control inward by a preset threshold to obtain an adjusted contour; based on the shape of the function icon corresponding to the first control, determining the largest inscribed figure from the adjusted contour, and the shape of the largest inscribed figure is the same as the shape of the function icon; in the case where the size of the largest inscribed figure is less than or equal to the maximum size of the function icon, determining the position and size of the largest inscribed figure as the position and size of the function icon; in the case where the size of the largest inscribed figure is greater than the maximum size of the function icon, scaling down the largest inscribed figure proportionally to the maximum size to obtain an adjusted inscribed figure, and determining the position and size of the adjusted inscribed figure as the position and size of the function icon.
[0161] In some embodiments, the first control may be an extended convex hull. Shrinking the contour of the first control inward by a preset threshold means shrinking the sides and arcs of the extended convex hull inward by the preset threshold. In some embodiments, for each side in the extended convex hull, determine the normal line corresponding to the side, and the second direction of the normal line is the direction of shrinking the extended convex hull; for each arc in the extended convex hull, determine the moving direction corresponding to the arc based on the connection line between the arc and the moved vertex; for each side, move the side along the second direction of the normal line corresponding to the side by a preset distance to obtain the moved side; for each arc, move the arc along the moving direction corresponding to the arc by a preset distance to obtain the moved arc; through the moved sides and the moved arcs, obtain the adjusted convex hull, and use the contour of the adjusted convex hull as the above-mentioned adjusted contour.
[0162] In some embodiments, the shape of the maximum inscribed figure may be a regular or irregular figure such as a circle, an ellipse, a rectangle, a triangle, a rhombus, etc., and the present application does not limit this. Exemplarily, the shape of the maximum inscribed figure may be a circle, and the maximum size of the function icon may be the radius R of the circle. When the determined radius of the circle is less than the maximum size R of the function icon, the position and size of the circle are determined as the position and size of the function icon. In the case where the radius of the circle is greater than the maximum size R of the function icon, the maximum inscribed figure is scaled down proportionally to the maximum size R to obtain the adjusted inscribed figure, and the position and size of the adjusted inscribed figure are determined as the position and size of the function icon.
[0163] The above method shrinks the contour of the first control inward by a preset threshold to obtain an adjusted contour. And determine the maximum inscribed figure from the adjusted contour. When the size of the maximum inscribed figure is less than or equal to the maximum size of the function icon, the position and size of the maximum inscribed figure are determined as the position and size of the function icon. In the case where the size of the maximum inscribed figure is greater than the maximum size of the function icon, the maximum inscribed figure is scaled down proportionally to the maximum size to obtain the adjusted inscribed figure, and the position and size of the adjusted inscribed figure are determined as the position and size of the function icon. The above method ensures that the determined size of the function icon does not exceed the set maximum size, thereby making the visual effect more harmonious and beautiful.
[0164] Next, taking the target application to which the first control belongs as a game application as an example, the method for setting key positions will be introduced. The execution subject of each step of this method may be a terminal device. For example, the terminal device may be Figure 1 the terminal device 10 in the computer system shown. This method may include at least one of the following steps S1 to S5.
[0165] Step S1, in the key position setting interface, display a first recognition area, which is the effective area for a first trigger operation used to trigger the function corresponding to the to-be-generated first control.
[0166] In a game application, the position and size of the first recognition area need to fully consider the convenience of game operations and the operation habits of players. For example, for common mobile games, the screen edge or corner may be more suitable for setting the recognition areas for some common functions because players' fingers can reach them more easily. For computer games, the first recognition area may need to be reasonably planned according to the keyboard layout and the mouse operation range.
[0167] Step S2, in response to N first trigger operations performed in the first recognition area, record the position information of the N first trigger operations. The position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, where N is a positive integer.
[0168] In a game application, players' operations may be very rapid, and the system needs to have high sensitivity and high-precision recording capabilities to avoid missing or misrecording the operation position. For the value of N, it should neither be too small so that the generated first control cannot accurately reflect the players' operation habits, nor be too large to increase the players' operation burden. A suitable range of N values can be preset according to the complexity and operation characteristics of the game, or a certain flexibility can be provided to allow players to adjust according to their own needs. This application does not make any limitations in this regard.
[0169] Step S3, display the first control generated based on the position information of the N first trigger operations. At least one of the position and contour of the first control is determined based on the position information of the N first trigger operations.
[0170] In some embodiments, after the above step S3, steps S4 - S5 may further be included.
[0171] Step S4, display the game round interface, which displays the first control. At least one of the position and contour of the first control in the game round interface is determined based on the position information of the N first trigger operations.
[0172] The game round interface is the screen that players see when conducting game battles, and may include elements such as game scenes, virtual objects, virtual props, and controls for user interaction. Step S4 is used to indicate that the game officially enters the battle stage, and players can operate the previously generated control in this interface for actual game operations.
[0173] Step S5: In response to an operation on the first control, display the first behavior corresponding to the first control in the game session interface. Specifically, the first control is used to control the virtual object to perform the first behavior in the virtual scene. In response to the operation on the first control, control the virtual object to perform the first behavior in the virtual scene.
[0174] In the above method, the position and / or contour of the first control is determined according to the position information of the previous N first trigger operations. Since the layout of the first control is more in line with the player's operation habits, the convenience and accuracy of the key operation in the game session are improved.
[0175] In some embodiments, a display screen of the virtual game scene is displayed in the key setting interface, and the first control is used to control the first virtual object to perform the first behavior in the virtual game scene; the method further includes: in response to the first trigger operation, control the first virtual object to perform the first behavior in the virtual game scene.
[0176] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0177] Please refer to Figure 11 , which shows a block diagram of a key setting device provided by an embodiment of the present application. The device has the function of implementing the above key setting method, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be a terminal device or can be set in a terminal device. The device 1100 may include: a first display module 1110, a recording module 1120, and a second display module 1130.
[0178] The first display module 1110 is configured to display a first recognition area in the key setting interface, where the first recognition area is an effective area of the first trigger operation, and the first trigger operation is used to trigger the function corresponding to the to-be-generated first control.
[0179] The recording module 1120 is configured to record the position information of the N first trigger operations in response to the N first trigger operations performed in the first recognition area. The position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, and N is a positive integer.
[0180] The second display module 1130 is configured to display the first control generated based on the position information of the N first trigger operations, and at least one of the position and contour of the first control is determined based on the position information of the N first trigger operations.
[0181] In some embodiments, the device 1100 further includes: a third display module ( Figure 11 not shown in
[0182] The third display module is configured to display operation marks respectively corresponding to the N first trigger operations, and the operation marks are used to visually display the operation positions of the first trigger operations in the first recognition area.
[0183] In some embodiments, for each of the N first trigger operations, the third display module is configured to display the operation mark corresponding to the first trigger operation after the first trigger operation is recognized.
[0184] In some embodiments, when the first trigger operation is a click operation, the operation mark corresponding to the first trigger operation is a position mark, and the position mark is used to visually display the click position of the first trigger operation in the first recognition area; or, when the first trigger operation is a swipe operation, the operation mark corresponding to the first trigger operation is a trajectory mark, and the trajectory mark is used to visually display the swipe trajectory of the first trigger operation in the first recognition area.
[0185] In some embodiments, a display screen of a virtual scene is displayed in the key position setting interface, and the first control is used to control a first virtual object to perform a first behavior in the virtual scene; the device 1100 further includes: a first control module ( Figure 11 not shown in
[0186] The first control module is configured to control the first virtual object to perform the first behavior in the virtual scene in response to the first trigger operation.
[0187] In some embodiments, at least one generated control is further displayed in the key position setting interface, and the display level of the generated control is higher than the display level of the first recognition area; the device 1100 further includes: a second control module ( Figure 11 not shown in
[0188] The second control module is configured to, for a first generated control among the at least one generated controls, in the case where the display area of the first generated control and the display area of the first recognition area overlap, control the first virtual object to perform the behavior corresponding to the first generated control in the virtual scene in response to a trigger operation on the first generated control; wherein, the trigger operation on the first generated control is not recognized as the first trigger operation.
[0189] In some embodiments, the second display module 1120 is configured to display a control icon of the first control according to at least one of the position and the contour of the first control determined based on the position information of the N first trigger operations; and display a function icon corresponding to the first control in the control icon of the first control.
[0190] In some embodiments, the first display module 1110 is configured to distinguish between the first recognition area and other areas in the key position setting interface except the first recognition area in the key position setting interface.
[0191] In some embodiments, at least two recognition areas are displayed in the key position setting interface, the at least two recognition areas include the first recognition area, and different recognition areas correspond to different controls to be generated; the apparatus 1100 further includes: a fourth display module ( Figure 11 not shown in the figure).
[0192] The fourth display module is configured to display a first prompt message after the operation recognition stage of the first control is started, where the first prompt message is used to indicate that the operation recognition stage of the first control is in progress; and distinguish between the first recognition area and other recognition areas in the at least two recognition areas except the first recognition area.
[0193] In some embodiments, the apparatus 1100 further includes: a fifth display module ( Figure 11 not shown in the figure).
[0194] The fifth display module is configured to, after the operation recognition stage of the first control ends, if there is a second control to be generated, start the operation recognition stage of the second control, display a second prompt message, where the second prompt message is used to indicate that the operation recognition stage of the second control is in progress; distinguish between the second recognition area and other recognition areas in the at least two recognition areas except the second recognition area; record position information of the M second trigger operations in response to the M second trigger operations performed in the second recognition area, where the position information of the second trigger operations is used to indicate an operation position of the second trigger operations in the second recognition area, and M is a positive integer; and display the second control generated based on the position information of the M second trigger operations, where at least one of the position and the contour of the second control is determined based on the position information of the M second trigger operations.
[0195] In some embodiments, the fifth display module is further configured to, in response to a selection operation for a target key layout in at least one key layout, display a key preview interface, where the target key layout includes at least one preselected control, and recognition regions corresponding to the at least one preselected control are displayed in the key preview interface; or, in response to a selection operation for at least one target control among at least one candidate control, display a key preview interface, where recognition regions corresponding to the at least one target control are displayed in the key preview interface; in response to an adjustment operation for the recognition region corresponding to the first control, display the adjusted recognition region corresponding to the first control, and the adjusted recognition region corresponding to the first control serves as the first recognition region; where the first control is any one of the at least one preselected control or the at least one target control, and the adjustment operation is used to adjust at least one of the following of the recognition region: position, size, shape.
[0196] In some embodiments, the apparatus 1100 further includes: a first determination module ( Figure 11 not shown in the figure).
[0197] The first determination module is configured to determine a set of coordinate points corresponding to the N first trigger operations, where each coordinate point in the set of coordinate points is used to indicate an operation position of the first trigger operation in the first recognition region; determine a convex hull corresponding to the set of coordinate points; and determine at least one of the position and the contour of the first control according to the convex hull.
[0198] In some embodiments, the convex hull is composed of vertices and edges between the vertices; the first determination module is configured to, for each edge in the convex hull, determine a normal line corresponding to the edge, and a first direction of the normal line is a direction for expanding the convex hull; for each vertex in the convex hull, determine a moving direction corresponding to the vertex based on the first directions of the normal lines corresponding to the two edges connected to the vertex; for each edge, move the edge a first distance along the first direction of the normal line corresponding to the edge to obtain a moved edge; for each vertex, move the vertex the first distance along the moving direction corresponding to the vertex to obtain a moved vertex; connect boundary points of two adjacent moved edges through an arc to obtain an expanded convex hull, and a center of the arc is the moved vertex located between the two adjacent moved edges; and determine at least one of the position and the contour of the expanded convex hull as at least one of the position and the contour of the first control.
[0199] In some embodiments, the first determination module is configured to, for each coordinate point in the set of coordinate points, determine an average distance of the coordinate point according to the distances between the coordinate point and other coordinate points in the set of coordinate points, where the average distance is used to characterize the degree of dispersion of the coordinate point; remove K coordinate points from the set of coordinate points to obtain an updated set of coordinate points, where the minimum value of the average distances of the K coordinate points is greater than or equal to the maximum value of the average distances of the respective coordinate points in the updated set of coordinate points, and K is a preset positive integer; based on the updated set of coordinate points, determine the convex hull, where the convex hull is the smallest convex polygon that contains the respective coordinate points in the updated set of coordinate points.
[0200] In some embodiments, the apparatus 1100 further includes: a second determination module ( Figure 11 not shown in the figure).
[0201] The second determination module is configured to determine the position and size of the function icon corresponding to the first control according to the contour of the first control, where the minimum distance between the function icon and the contour of the first control is not less than a preset threshold.
[0202] In some embodiments, the second determination module is configured to shrink the contour of the first control inward by the preset threshold to obtain an adjusted contour; based on the shape of the function icon corresponding to the first control, determine the largest inscribed figure from the adjusted contour, where the shape of the largest inscribed figure is the same as the shape of the function icon; in a case where the size of the largest inscribed figure is less than or equal to the maximum size of the function icon, determine the position and size of the largest inscribed figure as the position and size of the function icon; in a case where the size of the largest inscribed figure is greater than the maximum size of the function icon, scale down the largest inscribed figure proportionally to the maximum size to obtain an adjusted inscribed figure, and determine the position and size of the adjusted inscribed figure as the position and size of the function icon.
[0203] It should be noted that, when the apparatus provided in the above embodiments implements its functions, only the division of the above functional modules is used for illustration. In actual applications, the above functions may be allocated to different functional modules according to needs, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus provided in the above embodiments and the method embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0204] Please refer to Figure 12 which shows a structural block diagram of a terminal device 1200 provided in an embodiment of the present application. The terminal device 1200 may beFigure 1 The terminal device 10 in the described implementation environment is used to implement the key setting method provided in the above embodiments. Specifically:
[0205] Generally, the terminal device 1200 includes a processor 1201 and a memory 1202.
[0206] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 may be implemented in at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.
[0207] The memory 1202 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 is used to store a computer program, and the computer program is configured to be executed by one or more processors to implement the above key setting method.
[0208] In some embodiments, the terminal device 1200 may also optionally include a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202, and the peripheral device interface 1203 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1203 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 1204, a display screen 1205, an audio circuit 1206, and a power supply 1207.
[0209] Those skilled in the art can understand that Figure 12 the structure shown in Figure 12 does not constitute a limitation on the terminal device 1200, and may include more or fewer components than those shown, or combine some components, or adopt a different component arrangement.
[0210] In an exemplary embodiment, a computer-readable storage medium is further provided. A computer program is stored in the storage medium, and when the computer program is executed by a processor, the above key position setting method is implemented. Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or an optical disc, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0211] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the terminal device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the terminal device executes the above key position setting method.
[0212] It should be understood that "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In addition, the step numbers described herein only exemplarily show a possible execution sequence between steps. In some other embodiments, the above steps may not be executed in the order of the numbers. For example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in the reverse order of the illustration. The embodiments of the present application do not limit this.
[0213] The above are only exemplary embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A key position setting method, characterized in that, The method includes: In a key position setting interface, a first recognition area is displayed. The first recognition area is an effective area for a first trigger operation, and the first trigger operation is used to trigger the function corresponding to a first control to be generated. In response to N first trigger operations performed in the first recognition area, the position information of the N first trigger operations is recorded. The position information of the first trigger operation is used to indicate the operation position of the first trigger operation in the first recognition area, and N is a positive integer. The first control generated based on the position information of the N first trigger operations is displayed. At least one of the position and the outline of the first control is determined based on the position information of the N first trigger operations.
2. The method according to claim 1, wherein The method further includes: Operation marks corresponding to the N first trigger operations are displayed. The operation marks are used to visually display the operation positions of the first trigger operations in the first recognition area.
3. The method according to claim 2, characterized in that, The displaying the operation marks corresponding to the N first trigger operations respectively includes: For each of the N first trigger operations, after the first trigger operation is recognized, the operation mark corresponding to the first trigger operation is displayed.
4. The method according to claim 2 or 3, wherein When the first trigger operation is a click operation, the operation mark corresponding to the first trigger operation is a position mark, and the position mark is used to visually display the click position of the first trigger operation in the first recognition area; Or, When the first trigger operation is a sliding operation, the operation mark corresponding to the first trigger operation is a track mark, and the track mark is used to visually display the sliding track of the first trigger operation in the first recognition area.
5. The method according to any one of claims 1 to 4, characterized in that, A display screen of a virtual scene is displayed in the key position setting interface, and the first control is used to control a first virtual object to perform a first behavior in the virtual scene; The method further includes: In response to the first trigger operation, controlling the first virtual object to perform the first behavior in the virtual scene.
6. The method according to claim 5, wherein At least one generated control is also displayed in the key position setting interface, and the display level of the generated control is higher than the display level of the first recognition area; The method further includes: For a first generated control among the at least one generated controls, when there is an overlap between the display area of the first generated control and the display area of the first recognition area, in response to a trigger operation on the first generated control, controlling the first virtual object to perform the behavior corresponding to the first generated control in the virtual scene; wherein the trigger operation on the first generated control is not recognized as the first trigger operation.
7. The method according to any one of claims 1 to 6, characterized in that The displaying the first control generated based on the position information of the N first trigger operations includes: Displaying the control icon of the first control according to at least one of the position and the outline of the first control determined based on the position information of the N first trigger operations; In the control icon of the first control, the function icon corresponding to the first control is displayed.
8. The method according to any one of claims 1 to 7, characterized in that In the key position setting interface, a first recognition area is displayed, including: In the key position setting interface, the first recognition area and other areas in the key position setting interface except the first recognition area are displayed differently.
9. The method according to any one of claims 1 to 8, characterized in that, At least two recognition areas are displayed in the key position setting interface, and the at least two recognition areas include the first recognition area. Different recognition areas correspond to different controls to be generated; The method further includes: After the operation recognition stage of the first control is started, a first prompt message is displayed, and the first prompt message is used to indicate that the operation recognition stage of the first control is in progress; The first recognition area and other recognition areas in the at least two recognition areas except the first recognition area are displayed differently.
10. The method according to claim 9, wherein The method further includes: After the operation recognition stage of the first control ends, if there is a second control to be generated, the operation recognition stage of the second control is started, and a second prompt message is displayed. The second prompt message is used to indicate that the operation recognition stage of the second control is in progress; The second recognition area and other recognition areas in the at least two recognition areas except the second recognition area are displayed differently; In response to M second trigger operations performed in the second recognition area, the position information of the M second trigger operations is recorded. The position information of the second trigger operation is used to indicate the operation position of the second trigger operation in the second recognition area, and M is a positive integer; The second control generated based on the position information of the M second trigger operations is displayed. At least one of the position and the outline of the second control is determined based on the position information of the M second trigger operations.
11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: In response to a selection operation for a target key layout in at least one key layout, a key preview interface is displayed. The target key layout includes at least one preselected control, and the recognition areas corresponding to the at least one preselected control are displayed in the key preview interface; or, In response to a selection operation for at least one target control among at least one candidate control, a key preview interface is displayed. The recognition areas corresponding to the at least one target control are displayed in the key preview interface; In response to an adjustment operation for the recognition area corresponding to the first control, the adjusted recognition area corresponding to the first control is displayed, and the adjusted recognition area corresponding to the first control serves as the first recognition area; wherein, the first control is any one of the at least one preselected control or the at least one target control, and the adjustment operation is used to adjust at least one of the following of the recognition area: position, size, shape.
12. The method according to any one of claims 1 to 11, characterized in that, The method further includes: Determine a set of coordinate points corresponding to the N first trigger operations. Each coordinate point in the set of coordinate points is used to indicate the operation position of the first trigger operation in the first recognition area; Determine the convex hull corresponding to the set of coordinate points; Based on the convex hull, determine at least one of the position and the outline of the first control.
13. The method according to claim 12, wherein The convex hull is composed of vertices and the edges between the vertices; Determining at least one of the position and the contour of the first control according to the convex hull includes: For each side of the convex hull, determining a normal line corresponding to the side, where a first direction of the normal line is a direction for expanding the convex hull; For each vertex of the convex hull, determining a moving direction corresponding to the vertex based on the first directions of the normal lines respectively corresponding to two sides connected to the vertex; For each side, moving the side a first distance along the first direction of the normal line corresponding to the side to obtain a moved side; For each vertex, moving the vertex the first distance along the moving direction corresponding to the vertex to obtain a moved vertex; Connecting boundary points of two adjacent moved sides through an arc to obtain an expanded convex hull, where a center of the arc is the moved vertex located between the two adjacent moved sides; Determining at least one of the position and the contour of the expanded convex hull as at least one of the position and the contour of the first control.
14. The method according to claim 12 or 13, characterized in that, Determining the convex hull corresponding to the set of coordinate points includes: For each coordinate point in the set of coordinate points, determining an average distance of the coordinate point according to distances between the coordinate point and other coordinate points in the set of coordinate points, where the average distance is used to characterize a degree of dispersion of the coordinate point; Removing K coordinate points from the set of coordinate points to obtain an updated set of coordinate points, where a minimum value of the average distances of the K coordinate points is greater than or equal to a maximum value of the average distances of the respective coordinate points in the updated set of coordinate points, and K is a preset positive integer; Based on the updated set of coordinate points, determining the convex hull, where the convex hull is a smallest convex polygon including the respective coordinate points in the updated set of coordinate points.
15. The method according to any one of claims 12 to 14, characterized in that The method further includes: Determining a position and a size of a function icon corresponding to the first control according to the contour of the first control, where a minimum distance between the function icon and the contour of the first control is not less than a preset threshold.
16. The method according to claim 15, characterized in that Determining the position and the size of the function icon corresponding to the first control according to the contour of the first control includes: Shrinking the contour of the first control inward by the preset threshold to obtain an adjusted contour; Based on a shape of the function icon corresponding to the first control, determining a largest inscribed figure in the adjusted contour, where a shape of the largest inscribed figure is the same as the shape of the function icon; When a size of the largest inscribed figure is less than or equal to a maximum size of the function icon, determining the position and the size of the largest inscribed figure as the position and the size of the function icon; When the size of the largest inscribed figure is greater than the maximum size of the function icon, proportionally reducing the largest inscribed figure to the maximum size to obtain an adjusted inscribed figure, and determining the position and the size of the adjusted inscribed figure as the position and the size of the function icon.
17. A key position setting device, characterized in that, The apparatus includes: A first display module, configured to display a first recognition area in a key position setting interface, where the first recognition area is an effective area for a first trigger operation, and the first trigger operation is used to trigger a function corresponding to a first control to be generated; A recording module, configured to record position information of N first trigger operations in response to the N first trigger operations performed in the first recognition area, where the position information of the first trigger operation is used to indicate an operation position of the first trigger operation in the first recognition area, and N is a positive integer; A second display module, configured to display the first control generated based on the position information of the N first trigger operations, where at least one of a position and a contour of the first control is determined based on the position information of the N first trigger operations.
18. A terminal device, characterized in that, The terminal device includes a processor and a memory, and a computer program is stored in the memory. The computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 16.
20. A computer program product, characterized in that, The computer program product includes a computer program, the computer program is stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the method according to any one of claims 1 to 16.