Data processing method and device

Through automated processing methods, the language type of interface text data is automatically adjusted based on interface features, which solves the problem of mismatched results in manual processing and improves efficiency and accuracy.

CN120631344APending Publication Date: 2025-09-12LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510572871.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the prior art, when the language type of the interface text data is manually changed, the actual display effect cannot be directly seen, resulting in a mismatch between the data processing result and the interface and low efficiency.

Method used

Through automated processing methods, the language type of text data is adjusted based on interface feature data to ensure that the data processing results match the interface features, including text library matching, control size adaptation, and expression style adaptation, and multiple models are used for text data processing and proofreading.

Benefits of technology

The data processing results are matched with the interface, which improves processing efficiency, reduces costs, and ensures the accuracy and consistency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631344A_ABST
    Figure CN120631344A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device. The method comprises the steps of obtaining first data and second data of a first interface in response to a target instruction; the first data comprises text data capable of changing language types, and the second data can represent interface features of the first interface; processing the first data based on the second data to obtain third data; outputting a second interface; the third data in the second interface and the first data in the first interface at least belong to different language types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method and device. Background Art

[0002] Current data processing methods for interfaces rely on manually changing the language of text data within the interface. However, since manual data processing cannot directly visualize the actual display of the text data within the interface, it often only changes the language of the text data itself, ignoring the intended presentation of the text data within the interface. Furthermore, manual data processing is inefficient. Consequently, current data processing methods suffer from a mismatch between the data processing results and the interface, as well as low data processing efficiency. Summary of the Invention

[0003] The embodiments of the present application provide a data processing method and apparatus.

[0004] According to a first aspect of the present application, a data processing method is provided, the method comprising: obtaining first data and second data of a first interface in response to a target instruction; the first data comprises text data capable of changing a language type, and the second data is capable of representing interface features of the first interface; processing the first data based on the second data to obtain third data; outputting a second interface; the third data in the second interface and the first data in the first interface are of at least a different language type.

[0005] According to one embodiment of the present application, processing the first data based on the second data to obtain the third data includes at least one of the following: processing the first data based on the first strategy and the second data to obtain the third data, so that the third data corresponding to the first data that meets the target feature conditions remains consistent; processing the first data based on the second strategy and the second data to obtain the third data, so that the third data presented in the second interface is adapted to the size of the control carrying the data; processing the first data based on the third strategy and the second data to obtain the third data, so that the text expression style of the third data is adapted to the interface expression style of the first interface; the interface features of the first interface can reflect the interface expression style.

[0006] According to one embodiment of the present application, the processing of the first data based on the first strategy and the second data to obtain the third data so that the third data corresponding to the first data that meets the target feature condition remains consistent includes at least one of the following: determining a target text library based on the second data, and determining the third data corresponding to the first data from the target text library; different interfaces correspond to the same or different text libraries; determining at least one interface grouping based on the second data so that the third data corresponding to the first data of the same interface group remains consistent; the at least one interface grouping includes at least one of the first data.

[0007] According to one embodiment of the present application, the processing of the first data based on the second strategy and the second data to obtain the third data so that the third data presented in the second interface is adapted to the size of the control that carries the data includes: obtaining intermediate data of the first data, and determining the size of the control based on the second data; if the size of the control does not match the interface size required to be occupied by the intermediate data, adjusting the character length, character height of the intermediate data or adjusting the size of the control.

[0008] According to one embodiment of the present application, the method also includes: determining the second data; the determining the second data includes at least one of the following: determining the second data based on the source code of the first interface; performing image analysis on the image of the first interface based on the first model to obtain the second data; analyzing the user feature information of the first interface based on the second model to obtain the second data.

[0009] According to one embodiment of the present application, after the first data is processed based on the second data to obtain the third data, the method further includes: based on the first prompt word, using the third model to perform text data processing on the third data to obtain a text data processing result corresponding to the third data; the text data processing result represents the language type conversion problem existing in the third data; based on the second prompt word, using the fourth model to correct the third data based on the text data processing result to obtain a corrected text; based on the third prompt word, using the fifth model to proofread the corrected text to obtain a proofreading result; in response to the proofreading result satisfying the set proofreading condition, determining the corrected text as the corrected third data; outputting a second interface; the second interface includes the corrected third data; the first prompt word, the second prompt word and the third prompt word are used to define models as different roles.

[0010] According to one embodiment of the present application, the method also includes: in response to the proofreading result not meeting the set proofreading conditions, based on the fourth prompt word, using the sixth model based on the second data and the proofreading result, the first data is processed again to obtain another third data; the another third data is different from the third data; the fourth prompt word makes the role defined by the model different from the roles defined by the first prompt word, the second prompt word, and the third prompt word.

