Virtual object processing method and device, storage medium and electronic equipment

By obtaining the initial layout parameters of the virtual object and calculating the adjustment proportion coefficient, the width and height ratio of the virtual object remains unchanged when the dimensions change, the deformation problem of objects such as virtual keyboards and other objects during dimension adjustment is solved, simplifying the drawing process and improving adaptability.

CN120335705APending Publication Date: 2025-07-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510406447.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, virtual objects such as virtual keyboards are prone to deformation when size adjustments, resulting in complex drawing process and poor adaptability.

Method used

By obtaining the initial layout parameters of the virtual object, including physical dimensions and spacing distances, the adjustment ratio coefficient is calculated to ensure that the width and height ratio of the virtual child object remains unchanged when the dimensions change, and adaptive adjustment is made using the association relationship.

Benefits of technology

It effectively avoids the deformation problem of objects such as virtual keyboards when adjusting the size, simplifies the drawing process, and improves the adaptability of virtual objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335705A_ABST
    Figure CN120335705A_ABST
Patent Text Reader

Abstract

The invention provides a virtual object processing method, a virtual object processing device, a computer storage medium and electronic equipment, and relates to the technical field of computers. The method comprises the following steps: acquiring initial layout parameters of a virtual object, wherein the initial layout parameters at least comprise first physical size parameters of a plurality of virtual sub-objects in the virtual object and first spacing distance parameters between adjacent virtual sub-objects; in response to the adjustment of the virtual object to the target size, determining an adjustment proportionality coefficient based on the target size and the initial layout parameters of the plurality of virtual sub-objects; and determining a target layout parameter of the virtual object according to the adjustment proportionality coefficient, and generating an adjusted virtual object according to a second physical size parameter of each virtual sub-object included in the target layout parameter and a second spacing distance parameter between the adjacent virtual sub-objects. According to the invention, deformation caused by adjustment of the virtual object can be avoided, and the adaptability of adjustment of the virtual object is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In existing computer systems, users often need to adjust some virtual objects in the graphical user interface. Taking a virtual keyboard as an example, a virtual keyboard is usually configured in a computer device to enable users to perform simulated input through the virtual keyboard. The virtual keyboard is usually drawn with a full keyboard layout in reference to a physical keyboard. Specifically, it is drawn according to specific distances between the keys. When it is necessary to adjust the layout parameters of some keys, the entire keyboard needs to be adjusted. Otherwise, the layout of the virtual keyboard will be deformed. Summary of the Invention

[0003] The present disclosure provides a method for processing a virtual object, a device for processing a virtual object, a computer storage medium, and an electronic device, thereby avoiding deformation caused by adjusting the virtual object and improving the adaptability of virtual object adjustment.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for processing a virtual object. The method provides a graphical user interface through a terminal device, and the graphical user interface includes at least one virtual object, including: obtaining initial layout parameters of the virtual object, where the initial layout parameters at least include first physical size parameters of a plurality of virtual sub-objects in the virtual object, and a first interval distance parameter between adjacent virtual sub-objects; in response to adjusting the virtual object to a target size, determining an adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object; according to the adjustment ratio coefficient, determining target layout parameters of the virtual object, and generating an adjusted virtual object according to the second physical size parameters of the virtual sub-objects included in the target layout parameters, and the second interval distance parameter between adjacent virtual sub-objects.

[0005] In a second aspect, an embodiment of the present disclosure provides a device for processing a virtual object. The device provides a graphical user interface through a terminal device, and the graphical user interface includes at least one virtual object, including: a parameter acquisition module, configured to acquire initial layout parameters of the virtual object, where the initial layout parameters at least include first physical size parameters of a plurality of virtual sub-objects in the virtual object, and a first interval distance parameter between adjacent virtual sub-objects; a coefficient determination module, configured to determine an adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object in response to adjusting the virtual object to a target size; an object generation module, configured to determine target layout parameters of the virtual object according to the adjustment ratio coefficient, and generate an adjusted virtual object according to the second physical size parameters of the virtual sub-objects included in the target layout parameters, and the second interval distance parameter between adjacent virtual sub-objects.

[0006] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processing method of the virtual object as described above is implemented.

[0007] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the processing method of the virtual object as described above by executing the executable instructions.

[0008] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which when executed by a processor implements the processing method of the virtual object as described above.

[0009] The technical solution of the present disclosure has the following beneficial effects:

[0010] For the above-mentioned processing method of the virtual object, by obtaining the initial layout parameters of the virtual object, the initial layout parameters at least include the first physical size parameters of multiple virtual sub-objects in the virtual object and the first spacing distance parameters between adjacent virtual sub-objects; in response to adjusting the virtual object to a target size, determining an adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object; according to the adjustment ratio coefficient, determining the target layout parameters of the virtual object, and generating an adjusted virtual object according to the second physical size parameters of each virtual sub-object included in the target layout parameters and the second spacing distance parameters between adjacent virtual sub-objects. On the one hand, through the correlation between the physical size parameters of the virtual object and the spacing distance parameters between adjacent virtual sub-objects, when adjusting the virtual object, it is always ensured that the ratio of the width and height size parameters of each virtual sub-object in the virtual object to the line spacing / vertical spacing remains unchanged, thus solving the technical problem of the deformation of the layout of the virtual keyboard in the prior art. On the other hand, based on the above correlation, when the size of the virtual keyboard changes, it is directly adjusted adaptively according to the established correlation, simplifying the drawing process of the virtual keyboard and improving the adaptability of the virtual keyboard drawing.

[0011] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0013] Figure 1 Schematic diagram of a virtual keyboard schematically showing one full - keyboard layout mode in this exemplary embodiment;

[0014] Figure 2 Schematic diagram of a processing system architecture of a virtual object in this exemplary embodiment;

[0015] Figure 3 Schematic flowchart of a processing method of a virtual object in this exemplary embodiment;

