CN113220382A - Anomaly detection method and device for application language package - Google Patents

Anomaly detection method and device for application language package Download PDF

Info

Publication number
CN113220382A
CN113220382A CN202010072207.5A CN202010072207A CN113220382A CN 113220382 A CN113220382 A CN 113220382A CN 202010072207 A CN202010072207 A CN 202010072207A CN 113220382 A CN113220382 A CN 113220382A
Authority
CN
China
Prior art keywords
text
language
application
package
identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010072207.5A
Other languages
Chinese (zh)
Other versions
CN113220382B (en
Inventor
陈星�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Ezviz Software Co Ltd
Original Assignee
Hangzhou Ezviz Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Ezviz Software Co Ltd filed Critical Hangzhou Ezviz Software Co Ltd
Priority to CN202010072207.5A priority Critical patent/CN113220382B/en
Publication of CN113220382A publication Critical patent/CN113220382A/en
Application granted granted Critical
Publication of CN113220382B publication Critical patent/CN113220382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses an application language package abnormity detection method and device. The method comprises the following steps: acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed; determining a language packet preset for the application as a missing abnormal language packet when detecting that a text corresponding to the text identifier is not obtained; and generating text missing abnormal data for the application according to the text identification and the text missing language packet.

Description

Anomaly detection method and device for application language package
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for detecting an anomaly of an application language package.
Background
To meet different requirements, a plurality of application software (application for short) is developed, and to meet the international requirements, a support of a plurality of languages is usually provided, for example, language packages of a plurality of languages such as chinese, english, japanese, and the like may be preset for a certain application.
In general, multilingual translation can be performed based on one language, so that different language packages can be generated according to different languages, and thus different language packages can be loaded in an application so as to meet different language requirements.
However, before the application is released, the language package needs to be detected, and different language packages may be loaded manually, respectively, to check whether the text in the application interface is abnormal or not. Obviously, the manual method not only seriously affects the detection efficiency when loading different language packages respectively, but also may cause a large error in the detection result due to different detection levels. Therefore, a solution is needed to efficiently detect the abnormality of the language packet.
Disclosure of Invention
The embodiment of the application provides an anomaly detection method for an application language package, which can be used for efficiently carrying out anomaly detection on the application language package.
The embodiment of the application provides an anomaly detection device for an application language package, which can effectively detect anomalies of the application language package.
In order to solve the above technical problem, the embodiment of the present application is implemented as follows:
the embodiment of the application adopts the following technical scheme:
an anomaly detection method for an application language package, comprising:
acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
determining the language pack as a missing abnormal language pack when detecting that the text corresponding to the text identifier is not obtained aiming at the language pack preset for the application;
and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
An abnormality detection apparatus using a language pack includes an acquisition unit, a detection unit, and a generation unit, wherein,
the acquiring unit is used for acquiring a text identifier in an application, and the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
the detection unit is used for determining the language package as a missing abnormal language package when detecting that the text corresponding to the text identifier is not obtained aiming at the language package preset for the application;
and the generating unit is used for generating text missing abnormal data for the application according to the text identification and the text missing language package.
According to the technical scheme provided by the embodiment, after the text identifier used for loading the corresponding text in the language package in the application is obtained, whether the text corresponding to the text identifier can be obtained or not can be detected for the language package preset for the application, if not, the language package is determined as the missing abnormal language package, and the text missing abnormal data can be generated for the application according to the text identifier and the text missing language package.
That is, for a text in an application, corresponding texts in preset different language packages can be acquired, and if the texts cannot be acquired, it is indicated that the language packages are missing abnormally, so that missing abnormal data can be generated. Due to the fact that the missing detection can be carried out in a mode of whether the texts corresponding to the different language packages can be obtained or not based on the text identification, the application language packages can be detected in an abnormal mode more efficiently.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present application, the drawings needed for describing the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without paying creative labor.
Fig. 1 is a schematic flowchart of an anomaly detection method for an application language package according to an embodiment of the present application;
fig. 2 is a schematic diagram of an anomaly detection method for an application language package according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an anomaly detection method for an application language package according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an anomaly detection method for an application language package according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an anomaly detection apparatus for application language packages according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following embodiments and accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Example 1
The present embodiment provides an anomaly detection method for an application language package, which can relatively efficiently detect anomalies in the application language package. It is assumed that the execution body may be a terminal. The specific flow diagram of the method is shown in fig. 1, and comprises the following steps:
step 102: and acquiring a text identifier in the application.
Different application interfaces can be developed in advance for a certain application, for example, a login interface, a business interface, a profile interface and the like can be included in the application so as to guide the use of a user. Various texts are usually displayed in the application interface, for example, texts such as a user name and a password can be displayed in the login interface, and texts such as a nickname of the user can be displayed in different application interfaces, and the like.
In order to display an appropriate text at an appropriate position in the application interface, different text identifiers may be preset at different positions in the application interface, so that the corresponding text may be loaded from the language pack according to the text identifiers, that is, the text identifiers may be used to load the corresponding text in the language pack when the application interface is displayed.
For example, in a certain interface of an application, there may be different text identifiers represented by different characters such as "back" and "home", and these text identifiers may establish a corresponding relationship with some texts in a language package, for example, in a simplified chinese language package, there may be key value pairs such as "back-return" and "home-home". For another example, in the english language package (american style), there may be key-value pairs such as "Back-Back" and "home-phone". In the display process of the application interface, the corresponding text in the language package can be dynamically loaded according to the text identification. The Language Pack (Language Pack) may be a package of texts in different languages, so as to generate a data packet in different languages, so that the application may display the texts in different languages in the application interface in a dynamic loading manner.
As shown in fig. 2, which is a schematic diagram of an abnormality detection method for an application language package, as shown in the upper left of fig. 2, which is a schematic diagram of an application interface, the diagram may include texts "welcome", "username", "password", "login", and "retrieve", and the texts "0001", "0002", "0003", "0004", and "0005" are respectively corresponding to the text identifications. Therefore, in this step, the text identifier in the application can be obtained.
In practical application, a tester may start an application and detect a currently displayed application interface, as shown in fig. 2, when a user starts the application and displays the application interface, the step may be performed, so that the text identifier in the currently displayed application interface of the application may be obtained. For example, the text identifiers "0001", "0002", "0003", "0004", and "0005" may be obtained. It can be understood that, after the tester switches to other application interfaces, the text identifier in the application interface can be obtained again.
Step 104: and aiming at the language packet preset for the application, when detecting that the text corresponding to the text identifier is not obtained, determining the language packet as a missing abnormal language packet.
In practical applications, multiple language packages may be preset for the application, for example, as shown in fig. 2, a chinese language package, an english language package, a japanese language package, and the like may be set for the application. In order to detect whether there is translation missing in the language package, the step may acquire a plurality of texts corresponding to the text identifiers from the plurality of language packages according to the text identifiers acquired in the step.
It can be understood that if there is no text corresponding to the text identifier in a certain language package, it may indicate that a problem occurs in the language package, and if there is a text corresponding to the text identifier, the text may be obtained. Therefore, the step may detect whether the text corresponding to the text identifier can be obtained from the language package, and if not, it may indicate that the text corresponding to the text identifier may be untranslated or not integrated into the language package, that is, there is a text missing situation, and at this time, the language package may be determined as a missing abnormal language package.
For example, as shown in fig. 2, the text corresponding to the text identifier may be obtained from all language packages preset for the application according to the text identifiers "0001", "0002", "0003", "0004", and "0005", and if the text identifier is not obtained from a certain language package or certain language packages, it indicates that the text is missing in the language package or language packages, and accordingly, it may be determined that an abnormal language package is missing. Specifically, for example, as in the german language package in fig. 2, since the text corresponding to the text identifier "0004" is not obtained, the german language package may be determined as the missing abnormal language package at this time.
Step 106: and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
In the foregoing step, the missing-text language package has been determined, and in order to output the detection result, the step may generate missing-text abnormal data for the application based on the text identifier and the determined missing-text language package.
For example, the language name corresponding to the text missing language package may be identified in the text, and a statistical table is generated, specifically, as shown in table 1 below, for the generated text missing abnormal data:
text identification Deletion abnormalities
0004 German language
0233 Finland
0450 Sweden
TABLE 1
As can be seen from the above table, for the text identifier "0004", a text missing situation occurs in the german language package, that is, in the german language package, the corresponding text cannot be acquired according to the text identifier "0004", as in the example shown in fig. 2. For the text label "0233", the text missing situation appears in the finnish language package.
As can be seen from the method provided in the above embodiment, after the text identifier for loading the text corresponding to the language pack in the application is obtained, it may be detected whether the text corresponding to the text identifier can be obtained for the language pack preset for the application, if not, the language pack is determined as a missing abnormal language pack, and text missing abnormal data may be generated for the application according to the text identifier and the text missing language pack.
That is, for a text in an application, corresponding texts in preset different language packages can be acquired, and if the texts cannot be acquired, it is indicated that the language packages are missing abnormally, so that missing abnormal data can be generated. Due to the fact that the missing detection can be carried out in a mode of whether the texts corresponding to the different language packages can be obtained or not based on the text identification, the application language packages can be detected in an abnormal mode more efficiently.
According to this embodiment, if the tester carries out manual detection, also only need load a language package to through switching different application interfaces in using, alright with other language packages in the simultaneous detection application, compare in carrying out many times detection by the different language packages of manual loading, greatly promoted the unusual detection efficiency of language package.
Example 2
In the actual translation and generation of the language pack, it is possible to appear in a language pack and integrate into text that does not match the language of the language pack. For example, text in english is integrated in a japanese language pack, or text in german is integrated in an english language pack, and the like.
Therefore, in this embodiment, on the basis of the foregoing embodiment 1, another anomaly detection method for an application language package is provided, which can perform anomaly detection on the application language package more efficiently. It is assumed that the execution body may also be a terminal. The specific flow diagram of the method is shown in fig. 3, and includes:
step 202: and when detecting that the text corresponding to the text identification is obtained, performing language identification on the text to obtain a language identification result.
Step 204: and when the language type of the preset language package is detected to be different from the language type recognition result, determining the preset language package as a translation abnormal language package.
As described in embodiment 1, if the text corresponding to the text identifier is not obtained, the language packet may be determined as the missing abnormal language packet, and it can be understood that if the text corresponding to the text identifier can be obtained, it indicates that the text corresponding to the text identifier exists in the language packet, and at this time, it may be detected whether the text is the same as the language of the language packet to which the text identifier belongs.
Specifically, language identification may be performed on the obtained text, so as to obtain a language identification result. For example, a language-detection tool language-detection may be used, and the tool may perform language detection on an input text, so as to output a language corresponding to the text. Specifically, as shown in fig. 2, when the text corresponding to the text identifier is obtained, language identification may be performed on the text "logic", "サインイン", "initial search" and "Lolo n", so as to obtain respective language identification results.
After the language identification result of the acquired text is determined, the language identification result may be compared with the language of the corresponding language package, for example, as for the text "login" in fig. 2, the language identification result may be "english", and at this time, it may be detected whether the language of the preset language package is the same as the language identification result. The language pack preset here may be a text for performing language recognition, or a language pack to which the text belongs.
As shown in fig. 2, for the text "initial sei Lou n", the language identification result is spanish, and the text is obtained from the french language package, so the french language package can be determined as the translation exception language package.
In practical applications, even the same language may be divided into different language packages due to different regions, different habits, and other factors. For example, for chinese, it can be adapted to simplified chinese, traditional chinese (hong kong china) and traditional chinese (taiwan china) for different countries or regions, and for english, it can also include american, english, australian, etc. However, the same text may possibly appear in different language packages of the same language, for example, for the text "done", the simplified chinese language is the same as the traditional chinese language, and for the text "home", the american and english languages may also be the same.
This may cause one random recognition to be performed during the language recognition, which may cause the recognition result not to correspond to the language of the language pack, thereby causing erroneous judgment. For example, after the "finished" text is obtained from the language package of traditional chinese (taiwan in china), the language is identified as simplified chinese for various reasons during language identification, and at this time, the language package may be erroneously determined as an abnormal translation language package.
Therefore, when detecting whether the application language package is abnormal, in order to reduce the probability of misjudgment and make the detection result more accurate, in an embodiment, performing language identification on the text to obtain a language identification result may include: and performing language identification on the text to obtain a plurality of candidate language identification results. When the language type of the preset language package is detected to be different from the language type recognition result, determining the preset language package as the translation abnormal language package, which may include: and when the language type of the preset language package is detected to be different from the recognition results of the candidate languages, determining the preset language package as a translation abnormal language package.
Specifically, since different language packs may have the same text, when performing language identification on the text, multiple language candidate identification results can be obtained, for example, for "completion" of the text, when performing language identification, three language candidate identification results, i.e., simplified chinese, traditional chinese (hong china), and traditional chinese (taiwan china), can be determined. Therefore, the language of the language packet to which the text belongs can be matched with the candidate language identification results, and if the language is different from the candidate language identification results, the translation or the generation of the language packet is probably wrong. If one is the same, it indicates that the translated text has a high probability of being correct in language.
In practical applications, some texts may be fixed characters in a specific field, such as fixed english abbreviations, or characters containing specific meanings, and the like, and for example, a specific physical examination mode is usually indicated by CT (Computed Tomography) in medicine. In an application interface, the english abbreviation usually does not need to be translated, and for example, for International Organization for Standardization (ISO), the translation is not usually needed.
Therefore, characters such as CT and ISO may appear in the non-english language package, for example, in the simplified chinese language package, a mark of the management system standard such as ISO20000 may appear, and if this character is recognized as english in the language recognition, there is a possibility that the character does not match the language of the language package, which is the subject of the character, and the translation abnormality may be erroneously determined.
Therefore, when detecting whether the application language packet is abnormal or not, the detection result is more accurate in order to reduce the probability of misjudgment. In one embodiment, performing language recognition on the text to obtain a language recognition result may include: and filtering the text according to a preset filtering condition, and performing language identification on the filtered text to obtain a language identification result.
Specifically, a filtering condition may be established in advance, for example, specific characters such as "ISO", "CT", and the like in the above example may be included, and when the text subjected to language identification includes the specific characters in the filtering condition, the specific characters may be filtered, so as to perform language identification on the filtered text.
For example, for the text "CT inspection" in the simplified chinese language package, since "CT" is a specific character in the filtering condition, it can be filtered, so as to recognize the language of the text "inspection", and further obtain at least the language of the simplified chinese language. So as to detect whether the language is the same as the language of the language packet.
Step 206: and generating text translation abnormal data for the application according to the text identification and the determined translation abnormal language packet.
In the foregoing step, the translation exception language package has been determined, and in this step, text translation exception data may also be generated based on the text identifier and the determined translation exception language package, similarly to the description in embodiment 1.
For example, the language name corresponding to the language packet with the text identifier may be used to generate a statistical table, and a specific example is shown in table 2 below, which is the generated text translation exception data:
Figure BDA0002377593190000091
TABLE 2
As can be seen from the above table, for the text identification "0004", spanish text appears in the french language package, as in the example shown in fig. 2. In contrast, for the text label "0240", a korean text appears in the japanese language packet, and therefore, both the language packets have a problem of abnormal translation.
As can be seen from the method provided in the above embodiment, after the text corresponding to the text identifier is obtained from the preset language package, the language identification may be performed on the text, so as to detect whether the language of the preset language package is consistent with the language identification result, and if not, the language package may be determined as an abnormal translation language package, and abnormal text translation data may be generated.
That is, for the text in the application, after the text in the language package is acquired, the language of the text and the language of the language package may be matched, and if the language of the text and the language of the language package are not matched, it indicates that the translation exception exists. Accordingly, the application language package can be more efficiently detected for abnormality.
Example 3
In the actual translation process, there may be a situation where the size of the text differs greatly between different languages, for example, for the chinese text "login", the text may be translated as english text "login", japanese "サインイン", and russian "b o й" either "c", e.g., fe ", e.g., c у", etc. It can be seen that text in different languages may have different text sizes. However, in practical applications, a relatively fixed display area is usually preset for the text, so that it may happen that the size of the text is larger than the size of the display area, i.e. the text cannot be completely displayed in the display area.
Therefore, in this embodiment, in addition to the foregoing embodiment 1, another abnormality detection method for an application language package may be provided, and abnormality detection may be performed on the application language package more efficiently. It is assumed that the execution body may also be a terminal. The specific flow diagram of the method is shown in fig. 4, and includes:
step 302: when the text corresponding to the acquired text identification is detected, determining the size of a display area corresponding to the text identification, and determining the size of the text when the text is displayed in the display area.
The display area may refer to an area for displaying text, for example, as shown in fig. 2, displaying texts such as "welcome", "user name", "password" and the like may correspond to different display areas respectively. In the development process of the application interface, different area numbers or called area identifications can be preset for different display areas respectively, so that the corresponding text identifications can be corresponded, and further the corresponding text in the language package can be corresponded, so that the corresponding text can be accurately loaded. Here, the display area may be a text area for displaying text, a control area for displaying text, or the like. For example, the "welcome" text in fig. 2 may correspond to a text field, and the "login" text may correspond to a control field.
As already described, when developing an application interface, a corresponding display range is typically created for the display area so that text can be displayed within the range. For example, each text in fig. 2 corresponds to a fixed display range. Therefore, in this step, in order to detect whether the corresponding text can be displayed in the display range corresponding to the display area, when it is detected that the text corresponding to the text identifier is obtained, the size of the display area corresponding to the text identifier and the size of the text when the text is displayed in the display area can be determined respectively.
Specifically, a plurality of coordinates may be set in advance when setting the display area. For example, the text label "0002" in fig. 2 may include at least the upper left corner coordinate and the lower right corner coordinate, so that the size of the display area can be determined.
When the display area is set, the font size, the word pitch, the number of rows and columns, and the like used when the text is displayed may also be set in advance, for example, each text identifier in fig. 2 may be set to be displayed in a single row and a corresponding font size may be set because the number of words is small. In performing this step, the text can be displayed in the display area in a simulated manner, so that the text size can be determined. For example, a font of X, a font size of Y, a pitch of P, and a single line display, the size required for fully displaying the text can be determined by simulating the display in the display area.
In practice, most texts are displayed from left to right, so in one implementation, multiple lines of texts can be displayed in the display area, and then when the size of the display area is determined, the maximum width of the texts that can be displayed can be determined as the size of the texts by combining the lines. That is, the size of the display area in this step may refer to the maximum width of the display area for displaying the text, and the size of the text may be the width required for completely displaying the text. For example, for a display area displaying a single line of text, the width of the display area may be the maximum width of the displayed text, while for a display area displaying multiple lines of text, the width of the display area may be the maximum width of the displayed text. When the size of the text is determined, if a plurality of lines are present in the display area during the simulation, the total width of the plurality of lines of text may be used as the size of the text.
Step 304: and when the size of the display area is smaller than the text size, determining the preset language packet as a language packet with abnormal size.
After the size of the display area and the size of the text are determined, whether the size of the display area is smaller than the size of the text can be detected, and understandably, if the size of the display area is smaller than the size of the text, the situation that the text cannot be completely displayed in the area can be obviously indicated to a certain extent, that is, the text is too large in size, so that the language package can be determined as the language package with abnormal size.
For example, as shown in fig. 2, for the text "login" in the english language package, the corresponding display area is larger than the text size when displayed in the display area, which indicates that the text can be completely displayed in the corresponding display area. For the text "b й ei" c i у "in the russian language package, the size of the corresponding display area is smaller than that of the text displayed in the display area, which may indicate that the text cannot be completely displayed in the corresponding display area, so that the language package may be determined as a language package with abnormal size.
Step 306: and generating text size abnormal data for the application according to the text identification and the determined size abnormal language packet.
In the foregoing step, the language pack with the abnormal size has been determined, and in this step, text size abnormal data may also be generated based on the text identifier and the determined language pack with the abnormal size, similarly to the description in embodiments 1 and 2.
For example, the language name corresponding to the text identifier and the language package with abnormal size, the size of the display area, and the size of the text may be identified, and a statistical table is generated, specifically, as shown in table 3 below, for the generated text translation abnormal data:
Figure BDA0002377593190000121
TABLE 3
As can be seen from the above table, for the text identifier "0004", the simulation is displayed in the display area in the russian language package, and the unit width of the actual display area is only 600, as shown in fig. 2. For the text label "0300", the text in the vietnamese language package is simulated to be displayed in the display area, and the width of 850 units is needed, while the unit width of the actual display area is only 500.
As can be seen from the method provided in the above embodiment, after the text corresponding to the text identifier is obtained from the preset language package, the size of the display area corresponding to the text identifier and the size of the text when the text is displayed in the display area can be determined, so that whether the size of the display area is smaller than the size of the text can be detected, and if so, the language package can be determined as a language package with an abnormal size, and text size abnormal data can be generated.
That is, for a text in an application, after the text in the language pack is acquired, whether the text can be completely displayed in the display area is checked according to the size of the display area corresponding to the text and the size occupied by the text when the text is displayed in the display area, and if the text cannot be completely displayed, it is indicated that the size is abnormal. Therefore, the anomaly detection can be carried out on the application language package more efficiently.
Example 4
Based on the same concept, embodiment 4 of the present application provides an abnormality detection apparatus for an application language package, which can detect the current display state of a signal lamp more accurately. The schematic structural diagram of the device is shown in fig. 5, and the device comprises: an acquisition unit 402, a detection unit 404, and a generation unit 406, wherein,
an obtaining unit 402, configured to obtain a text identifier in an application, where the text identifier is used to load a corresponding text in a language package when an application interface is displayed;
the detecting unit 404 may be configured to determine, for a language package preset for application, when it is detected that a text corresponding to the text identifier is not obtained, the language package as a missing abnormal language package;
the generating unit 406 may be configured to generate text missing exception data for the application according to the text identifier and the text missing language package.
In an embodiment, the detecting unit 404 may further be configured to:
when detecting that the text corresponding to the text identification is obtained, performing language identification on the text to obtain a language identification result;
when the language type of the preset language package is detected to be different from the language type recognition result, determining the preset language package as a translation abnormal language package; then
The generating unit 406 may further be configured to:
and generating text translation abnormal data for the application according to the text identification and the translation abnormal language packet.
In an embodiment, the detecting unit 404 may be configured to:
performing language identification on the text to obtain a plurality of candidate language identification results;
and when the language type of the preset language package is detected to be different from the recognition results of the candidate languages, determining the preset language package as a translation abnormal language package.
In an embodiment, the detecting unit 404 may be configured to:
and filtering the text according to a preset filtering condition, and performing language identification on the filtered text to obtain a language identification result.
In an embodiment, the detecting unit 404 may further be configured to:
when detecting that the text corresponding to the text identification is obtained, determining the size of a display area corresponding to the text identification, and determining the size of the text when the text is displayed in the display area;
when the size of the display area is smaller than the size of the text, determining a preset language package as a language package with abnormal size; then
The generating unit 406 may further be configured to:
and generating text size abnormal data for the application according to the text identification and the size abnormal language packet.
In an embodiment, the detecting unit 404 may further be configured to:
when detecting that the text corresponding to the text identification is obtained, determining the size of a display area corresponding to the text identification, and determining the size of the text when the text is displayed in the display area;
when the size of the display area is smaller than the size of the text, determining a preset language package as a language package with abnormal size; then
The generating unit 406 may further be configured to:
and generating text size abnormal data for the application according to the text identification and the size abnormal language packet.
As can be seen from the method provided in the above embodiment, after the text identifier for loading the text corresponding to the language pack in the application is obtained, it may be detected whether the text corresponding to the text identifier can be obtained for the language pack preset for the application, if not, the language pack is determined as a missing abnormal language pack, and text missing abnormal data may be generated for the application according to the text identifier and the text missing language pack.
That is, for the text in the application, the corresponding text in the preset different language packages may be acquired, and if the text cannot be acquired, it is described that the language packages have missing abnormality, so that missing abnormal data may be generated. Due to the fact that the missing detection can be carried out in a mode of acquiring texts corresponding to different language packages or not based on the text identification, the application language packages can be detected in an abnormal mode more efficiently.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. On the hardware level, the electronic device comprises a processor and optionally an internal bus, a network interface and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may also include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 6, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the abnormality detection device of the application language package on the logic level. The processor executes the program stored in the memory and is specifically used for executing the following operations:
acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
determining the language pack as a missing abnormal language pack when detecting that the text corresponding to the text identifier is not obtained aiming at the language pack preset for the application;
and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
The method executed by the anomaly detection device for the application language package according to the embodiment shown in fig. 5 of the present application can be applied to a processor or implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eeprom, registers, etc. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further perform the functions of the anomaly detection apparatus for an application language package provided in the embodiment shown in fig. 5 in the embodiment shown in fig. 6, which are not described herein again in this embodiment of the present application.
An embodiment of the present application further provides a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which, when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method performed by the abnormality detection apparatus of the application language package in the embodiment shown in fig. 5, and are specifically configured to perform:
acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
determining the language pack as a missing abnormal language pack when detecting that the text corresponding to the text identifier is not obtained aiming at the language pack preset for the application;
and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information which can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An anomaly detection method for an application language package, comprising:
acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
determining a language packet preset for the application as a missing abnormal language packet when detecting that a text corresponding to the text identifier is not obtained;
and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
2. The method of claim 1, wherein the method further comprises:
when detecting that the text corresponding to the text identification is obtained, performing language identification on the text to obtain a language identification result;
when the language type of the preset language package is detected to be different from the language type recognition result, determining the preset language package as a translation abnormal language package;
and generating text translation abnormal data for the application according to the text identification and the translation abnormal language packet.
3. The method of claim 2, wherein performing language identification on the text to obtain a language identification result comprises:
performing language identification on the text to obtain a plurality of candidate language identification results; then
When the language type of the preset language package is detected to be different from the language type recognition result, determining the preset language package as a translation abnormal language package, including:
and when the language of the preset language package is detected to be different from the recognition results of the candidate languages, determining the preset language package as a translation abnormal language package.
4. The method of claim 2, wherein performing language identification on the text to obtain a language identification result comprises:
and filtering the text according to a preset filtering condition, and performing language identification on the filtered text to obtain a language identification result.
5. The method of claim 1, wherein the method further comprises:
when the text corresponding to the text identification is detected and obtained, determining the size of a display area corresponding to the text identification, and determining the size of the text when the text is displayed in the display area;
when the size of the display area is smaller than the size of the text, determining the preset language package as a language package with abnormal size;
and generating text size abnormal data for the application according to the text identification and the size abnormal language packet.
6. An abnormality detection device using a language pack, comprising an acquisition unit, a detection unit, and a generation unit, wherein,
the acquiring unit is used for acquiring a text identifier in an application, and the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
the detection unit is used for determining the language package as a missing abnormal language package when detecting that the text corresponding to the text identifier is not obtained for the language package preset for the application;
and the generating unit is used for generating text missing abnormal data for the application according to the text identification and the text missing language package.
7. The apparatus of claim 6, wherein the detection unit is further configured to:
when detecting that the text corresponding to the text identification is obtained, performing language identification on the text to obtain a language identification result;
when the language type of the preset language package is detected to be different from the language type recognition result, determining the preset language package as a translation abnormal language package;
the generation unit is further configured to:
and generating text translation abnormal data for the application according to the text identification and the translation abnormal language packet.
8. The apparatus of claim 7, wherein the detection unit is further configured to:
when the text corresponding to the text identification is detected and obtained, determining the size of a display area corresponding to the text identification, and determining the size of the text when the text is displayed in the display area;
when the size of the display area is smaller than the size of the text, determining the preset language package as a language package with abnormal size;
the generation unit is further configured to:
and generating text size abnormal data for the application according to the text identification and the size abnormal language packet.
9. An electronic device, comprising:
a processor; and
a memory arranged to store computer-executable instructions that, when executed, cause the processor to:
acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
determining a language packet preset for the application as a missing abnormal language packet when detecting that a text corresponding to the text identifier is not obtained;
and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
10. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
acquiring a text identifier in an application, wherein the text identifier is used for loading a corresponding text in a language package when an application interface is displayed;
determining a language packet preset for the application as a missing abnormal language packet when detecting that a text corresponding to the text identifier is not obtained;
and generating text missing abnormal data for the application according to the text identification and the text missing language packet.
CN202010072207.5A 2020-01-21 2020-01-21 Abnormality detection method and device for application language package Active CN113220382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010072207.5A CN113220382B (en) 2020-01-21 2020-01-21 Abnormality detection method and device for application language package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010072207.5A CN113220382B (en) 2020-01-21 2020-01-21 Abnormality detection method and device for application language package

Publications (2)

Publication Number Publication Date
CN113220382A true CN113220382A (en) 2021-08-06
CN113220382B CN113220382B (en) 2023-08-29

Family

ID=77085280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010072207.5A Active CN113220382B (en) 2020-01-21 2020-01-21 Abnormality detection method and device for application language package

Country Status (1)

Country Link
CN (1) CN113220382B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110066467A (en) * 2009-12-11 2011-06-17 한국전자통신연구원 Method and apparatus for automatic post-editing based on factored language model
WO2014101504A1 (en) * 2012-12-25 2014-07-03 腾讯科技(深圳)有限公司 Method and device for detecting words in application program
US20150039287A1 (en) * 2013-07-31 2015-02-05 International Business Machines Corporation Translating textual information of an application
CN107273366A (en) * 2017-05-25 2017-10-20 深圳市比邻软件有限公司 A kind of method and system for translating physical equipment program interface
CN109032717A (en) * 2018-06-15 2018-12-18 福建天晴数码有限公司 A kind of method and system updating interface display language
CN110018876A (en) * 2019-04-16 2019-07-16 成都四方伟业软件股份有限公司 The international method, apparatus of software application and electronic equipment
CN110536149A (en) * 2019-09-02 2019-12-03 北京字节跳动网络技术有限公司 Message display method, device, readable medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110066467A (en) * 2009-12-11 2011-06-17 한국전자통신연구원 Method and apparatus for automatic post-editing based on factored language model
WO2014101504A1 (en) * 2012-12-25 2014-07-03 腾讯科技(深圳)有限公司 Method and device for detecting words in application program
US20150039287A1 (en) * 2013-07-31 2015-02-05 International Business Machines Corporation Translating textual information of an application
CN107273366A (en) * 2017-05-25 2017-10-20 深圳市比邻软件有限公司 A kind of method and system for translating physical equipment program interface
CN109032717A (en) * 2018-06-15 2018-12-18 福建天晴数码有限公司 A kind of method and system updating interface display language
CN110018876A (en) * 2019-04-16 2019-07-16 成都四方伟业软件股份有限公司 The international method, apparatus of software application and electronic equipment
CN110536149A (en) * 2019-09-02 2019-12-03 北京字节跳动网络技术有限公司 Message display method, device, readable medium and electronic equipment

Also Published As

Publication number Publication date
CN113220382B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN109033772B (en) Verification information input method and device
CN106899411B (en) Verification method and device based on verification code
CN108388514B (en) Interface automation test method, device, equipment and computer readable storage medium
US10019347B2 (en) Systems and methods for selection of test cases for payment terminals
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN111078908A (en) Data annotation detection method and device
CN111931731B (en) Question judging method and device, electronic equipment and storage medium
CN110990276A (en) Automatic testing method and device for interface field and storage medium
CN110704297B (en) Code review method, device, computer equipment and storage medium
CN110704304A (en) Application program testing method and device, storage medium and server
CN110750440A (en) Data testing method and terminal equipment
CN110389941B (en) Database checking method, device, equipment and storage medium
CN110866258A (en) Method for quickly positioning bug, electronic device and storage medium
CN112199268A (en) Software compatibility testing method and electronic equipment
CN111615688A (en) Assertion verification code binding method and device
CN110069736A (en) Page loading method and equipment
CN112035341A (en) Automatic testing method and device
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN109062793B (en) Test method and device of roller control and electronic equipment
CN109828926B (en) Method and device for judging whether application interface is loaded abnormally
CN112306568A (en) Service instance configuration method and device, electronic equipment and storage medium
CN113220382B (en) Abnormality detection method and device for application language package
CN109474822B (en) Android television multi-language automatic testing method and device
CN112631852B (en) Macro checking method, macro checking device, electronic equipment and computer readable storage medium
CN107766228B (en) Multi-language-based automatic testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant