Terminal language detection method, user equipment, storage medium and device

The method automates language detection by extracting and matching terms from XML files based on coordinate overlap, improving efficiency and accuracy in multi-language testing for terminals.

CN111143001BActive Publication Date: 2025-01-03TCL OVERSEAS ELECTRONIC (HUIZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911354176.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-23
Publication Date
2025-01-03
Estimated Expiration
2039-12-23

AI Technical Summary

Technical Problem

Existing language detection methods for terminals are inefficient and prone to errors due to manual comparison and long confirmation cycles in multi-language testing.

Method used

A method involving acquiring reference and detected pages in different languages, extracting terms from XML files, pairing them based on coordinate matching and overlap ratios, and comparing with a preset language database to output detection results.

Benefits of technology

Enhances the efficiency and accuracy of multilingual detection by automating the comparison process and reducing manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111143001B_ABST
    Figure CN111143001B_ABST
Patent Text Reader

Abstract

The present invention discloses a language detection method, user equipment, storage medium and device for a terminal. In the language detection method of the present invention, a reference page displayed by a reference terminal is obtained, and a page to be detected displayed by a terminal to be detected is obtained, wherein the reference page and the page to be detected are the same page represented by different languages; reference terms are extracted from the reference page, and the terms to be detected are extracted from the page to be detected; the reference terms and the terms to be detected are paired; the paired reference terms and terms to be detected are compared, and the detection result is output according to the comparison. The technical solution of the present invention can capture the relevant information of the corresponding pages of the reference terminal and the terminal to be detected, and realize the language detection of the terminal by analyzing and comparing the relevant information. This solution greatly improves the efficiency of multi-language detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a field, and in particular to a language detection method for a terminal, user equipment, a storage medium and a device. Background Art

[0002] The TV interface language needs to be tested before leaving the factory. As the company's overseas business continues to increase, the coverage of product sales regions is also expanding, and the content of multi-language testing related to the TV interface is increasing. In the existing testing scheme, the comparison of language library is done by customer confirmation or translation company, and the testing is done by manual comparison. This scheme has the problems of long confirmation cycle for language library comparison and easy error in manual comparison, etc., which is inefficient.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a language detection method for a terminal, a user device, a storage medium and a device, aiming to solve the technical problem of low language detection efficiency in the prior art.

[0005] To achieve the above object, the present invention provides a language detection method for a terminal, the language detection method for a terminal comprising the following steps:

[0006] Acquire a reference page displayed by a reference terminal, and acquire a page to be detected displayed by a terminal to be detected, wherein the reference page and the page to be detected are the same page represented in different languages;

[0007] Extract reference terms from the reference page, and extract the terms to be detected from the page to be detected;

[0008] Pairing the reference terms with the terms to be detected;

[0009] The paired reference terms are compared with the terms to be tested, and the test results are output based on the comparison results.

[0010] Preferably, extracting reference terms from reference pages and extracting the terms to be detected from pages to be detected includes:

[0011] Get the XML information in the reference page to generate a reference XML file;

[0012] Obtain the XML information in the page to be detected to generate the XML file to be detected;

[0013] Reference terms are extracted from the reference XML file, and terms to be detected are extracted from the XML file to be detected.

[0014] Preferably, the pairing of the reference term and the term to be detected comprises:

[0015] Extracting a first control including a reference term from the reference XML file, and extracting a second control including a term to be detected from the XML file to be detected;

[0016] Obtain a first coordinate corresponding to a reference term in the first control, and obtain a second coordinate corresponding to a term to be detected in the second control;

[0017] Matching the first coordinate with the second coordinate;

[0018] When the first coordinate and the second coordinate meet a preset matching condition, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are successfully matched.

[0019] Preferably, the step of matching the first coordinate with the second coordinate, and when the first coordinate and the second coordinate meet a preset matching condition, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are successfully matched includes:

[0020] Calculate a first rectangular area of ​​the reference term corresponding to the first coordinates, and calculate a second rectangular area of ​​the term to be detected corresponding to the second coordinates;

[0021] Calculate the overlap ratio of the first rectangular area and the second rectangular area;

[0022] Correspondingly, when the first coordinate and the second coordinate meet a preset matching condition, pairing the reference term corresponding to the first coordinate with the term to be detected corresponding to the second coordinate includes:

[0023] When the overlapping area ratio of the first rectangular area and the second rectangular area reaches a preset threshold, the reference term corresponding to the first coordinate and the to-be-detected term corresponding to the second coordinate are successfully paired.

[0024] Preferably, before extracting the reference terms from the reference page and extracting the terms to be detected from the page to be detected, the language detection method of the terminal further includes:

[0025] A screenshot of the reference page and a screenshot of the page to be detected are obtained respectively, and the screenshots are saved.

[0026] Preferably, comparing the paired reference terms with the terms to be detected and outputting the detection results according to the comparison results includes:

[0027] Query the standard characters corresponding to the reference terms in the preset language database;

[0028] The standard characters are compared with the characters corresponding to the entry to be detected in the comparison list, and the detection result is output according to the comparison situation.

[0029] Preferably, before respectively acquiring the screenshot of the reference page and the screenshot of the page to be detected and saving the screenshots, the language detection method of the terminal further includes:

[0030] Import the confirmed translation table into the translation database;

[0031] Reference term information is extracted from the translation library, and the reference term information is converted into corresponding standard characters to form the preset language database.

[0032] To achieve the above-mentioned purpose, the present invention also proposes a user device, which includes: a memory, a processor, and a language detection program of a terminal stored in the memory and capable of running on the processor, wherein the language detection program of the terminal implements the steps of the language detection method of the terminal as described above when executed by the processor.

[0033] To achieve the above object, the present invention further proposes a storage medium, on which a language detection program of a terminal is stored, and when the language detection program of the terminal is executed by a processor, the steps of the language detection method of the terminal as described above are implemented.

[0034] To achieve the above object, the present invention further proposes a language detection device for a terminal, the language detection device for the terminal comprising:

[0035] An acquisition module, used to acquire a reference page displayed by a reference terminal and to acquire a page to be detected displayed by a terminal to be detected, wherein the reference page and the page to be detected are the same page represented in different languages;

[0036] An extraction module, used to extract reference terms from reference pages, and to extract the terms to be detected from pages to be detected;

[0037] A matching module, used for pairing the reference term with the term to be detected;

[0038] The output module is used to compare the paired reference terms with the terms to be detected and output the detection results according to the comparison results.

[0039] In the technical solution of the present invention, by obtaining the reference page displayed by the reference terminal, and obtaining the page to be detected displayed by the terminal to be detected, wherein the reference page and the page to be detected are the same page represented by different languages; extracting reference terms from the reference page, and extracting the terms to be detected from the page to be detected; pairing the reference terms with the terms to be detected; comparing the paired reference terms to be detected, and outputting the detection results according to the comparison. The technical solution of the present invention can capture the relevant information of the corresponding pages of the reference terminal and the terminal to be detected, and realize the language detection of the terminal by analyzing and comparing the relevant information. This solution greatly improves the efficiency of multilingual detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the structure of a user equipment in a hardware operating environment involved in an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a flow chart of an embodiment of a language detection method for a terminal of the present invention;

[0042] Figure 3 for Figure 2 Detailed flow chart of step S20;

[0043] Figure 4 for Figure 2 A detailed flow chart of step S40;

[0044] Figure 5 for Figure 2 Detailed flow chart of step S30;

[0045] Figure 6 for Figure 5 Detailed flow chart of step S303;

[0046] Figure 7 It is a functional module diagram of an embodiment of a language detection device for a terminal of the present invention.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0049] like Figure 1As shown, the user device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a button, and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0050] Those skilled in the art will understand that Figure 1 The user equipment structure shown in the figure does not constitute a limitation on the user equipment, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0051] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a language detection program of the terminal.