[0011] According to one embodiment of the present application, before outputting the second interface, the method further includes: determining a proofreading language set; the proofreading language set includes at least a target language for proofreading provided in the present application; each of the target languages ​​can represent a language family provided in the present application, and the target language is different from the language of the first data; converting the language type of the third data into each target language in the proofreading language set to obtain at least one first proofreading text; converting the language type of the first data into each target language in the proofreading language set to obtain at least one second proofreading text; determining a first relationship and a second relationship between the first proofreading text and the second proofreading text of the same language family; the first relationship represents the semantic similarity between the texts; the second relationship represents the grammatical organization similarity between the texts; and proofreading the third data based on the first relationship and the second relationship.

[0012] According to one embodiment of the present application, determining the second relationship between the first proofreading text and the second proofreading text in the same language includes: calculating the edit distance between the first proofreading text and the second proofreading text; determining the structural similarity between the first proofreading text and the second proofreading text based on the edit distance, the character length of the first proofreading text, and the character length of the second proofreading text; calculating the ratio of the number of identical words in the first proofreading text and the second proofreading text to the total number of all words to obtain word coverage; and determining the second relationship based on the structural similarity and the word coverage.

[0013] According to a second aspect of the present application, a data processing device is provided, which includes: an acquisition module for obtaining first data and second data of a first interface in response to a target instruction; the first data includes text data that can change the language type, and the second data can represent the interface characteristics of the first interface; a processing module for processing the first data based on the second data to obtain third data; an output module for outputting a second interface; the third data in the second interface and the first data in the first interface belong to at least a different language type.

[0014] It should be understood that the teachings of this application do not necessarily achieve all of the beneficial effects described above, but that specific technical solutions can achieve specific technical effects, and other embodiments of this application can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present application are shown in an illustrative and non-limiting manner, in which:

[0016] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.

[0017] Figure 1 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown as follows Figure 1 ;

[0018] Figure 2 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown as follows Figure 2 ;

[0019] Figure 3 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown as follows Figure 3 ;

[0020] Figure 4 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown as follows Figure 4 ;

[0021] Figure 5 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown as follows Figure 5 ;

[0022] Figure 6 The application scenario of the data processing method provided in the embodiment of the present application is shown Figure 1 ;

[0023] Figure 7 The application scenario of the data processing method provided in the embodiment of the present application is shown Figure 2 ;

[0024] Figure 8 The application scenario of the data processing method provided in the embodiment of the present application is shown Figure 3 ;

[0025] Figure 9 The application scenario of the data processing method provided in the embodiment of the present application is shown Figure 4 ;

[0026] Figure 10An optional schematic diagram of a data processing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] In order to make the purpose, features, and advantages of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.

[0028] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0029] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0031] The processing flow of the data processing method provided in the embodiment of the present application is described. Figure 1 , Figure 1 This is a schematic diagram of the processing flow of the data processing method provided in the embodiment of the present application. Figure 1 , will combine Figure 1 Steps S101-S103 are shown for explanation.

[0032] Step S101 , in response to a target instruction, obtaining first data and second data of a first interface; the first data includes text data capable of changing the language type, and the second data can represent interface features of the first interface.

[0033] In some embodiments, the target instruction can be used to trigger data processing. The first interface may include: an interface containing first data. The first data may include: text data that can change the language type in the first interface. Changing the language type may include: text translation and changing the text expression style, etc., and the embodiments of this application do not limit the specific language type of change. The second data may represent the interface features of the first interface. The interface features may include: control type, control layout, interface color, interface font, etc. The embodiments of this application do not limit the specific interface features.

[0034] Step S102: Process the first data based on the second data to obtain third data.

[0035] In some embodiments, processing the first data based on the second data to obtain the third data may include: changing the language type of the first data in combination with interface features of the first interface to obtain the third data. The third data may include: the text data of the changed language type obtained after processing.

[0036] Step S103: outputting a second interface; the third data in the second interface and the first data in the first interface are at least of a different language type.

[0037] In some embodiments, the second interface may include an interface for displaying text data after the language type is changed. The third data in the second interface and the first data in the first interface may be of at least a different language type by obtaining first data in the first interface including the English text "Submit" and interface features of the first interface, processing the English text according to the interface features, translating it into third data including the Chinese text "Submit," outputting a second interface, and displaying the translated Chinese text "Submit" on the second interface, wherein the third data and the first data in the first interface include a different language type.

[0038] The first data obtained in the first interface includes the text "You must complete this step immediately" in a serious expression style and the interface features of the first interface. The text is processed according to the interface features to obtain third data. The third data is the text "Complete this step now!" in a relaxed expression style. The second interface is output, and the text "Complete this step now!" in a relaxed expression style is displayed on the second interface. The third data has a different expression style from the language type of the first data of the first interface.

[0039] The method of the present embodiment processes text data based on interface features to change the language type of the text data. The third data obtained after data processing matches the interface features, thus matching the data processing results with the interface. Furthermore, the data processing process requires no manual intervention, reducing the time required for data processing, thereby improving data processing efficiency and reducing data processing costs.

[0040] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 2 ,like Figure 2 As shown, the data processing method may specifically include:

[0041] Step S201a: Process the first data based on the first strategy and the second data to obtain third data, so that the third data corresponding to the first data that meets the target feature condition remains consistent.

