Control information display method, server and storage medium

By obtaining and analyzing the metadata of the control, adjusting the translated text to adapt to the display ability of the control, the problem of abnormal text display after direct translation is solved, and normal display and efficient translation of text within the control is achieved.

CN120216073APending Publication Date: 2025-06-27VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510224760.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, if the translated text is directly rendered to the area where the control is located, it is easy to cause abnormal display of the text in the area where the control is located, especially in different countries with different text lengths.

Method used

By obtaining the metadata of each control of the display interface that the terminal device is displaying, including the total length of the control, the blank length, the text font size and the font width coefficient, the maximum number of characters that can be displayed in the control, and adjust the text according to these parameters during translation to ensure that it is displayed normally in the control.

Benefits of technology

It effectively avoids the problem of abnormal text display, ensures that the translated text is displayed normally in the control, and improves translation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216073A_ABST
    Figure CN120216073A_ABST
Patent Text Reader

Abstract

The invention provides a control information display method, a server and a storage medium, and relates to the technical field of data display. The method comprises the following steps of: for each control, determining the number of characters which can be displayed at most in the control according to the total length of the control, the blank length of the control, the text font size associated with the control and the font width coefficient; translating a first target text of a first language type associated with the control, and under the condition that a second target text of a second language type which has the same semantics as the first target text and comprises characters which are less than or equal to the maximum number of the characters which can be displayed can be obtained through translation, obtaining a second target text of a second language type, according to the method, the second target text can be displayed in the area where the control is located according to the blank length of the control, the text word size associated with the control and the font width coefficient, the phenomenon of abnormal display is avoided, and the translation efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data display, and in particular, to a method for displaying control information, a server, and a storage medium. Background Art

[0002] With the development of technology, vehicles have more and more functions. Different functions of a vehicle can be realized by different application programs loaded on the in-vehicle operating system. For example, the navigation function can be realized through a navigation application, and the music playing function can be realized through a music application. When it is necessary to implement the functions associated with an application program, it is necessary to display the display interface of the application program, and the display interface includes a plurality of controls marked with text information.

[0003] Currently, when a vehicle is for sale in Country A, the text in the area where a plurality of controls in the display interface of the application program of the in-vehicle operating system is in the language of Country A. When the vehicle is for sale in Country B, it is necessary to translate the text in the language of Country A into the text in the language of Country B and then mark it in the area where the control is located. However, the text lengths of texts in different countries with the same semantics are different, and a control that can accommodate the text in the language of Country A may not be able to accommodate the text in the language of Country B with the same semantics. In this way, if the translated text is directly rendered to the area where the control is located, it is easy to cause abnormal display of the text in the area where the control is located. Summary of the Invention

[0004] This application provides a method for displaying control information, a server, and a storage medium, which are used to solve the problem that if the translated text is directly rendered to the area where the control is located in the prior art, it is easy to cause abnormal display of the text in the area where the control is located.

[0005] In a first aspect, this application provides a method for displaying control information, which is applied to a server. The method provided by this application includes:

[0006] Obtain the metadata of each control in the display interface currently being displayed by the terminal device, where the metadata of each control includes the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient;

[0007] For each control, determine the maximum number of characters that can be displayed within the control according to the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient;

[0008] Translate the first target text of the first language type associated with the control. When it is possible to obtain a second target text of the second language type that has the same semantics as the first target text and the number of characters included is less than or equal to the maximum number of characters that can be displayed, display the second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0009] In some embodiments, translating the first target text of the first language type associated with the control. When it is possible to obtain a second target text of the second language type that has the same semantics as the first target text and the number of characters included is less than or equal to the maximum number of characters that can be displayed, displaying the second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient includes:

[0010] Directly translate the first target text to obtain at least one directly translated second target text of the second language type that has the same semantics as the first target text;

[0011] When it is determined that there is a directly translated second target text whose number of characters is less than or equal to the maximum number of characters that can be displayed, display the directly translated second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0012] In some embodiments, when it is determined that there is a directly translated second target text whose number of characters is less than or equal to the maximum number of characters that can be displayed, displaying the directly translated second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient includes:

[0013] When it is determined that there are multiple directly translated second target texts of the second language type whose number of characters is less than or equal to the maximum number of characters that can be displayed, select the directly translated second target text with the largest number of characters from the multiple second target texts;