[0052] exist Figure 1 In the user device shown, the network interface 1004 is mainly used to connect to the external network and communicate data with other network devices; the user interface 1003 is mainly used to connect to the user terminal and communicate data with the terminal; the user device of the present invention calls the real estate recommendation program stored in the memory 1005 through the processor 1001, and executes the language detection method of the terminal provided in the embodiment of the present invention.

[0053] The user device may be an electronic device such as a personal computer or a smart phone.

[0054] Based on the above hardware structure, an embodiment of the language detection method of the terminal of the present invention is proposed.

[0055] Reference Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a language detection method for a terminal according to the present invention.

[0056] In a first embodiment, the language detection method of the terminal comprises the following steps:

[0057] Step S10: obtaining a reference page displayed by the reference terminal, and obtaining a page to be detected displayed by the terminal to be detected, wherein the reference page and the page to be detected are the same page represented in different languages;

[0058] It is understandable that the execution subject of this embodiment is a user device. In this embodiment, a television is used as the terminal to be detected. The display language of the reference terminal is set to English as the standard language, and the display language of the terminal to be detected is set to the language to be detected, that is, the target language.

[0059] During the test, the reference terminal and the terminal to be tested need to be set to the same page in their respective languages. It is easy to understand that a TV has many menu pages, such as the commonly used settings page, sound page, etc. During the test, the reference terminal and the terminal to be tested can be set to the same page by the remote control.