[0016] Figure 4 Schematic diagram of an initial layout parameter in this exemplary embodiment;

[0017] Figure 5 Schematic flowchart of a method for obtaining an initial layout parameter in this exemplary embodiment;

[0018] Figure 6A Schematic code diagram of a standard interval parameter and a standard size parameter in this exemplary embodiment;

[0019] Figure 6B Schematic diagram of another initial layout parameter in this exemplary embodiment;

[0020] Figure 7 Schematic diagram of a structure of a processing device of a virtual object in this exemplary embodiment;

[0021] Figure 8 Schematic diagram of a structure of an electronic device in this exemplary embodiment. Detailed implementation manners

[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that one or more of the specific details can be omitted in practicing the technical solutions of the present disclosure, or other methods, components, devices, steps, etc. can be adopted. In other cases, well - known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

[0023] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0024] The flowcharts shown in the accompanying drawings are only illustrative and do not necessarily include all steps. For example, some steps can be further decomposed, while some steps can be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.

[0025] In related technical solutions, in existing computer systems, users often need to adjust some virtual objects in the graphical user interface to adapt to the display effect of the current graphical user interface. Among them, the virtual objects can be, for example, virtual keyboards, live interfaces or other objects to be adjusted, etc. The embodiments of the present disclosure do not impose any special restrictions on this.

[0026] Taking the virtual keyboard as an example, users can input through a physical keyboard. To improve convenience, virtual keyboards are usually configured in computer devices so that users can perform simulated input through the virtual keyboards. During software development, for example, the virtual keyboard in an Android client is usually drawn in a computer device according to the layout of the physical keyboard and displayed in the graphical user interface.

[0027] Figure 1 Schematic diagram of a virtual keyboard showing one full - keyboard layout mode of this exemplary embodiment; refer to Figure 1 As shown, it is a virtual keyboard simulated according to a physical keyboard. For example, the virtual keyboard adopts a full - keyboard layout mode. For the Figure 1 virtual keyboard shown, its size parameters of each key in the virtual keyboard are determined by the size parameters or aspect ratios of the keys in the physical keyboard. Similarly, the row / vertical spacing between the keys in the virtual keyboard is determined by the row / vertical spacing between the keys in the physical keyboard, so as to draw a virtual keyboard effect that meets the user's expectations.

[0028] However, when the layout of the virtual keyboard displayed in the graphical user interface changes, that is, when the width and height parameters of the virtual keyboard change, the related technical solutions can ensure that each key maintains its original physical size parameters (i.e., width, height, or aspect ratio), but the spacing between rows and the spacing between keys cannot maintain the original ratio, resulting in deformation of the adjusted virtual keyboard. Moreover, since the parameters of each key are fixed, when modifying the virtual keyboard, it is necessary to modify the human-computer interaction (User Interface, UI) file of the virtual keyboard to adjust the UI parameters of the entire virtual keyboard, and modify the corresponding program in the computer system based on the UI file of the virtual keyboard, resulting in a complex drawing process and a large workload for the virtual keyboard.

[0029] In view of the above problems, an exemplary embodiment of the present disclosure proposes a method for processing virtual objects, which can be applied to any application scenario where virtual objects in a graphical user interface need to be adjusted, and each virtual sub-object in the adjusted virtual object can maintain the original display ratio. Taking the virtual keyboard as an example, the method for processing virtual objects proposed in the present disclosure adds the association relationship between the width and height of the keys in the virtual keyboard and the spacing distance between the keys to the algorithm implementation, so as to keep the width and height of the keys and the spacing distance between the keys relatively unchanged when the size of the virtual keyboard changes. Specifically, they are all scaled by the same adjustment ratio coefficient, thus avoiding the technical problem of deformation of the adjusted virtual keyboard caused by the above related technologies. Moreover, this method enables the size of the virtual keyboard to change and directly perform adaptive adjustment according to the constructed association relationship, simplifies the drawing process of the virtual keyboard, and improves the adaptability of the virtual keyboard drawing.

[0030] To solve the above problems, the present disclosure proposes a method and device for processing virtual objects, which can be applied to Figure 2 the system architecture of the exemplary application environment shown.

[0031] As Figure 2 shown, the system architecture 200 may include a terminal device 201 and a server 202.

[0032] Among them, the terminal device 201 can be any electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart vehicle-mounted device, a smart wearable device, a smart TV, and an aircraft. The terminal device 201 provides a graphical user interface, which includes virtual objects, and the virtual objects include multiple virtual sub-objects. Among them, the virtual object can be a virtual keyboard, and correspondingly, each virtual sub-object is a plurality of keys in the virtual keyboard; if the virtual object is a live broadcast interface, correspondingly, each virtual sub-object is a plurality of live broadcast components in the live broadcast interface. Of course, the virtual object can also be other adjustable virtual objects, and the embodiments of the present disclosure do not impose any special restrictions on this.

[0033] The server 202 can be a background server configured for each application program in the terminal device, and is used to provide corresponding background services for it. It can be an independent physical server, or a server cluster or 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, i.e., Content Delivery Network (CDN), and big data and artificial intelligence platforms, but it is not limited thereto.

[0034] It should be noted that the method for processing virtual objects in the embodiments of the present application can be executed independently by the terminal device 201 or the server 202, or can be jointly executed by the server 202 and the terminal device 201. In actual applications, specific configurations can be made according to the situation, and the present application does not make specific limitations here. Among them, both the server 202 and the terminal device 201 can include one or more processors, memories, and an interactive I / O interface, etc. Among them, the memories of the server 202 and the terminal device 201 can also store the program instructions required to be executed by each of them in the method for processing virtual objects provided in the embodiments of the present disclosure. When these program instructions are executed by the processor, they can be used to implement the display control process of the terminal provided in the embodiments of the present disclosure. It can be understood that when the display control method of the terminal provided in the embodiments of the present application is executed independently by the server 202 or the terminal device 201, then only the server 202 or the terminal device 201 single device can also be included in the above application scenario, or it can also be considered that the server 202 and the terminal device 201 are the same device. Of course, in actual applications, when the method for processing virtual objects provided in the embodiments of the present application is jointly executed by the server 202 and the terminal device 201, the server 202 and the terminal device 201 can also be the same device, that is, the server 202 and the terminal device 201 can be different functional modules of the same device, or virtual devices virtualized by the same physical device.