[0014] Display the selected directly translated second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0015] In some embodiments, after directly translating the first target text to obtain at least one directly translated second target text of the second language type that has the same semantics as the first target text, it includes:

[0016] When it is determined that there is no second target text in the directly translated second target text whose number of characters is less than or equal to the maximum number of characters that can be displayed, look up in a preset industry term abbreviation dictionary to see if there is a second target text in the abbreviated version of the second language type that corresponds to the first target text and whose number of characters is less than or equal to the maximum number of characters that can be displayed;

[0017] When there is a second target text in the abbreviated version of the second language type that corresponds to the first target text and whose number of characters is less than or equal to the maximum number of characters that can be displayed, display the abbreviated version of the second target text in the area where the control is located.

[0018] In some embodiments, the method provided by the embodiments of the present application further includes:

[0019] When there is no second target text in the abbreviated version of the second language type that corresponds to the first target text and whose number of characters is less than or equal to the maximum number of characters that can be displayed, determine whether the height of the control can be expanded according to the identifier of the control;

[0020] If it is determined that the height of the control can be expanded, divide the directly translated second target text into multiple lines of text data, and the number of characters in each line of text data is less than or equal to the maximum number of characters that can be displayed;

[0021] Display the divided directly translated second target text in the area where the control is located.

[0022] In some embodiments, the method provided by the embodiments of the present application further includes:

[0023] When there is no second target text in the abbreviated version of the second language type that corresponds to the first target text and whose number of characters is less than or equal to the maximum number of characters that can be displayed, detect the number of characters in the second target text;

[0024] According to the total length of the control, the blank length of the control, the number of characters in the second target text, and the font width coefficient associated with the control, determine the maximum font size that enables the control to fill the second target text;

[0025] Shrink the characters of the second target text to the maximum font size that enables the control to fill the second target text;

[0026] Display the directly translated second target text with the shrunk characters in the area where the control is located.

[0027] In some embodiments, for each control, determining the maximum number of characters that can be displayed in the control according to the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient includes:

[0028] According to the arithmetic formula Determine the maximum number of characters that can be displayed within the control, where N is the maximum number of characters that can be displayed within the control, d1 is the total length of the control, d2 is the blank length of the control, m is the text font size associated with the control, and k is the font width coefficient.

[0029] In a second aspect, the present application also provides a storage medium storing a computer program, which when executed, causes the server to execute the method provided in the first aspect of the present application.

[0030] In a third aspect, the present application also provides a computer program product including a computer program, which when run, causes a computer to execute the method provided in the first aspect of the present application.

[0031] In a fourth aspect, the present application also provides a server including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the instructions to implement the method provided in the first aspect of the present application.

[0032] The present application provides a method for displaying control information, a server, and a storage medium, which can obtain metadata of each control on the display interface being displayed by a terminal device, where the metadata of each control includes the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient;

[0033] For each control, determine the maximum number of characters that can be displayed within the control according to the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient;

[0034] Translate the first target text of the first language type associated with the control. When it is possible to obtain a second target text of the second language type that has the same semantics as the first target text and includes a number of characters less than or equal to the maximum number of characters that can be displayed, it indicates that when the translated second target text is displayed in the area where the control is located, it will not exceed the area where the control is located. Furthermore, the second target text can be displayed in the area where the control is located according to the blank length of the control, the text font size associated with the control, and the font width coefficient, without any abnormal display phenomenon, and the translation efficiency is high. Description of the Drawings

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 Schematic diagram of interaction between the server and the terminal device provided by an embodiment of the present application;

[0037] Figure 2 One of the flowcharts of the control information display method provided by an embodiment of the present application;

[0038] Figure 3 Another flowchart of the control information display method provided by an embodiment of the present application;

[0039] Figure 4 Functional module block diagram of the control information display device provided by an embodiment of the present application. Detailed implementation manners

[0040] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.

[0041] Various structural schematic diagrams according to embodiments of the present disclosure are shown in the accompanying drawings. These figures are not drawn to scale, where for the purpose of clear expression, some details are enlarged and some details may be omitted. The shapes of various regions and layers shown in the figures, as well as their relative sizes and positional relationships, are merely exemplary. In practice, there may be deviations due to manufacturing tolerances or technical limitations, and those skilled in the art can design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0042] In the context of the present disclosure, when a layer / element is referred to as being "on" another layer / element, the layer / element can be directly on the other layer / element, or there can be an intermediate layer / element between them. Additionally, if a layer / element is "on" another layer / element in one orientation, then when the orientation is reversed, the layer / element can be "under" the other layer / element.