[0042] In this embodiment, the first policy may include rules for ensuring that third data corresponding to first data that meets the target characteristic condition remains consistent. Specifically, the first data is processed based on the first policy and the second data control model to obtain third data so that the third data corresponding to the first data that meets the target characteristic condition remains consistent. The target characteristic condition may be a pre-set condition used to determine whether the first data meets specific requirements.

[0043] In some embodiments, step S201a may include at least one of the following: determining a target text library based on the second data, and determining third data corresponding to the first data from the target text library; determining at least one interface group based on the second data, so that the third data corresponding to the first data of the same interface group remains consistent;

[0044] As an example, different interfaces correspond to the same or different text libraries. Specifically, when the language type is changed to translate the first data of the first interface from English to Chinese, the target text library corresponding to the first interface may include data corresponding to the translation from English to Chinese. The target text library corresponding to the first interface may also include not only data corresponding to the translation from English to Chinese, but also data corresponding to the translation from English to multiple other languages. Determining the target text library based on the second data, and determining the third data corresponding to the first data from the target text library may include: determining the target text library based on the second data, and the target text library may be a special term library corresponding to the first interface. Matching the first data with the data in the special term library. Determining the third data corresponding to the first data from the special term library. For example, when the language type is changed to perform text translation on the first data of the first interface, "Scan&fix" in the first data is a special term. The third data corresponding to the first data is directly called from the special term library as "Scan and repair", and ensuring that the same text translation is used wherever "Scan&fix" appears in the first interface, thereby achieving translation consistency. For another example, when the language type is changed to perform text translation on the first data of the first interface, "Andy" in the first data is a special term. The third data corresponding to the first data is directly called as "Andy" from the special term library, and it is ensured that text translation is not performed wherever "Andy" appears in the first interface, thereby achieving translation consistency.

[0045] As an example, at least one interface group includes at least one first data. The interface grouping may include grouping the interfaces based on control type information in the second data, grouping the interfaces based on contextual information in the second data, and grouping based on control type information and contextual information in the second data.

[0046] According to the control type information in the second data, the first data corresponding to all button controls in the first interface are divided into the same interface group, and the third data corresponding to the first data in the same interface group remain consistent.

[0047] According to the context association information in the second data, all first data related to "file operation" in the first interface are divided into the same interface group, and the third data corresponding to the first data in the same interface group remain consistent.

[0048] Combined with the control type and context-related information in the second data, the first data corresponding to all button controls related to "file operations" in the first interface are divided into the same interface group, and the first data corresponding to all link controls related to "file operations" in the first interface are divided into another interface group. The third data corresponding to the first data of the same interface group remains consistent.

[0049] In some embodiments, the target text library may further include historical translation results. The historical translation results may be translated text applied in historical versions of the first interface. The historical translation results may also be historical translation text corresponding to an interface having similar interface features to the first interface. Third data corresponding to the first data is determined from the historical translation results included in the target text library, such that the third data is consistent with the historical translation text in the published version.

[0050] Step S201b: Process the first data based on the second strategy and the second data to obtain third data, so that the third data presented in the second interface is adapted to the size of the control carrying the data.

[0051] In this embodiment, the second policy may include a rule for adapting the third data presented in the second interface to the size of the control that carries the data. Specifically, the first data is processed based on the second policy and the second data control model to obtain the third data, so that the third data presented in the second interface is adapted to the size of the control that carries the data.

[0052] In some embodiments, step S201b may include: obtaining intermediate data of the first data, determining the size of the control based on the second data; if the size of the control does not match the interface size required to be occupied by the intermediate data, adjusting the character length, character height of the intermediate data or adjusting the size of the control.

[0053] As an example, when the language type is changed to text translation of the first data of the first interface, the intermediate data may include text data obtained after text translation of the first data. The intermediate data may be the same as or different from the third data finally output.

[0054] Adjusting the character length may include: determining that the maximum number of characters allowed to be displayed by the size of the button control is two characters based on the second data, and if the length of the translated text "Please Submit" exceeds two characters, adjusting the translated text to "Submit".

[0055] Adjusting the character height may include: determining, based on the second data, that the height of the text box control is 20px; and if the height of the translated text exceeds the height of the text box control, reducing the font size corresponding to the text data. For example, if the original text box height is 20px and the translated text is "OK," the font size corresponding to the intermediate data requires a height of 24px to be displayed, and the font size corresponding to the intermediate data is reduced to fit within the 20px height of the text box.

[0056] Adjusting the control size may include: determining, based on the second data, that the maximum number of characters allowed to be displayed by the size of the text box control is two characters, and the text box control can be resized. If the length of the translated text "Please Submit" exceeds two characters, the size of the text box control is adjusted to a size corresponding to allowing three characters to be displayed.

[0057] Adjusting the control size may also include: determining, based on the second data, that the maximum number of characters allowed to be displayed by the size of the text box control is two characters, and the text box control can be resized. If the length of the translated text "Please Submit" exceeds two characters, based on the control layout in the second data, the text box width is increased to a maximum number of characters allowed to be displayed of three characters, and at the same time, the position of the button control on the right side of the text box control is adjusted to adapt to the control layout.