[0035] In the embodiments of the present application, the terminal device 201 and the server 202 can be directly or indirectly communicatively connected through one or more networks 203. The network 203 can be a wired network or a wireless network. For example, the wireless network can be a mobile cellular network or a Wireless-Fidelity (WIFI) network. Of course, it can also be other possible networks, and the embodiments of the present disclosure do not limit this. It should be noted that Figure 2 The above is only an example. In fact, the number of terminal devices and servers is not limited and is not specifically defined in the embodiments of the present application.

[0036] For example, in an exemplary embodiment, the terminal device 201 can obtain the initial layout parameters of the virtual object from the server 202. The initial layout parameters at least include the first physical size parameters of multiple virtual sub-objects in the virtual object and the first spacing distance parameters between adjacent virtual sub-objects. In response to adjusting the virtual object to a target size, a scaling factor is determined based on the target size and the initial layout parameters of the multiple virtual sub-objects. According to the scaling factor, the target layout parameters of the virtual object are determined, and an adjusted virtual object is generated according to the second physical size parameters of each virtual sub-object included in the target layout parameters and the second spacing distance parameters between adjacent virtual sub-objects.

[0037] However, those skilled in the art can easily understand that the above application scenarios are only for illustration and are not limited thereto in this exemplary embodiment.

[0038] Hereinafter, taking the above terminal device as the execution subject and applying the processing method of the virtual object to the above terminal device as an example for illustration. Through the above terminal device, a graphical user interface is provided. The graphical user interface includes at least one virtual object, and the virtual object includes multiple virtual sub-objects. Figure 3 Schematically shows a flowchart of a processing method of one of the virtual objects in this exemplary embodiment; please refer to Figure 3 , the processing method of the virtual object provided by the embodiments of the present disclosure includes the following steps S301 - step S303:

[0039] Step S301, obtain the initial layout parameters of the virtual object. The initial layout parameters at least include the first physical size parameters of multiple virtual sub-objects in the virtual object and the first spacing distance parameters between adjacent virtual sub-objects.

[0040] Step S302, in response to adjusting the virtual object to a target size, determine a scaling factor based on the target size and the initial layout parameters of the virtual object.

[0041] Step S303: Determine the target layout parameters of the virtual object according to the adjustment ratio coefficient, and generate an adjusted virtual object based on the second physical size parameters of the virtual sub-objects included in the target layout parameters and the second spacing distance parameters between adjacent virtual sub-objects.

[0042] Based on Figure 3 The provided technical solution obtains the initial layout parameters of the virtual object. The initial layout parameters at least include the first physical size parameters of multiple virtual sub-objects in the virtual object and the first spacing distance parameters between adjacent virtual sub-objects. In response to adjusting the virtual object to the target size, determine the adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object. According to the adjustment ratio coefficient, determine the target layout parameters of the virtual object, and generate an adjusted virtual object based on the second physical size parameters of the virtual sub-objects included in the target layout parameters and the second spacing distance parameters between adjacent virtual sub-objects. On the one hand, through the correlation between the physical size parameters of the virtual object and the spacing distance parameters between adjacent virtual sub-objects, when adjusting the virtual object, it always ensures that the ratio of the width and height size parameters of the virtual sub-objects in the virtual object to the line spacing / vertical spacing remains unchanged, thus solving the technical problem of the deformation of the layout of the virtual keyboard in the prior art. On the other hand, based on the above correlation, when the size of the virtual keyboard changes, it is directly adjusted adaptively according to the constructed correlation, simplifying the drawing process of the virtual keyboard and improving the adaptability of the virtual keyboard drawing.

[0043] The following will combine specific embodiments to Figure 3 elaborate in detail on the specific implementation manners of each step in the

[0044] In step S301, obtain the initial layout parameters of the virtual object. The initial layout parameters at least include the first physical size parameters of multiple virtual sub-objects in the virtual object and the first spacing distance parameters between adjacent virtual sub-objects.

[0045] Among them, the virtual object can be any virtual object that needs to adjust the size parameters or the layout parameters of the internal virtual sub-objects. For example, the virtual object can be a virtual keyboard, a live broadcast interface, or other objects displayed on the graphical user interface. The virtual object contains multiple virtual sub-objects. When the virtual object is a virtual keyboard, the virtual sub-objects are the keyboard keys on the virtual keyboard; when the virtual object is a live broadcast interface, the virtual sub-objects are the live broadcast components in the live broadcast interface.

[0046] Among them, the physical size parameters can be the width, height parameters, etc. of each virtual sub-object in the virtual object, and the spacing distance parameter is the spacing distance between virtual sub-objects in adjacent positions. The above spacing distance parameter at least includes the longitudinal spacing distance between vertically adjacent positions and the lateral spacing distance between horizontally adjacent positions.

[0047] In an optional embodiment of the present disclosure, the virtual object is a virtual keyboard.

[0048] Exemplarily, obtain the physical size parameters such as the width and height of multiple keys in the virtual keyboard, and the spacing distance parameter between keys in adjacent positions, so as to determine the adjustment ratio coefficient in the subsequent steps.

[0049] For the convenience of description, hereinafter, taking the lateral spacing distance between horizontally adjacent positions as an example, in combination with Figure 4 exemplarily illustrate the initial layout parameters of the virtual object obtained above.