[0043] Hereinafter, the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail with specific embodiments. These several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings.

[0044] An embodiment of the present application provides a control information display method, which is applied to the server 101. Among them, as Figure 1As shown in the figure, the server 101 can be communicatively connected to the terminal device 102 installed with an operating system (such as the Android system). The terminal device 102 can be, but is not limited to, a car head unit or a mobile phone, etc. The operating system loads multiple application programs, such as a navigation application, a music application, a video application, etc., which are not limited herein. For example, Figure 2 As shown in the figure, the method provided by the embodiment of the present application includes:

[0045] S201: Obtain the metadata of each control on the display interface currently being displayed on the terminal device 102.

[0046] For example, when the terminal device 102 is currently displaying the display interface of a navigation application, the display interface of the navigation application includes a start navigation control, a route preference setting control, etc.

[0047] Among them, the metadata of each control includes the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient. The total length of the control refers to the length from the leftmost edge to the rightmost edge of the control. The blank length of the control refers to the sum of the length from the leftmost edge of the control to the leftmost edge where text can be displayed within the control and the length from the rightmost edge of the control to the rightmost edge where text can be displayed within the control.

[0048] S202: For each control, determine the maximum number of characters that can be displayed within the control according to the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient.

[0049] Exemplarily, the maximum number of characters that can be displayed within the control can be determined according to the formula where N is the maximum number of characters that can be displayed within the control, d1 is the total length of the control, d2 is the blank length of the control, m is the text font size associated with the control, and k is the font width coefficient. For example, when the total length d1 of the control is 150 mm, the blank length of the control is 10 mm, the text font size m associated with the control is 12 pt, and the font width coefficient k is 1.2,

[0050] S203: Translate the first target text of the first language type associated with the control.

[0051] Exemplarily, the first target text of the first language type can be found through the control ID. For example, if the first target text of the first language type is the Chinese version of "End", then the second target text in English directly translated from "End" is "end". It can be seen that the number of characters in the second target text is 3.

[0052] S204: Determine whether it is possible to obtain a second target text in a second language type that has the same semantics as the first target text and whose character count is less than or equal to the maximum number of characters that can be displayed. If so, execute S205.

[0053] Understandably, when the maximum number of characters that can be displayed within the control is 9 and the character count of the second target text is 3, it is determined that a second target text in a second language type that has the same semantics as the first target text and whose character count is less than or equal to the maximum number of characters that can be displayed can be obtained.

[0054] S205: Display the second target text in the area where the control is located based on the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0055] For example, when the second target text is "end", display the second target text "end" in the area where the control is located based on the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0056] In summary, the embodiments of the present application provide a method for displaying control information. Metadata of each control on the display interface being currently displayed on the terminal device 102 can be obtained. Among them, the metadata of each control includes the total length of the control, the blank space length of the control, the text font size associated with the control, and the font width coefficient. For each control, determine the maximum number of characters that can be displayed within the control based on the total length of the control, the blank space length of the control, the text font size associated with the control, and the font width coefficient. Translate the first target text in the first language type associated with the control. When it is possible to obtain a second target text in a second language type that has the same semantics as the first target text and whose character count is less than or equal to the maximum number of characters that can be displayed, it indicates that when the translated second target text is displayed in the area where the control is located, it will not exceed the area where the control is located. Furthermore, the second target text can be displayed in the area where the control is located based on the blank space length of the control, the text font size associated with the control, and the font width coefficient, without any abnormal display phenomenon, and the translation efficiency is high.

[0057] In some embodiments, as Figure 3 shown, the above S203 - S205 can be specifically implemented as:

[0058] S301: Directly translate the first target text to obtain at least one directly translated second target text in a second language type that has the same semantics as the first target text.

[0059] For example, the first target text can be directly translated based on a preset translation model. The preset translation model can be, but is not limited to, a rule-based machine translation model (RBMT) or a neural machine translation model (NMT). Exemplarily, multiple training samples can be input into a deep learning network for training to obtain a machine translation model. Each training sample includes a historical first target text, the message type corresponding to the historical first target text, an industry term dictionary, and the corresponding directly translated historical second target text. In this way, the accuracy of the translated second target text can be higher. For example, when the message type is the functional description type of an in-vehicle terminal, if the first language type of the first target text is English and the first language type of the first target text is Chinese, "Menu" can be accurately translated as "Function List" instead of "Menu", improving the reliability and professionalism of the translated second target text.