[0058] Step S201c: Process the first data based on the third strategy and the second data to obtain third data, so that the text expression style of the third data is adapted to the interface expression style of the first interface.

[0059] In this embodiment, the third strategy may include rules for adapting the text expression style of the third data to the interface expression style of the first interface. Specifically, the first data is processed based on the third strategy and the second data control model to obtain the third data, so that the text expression style of the third data is adapted to the interface expression style of the first interface. The interface expression style may be a way of presenting interface features. Specific interface expression styles may include: formal, relaxed, humorous, serious and other styles. The embodiments of this application do not limit the specific interface expression style. The text expression style may be the language form used to express the text. Specific text expression styles may include: formal, relaxed, humorous, serious and other styles. The embodiments of this application do not limit the specific text expression style.

[0060] Step S202: output the second interface.

[0061] The specific description of step S202 is similar to that of the above step S103 and will not be repeated here.

[0062] In some embodiments, the data processing method may further include: obtaining the remark information in the source code of the first interface. The remark information and the first data are input into the language model to obtain the third data. Among them, the remark information may be a special requirement for any first data in the first interface. For example, if the interface expression style of the first interface is serious, then the text expression style of the corresponding third data should also be serious. The remark information may be to determine the text expression style of the third data corresponding to a certain first data as lively. Then the remark information and the first data are input into the language model, and in the obtained third data, the text expression style of the third data obtained by processing the first data corresponding to the remark information is lively. The remark information may also be to determine the text expression style of the third data corresponding to a certain first data as more serious. Then the remark information and the first data are input into the language model, and in the obtained third data, the text expression style of the third data obtained by processing the first data corresponding to the remark information is more serious. The remark information may also be other types of special requirements, which are not limited in the embodiments of the present application.

[0063] The method of the embodiment of the present application introduces multiple strategies for data processing, improving the accuracy, interface adaptability, and consistency of the data processing results. By processing data based on different strategies, the data processing results are not only accurate but also match the control size and expression style of the interface. The data processing process does not require manual processing, which reduces the time required for data processing, thereby improving data processing efficiency and reducing data processing costs.

[0064] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 3 ,like Figure 3 As shown, the data processing method may further include:

[0065] Step S301: determine the second data.

[0066] In some embodiments, step S301 may include at least one of the following: determining the second data based on the source code of the first interface; performing image analysis on the image of the first interface based on the first model to obtain the second data; analyzing the user feature information of the first interface based on the second model to obtain the second data.

[0067] In this embodiment, the source code of the first interface may include the interface structure and content of the first interface. The first model can be used to extract features from the image of the first interface to obtain second data. The second model can be used to analyze the user characteristic information of the first interface to obtain second data. User characteristic information may include: user behavior data, user preference data, user operating habits and user device information and other data. The embodiment of this application does not limit the specific user characteristic information. User characteristic information can be determined from the background information of the project corresponding to the first interface. Project background information may include: target user groups and their usage habits. For example, if the software corresponding to the first interface is financial software designed for business people, the user characteristic information of the first interface may include: information such as the user's preference for formal and professional interface styles and commonly used specific financial terms.

[0068] Step S302: Process the first data based on the second data to obtain third data.

[0069] The specific description of step S302 is similar to that of the above step S102 and will not be repeated here.

[0070] The method of the embodiment of the present application ensures that the data processing results match the actual usage scenarios of the interface by extracting interface features from source code, image analysis and user feature information. The data processing process does not require manual processing, which reduces the time required for data processing, thereby improving the efficiency of data processing and reducing the cost of data processing.

[0071] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 4 ,like Figure 4 As shown, after step S102, the data processing method may further include:

[0072] Step S401 : Based on the first prompt word, use a third model to perform text data processing on third data to obtain a text data processing result corresponding to the third data.

[0073] Step S402: Based on the second prompt word, the third data is corrected using the fourth model based on the text data processing result to obtain a corrected text.

[0074] Step S403: Based on the third prompt word, the fifth model is used to proofread the corrected text to obtain a proofreading result.

[0075] In this embodiment, the first prompt word can be used to define the role of the third model. The defined role of the third model can identify language type conversion issues in the third data. The text data processing result represents at least one language type conversion issue in the third data. The third model can be used to identify the language type conversion issue in the third data and obtain a text processing result. The second prompt word can be used to define the role of the fourth model. The defined role of the fourth model can be used to correct the third data based on the text data processing result. The fourth model can be used to correct the third data based on the language type conversion issues in the text data processing result. The corrected text can be the text data corrected by the fourth model. The third prompt word can be used to define the role of the fifth model. The defined role of the fifth model can be used to proofread the corrected text. The fifth model can be used to proofread the corrected text according to language type conversion requirements. The proofreading result can represent specific information about whether the corrected text meets the set proofreading conditions. The proofreading result can specifically include semantic similarity and grammatical organization similarity.