[0050] Figure 4 Schematically show a schematic diagram of one of the initial layout parameters of this exemplary embodiment; referring to Figure 4 as shown, a row in the virtual keyboard contains n keys, which are key 1, key 2,..., key n respectively. Among them, the first physical size parameters of key 1, key 2,..., key n are the width parameters corresponding to key 1, key 2,..., key n, which are W k1 、W k2 、...、W kn ; and the first spacing distance parameters between key 1, key 2,..., key n in adjacent positions are specifically the lateral spacing distance parameters, which are W s1 、W s2 、...、W sn-1 .

[0051] In an optional embodiment of the present disclosure, the physical size parameters of each virtual sub-object include the width and height of the virtual sub-object. The heights of the virtual sub-objects in the same row among multiple virtual sub-objects are the same, the widths of the virtual sub-objects in the same row are the same or different, or the spacing distances between adjacent virtual sub-objects in the same row are the same or different.

[0052] Exemplarily, the heights of the virtual sub-objects in the same row are all the same. For example, Figure 4 key 1, key 2, and key 3 in

[0053] The spacing distances between adjacent virtual sub-objects in the same row can also be the same or different. For example Figure 1 the spacing distance Ws1 between button 1 and button 2 in Figure 1 and the spacing distance Ws2 between button 2 and button 3 can be the same or different.

[0054] Furthermore, when obtaining the initial layout parameters of the virtual object in step S301, in order to improve the scalability of the program code and the computational simplicity, thereby improving the efficiency of redrawing the virtual object, the layout parameters of the virtual object can be preprocessed in advance.

[0055] Figure 5 Schematically shows a flowchart of one method for obtaining the initial layout parameters in this exemplary embodiment; refer to Figure 5 In an optional embodiment of the present disclosure, steps S501 to S504 of the following embodiment can be referred to:

[0056] Step S501: Obtain the original layout parameters of the virtual object.

[0057] Among them, the original layout parameters at least include the original physical size parameters of multiple virtual sub-objects in the virtual object, and the original spacing distance parameters between adjacent virtual sub-objects; the original layout parameters of the virtual object can be the layout parameters of each button determined for the physical keyboard.

[0058] Step S502: Determine the standard size parameters based on the original physical size parameters of multiple virtual sub-objects.

[0059] Among them, the original physical size parameters can be width and height, and the corresponding obtained standard size parameters can be the horizontal standard size parameters for the width or the vertical standard size parameters for the height.

[0060] Step S503: Determine the standard spacing parameters based on the original spacing distance parameters between adjacent virtual sub-objects among multiple virtual sub-objects.

[0061] Among them, the original spacing distance parameters can be the horizontal spacing distance parameters for left and right adjacent ones, and the vertical spacing distance parameters for upper and lower adjacent ones, and the corresponding obtained standard spacing parameters can be the horizontal standard spacing parameters for the horizontal spacing distance parameters or the vertical standard spacing parameters for the vertical spacing distance parameters.

[0062] Step S504: Store the original layout parameters of the virtual object in the form of the first multiple of the standard size parameters and the second multiple of the standard spacing parameters to obtain the initial layout parameters of the virtual object.

[0063] In the above step S502, after obtaining the original physical size parameters of multiple virtual sub-objects, the standard size parameters for the physical size parameters can be calculated based on the numerical relationship between the original physical size parameters of the multiple virtual sub-objects. For example, taking a virtual keyboard as an example, the physical size parameters of each key include width and height, and the correspondingly determined standard size parameters can also include the standard key width and the standard key height.

[0064] Similarly, in the above step S503, after obtaining the original spacing distance parameters between adjacent virtual sub-objects among multiple virtual sub-objects, the standard spacing parameters for the original spacing distance parameters can be calculated based on the numerical relationship between the original spacing distance parameters between adjacent virtual sub-objects.

[0065] For example, assume that the physical size parameters of key 1, key 2, and key 3 of a virtual keyboard are 2dp, 4dp, and 6dp respectively. Then the standard size parameters that can be determined based on the above physical size parameters can be 2dp. At this time, when storing the layout parameter data of the virtual object, the physical size parameter of key 1 can be stored as 1 multiple of 2dp, the physical size parameter of key 2 can be stored as 2 multiples of 2dp, and the physical size parameter of key 3 can be stored as 3 multiples of 2dp.

[0066] It should be explained that the above dp (Device Independent Pixels) is a unit used to define the size of UI elements in Android development, aiming to solve the display difference problems caused by different device screen densities (dots per inch, dpi).

[0067] Similarly, the original spacing distance parameters between adjacent virtual sub-objects can also be stored in the form of the second multiple of the standard spacing parameters, so that when calculating the adjustment ratio coefficient based on the above formula, faster elimination processing can be performed, thereby improving the efficiency of calculating the adjustment ratio coefficient, and further improving the efficiency of drawing the adjusted virtual object and reducing the complexity.

[0068] Furthermore, the spacing distance parameters between adjacent virtual sub-objects can be the same or different. To adapt to actual production requirements and improve adaptability, the spacing distance parameters between adjacent virtual sub-objects can be divided into two parts.

[0069] In an optional embodiment of the present disclosure, the original spacing distance parameters between adjacent virtual sub-objects are divided into a first original spacing distance parameter and a second original spacing distance parameter; the original layout parameters of the virtual object are stored in the form of the first multiple of the standard size parameters, and the second multiple form of the first original spacing distance parameter and / or the second original spacing distance parameter, to obtain the initial layout parameters of the virtual object.

[0070] Among them, assuming that adjacent virtual sub-objects are left and right adjacent virtual sub-objects, the first original interval distance parameter and the second original interval distance parameter are the left half interval distance and the right half interval distance respectively. If the adjacent virtual sub-objects are upper and lower adjacent virtual sub-objects, the first original interval distance parameter and the second original interval distance parameter are the upper half interval distance and the lower half interval distance respectively.