[0060] S302: Determine whether there is a directly translated second target text whose number of characters is less than or equal to the maximum number of characters that can be displayed. If so, execute S303; optionally, if not, execute S304 - S305.

[0061] S303: Display the directly translated second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0062] Furthermore, S302 - S303 can be specifically implemented as follows: In the case of determining that there are multiple directly translated second target texts in the second language type whose number of characters is less than or equal to the maximum number of characters that can be displayed, select the directly translated second target text with the largest number of characters from the multiple second target texts; according to the blank space length of the control, the text font size associated with the control, and the font width coefficient, display the selected directly translated second target text in the area where the control is located. In this way, while ensuring that the second target text can be normally displayed in the area where the control is located, the content richness of the second target text can be made as high as possible, facilitating user understanding.

[0063] S304: Check from a preset industry term abbreviation dictionary whether there is an abbreviated version of the second target text in the second language type that corresponds to the first target text and whose number of characters is less than or equal to the maximum number of characters that can be displayed. If so, execute S305.

[0064] S305: Display the abbreviated version of the second target text in the area where the control is located.

[0065] For example, when the first target text is "Route preference setting" and the directly translated second target text is "Route Preferences", which contains 17 characters. If the maximum number of characters that the control can display is 9, then through a preset industry term abbreviation dictionary, the "Rou Prefs" associated with "Route preference setting" (i.e., the abbreviated version of the second target text) can be found. In this way, the abbreviated version of the second target text can be normally displayed in the area where the control is located.

[0066] In addition, in some other embodiments, the method provided by the embodiments of the present application may further include:

[0067] In the case where there is no abbreviated version of the second target text in the second language type that corresponds to the first target text and the number of characters is less than or equal to the maximum number of characters that can be displayed, determine whether the height of the control can be expanded according to the identifier of the control. Among them, each identifier of the control is associated with a flag for indicating whether the height of the control can be expanded. For example, the flag "0" indicates that it cannot be expanded, and the flag "1" indicates that it can be expanded.

[0068] If it is determined that the height of the control can be expanded, then divide the directly translated second target text into multiple lines of text data, and the number of characters in each line of text data is less than or equal to the maximum number of characters that can be displayed. Display the divided directly translated second target text in the area where the control is located. For example, when the first target text is "Play music" and the directly translated second target text is "Play music", which contains 10 characters. If the maximum number of characters that each line of the control can display is 9, then divide the second target text "Play music" into two lines of text data. The first line of text data can be "Play", and the second line of text data is "music". It can be understood that when the second target text is divided into two lines of text data for display, the height of the area where the control is located is also expanded accordingly. In this way, the divided second target text can be normally displayed in the area where the control is located.

[0069] In some other embodiments, the method provided by the embodiments of the present application further includes:

[0070] Step 1: In the case where there is no abbreviated version of the second target text in the second language type that corresponds to the first target text and the number of characters is less than or equal to the maximum number of characters that can be displayed, detect the number of characters of the second target text.

[0071] Step 2: Determine the maximum font size that enables the control to fill the second target text according to the total length of the control, the blank length of the control, the number of characters of the second target text, and the font width coefficient associated with the control.

[0072] Among them, where N is the maximum number of characters that can be displayed within the control, d1 is the total length of the control, d2 is the blank length of the control, m is the text font size associated with the control, and k is the font width coefficient.

[0073] Step 3: Shrink the characters of the second target text to the maximum font size that enables the control to fill the second target text.

[0074] For example, shrink the font size of the second target text from "12pt" to "9pt".

[0075] Step 4: Display the directly translated second target text with shrunk characters in the area where the control is located.

[0076] Please refer to Figure 4 , an embodiment of the present application provides a control information display device, which is applied to the server 101. It should be noted that the basic principle and the technical effects generated by the control information display device provided in the embodiment of the present application are the same as those in the above embodiment. For a brief description, for the parts not mentioned in the embodiment of the present application, reference can be made to the corresponding content in the above embodiment. The device provided in the embodiment of the present application includes a data acquisition unit, a quantity determination unit, a text translation unit, and a text display unit. Among them,

[0077] The data acquisition unit is configured to acquire the metadata of each control on the display interface being displayed by the terminal device 102. Among them, the metadata of each control includes the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient.

[0078] The quantity determination unit is configured to, for each control, determine the maximum number of characters that can be displayed within the control according to the total length of the control, the blank length of the control, the text font size associated with the control, and the font width coefficient.

[0079] The quantity determination unit is specifically configured to determine the maximum number of characters that can be displayed within the control according to the arithmetic formula where N is the maximum number of characters that can be displayed within the control, d1 is the total length of the control, d2 is the blank length of the control, m is the text font size associated with the control, and k is the font width coefficient.

[0080] The text translation unit is configured to translate the first target text of the first language type associated with the control.

[0081] A text display unit, configured to, when a second target text in a second language type that has the same semantics as the first target text and has a number of characters less than or equal to the maximum number of characters that can be displayed can be translated, display the second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0082] In some embodiments, the text translation unit is specifically configured to directly translate the first target text to obtain at least one directly translated second target text in a second language type that has the same semantics as the first target text.

[0083] The text display unit is specifically configured to, when it is determined that there is a directly translated second target text with a number of characters less than or equal to the maximum number of characters that can be displayed, display the directly translated second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0084] In some embodiments, the text display unit is specifically configured to, when it is determined that there are multiple directly translated second target texts in a second language type with a number of characters less than or equal to the maximum number of characters that can be displayed, select the directly translated second target text with the largest number of characters from the multiple second target texts; and display the selected directly translated second target text in the area where the control is located according to the blank space length of the control, the text font size associated with the control, and the font width coefficient.

[0085] In some embodiments, the text translation unit is specifically configured to, when it is determined that there is no directly translated second target text with a number of characters less than or equal to the maximum number of characters that can be displayed, search a preset industry term abbreviation dictionary to find whether there is an abbreviated version of the second target text in a second language type that corresponds to the first target text and has a number of characters less than or equal to the maximum number of characters that can be displayed.

[0086] The text display unit is specifically configured to, when there is an abbreviated version of the second target text in a second language type that corresponds to the first target text and has a number of characters less than or equal to the maximum number of characters that can be displayed, display the abbreviated version of the second target text in the area where the control is located.

[0087] In some embodiments, the apparatus provided by the embodiments of the present application further includes:

[0088] A text display unit, specifically configured to determine whether the height of a control can be expanded according to the identifier of the control when there is no second target text in the abbreviated version of the second language type that corresponds to the first target text and the number of characters is less than or equal to the maximum number of characters that can be displayed; if it is determined that the height of the control can be expanded, the directly translated second target text is divided into multiple lines of text data, and the number of characters in each line of text data is less than or equal to the maximum number of characters that can be displayed; the divided directly translated second target text is displayed in the area where the control is located.

[0089] In some embodiments, the device provided by the embodiments of the present application further includes:

[0090] A text quantity detection unit, configured to detect the number of characters of the second target text when there is no second target text in the abbreviated version of the second language type that corresponds to the first target text and the number of characters is less than or equal to the maximum number of characters that can be displayed;

[0091] A font size determination unit, which determines the maximum font size that enables the control to fill the second target text according to the total length of the control, the blank length of the control, the number of characters of the second target text, and the font width coefficient associated with the control;

[0092] A font size determination unit, configured to reduce the characters of the second target text to the maximum font size that enables the control to fill the second target text.

[0093] A text display unit, configured to display the directly translated second target text with reduced characters in the area where the control is located.

[0094] In addition, the embodiments of the present application further provide a server 101, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the instructions to implement the method provided by the above embodiments of the present application.

[0095] In addition, the embodiments of the present application further provide a storage medium, and the storage medium stores a computer program. When the computer program is executed, the server 101 is caused to execute the method provided by the above embodiments of the present application.

[0096] In addition, the embodiments of the present application further provide a computer program product, including a computer program. When the computer program is run, the computer is caused to execute the method provided by the above embodiments of the present application.

[0097] In the above description, no detailed explanations are given for technical details such as the composition of each layer. However, those skilled in the art should understand that various technical means can be used to form layers, regions, etc. of the desired shape. Additionally, in order to form the same structure, those skilled in the art can also design methods that are not exactly the same as the methods described above. Moreover, although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination.

[0098] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.