[0076] Step S404a: in response to the proofreading result satisfying the set proofreading condition, the corrected text is determined as the corrected third data.

[0077] Step S405: output the second interface.

[0078] In this embodiment, the proofreading result meeting the set proofreading condition may include: the semantic similarity and grammatical organization similarity included in the proofreading result are both greater than a set similarity threshold. The output second interface includes the corrected third data.

[0079] Step S404b: In response to the proofreading result not meeting the set proofreading condition, based on the fourth prompt word, the first data is processed again using the sixth model based on the second data and the proofreading result to obtain another third data.

[0080] In this embodiment, the fourth prompt word can be used to define the role of the sixth model. The defined sixth model can be used to reprocess the first data based on the second data and the proofreading results to obtain another third data. The other third data is different from the third data, and the role defined by the fourth prompt word is different from the roles defined by the first, second, and third prompt words. The third, fourth, fifth, and sixth models can be the same model. The third, fourth, fifth, and sixth models can also be different models. The third, fourth, fifth, and sixth models can also be different sub-models within the same model.

[0081] The method of the embodiment of the present application improves the quality of the data processing results through proofreading and correction. By performing data processing through different models, the data processing results can be proofread and corrected at multiple levels, thereby outputting high-quality data processing results and improving the accuracy of the data processing results. When the proofreading conditions are not met, the data processing results are optimized. It is ensured that the final output data processing results meet the requirements, and the data processing process does not require manual processing, which reduces the time required for data processing, thereby improving the efficiency of data processing and reducing the cost of data processing.

[0082] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 5 ,like Figure 5 As shown, before step S103, the data processing method may further include:

[0083] Step S501: Determine a proofreading language set.

[0084] In this embodiment, the proofreading language set includes at least one target language for proofreading; each target language can represent a language family, and the target language is different from the language of the first data. The target language can cover different language families. The language family can include: language classification systems, such as Indo-European, Sino-Tibetan, Altaic, Semitic-Hamitic, Caucasian, Austronesian, South Asian, and Uralic languages. Specifically, the target language can be a typical language corresponding to the language family. Typical languages ​​can include: German, French, Spanish, Russian, Chinese, Turkish, Arabic, Hungarian, Filipino, Japanese, and Korean.

[0085] Step S502: Convert the language type of the third data into each target language in the proofreading language set to obtain at least one first proofreading text.

[0086] Step S503: convert the language type of the first data into each target language in the proofreading language set to obtain at least one second proofreading text.

[0087] In this embodiment, the proofreading language set may include 11 target languages: German, French, Spanish, Russian, Chinese, Turkish, Arabic, Hungarian, Filipino, Japanese, and Korean. The language type of the third data is converted into each target language in the proofreading language set to obtain first proofreading texts corresponding to the 11 languages. The language type of the first data is converted into each target language in the proofreading language set to obtain second proofreading texts corresponding to the 11 languages.

[0088] Step S504 : determining a first relationship and a second relationship between the first proofreading text and the second proofreading text in the same language.

[0089] In this embodiment, the first relationship may include: semantic similarity between the first proofread text and the second proofread text.

[0090] The semantic similarity between the first proofread text and the second proofread text in the same language can be expressed by the following formula.

[0091]

[0092] Among them, Semantic(T src ,T tgt ) represents the semantic similarity between the first proofread text and the second proofread text, T src Indicates the second proofread text, T tgt Indicates the first proofread text, Represents the second proofread text after vectorization, Represents the first proofread text after vectorization.

[0093] In this embodiment, determining the second relationship between a first proofreading text and a second proofreading text in the same language family may include: calculating an edit distance between the first proofreading text and the second proofreading text; determining structural similarity between the first proofreading text and the second proofreading text based on the edit distance and the character length of the first proofreading text and the character length of the second proofreading text; calculating a ratio of the number of identical words in the first proofreading text and the second proofreading text to the total number of all words to obtain a word coverage; and determining the second relationship based on the structural similarity and the word coverage. The second relationship may include grammatical organization similarity between the first proofreading text and the second proofreading text.

[0094] The grammatical organization similarity between the first proofread text and the second proofread text in the same language family can be expressed by the following formula.

[0095]

[0096] Among them, Literal(T src ,T tgt ) represents the grammatical organization similarity between the first proofread text and the second proofread text, EditDist(T src ,T tgt ) represents the edit distance between two texts. The edit distance represents the number of operations (including insertions, deletions, and substitutions) required to transform one text into another. src | represents the character length of the second proofread text, |T tgt | indicates the character length of the first proofread text, represents the structural similarity between the first proofread text and the second proofread text, W src Represents the word set of the second proofread text, Wtgt The word set representing the first proofread text, |W src ∩W tgt | represents the number of identical words in the first proofread text and the second proofread text, |W src ∪W tgt | represents the total number of words in the first proofread text and the second proofread text, represents the word coverage between the first proofread text and the second proofread text, ω1 is the weight coefficient of structural similarity, ω2 is the weight coefficient of word coverage, ω1+ω2=1.