[0071] Exemplarily, the basic units of the first original interval distance parameter and the second original interval distance parameter are the same. Therefore, when calculating the adjustment ratio parameter based on the above formula, the merging and elimination operation can be directly performed to cope with the cases of different spacings.

[0072] For the sake of easy understanding, the following will take a virtual keyboard as an example and combine Figure 6A and Figure 6B to explain.

[0073] Figure 6A Schematically showing a code schematic diagram of one of the standard interval parameters and standard size parameters in this exemplary embodiment; referring to Figure 6A as shown, the UI serialization parameters of the virtual keyboard are shown, where the standard parameters include four standard values: standardKeyWidth, standardKeyHeight, standardHorizontalMargin, and standardVerticalMargin, which respectively represent the standard key width, the standard key height, the standard size of the vertical width (i.e., the spacing between left and right adjacent virtual sub-objects), and the standard size of the vertical height (i.e., the spacing between upper and lower adjacent virtual sub-objects).

[0074] For the spacing between left and right adjacent virtual sub-objects, it can be divided into a first original interval distance parameter startMargin and a second original interval distance parameter endMargin, which respectively represent the multiple of the distance unit from the key to the left key and the multiple of the distance unit from the key to the right key. width is used to represent the multiple of the key with respect to the standard key width.

[0075] Similarly, for the spacing between upper and lower adjacent virtual sub-objects, it can be divided into a first original interval distance parameter topMargin and a second original interval distance parameter bottomMargin, which respectively represent the multiple of the distance unit from the key to the top key and the multiple of the distance unit from the key to the bottom key. height is used to represent the multiple of the key with respect to the standard key height.

[0076] Through the above embodiments, for a keyboard layout with a unified height for each row of keys but a non-unified width for the keys within a row, the adaptive layout adaptation can be performed through the method for processing virtual objects provided by the present disclosure.

[0077] After obtaining the original layout parameters of the virtual object based on the above embodiments, the original layout parameters of the virtual object can be stored in the server in a target format file. That is, in an optional embodiment of the present disclosure, when storing the original layout parameters of the virtual object in the above embodiments, the original layout parameters of the virtual object are stored in the server in a target format file; in response to sending an adjustment instruction for the virtual object to the server, the target format file is obtained from the server, and the target format file is parsed to obtain the initial layout parameters of the virtual object.

[0078] Among them, the target format file can be in JSON format (JavaScript Object Notation), or other lightweight data formats.

[0079] Exemplarily, by storing the original layout parameters of the virtual object in a target format file in the server, when it is necessary to adjust the virtual object, the JSON file can be obtained from the server to parse the JSON file to obtain the initial layout parameters of the virtual object.

[0080] It should be explained that the JSON format is a lightweight data exchange format, which is easy for humans to read and write, and is also convenient for machines to parse and generate. Moreover, the JSON format effectively improves the network transmission efficiency as a simple and clear hierarchical structure, making it an ideal data exchange language.

[0081] Through the above embodiments, the UI parameters (i.e., layout parameters) of multiple virtual sub-objects in the virtual object can be serialized and stored uniformly, and by setting the standard size parameters and standard spacing parameters, the scalability of the code can be greatly improved, so that the adjustment of the UI parameters becomes centralized and convenient, thereby improving the efficiency of redrawing the virtual object and the adaptability of the virtual object.

[0082] In step S302, in response to adjusting the virtual object to a target size, an adjustment ratio coefficient is determined based on the target size and the initial layout parameters of the virtual object.

[0083] Among them, the adjustment ratio coefficient is used to represent the ratio coefficient for scaling the virtual object; the target size is parameter information such as the overall width and height of the virtual object.

[0084] Exemplarily, when the terminal device detects that the virtual object is adjusted from the initial size to the target size, the adjustment ratio coefficient is determined based on the target size and the initial layout parameters. Herein, the initial size may be smaller than the target size or larger than the target size, that is, an enlargement adjustment operation or a reduction adjustment operation may be performed on the virtual object.

[0085] In an optional embodiment of the present disclosure, when performing the above step S202, the adjustment ratio coefficient is determined according to the initial size and the target size; the second physical size parameter is determined according to the first physical size parameter and the adjustment ratio coefficient; the second interval distance parameter is determined according to the first interval distance parameter and the adjustment ratio coefficient, and the target layout parameters of the adjusted virtual object are obtained.

[0086] Exemplarily, after obtaining the first physical size parameter and the first interval distance parameter of the virtual object, the initial size of the virtual object can be calculated, and then the adjustment ratio coefficient is determined according to the initial size and the target size. Specifically, the product of the initial size and the adjustment ratio coefficient is equal to the target size, so as to obtain the first functional relationship. Since the initial size and the target size are known, the corresponding adjustment ratio coefficient can be obtained.

[0087] For example, taking a row of keys on a virtual keyboard as an example, assume that the first physical size parameters of keys 1, 2, …, n are the width parameters corresponding to keys 1, 2, …, n, which are W k1 、W k2 、...、W kn respectively; and the first interval distance parameters between adjacent positions of keys 1, 2, …, n are specifically the horizontal interval distance parameters, which are W s1 、W s2 、...、W sn-1 respectively. Then, the initial size of the virtual object can be obtained based on the following formula (1):

[0088] W p =W k1 +W k2 +...+W kn +W s1 +W s2 +...+W sn-1 Formula (1)

[0089] In formula (1), W p is the initial size of the virtual object (in this embodiment, W p is the initial width of the virtual object), W k1 、W k2 、...、W kn are the width parameters corresponding to keys 1, 2, …, n respectively; Ws1 , W s2 ,..., W sn-1 are the interval distance parameters between adjacent keys respectively, and W s1 is the interval distance parameter between Key 1 and Key 2, and W s2 is the interval distance parameter between Key 2 and Key 3, and W sn-1 is the interval distance parameter between Key n - 1 and Key n.