[0099] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A control information display method, characterized in that: Applied to a server, the method comprises: Obtaining metadata of each control of the display interface being displayed by the terminal device, wherein the metadata of each control includes the total length of the control, the blank length of the control, the text font size and font width coefficient associated with the control; For each of the controls, determining the maximum number of characters that can be displayed in the control according to the total length of the control, the blank length of the control, the font size of the text associated with the control, and the font width coefficient; A first target text of a first language type associated with the control is translated, and when a second target text of a second language type having the same semantics as the first target text and including a number of characters less than or equal to the maximum number of characters that can be displayed can be translated, the second target text is displayed in the area where the control is located according to the blank length of the control, the text font size associated with the control, and the font width coefficient.

2. The method according to claim 1, characterized in that The translating of a first target text of a first language type associated with the control, and displaying the second target text of a second language type having the same semantics as the first target text and including a number of characters less than or equal to the maximum number of characters that can be displayed, in a case where the second target text can be translated and has the same semantics as the first target text, in an area where the control is located according to a blank length of the control, a text font size associated with the control, and a font width coefficient, comprises: Directly translate the first target text to obtain at least one directly translated second target text in a second language with the same semantics as the first target text; When it is determined that there is a second target text of direct translation whose number of characters is less than or equal to the maximum number of characters that can be displayed, the second target text of direct translation is displayed in the area where the control is located based on the blank length of the control, the text font size associated with the control, and the font width coefficient.

3. The method according to claim 2, characterized in that In a case where it is determined that there is a directly translated second target text whose number of characters is less than or equal to the maximum number of characters that can be displayed, displaying the directly translated second target text in the area where the control is located according to the blank length of the control, the text font size associated with the control, and the font width coefficient, includes: In a case where it is determined that there are a plurality of second target texts of direct translation in the second language type whose number of characters is less than or equal to the maximum number of characters that can be displayed, selecting a second target text of direct translation with the largest number of characters from the plurality of second target texts; The selected second target text for direct translation is displayed in the area where the control is located according to the blank length of the control, the text font size associated with the control, and the font width coefficient.

4. The method according to claim 3, characterized in that After directly translating the first target text to obtain at least one directly translated second target text in a second language with the same semantics as the first target text, the method further comprises: If it is determined that there is no second target text of a direct translation whose number of characters is less than or equal to the maximum number of characters that can be displayed, searching from a preset industry term abbreviation dictionary whether there is a second target text of an abbreviated version in the second language type corresponding to the first target text and whose number of characters is less than or equal to the maximum number of characters that can be displayed; If there is an abbreviated second target text in the second language type corresponding to the first target text and having a number of characters less than or equal to the maximum number of characters that can be displayed, the abbreviated second target text is displayed in the area where the control is located.

5. The method according to claim 4, characterized in that The method further comprises: In the case that there is no abbreviated second target text of the second language type corresponding to the first target text and having a number of characters less than or equal to the maximum number of characters that can be displayed, determining whether the height of the control can be extended according to the identifier of the control; If it is determined that the height of the control can be expanded, dividing the directly translated second target text into multiple lines of text data, and the number of characters in each line of the text data is less than or equal to the number of characters that can be displayed at most; The divided directly translated second target text is displayed in the area where the control is located.

6. The method according to claim 4, characterized in that The method further comprises: If there is no abbreviated second target text in the second language type corresponding to the first target text and having a number of characters less than or equal to the maximum number of characters that can be displayed, detecting the number of characters of the second target text; Determine, according to the total length of the control, the blank length of the control, the number of characters of the second target text, and the font width coefficient associated with the control, a maximum font size that enables the control to fill the second target text; reducing the characters of the second target text to a maximum font size that enables the control to fill the second target text; The second target text of the direct translation after the characters are reduced is displayed in the area where the control is located.

7. The method according to any one of claims 1 to 6, characterized in that: The step of determining, for each of the controls, the maximum number of characters that can be displayed in the control according to the total length of the control, the blank length of the control, the font size of the text associated with the control, and the font width coefficient, includes: According to the formula Determine the maximum number of characters that can be displayed in the control, where N is the maximum number of characters that can be displayed in the control, d1 is the total length of the control, d2 is the blank length of the control, m is the text font size associated with the control, and k is the font width coefficient.

8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the server is caused to perform the method according to any one of claims 1 to 7.

9. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer is caused to perform the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed, the server is caused to execute the method as claimed in any one of claims 1 to 7.