[0060] Step S20: extracting reference terms from the reference page, and extracting the terms to be detected from the page to be detected;

[0061] It is understandable that, for the same page represented in different languages, the position of the reference entry and the position of the entry to be detected are substantially the same. The position in this embodiment refers to the display position of the entry in the display screen.

[0062] Reference Figure 3 , step S20 specifically includes the following steps:

[0063] Step S201: obtaining XML information in a reference page to generate a reference XML file;

[0064] It is worth noting that in this embodiment, the XML information of the page is captured by UIAutomator, wherein UIAutomator is a tool for UI automation testing, which is used to test whether the output result of the user interface meets expectations.

[0065] The captured XML information is converted into an XML file through UIAutomator. The XML file is an extensible markup language. Converting the reference page into an XML file facilitates document transmission between different electronic devices, because the XML file carries the location information of the reference entry and the characters corresponding to the reference entry.

[0066] Step S202: obtaining XML information in the page to be detected to generate an XML file to be detected;

[0067] Similarly, the XML file to be detected also contains the location information of the entry to be detected and the corresponding characters.

[0068] Step S203: extract reference terms from the reference XML file, and extract the terms to be detected from the XML file to be detected. The reference font and the terms to be detected can be compared through position information and characters.

[0069] Step S30: Pairing the reference term with the term to be detected;

[0070] Reference terms whose position similarity is greater than a certain value are paired with the terms to be detected. This is because the reference terms representing the same semantics displayed by the reference terminal are roughly located at the same position as the terms to be detected, and the pairing of terms can be achieved through position matching.

[0071] Step S40: Compare the paired reference terms with the terms to be detected, and output the detection results according to the comparison results.

[0072] Reference Figure 4 In this embodiment, the standard characters of the reference term are compared with the characters corresponding to the term to be detected to determine whether the two are the same, thereby determining whether the term to be detected is correct. Step S40 is as follows:

[0073] Step S401: querying the standard characters corresponding to the reference terms in the preset language database;

[0074] The preset language database is a pre-built database that contains standard characters corresponding to all entries in the terminal. When it is necessary to compare with the characters of the entry to be detected, the standard characters corresponding to the reference entry are obtained from the preset language database by query, and then compared with the characters corresponding to the entry to be detected.

[0075] Step S402: Compare the standard characters with the characters corresponding to the to-be-detected entries in the comparison list, and output a detection result according to the comparison results.

[0076] Based on the comparison between the above standard characters and the characters corresponding to the entry to be detected, the following results can be obtained:

[0077] Pass, Fail, NotInLibrary and NotMatch.

[0078] Pass means the translation test has passed;

[0079] Fail indicates that the translation detection failed;

[0080] NotInLibrary means that the entry does not exist in the default language database;

[0081] NotMath means that the term is not matched and needs manual confirmation.

[0082] Reference Figure 5 Specifically, the pairing of the reference term and the term to be detected includes:

[0083] Step S301: extracting a first control including a reference term from the reference XML file, and extracting a second control including a term to be detected from the XML file to be detected;

[0084] A control refers to the encapsulation of data and methods. A control has its own properties and methods. The first control and the second control respectively contain the coordinate positions of the reference entry and the entry to be detected.

[0085] Step S302: obtaining a first coordinate corresponding to a reference term in the first control, and obtaining a second coordinate corresponding to a to-be-detected term in the second control;

[0086] The entry corresponds to a rectangle, and the area of ​​the rectangle is determined by determining the coordinates of the four vertices of the rectangle. The first coordinate obtained contains the coordinates of the four vertices, and similarly, the second coordinate obtained also contains the coordinates of the four vertices.

[0087] Step S303: matching the first coordinate with the second coordinate;

[0088] It can be understood that the matching is performed through the four vertices of the first coordinates and the four vertices of the second coordinates and the preset conditions. If the matching conditions are met, the pairing is successful.

[0089] Step S304: When the first coordinate and the second coordinate meet a preset matching condition, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are successfully matched.