[0090] Assume that the adjustment ratio coefficient is α, then the expression of the first functional relationship is shown in Formula (2) below:

[0091] W p ′ = αW p Formula (2)

[0092] Formula (2) is the expression of the first functional relationship, and W p ′ is the target size of the virtual object after adjustment (in this embodiment, W p ′ is the target width of the virtual object after adjustment), and W p is the initial size of the virtual object (in this embodiment, W p is the initial width of the virtual object); the adjustment ratio coefficient is α.

[0093] In W in Formula (2) p ′ and W p are both known quantities, where W p is obtained based on Formula (1), and then the unknown adjustment ratio coefficient α can be obtained through W p ′ and W p Specifically, the adjustment ratio coefficient is obtained according to the transformation of Formula (2) to obtain the adjustment ratio coefficient.

[0094] In order to ensure that the adjusted virtual keyboard does not deform, an equation relationship between the first physical size parameter, the adjustment ratio coefficient, and the second physical size parameter is constructed to obtain the second functional relationship, and an equation relationship between the first interval distance parameter, the adjustment ratio coefficient, and the second interval distance parameter is used to obtain the third functional relationship. Correspondingly, the expression of the second functional relationship is shown in Formula (3) below:

[0095] W kn ′ = αW kn Formula (3)

[0096] Formula (3) is the expression of the second functional relationship. In this expression, W kn ′ is the second physical size parameter of the virtual object after adjustment (in this embodiment, specifically the width of the virtual object after adjustment), and W knThe first physical size parameter before adjustment for the virtual object (in this embodiment, specifically the width of the virtual object before adjustment), and α is the adjustment ratio coefficient. The value of n can be Figure 4 any value from 1 to n - 1 in Figure 4 . If there is a spacing distance between button 1 and the left edge position, and there is a spacing distance between button n and the right edge position, then the value of n is from 1 to n + 1.

[0097] In this formula (3), since α has been determined through formula (2), and W kn is a known quantity, the adjusted second spacing distance parameter W kn ' can be obtained.

[0098] The expression of the third functional relationship is as shown in formula (4) below:

[0099] W sn-1 ' = αW sn-1 Formula (4)

[0100] Formula (4) is the expression of the third functional relationship. In this expression, W sn-1 ' is the second spacing distance parameter after adjustment for the virtual object, W sn-1 is the first spacing distance parameter before adjustment for the virtual object, and α is the adjustment ratio coefficient.

[0101] Similarly, in this formula (4), since the adjustment ratio coefficient α has been determined through formula (2), and W sn-1 is a known quantity, the adjusted second spacing distance parameter W sn-1 ' can be obtained.

[0102] And the above W p ' can also be expressed using formula (5) as follows:

[0103] W p ' = W k1 ' + W k2 ' +... + W kn ' + W s1 ' + W s2 ' +... + W sn-1 ' Formula (5)

[0104] Based on the above formulas (1) to (5), since usually the widths of each button and the widths of the spacing distances are saved as independent parameters, so W p in formula (1) is an unknown quantity, and W k1 , W k2 ,..., W kn and W s1 , W s2 ,..., W sn-1As known quantities, after adjusting the size parameters of the virtual keyboard, it is necessary to reverse calculate the key width and the width of the interval distance after the change based on the changed W p ′, that is, the second physical size parameter and the second interval distance parameter. That is to say, W p ′ is a known quantity, and W k1 ′, W k2 ′,..., W kn ′ and W s1 ′, W s2 ′,..., W sn-1 ′ are unknown quantities.

[0105] That is to say, by using the above formulas (1) to (5) to establish a system of equations, the adjustment ratio coefficient α and the adjusted target layout parameters can be calculated.

[0106] Through the above embodiments, the correlation relationship between the width and height of each key of the virtual keyboard and the interval distance parameter between the keys can be considered into the algorithm, and the purpose of keeping the relative sizes of the width, height and spacing unchanged when the width / height of the original size of the virtual object changes can be achieved, and the defect that the original layout is prone to deformation is solved.

[0107] In addition to the above embodiments, in the form of the first multiple of the standard size parameter and the second multiple of the standard spacing parameter, the original layout parameters of the virtual object are stored, and the original interval distance parameter between adjacent virtual sub-objects is divided into the first original interval distance parameter and the second original interval distance parameter to obtain the initial layout parameters and Figure 6A , Figure 6B On this basis, when calculating the initial width Wp of the above formula (1), the startMargin and endMargin of each key can be accumulated, representing the multiple of the total interval between all keys in a row relative to the standardHorizontalMargin; the width of each key is accumulated, representing the sum of the multiples of the standard width standardKeyWidth of the key width. When calculating the target layout parameters in step S203, the relative ratio of standardHorizontalMargin and standardKeyWidth can be preferentially used for elimination to convert the multiple of the horizontal interval into the sum of the width multiples, and finally, based on the known initial width W p Inverse calculation is performed to obtain the adjusted horizontal interval between each key.

[0108] Similarly, when calculating the initial height W of the above formula (1) pWhen calculating, the topMargin and bottomMargin of each button can be accumulated, representing the multiple of the total interval between each row relative to the standardVerticalMargin; the heights of each row are accumulated, representing the sum of the standard height multiples of the button heights. Then, when calculating the target layout parameters in step S203, the relative ratio of the standardVerticalMargin to the standardKeyHeight can be preferentially used for elimination to convert the multiple of the interval between each vertical row into the sum of height multiples. Finally, based on the known initial height W p Inverse calculation is performed to obtain the adjusted vertical interval between each button.

[0109] In another optional embodiment of the present disclosure, when dividing the original interval distance parameter between adjacent virtual sub-objects into a first original interval distance parameter and a second original interval distance parameter, when performing the steps of calculating the adjustment ratio parameter, the second interval distance parameter in the target layout parameter, and the second physical size parameter, reference can be made to Figure 6B As shown, still taking a row of virtual sub-objects as an example, for W s1 、W s2 、...、W sn-1 They are respectively divided into two parts in the manner as shown in Figure 6B For example, W s1 is divided into EM1 and SM2.

[0110] After splitting, at this time, the initial size of the parent layout, that is, the initial width, is represented by formula (6):

[0111]

[0112] In formula (6), SM i is the second original interval distance parameter between the i-th adjacent buttons; EM i is the first original interval distance parameter between the i-th adjacent buttons; W p is the initial width of the virtual keyboard; W i is the width of each keyboard.

[0113] Based on the above embodiments and Figure 6B , both the startMargin and the endMargin appear in the form of multiples of the standardHorizontalMargin, that is, they satisfy the following formulas (7) to (8):

[0114] SM i =sm i Ws Formula (7)

[0115] EM i= em i Ws formula (8)

[0116] In formulas (7) to (8), SM i is the second original interval distance parameter between the i-th adjacent keys, and sm i is a multiple of the standard size parameter for the second original interval distance parameter (refer to Figure 6A , the startMargin of the i-th key); EM i is the first original interval distance parameter between the i-th adjacent keys, and em i is a multiple of the standard size parameter for the first original interval distance parameter, that is, the endMargin corresponding to the i-th key; Ws is the standard width size, corresponding to standardHorizontalMargin.

[0117] In step S303, according to the adjustment ratio coefficient, determine the target layout parameters of the virtual object, and generate an adjusted virtual object according to the second physical size parameters of each virtual sub-object included in the target layout parameters and the second interval distance parameters between adjacent virtual sub-objects.

[0118] Exemplarily, after determining the initial layout parameters and the adjustment ratio coefficient, the target layout parameters of the virtual object can be calculated, so as to generate an adjusted virtual object according to the second physical size parameters of each virtual sub-object included in the target layout parameters and the second interval distance parameters between adjacent virtual sub-objects.

[0119] Specifically, the calculated target layout parameters of the virtual object can be set into the system components of the terminal device to complete the final rendering of the virtual object, such as a virtual keyboard.

[0120] To implement the above method for processing a virtual object, an embodiment of the present disclosure provides a device for processing a virtual object. Figure 7 Schematically shows a schematic architecture diagram of the device for processing a virtual object.

[0121] Among them, the virtual object processing device 700 provides a graphical user interface through a terminal device. The graphical user interface includes at least one virtual object, which includes a parameter acquisition module 701, a coefficient determination module 702, and an object generation module 703.

[0122] The parameter acquisition module 701 is configured to acquire initial layout parameters of a virtual object, where the initial layout parameters at least include first physical size parameters of multiple virtual sub-objects in the virtual object and first spacing distance parameters between adjacent virtual sub-objects; a coefficient determination module 702 is configured to, in response to adjusting the virtual object to a target size, determine an adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object; an object generation module 703 is configured to determine target layout parameters of the virtual object according to the adjustment ratio coefficient, and generate an adjusted virtual object according to second physical size parameters of each virtual sub-object included in the target layout parameters and second spacing distance parameters between adjacent virtual sub-objects.

[0123] In an optional embodiment of the present disclosure, the coefficient determination module 702 is specifically configured to determine an initial size of the virtual object based on the first physical size parameters and the first spacing distance parameters; determine a target size according to the product of the initial size and the adjustment ratio coefficient to obtain a first functional relationship; determine second physical size parameters according to the first physical size parameters and the adjustment ratio coefficient to obtain a second functional relationship; and determine second spacing distance parameters according to the first spacing distance parameters and the adjustment ratio coefficient to obtain a third functional relationship; and determine the adjustment ratio coefficient based on the first functional relationship, the second functional relationship, and the third functional relationship.

[0124] In an optional embodiment of the present disclosure, the device may further include a standard parameter determination module and a storage module. The parameter acquisition module 701 may further be configured to acquire original layout parameters of the virtual object, where the original layout parameters at least include original physical size parameters of multiple virtual sub-objects in the virtual object and original spacing distance parameters between adjacent virtual sub-objects; a standard parameter determination module is configured to determine standard size parameters based on the original physical size parameters of the multiple virtual sub-objects; the standard parameter determination module is further configured to determine standard spacing parameters based on the original spacing distance parameters between adjacent virtual sub-objects among the multiple virtual sub-objects; a storage module is configured to store the original layout parameters of the virtual object in a form of a first multiple of the standard size parameters and a form of a second multiple of the standard spacing parameters to obtain the initial layout parameters of the virtual object.

[0125] In an optional embodiment of the present disclosure, the storage module may further be configured to divide the original spacing distance parameters between adjacent virtual sub-objects into first original spacing distance parameters and second original spacing distance parameters; store the original layout parameters of the virtual object in a form of a first multiple of the standard size parameters and a form of a second multiple of the first original spacing distance parameters and / or the second original spacing distance parameters to obtain the initial layout parameters of the virtual object.

[0126] In an alternative embodiment of the present disclosure, the storage module may also be configured to store the original layout parameters of the virtual object in a target format file to the server; in response to sending an adjustment instruction for the virtual object to the server, obtain the target format file from the server, and parse the target format file to obtain the initial layout parameters of the virtual object.

[0127] In an alternative embodiment of the present disclosure, the virtual object is a virtual keyboard.

[0128] In an alternative embodiment of the present disclosure, the physical size parameters of each virtual sub-object include the width and height of the virtual sub-object. The heights of the virtual sub-objects in the same row among the multiple virtual sub-objects are the same, and the widths of the virtual sub-objects in the same row may be the same or different.

[0129] The virtual object processing device 700 provided in the embodiments of the present disclosure may execute the technical solutions of the virtual object processing method in any of the above embodiments. The implementation principle and beneficial effects are similar to those of the virtual object processing method. For details, refer to the implementation principle and beneficial effects of the virtual object processing method, which will not be elaborated herein.

[0130] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having a program product capable of implementing the above methods of this specification. In some possible implementation manners, various aspects of the present invention may also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the "Exemplary Methods" section of this specification.

[0131] The program product for implementing the above method according to the embodiments of the present invention may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.

[0132] The program product may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0133] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0134] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0135] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).

[0136] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is further provided.

[0137] Those skilled in the art to which the present invention pertains can understand that various aspects of the present invention can be implemented as a system, a method, or a program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to herein as "circuitry", "module", or "system".

[0138] The following refers to Figure 8 to describe the electronic device 800 according to this embodiment of the present invention. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.

[0139] As Figure 8 shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one of the above-mentioned processing units 810, at least one of the above-mentioned storage units 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.

[0140] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 810, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification. For example, the processing unit 810 can execute steps S301 to S303 as Figure 3 shown.

[0141] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 8201 and / or a cache storage unit 8202, and may further include a read-only storage unit (ROM) 8203.

[0142] The storage unit 820 may further include a program / utility 8204 having a set (at least one) of program modules 8205. Such program modules 8205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Implementations of a network environment may be included in each or some combination of these examples.

[0143] The bus 830 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0144] The electronic device 800 can also communicate with one or more external devices 1000 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 850. Moreover, the electronic device 800 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 860. As shown in the figure, the network adapter 860 communicates with other modules of the electronic device 800 through the bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, redundant arrays of independent disks (RAID) systems, tape drives, and data backup storage systems, etc.

[0145] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by the way of software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0146] In addition, the above drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, rather than for limiting purposes. It is easy to understand that the processes shown in the above drawings do not indicate or limit the time sequence of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.

[0147] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0148] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

[0149] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only defined by the appended claims.

Claims

1. A method for processing virtual objects, characterized in that Providing a graphical user interface through a terminal device, the graphical user interface at least includes virtual objects, and the method includes: Obtaining initial layout parameters of the virtual object, the initial layout parameters at least including first physical size parameters of a plurality of virtual sub-objects in the virtual object, and a first spacing distance parameter between adjacent virtual sub-objects; In response to adjusting the virtual object to a target size, determining an adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object; According to the adjustment ratio coefficient, determining target layout parameters of the virtual object, and generating an adjusted virtual object according to the second physical size parameters of each virtual sub-object included in the target layout parameters and a second spacing distance parameter between adjacent virtual sub-objects.

2. The method according to claim 1, wherein The method further includes: Based on the first physical size parameters and the first spacing distance parameter, determining the initial size of the virtual object; According to the initial size and the target size, determining the adjustment ratio coefficient; Determining the second physical size parameter according to the first physical size parameter and the adjustment ratio coefficient; Determining the second spacing distance parameter according to the first spacing distance parameter and the adjustment ratio coefficient, to obtain the target layout parameters of the adjusted virtual object.

3. The method according to claim 1 or 2, characterized in that, The method further includes: Obtaining original layout parameters of the virtual object, the original layout parameters at least including original physical size parameters of a plurality of virtual sub-objects in the virtual object, and an original spacing distance parameter between adjacent virtual sub-objects; Based on the original physical size parameters of the plurality of virtual sub-objects, determining standard size parameters; Based on the original spacing distance parameter between adjacent virtual sub-objects among the plurality of virtual sub-objects, determining standard spacing parameters; Storing the original layout parameters of the virtual object in a first multiple form of the standard size parameters and a second multiple form of the standard spacing parameters, to obtain the initial layout parameters of the virtual object.

4. The method according to claim 3, characterized in that The storing the original layout parameters of the virtual object in a first multiple form of the standard size parameters and a second multiple form of the standard spacing parameters includes: Dividing the original spacing distance parameter between adjacent virtual sub-objects into a first original spacing distance parameter and a second original spacing distance parameter; Storing the original layout parameters of the virtual object in a first multiple form of the standard size parameters and a second multiple form of the first original spacing distance parameter and / or the second original spacing distance parameter, to obtain the initial layout parameters of the virtual object.

5. The method according to claim 3, wherein The method further includes: Storing the original layout parameters of the virtual object in a target format file to a server; In response to sending an adjustment instruction for the virtual object to the server, obtaining the target format file from the server, and parsing the target format file to obtain the initial layout parameters of the virtual object.

6. The method according to claim 1, characterized in that, The virtual object is a virtual keyboard.

7. The method according to claim 6, characterized in that, The physical size parameters of each virtual sub-object include the width and height of the virtual sub-object. The heights of the virtual sub-objects in the same row among the multiple virtual sub-objects are the same, and the widths of the virtual sub-objects in the same row may be the same or different. The interval distances between adjacent virtual sub-objects in the same row may be the same or different.

8. A processing device for virtual objects, characterized in that, A graphical user interface is provided through a terminal device. The graphical user interface at least includes virtual objects. The device includes: a parameter acquisition module, configured to acquire initial layout parameters of the virtual object. The initial layout parameters at least include first physical size parameters of multiple virtual sub-objects in the virtual object, and first interval distance parameters between adjacent virtual sub-objects; a coefficient determination module, configured to, in response to adjusting the virtual object to a target size, determine an adjustment ratio coefficient based on the target size and the initial layout parameters of the virtual object; an object generation module, configured to determine target layout parameters of the virtual object according to the adjustment ratio coefficient, and generate an adjusted virtual object according to second physical size parameters of each virtual sub-object included in the target layout parameters and second interval distance parameters between adjacent virtual sub-objects.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for processing a virtual object according to any one of claims 1 to 7.

10. An electronic device, characterized in that, including: a processor; and a memory, configured to store executable instructions of the processor; wherein the processor is configured to execute the method for processing a virtual object according to any one of claims 1 to 7 by executing the executable instructions.