[0097] Step S505: proofread the third data based on the first relationship and the second relationship.

[0098] In this embodiment, proofreading the third data based on the first relationship and the second relationship may include: determining a proofreading result corresponding to the third data based on the first relationship and the second relationship. If the proofreading result satisfies a set proofreading condition, outputting a second interface including the third data. If the proofreading result does not satisfy the set proofreading condition, processing the first data again based on the second data and the proofreading result to obtain another third data.

[0099] In some embodiments, the verification result corresponding to the third data determined based on the first relationship and the second relationship can be expressed by the following formula.

[0100] Quality(T src ,T tgt )=α*Semantic(T src ,T tgt )+β*Literal(T src ,T tgt )

[0101] Among them, Quality (T src ,T tgt ) represents the proofreading result, α represents the weight coefficient of text similarity, β represents the weight coefficient of grammatical organization similarity, α+β=1. The proofreading result that meets the set proofreading conditions may include: Quality(T src ,T tgt ) is greater than the set threshold.

[0102] The method of the embodiment of the present application, by covering the target language verification process of typical language families, not only pays attention to mainstream languages, but also takes into account the differences between language systems, ensuring that the data processing results in different language families can meet the requirements of semantic similarity and grammatical organization similarity. The data processing results are quantitatively evaluated by the two indicators of semantic understanding similarity and grammatical organization similarity, thereby improving the accuracy of the data processing results. In addition, the data processing process does not require manual processing, which reduces the time required for data processing, thereby improving the efficiency of data processing and reducing the cost of data processing.

[0103] refer to Figure 6 , an application scenario diagram of the data processing method provided in the embodiment of the present application, which is applied to data processing in multi-language interface development.

[0104] As an example, a developer is developing an interface for an application that supports multiple languages. The goal is to ensure the consistency and translation accuracy of the application's interface in different language environments.

[0105] The first data is text data in the first interface, and the third data is text data in the second interface. First, it is determined that the proofreading language set includes 10 languages ​​representing different language families. The third data in the second interface is converted into each language in the proofreading language set, obtaining first proofreading texts corresponding to the 10 language families. The first data in the first interface is converted into each language in the proofreading language set, obtaining second proofreading texts corresponding to the 10 language families. For each language family, the semantic similarity and grammatical similarity between the first proofreading text and the second proofreading text are calculated to obtain 10 proofreading results. For example, the semantic similarity and grammatical similarity between the first proofreading text in language family 1 and the second proofreading text in language family 1 are calculated to obtain proofreading result 1. Proofreading conditions may include: the presence of 8 proofreading results indicates that the translation quality is acceptable. Determining whether the third data meets the proofreading conditions based on the proofreading results may include: if the presence of 8 proofreading results indicates that the translation quality is acceptable, outputting a second interface, which includes the third data. If there are not 8 proofreading results indicating that the translation quality is qualified, the first data is processed again based on the interface features of the first interface and the proofreading results to obtain another third data, and the proofreading results are fed back to the developer.

[0106] refer to Figure 7 , an application scenario diagram of the data processing method provided in an embodiment of the present application is applied to data processing of the language translation function in the interface of the user using the application.

[0107] First, the user's operational behavior on the first interface is analyzed to obtain a prediction result. In response to the prediction result, a target instruction is generated to translate the first interface into another language. In response to the target instruction, first data and second data of the first interface are obtained; the first data includes text data capable of changing the language type, and the second data can represent the interface features of the first interface;

[0108] When the language type is changed to perform text translation on the first data of the first interface, the first data of the first interface is "Scan&fix". The special terminology library corresponding to the first interface is determined according to the second data, and the third data corresponding to the first data is directly called from the special terminology library as "Scan and Repair". According to the second data, it is determined that sub-interface A and sub-interface B in the first interface are in the same interface group, and it is ensured that "Scan&fix" in sub-interface A and sub-interface B are translated as "Scan and Repair". Finally, it is ensured that the same text translation "Scan and Repair" is used in all places where "Scan&fix" appears in the first interface, and the translated third data is saved in the configuration file. When a request to change the language of the first interface is received, the pre-generated configuration file is directly loaded and the second interface is output. The second interface includes the third data.

[0109] refer to Figure 8 , an application scenario diagram of the data processing method provided in an embodiment of the present application is applied to data processing of the language translation function in the interface of the user using the application.

[0110] First, the user's operational behavior on the first interface is analyzed to obtain a prediction result. In response to the prediction result, a target instruction is generated to translate the first interface into another language. In response to the target instruction, first data and second data of the first interface are obtained; the first data includes text data capable of changing the language type, and the second data can represent the interface features of the first interface;

[0111] When the language type is changed to perform text translation on the first data of the first interface, the controls corresponding to the first data "Most recent scan" and "Next scheduled scan" in the sub-interface C of the first interface are determined to be size-adjustable controls based on the second data. If the lengths of the translated texts "Most recent scan" and "Next scheduled scan" do not match the controls, based on the control layout in the second data, the height of the control corresponding to "Most recent scan" is increased, while the height of the control corresponding to "Next scheduled scan" is adjusted to fit the control layout. Ensure that the third data presented in the second interface is adapted to the size of the control that carries the data, and save the translated third data to the configuration file. When a request to change the language of the first interface is received, directly load the pre-generated configuration file and output the second interface. The second interface includes the third data.