[0090] Reference Figure 6 Specifically, the step of matching the first coordinate with the second coordinate, and when the first coordinate and the second coordinate meet a preset matching condition, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are successfully matched includes:

[0091] Step S303a: calculating a first rectangular area of ​​a reference term corresponding to the first coordinates, and calculating a second rectangular area of ​​a to-be-detected term corresponding to the second coordinates;

[0092] It is understandable that when the reference term or the term to be detected is displayed on the display screen, there is a corresponding preset display area, which is the corresponding first rectangle or second rectangle. The first rectangular area and the second rectangular area are calculated according to the first coordinate and the second coordinate obtained in step S302.

[0093] Step S303b: calculating the overlap area ratio between the first rectangular area and the second rectangular area;

[0094] It should be noted that since the lengths of characters in different languages ​​are generally inconsistent when expressing the same meaning, the overlapping area of ​​the two has a certain range. When the calculated overlapping area of ​​the first rectangular area and the second rectangular area is within this range, it means that the two are paired; if not within this range, it means that the two are not paired.

[0095] Correspondingly, when the first coordinate and the second coordinate meet a preset matching condition, pairing the reference term corresponding to the first coordinate with the term to be detected corresponding to the second coordinate includes:

[0096] Step S303c: When the overlap area ratio of the first rectangular area and the second rectangular area reaches a preset threshold, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are successfully paired.

[0097] In the technical solution of the present invention, by obtaining the reference page displayed by the reference terminal, and obtaining the page to be detected displayed by the terminal to be detected, wherein the reference page and the page to be detected are the same page represented by different languages; extracting reference terms from the reference page, and extracting the terms to be detected from the page to be detected; pairing the reference terms with the terms to be detected; comparing the paired reference terms to be detected, and outputting the detection results according to the comparison. The technical solution of the present invention can capture the relevant information of the corresponding pages of the reference terminal and the terminal to be detected, and realize the language detection of the terminal by analyzing and comparing the relevant information. This solution greatly improves the efficiency of multilingual detection.

[0098] Based on the above Figure 2 The first embodiment shown here is a second embodiment of the language detection method for a terminal of the present invention.

[0099] In the second embodiment, before extracting the reference terms from the reference page and extracting the terms to be detected from the page to be detected, the language detection method of the terminal further includes:

[0100] A screenshot of the reference page and a screenshot of the page to be detected are obtained respectively, and the screenshots are saved.

[0101] The purpose of saving the screenshot here is to facilitate the subsequent multi-language translation Fail items and quickly find the problem interface.

[0102] Furthermore, before respectively obtaining the screenshot of the reference page and the screenshot of the page to be detected and saving the screenshots, the language detection method of the terminal further includes:

[0103] Import the confirmed translation table into the translation database;

[0104] It is worth noting that the translation table is a table confirmed by the translation agency, and the translation table is imported into a local or cloud translation library. The translation table contains reference term information represented in English, and the standard characters corresponding to the reference term information are updated to the language database.

[0105] Reference term information is extracted from the translation library, and the reference term information is converted into corresponding standard characters to form the preset language database.

[0106] It should be noted that the preset language database includes a web-side query interface and a client-side query interface, and the user device can query the preset language database through the web-side query interface and the client-side query interface.

[0107] Reference Figure 7 Based on the above-mentioned language detection method of a terminal, the present invention further proposes a language detection device for a terminal, the language detection device for a terminal comprising:

[0108] The acquisition module 10 is used to acquire a reference page displayed by the reference terminal and acquire a page to be detected displayed by the terminal to be detected, wherein the reference page and the page to be detected are the same page represented in different languages;

[0109] It is understandable that the execution subject of this embodiment is a user device. In this embodiment, a television is used as the terminal to be detected. The display language of the reference terminal is set to English as the standard language, and the display language of the terminal to be detected is set to the language to be detected, that is, the target language.

[0110] During the test, the reference terminal and the terminal to be tested need to be set to the same page in their respective languages. It is easy to understand that a TV has many menu pages, such as the commonly used settings page, sound page, etc. During the test, the reference terminal and the terminal to be tested can be set to the same page by the remote control.

[0111] An extraction module 20, used to extract reference terms from reference pages, and to extract the terms to be detected from pages to be detected;

[0112] It is understandable that, for the same page represented in different languages, the position of the reference entry and the position of the entry to be detected are substantially the same. The position in this embodiment refers to the display position of the entry in the display screen.

[0113] A matching module 30, used for pairing the reference term with the term to be detected;