[0112] refer to Figure 9 , an application scenario diagram of the data processing method provided in the embodiment of the present application is applied to data processing in multi-language interface development.

[0113] As an example, a target instruction is generated in response to an input operation by a developer. The input operation may represent a change in the language type of a first interface. In response to the target instruction, first data and second data of the first interface are obtained; the first data includes text data capable of changing the language type, and the second data can represent interface features of the first interface;

[0114] When the language type is changed to perform text translation on the first data of the first interface, the first data in the sub-interface D of the first interface is "Please confirm", and the interface expression style corresponding to the first interface is determined to be a relaxed style based on the second data. The interface expression style and the first data are input into the text translation model, and the third data output by the model is "Please confirm". The text expression style of the third data is consistent with the interface expression style, both of which are relaxed styles, ultimately ensuring that the text expression style of the third data is adapted to the interface expression style of the first interface. The second interface is output to the developer for confirmation, wherein the second interface includes the third data.

[0115] The following continues to describe an exemplary structure of the data processing device 90 provided in the embodiment of the present application implemented as a software module. In some embodiments, such as Figure 10As shown, the data processing device 90 may include: an acquisition module 901, which can be used to obtain first data and second data of a first interface in response to a target instruction; the first data includes text data that can change the language type, and the second data can represent the interface characteristics of the first interface; a processing module 902, which can be used to process the first data based on the second data to obtain third data; an output module 903, which can be used to output a second interface; the third data in the second interface and the first data in the first interface belong to at least a different language type.

[0116] In some embodiments, the processing module 902 can be used for at least one of the following: processing the first data based on the first strategy and the second data to obtain third data, so that the third data corresponding to the first data that meets the target feature condition remains consistent; processing the first data based on the second strategy and the second data to obtain third data, so that the third data presented in the second interface is adapted to the size of the control carrying the data; processing the first data based on the third strategy and the second data to obtain third data, so that the text expression style of the third data is adapted to the interface expression style of the first interface; the interface features of the first interface can reflect the interface expression style.

[0117] In some embodiments, the processing module 902 can be used for at least one of the following: determining a target text library based on the second data, and determining third data corresponding to the first data from the target text library; different interfaces correspond to the same or different text libraries; determining at least one interface group based on the second data so that the third data corresponding to the first data of the same interface group remains consistent; the at least one interface group includes at least one of the first data.

[0118] In some embodiments, the processing module 902 can be used to: obtain intermediate data of the first data, and determine the size of the control based on the second data; if the size of the control does not match the interface size required to be occupied by the intermediate data, adjust the character length, character height of the intermediate data or adjust the size of the control.

[0119] In some embodiments, the data processing device 90 may further include a determination module, which may be used to: determine the second data; the determination of the second data includes at least one of the following: determining the second data based on the source code of the first interface; performing image analysis on the image of the first interface based on the first model to obtain the second data; analyzing the user feature information of the first interface based on the second model to obtain the second data.

[0120] In some embodiments, the data processing device 90 may further include a verification module, which may be used to: based on the first prompt word, use the third model to perform text data processing on the third data to obtain a text data processing result corresponding to the third data; the text data processing result represents the language type conversion problem existing in the third data; based on the second prompt word, use the fourth model to correct the third data based on the text data processing result to obtain a corrected text; based on the third prompt word, use the fifth model to proofread the corrected text to obtain a proofreading result; in response to the proofreading result meeting the set proofreading condition, determine the corrected text as the corrected third data; output a second interface; the second interface includes the corrected third data; the first prompt word, the second prompt word and the third prompt word are used to define the model as different roles.

[0121] In some embodiments, the data processing device 90 may further include a generation module, which may be used to: in response to the proofreading result not meeting the set proofreading conditions, based on the fourth prompt word, use the sixth model based on the second data and the proofreading result to process the first data again to obtain another third data; the another third data is different from the third data; the fourth prompt word makes the role defined by the model different from the roles defined by the first prompt word, the second prompt word, and the third prompt word.

[0122] In some embodiments, the data processing device 90 may further include a computing module, which may be used to: determine a proofreading language set; the proofreading language set includes at least a target language for proofreading provided in the present application; each of the target languages ​​can represent a language family provided in the present application, and the target language is different from the language of the first data; convert the language type of the third data into each target language in the proofreading language set to obtain at least one first proofreading text; convert the language type of the first data into each target language in the proofreading language set to obtain at least one second proofreading text; determine a first relationship and a second relationship between the first proofreading text and the second proofreading text of the same language family; the first relationship represents the semantic similarity between texts; the second relationship represents the grammatical organization similarity between texts; and proofread the third data based on the first relationship and the second relationship.