[0114] The characters corresponding to different languages ​​that represent the same meaning are the same, and the characters are characters that can be recognized by computers. The characters corresponding to the reference terms whose position similarity is greater than a certain value are paired with the characters corresponding to the terms to be detected. This is because the reference terms that represent the same semantics displayed by the reference terminal are roughly at the same position as the terms to be detected, and the pairing of terms can be achieved through position matching.

[0115] The output module 40 is used to compare the paired reference terms with the terms to be detected, and output the detection results according to the comparison results.

[0116] In this embodiment, the standard characters of the reference term are compared with the characters corresponding to the term to be detected to determine whether the two are the same, thereby determining whether the term to be detected is correct.

[0117] Specifically, the extraction module is also used to obtain XML information in the reference page to generate a reference XML file; it is worth noting that in this embodiment, the XML information of the page is captured by UIAutomator, where UIAutomator is a tool for UI automation testing, which is used to test whether the output results of the user interface meet expectations.

[0118] The captured XML information is converted into an XML file through UIAutomator. The XML file is an extensible markup language. Converting the reference page into an XML document facilitates document transmission between different electronic devices, because the XML file carries the location information of the reference entry and the characters corresponding to the reference entry.

[0119] The XML information in the page to be detected is obtained to generate an XML file to be detected; similarly, the XML file to be detected also contains the position information of the entry to be detected and the corresponding characters.

[0120] The reference word is extracted from the reference XML file, and the word to be detected is extracted from the XML file to be detected. The reference font and the word to be detected can be compared through the position information and the characters.

[0121] Specifically, the matching module 30 is also used to extract a first control containing a reference term from the reference XML file, and to extract a second control containing a term to be detected from the XML file to be detected; a control refers to an encapsulation of data and methods, and a control has its own properties and methods. The first control and the second control respectively contain the coordinate positions of the reference term and the term to be detected.

[0122] The first coordinate corresponding to the reference entry in the first control is obtained, and the second coordinate corresponding to the entry to be detected in the second control is obtained; the entry corresponds to a rectangle, and the coordinates of the four vertices of the rectangle determine the area of ​​the rectangle. The first coordinate obtained contains the coordinates of the four vertices, and similarly, the second coordinate obtained also contains the coordinates of the four vertices.

[0123] The first coordinate is matched with the second coordinate; it can be understood that the matching is performed through the four vertices of the first coordinate and the four vertices of the second coordinate and the preset conditions. If the matching conditions are met, the pairing is successful.

[0124] When the first coordinate and the second coordinate meet a preset matching condition, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are paired.

[0125] Specifically, the matching module 30 is further used to: calculate the first rectangular area of ​​the corresponding reference term according to the first coordinates, and calculate the second rectangular area of ​​the corresponding to-be-detected term according to the second coordinates; it can be understood that when the reference term or the to-be-detected term is displayed on the display screen, there is a corresponding preset display area, and these display areas are the corresponding first rectangle or second rectangle. The first rectangular area and the second rectangular area are calculated according to the first coordinates and the second coordinates obtained above.

[0126] Calculate the ratio of the overlapping areas of the first rectangular area and the second rectangular area. It should be noted that since the lengths of characters in different languages ​​are generally inconsistent when representing the same meaning, the overlapping areas of the two have a certain range. When the calculated overlapping areas of the first rectangular area and the second rectangular area are within this range, it means that the two are paired; if not within this range, it means that the two are not paired.

[0127] Correspondingly, when the first coordinate and the second coordinate meet a preset matching condition, pairing the reference term corresponding to the first coordinate with the term to be detected corresponding to the second coordinate includes:

[0128] When the overlap area ratio of the first rectangular area and the second rectangular area reaches a preset threshold, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are paired.

[0129] Furthermore, the extraction module 20 is also used to obtain screenshots of the same display page of the reference terminal and the terminal to be detected, and save the screenshots. The purpose of saving the screenshots here is to facilitate the subsequent occurrence of multilingual translation Fail items and quickly find the problem interface.

[0130] Furthermore, the output module 40 is also used to query the standard characters corresponding to the reference entry in the preset language database;

[0131] The standard characters are compared with the characters corresponding to the entry to be detected, and a detection result is output according to the comparison results.

[0132] Furthermore, the extraction module 20 is also used to import the confirmed translation table into the translation library; it is worth noting that the translation table is a table confirmed by the translation agency, and the translation table is imported into the local translation library. The translation table contains reference term information represented in English, and the reference term information is updated to the language database.