[0123] In some embodiments, the calculation module can be used to: calculate the edit distance between the first proofreading text and the second proofreading text; determine the structural similarity between the first proofreading text and the second proofreading text based on the edit distance, the character length of the first proofreading text and the character length of the second proofreading text; calculate the ratio of the number of identical words in the first proofreading text and the second proofreading text to the total number of all words to obtain word coverage; determine the second relationship based on the structural similarity and the word coverage.

[0124] It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, so it will not be repeated here. Figures 1 to 9 The present invention shall be understood by reference to the description of any of the accompanying drawings.

[0125] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A data processing method, comprising: In response to the target instruction, obtaining first data and second data of the first interface; The first data includes text data capable of changing the language type, and the second data can represent interface features of the first interface; processing the first data based on the second data to obtain third data; Output the second interface; The third data in the second interface and the first data in the first interface are at least of a different language type.

2. The method according to claim 1, wherein processing the first data based on the second data to obtain the third data comprises at least one of the following: Processing the first data based on the first strategy and the second data to obtain third data, so that the third data corresponding to the first data meeting the target feature condition remains consistent; Processing the first data based on the second strategy and the second data to obtain third data, so that the third data presented in the second interface is adapted to the size of the control carrying the third data; The first data is processed based on a third strategy and the second data to obtain third data, so that the text expression style of the third data is adapted to the interface expression style of the first interface; the interface features of the first interface can reflect the interface expression style.

3. The method according to claim 2, wherein the processing of the first data based on the first strategy and the second data to obtain the third data so that the third data corresponding to the first data meeting the target feature condition remains consistent comprises at least one of the following: Determine a target text library based on the second data, and determine third data corresponding to the first data from the target text library; different interfaces correspond to the same or different text libraries; At least one interface group is determined based on the second data, so that the third data corresponding to the first data of the same interface group remains consistent; the at least one interface group includes at least one of the first data.

4. The method according to claim 2, wherein the step of processing the first data based on the second policy and the second data to obtain third data so that the third data presented in the second interface is adapted to the size of the control carrying the third data comprises: Obtaining intermediate data of the first data, and determining the size of the control according to the second data; If the size of the control does not match the interface size required to be occupied by the intermediate data, the character length and character height of the intermediate data are adjusted or the size of the control is adjusted.

5. The method according to claim 1, further comprising: determining the second data; Determining the second data includes at least one of the following: Determining the second data based on the source code of the first interface; Performing image analysis on the image of the first interface based on the first model to obtain the second data; The user characteristic information of the first interface is analyzed based on the second model to obtain the second data.

6. The method according to claim 1, after processing the first data based on the second data to obtain third data, the method further comprises: Based on the first prompt word, using a third model to perform text data processing on the third data to obtain a text data processing result corresponding to the third data; The text data processing result represents the language type conversion problem existing in the third data; Based on the second prompt word, using a fourth model and a result of processing the text data, the third data is corrected to obtain a corrected text; Based on the third prompt word, using the fifth model to proofread the corrected text to obtain a proofreading result; In response to the proofreading result satisfying a set proofreading condition, determining the revised text as revised third data; outputting a second interface; wherein the second interface includes the corrected third data; The first prompt word, the second prompt word, and the third prompt word are used to define the model as different roles.

7. The method according to claim 6, further comprising: In response to the proofreading result not meeting the set proofreading condition, based on the fourth prompt word, the first data is processed again using a sixth model based on the second data and the proofreading result to obtain another third data; The another third data is different from the third data; the role defined by the fourth prompt word is different from the roles defined by the first prompt word, the second prompt word, and the third prompt word.

8. The method according to claim 1, before outputting the second interface, the method further comprises: Determine the set of proofreading languages; The proofreading language set includes at least one target language for proofreading; Each of the target languages ​​can represent a language family, and the target language is different from the language of the first data; Converting the language type of the third data into each target language in the proofreading language set to obtain at least one first proofreading text; Converting the language type of the first data into each target language in the proofreading language set to obtain at least one second proofreading text; Determining a first relationship and a second relationship between the first proofread text and the second proofread text in the same language; the first relationship represents semantic similarity between the texts; and the second relationship represents grammatical organization similarity between the texts; The third data is collated based on the first relationship and the second relationship.

9. The method according to claim 8, wherein determining the second relationship between the first proofread text and the second proofread text in the same language comprises: Calculating an edit distance between the first proofread text and the second proofread text; determining a structural similarity between the first proofread text and the second proofread text based on the edit distance, the character length of the first proofread text, and the character length of the second proofread text; Calculating the ratio of the number of identical words in the first proofread text and the second proofread text to the total number of all words to obtain a word coverage rate; The second relationship is determined based on the structural similarity and the word coverage.

10. A data processing device, comprising: An acquisition module, configured to obtain first data and second data of a first interface in response to a target instruction; The first data includes text data capable of changing the language type, and the second data can represent interface features of the first interface; a processing module, configured to process the first data based on the second data to obtain third data; An output module, used for outputting a second interface; The third data in the second interface and the first data in the first interface are at least of a different language type.