[0133] Reference term information is extracted from the translation library, and the reference term information is converted into corresponding standard characters to form the preset language database.

[0134] It should be noted that the preset language database includes a web-side query interface and a client-side query interface, and the user device can query the preset language database through the web-side query interface and the client-side query interface.

[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0136] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments. The use of the words first, second, and third, etc. does not indicate any order, and these words can be interpreted as names.

[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0138] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A language detection method for a terminal, characterized in that: The language detection method of the terminal comprises the following steps: Acquire a reference page displayed by a reference terminal, and acquire a page to be detected displayed by a terminal to be detected, wherein the reference page and the page to be detected are the same page represented in different languages; Extract reference terms from the reference page, and extract terms to be detected from the page to be detected; Pairing the reference terms with the terms to be detected; The paired reference terms are compared with the terms to be tested, and the test results are output based on the comparison results.

2. The language detection method of a terminal according to claim 1, characterized in that: The step of extracting reference terms from the reference page and extracting terms to be detected from the page to be detected includes: Get the XML information in the reference page to generate a reference XML file; Obtain the XML information in the page to be detected to generate the XML file to be detected; Reference terms are extracted from the reference XML file, and terms to be detected are extracted from the XML file to be detected.

3. The language detection method of a terminal according to claim 2, characterized in that: The pairing of the reference term and the term to be detected includes: Extracting a first control including a reference term from the reference XML file, and extracting a second control including a term to be detected from the XML file to be detected; Obtain a first coordinate corresponding to a reference term in the first control, and obtain a second coordinate corresponding to a term to be detected in the second control; The first coordinate is matched with the second coordinate; when the first coordinate and the second coordinate meet a preset matching condition, the reference term corresponding to the first coordinate and the term to be detected corresponding to the second coordinate are successfully paired.

4. The language detection method of a terminal as claimed in claim 3, characterized in that: The step of matching the first coordinate with the second coordinate; when the first coordinate and the second coordinate meet a preset matching condition, the reference entry corresponding to the first coordinate and the entry to be detected corresponding to the second coordinate are successfully matched includes: Calculate a first rectangular area of ​​the reference term corresponding to the first coordinates, and calculate a second rectangular area of ​​the term to be detected corresponding to the second coordinates; Calculate the overlap ratio of the first rectangular area and the second rectangular area; When the overlapping area ratio of the first rectangular area and the second rectangular area reaches a preset threshold, the reference term corresponding to the first coordinate and the to-be-detected term corresponding to the second coordinate are successfully paired.

5. The language detection method of a terminal according to claim 1, characterized in that: Before extracting reference terms from the reference page and extracting terms to be detected from the page to be detected, the language detection method of the terminal further includes: A screenshot of the reference page and a screenshot of the page to be detected are obtained respectively, and the screenshots are saved.

6. The language detection method of a terminal according to claim 5, characterized in that: The step of comparing the paired reference terms with the terms to be detected and outputting the detection results according to the comparison results includes: Query the standard characters corresponding to the reference terms in the preset language database; The standard characters are compared with the characters corresponding to the entry to be detected, and the detection result is output according to the comparison situation.

7. The language detection method of a terminal according to claim 6, characterized in that: Before respectively acquiring the screenshot of the reference page and the screenshot of the page to be detected and saving the screenshots, the language detection method of the terminal further includes: Import the confirmed translation table into the translation database; Reference term information is extracted from the translation library, and the reference term information is converted into corresponding standard characters to form the preset language database.

8. A user equipment, characterized in that: The user equipment comprises: a memory, a processor, and a language detection program of the terminal stored in the memory and capable of running on the processor, wherein the language detection program of the terminal, when executed by the processor, implements the steps of the language detection method of the terminal as described in any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium stores a language detection program of the terminal, and when the language detection program of the terminal is executed by the processor, the steps of the language detection method of the terminal according to any one of claims 1 to 7 are implemented.

10. A language detection device for a terminal, characterized in that: The language detection device of the terminal comprises: An acquisition module, used to acquire a reference page displayed by a reference terminal and to acquire a page to be detected displayed by a terminal to be detected, wherein the reference page and the page to be detected are the same page represented in different languages; An extraction module, used to extract reference terms from reference pages and to extract terms to be detected from pages to be detected; A matching module, used for pairing the reference term with the term to be detected; The output module is used to compare the paired reference terms with the terms to be detected and output the detection results according to the comparison results.