CN113220382B - Abnormality detection method and device for application language package - Google Patents

Abnormality detection method and device for application language package Download PDF

Info

Publication number
CN113220382B
CN113220382B CN202010072207.5A CN202010072207A CN113220382B CN 113220382 B CN113220382 B CN 113220382B CN 202010072207 A CN202010072207 A CN 202010072207A CN 113220382 B CN113220382 B CN 113220382B
Authority
CN
China
Prior art keywords
language
text
pack
application
preset
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.)
Active
Application number
CN202010072207.5A
Other languages
Chinese (zh)
Other versions
CN113220382A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses an abnormality detection method and device for an application language packet. 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 pack when an application interface is displayed; aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack; and generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet.

Description

Abnormality 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 abnormality of an application language package.
Background
In order to meet different requirements, various application software (abbreviated as applications) is developed, and in order to meet international requirements, support of multiple languages is generally provided, for example, for a certain application, language packages of multiple languages such as chinese, english, japanese and the like can be preset.
In general, multilingual translation can be performed based on one language, so that different language packages can be generated according to different languages, and different language packages can be loaded in an application so as to meet different language requirements.
However, before the application is released, language packs need to be detected, and specifically, different language packs can be loaded manually to check whether the text in the application interface is abnormal or not. Obviously, the manual mode can seriously affect the detection efficiency when different language packets are respectively loaded, and the detection results can have larger errors due to different detection levels. Therefore, a scheme is needed to detect the abnormality of the application language packet more efficiently.
Disclosure of Invention
The embodiment of the application provides an abnormality detection method for an application language packet, which can be used for detecting the abnormality of the application language packet more efficiently.
The embodiment of the application provides an abnormality detection device for an application language packet, which can detect the abnormality of the application language packet more efficiently.
In order to solve the technical problems, the embodiment of the application is realized 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 pack when an application interface is displayed;
aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack;
And generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet.
An abnormality detection device for an application language package includes an acquisition unit, a detection unit, and a generation unit, wherein,
the acquiring unit is used for acquiring text identifiers in the application, and the text identifiers are used for loading corresponding texts in the language package when the application interface is displayed;
the detection unit is used for aiming at a language package preset for the application, and determining the language package as a missing abnormal language package when detecting that the text corresponding to the text mark is not acquired;
the generating unit is used for generating text deletion abnormal data for the application according to the text identifier and the text deletion language package.
According to the technical scheme provided by the embodiment, after the text identifier of the corresponding text in the language pack is obtained and used for loading the language pack in the application, whether the text corresponding to the text identifier can be obtained can be detected for the language pack preset for the application, if not, the language pack is determined to be the missing abnormal language pack, and the text missing abnormal data can 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 text corresponding to the preset different language package can be obtained, if the situation that the text cannot be obtained exists, the situation that the language package has the missing abnormality is explained, and thus missing abnormal data can be generated. Because the deletion detection can be performed based on the text identification in a mode of acquiring the texts corresponding to the different language packages, the abnormality detection can be performed on the application language packages more efficiently.
Drawings
In order to more clearly illustrate the embodiments of the application or the prior art solutions, the drawings which are used in the description of the embodiments or the prior art will be briefly described below, it being obvious that the drawings in the description below are only some of the embodiments described in the present application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flow chart of an anomaly detection method of 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 flowchart illustrating an anomaly detection method for an application language package according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating 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 abnormality detection device for an application language package 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 clearly and completely described below with reference to specific embodiments and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Example 1
The embodiment provides an abnormality detection method for an application language packet, which can detect the abnormality of the application language packet more efficiently. It is assumed that the execution subject may be a terminal. The specific flow diagram of the method is shown in fig. 1, and comprises the following steps:
step 102: a text identifier in the application is obtained.
Different application interfaces may be developed in advance for a certain application, for example, a login interface, a business interface, a personal data interface, etc. may be included in the application, so as to guide the user to use. Various texts are typically displayed in the application interface, such as texts like "user name" and "password" may be displayed in the login interface, texts like a nickname of a user may be displayed in different application interfaces, etc.
In order to display a proper text at a proper position in the application interface, different text identifiers can be preset at different positions in the application interface, so that corresponding text can be loaded from the language pack according to the text identifiers, namely the text identifiers can be used for loading the corresponding text in the language pack when the application interface is displayed.
For example, in a certain interface of the application, there may be different text identifiers represented by different characters such as "back", "home", etc., where the text identifiers may be associated with certain texts in the language pack, for example, in a simplified chinese language pack, there may be key value pairs such as "back-return", "home-home", etc. For another example, in the English language package (American style), there may be key-value pairs such as "Back-Back", "home-Home". And in the display process of the application interface, the corresponding text in the language pack can be dynamically loaded according to the text identification. The Language Pack (Language Pack) can Pack texts in different languages so as to generate data packs in different languages, so that the application can display the texts in different languages in an application interface in a dynamic loading mode.
As shown in fig. 2, a schematic diagram of an anomaly detection method of an application language package, as shown in the upper left part of fig. 2, a schematic diagram of an application interface may include texts such as "welcome", "user name", "password", "login" and "retrieve", and text identifiers such as "0001", "0002", "0003", "0004" and "0005" respectively. So this step can obtain the text identification in the application.
In practical application, a tester can 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 can be executed, so that the text identifier in the currently displayed application interface of the application can be obtained. For example, the text labels "0001", "0002", "0003", "0004", and "0005" can be obtained. It will be appreciated that when the tester switches to another application interface, the text identifier in the application interface may be obtained again.
Step 104: and aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack.
In practical applications, multiple language packs may be preset for the application, for example, as shown in fig. 2, a chinese language pack, an english language pack, a japanese language pack, etc. may be set for the application. In order to detect whether the language package has the translation missing, the text identifier obtained in the previous step can be used for obtaining a plurality of texts corresponding to the text identifier from a plurality of language packages.
It can be understood that if a text corresponding to the text identifier does not exist in a certain language pack, the language pack can be indicated to have a problem, and if the text corresponding to the text identifier exists, the text can be obtained. Therefore, the step can detect whether the text corresponding to the text mark can be obtained from the language pack, if not, the text corresponding to the text mark can be indicated to be untranslated or not integrated into the language pack, namely, the text is missing, and then the language pack can be determined to be the missing abnormal language pack.
For example, as shown in fig. 2, text corresponding to the text identifier may be acquired from all language packs preset for the application according to the text identifiers "0001", "0002", "0003", "0004" and "0005", and if text is not acquired from one or some language packs, it may be determined that the one or some language packs have text missing, so that an abnormal language pack may be determined to be missing. Specifically, for example, in the german language package in fig. 2, since the text corresponding to the text identifier "0004" is not acquired, the german language package may be determined to be the missing abnormal language package at this time.
Step 106: and generating text deletion abnormal data for the application according to the text identification and the text deletion language package.
In the foregoing step, the text-missing language package has been determined, and in order to be able to output the detection result, the step may generate text-missing abnormal data for the application based on the text identification and the determined text-missing language package.
For example, the text identifier may be associated with a language name corresponding to the text-missing language package to generate a statistical table, and the statistical table is specifically compared with the following table 1 to generate text-missing abnormal data:
text identification Missing anomalies
0004 German language
0233 Finnish Finland
0450 Swedish (Swedish)
TABLE 1
As can be seen from the above table, for the text identifier "0004", a text deletion occurs in the german language package, that is, in the german language package, the corresponding text cannot be obtained according to the text identifier "0004", as in the example shown in fig. 2. Whereas for the text label "0233" a text deletion situation occurs in the finnish language package.
According to the method provided by the embodiment, after the text identifier of the corresponding text in the language pack is obtained and used for loading the language pack in the application, whether the text corresponding to the text identifier can be obtained can be detected for the language pack preset for the application, if not, the language pack is determined to be the missing abnormal language pack, and the text missing abnormal data can 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 text corresponding to the preset different language package can be obtained, if the situation that the text cannot be obtained exists, the situation that the language package has the missing abnormality is explained, and thus missing abnormal data can be generated. Because the deletion detection can be performed based on the text identification in a mode of acquiring the texts corresponding to the different language packages, the abnormality detection can be performed on the application language packages more efficiently.
According to the embodiment, if the tester performs manual detection, only one language packet is required to be loaded, and other language packets in the application can be detected simultaneously by switching different application interfaces in the application, so that compared with the case that the tester performs detection by manually loading different language packets for multiple times, the abnormal detection efficiency of the language packets is greatly improved.
Example 2
In the actual translation and generation of language packs, it is possible that a certain language pack is integrated into text that does not match the language of the language pack. For example, text integrated into english in a japanese language package, text integrated into german in an english language package, or the like.
Therefore, in this embodiment, another method for detecting an abnormality of an application language package is provided on the basis of the foregoing embodiment 1, so that the abnormality of the application language package can be detected more efficiently. It is assumed that the execution subject may also be a terminal. The specific flow diagram of the method is shown in fig. 3, and comprises the following steps:
Step 202: when the text corresponding to the obtained text mark is detected, language identification is carried out on the text, and a language identification result is obtained.
Step 204: when the language of the preset language pack is detected and is different from the language identification result, the preset language pack is determined to be the translation abnormal language pack.
In embodiment 1, it has been described that if the text corresponding to the text identifier is not obtained, the language pack may be determined as a missing abnormal language pack, and it may be understood that if the text corresponding to the text identifier is obtained, it is indicated that the text corresponding to the text identifier exists in the language pack, and then whether the text is the same as the language of the language pack to which the text belongs may be detected.
Specifically, language identification can be performed on the acquired text, so that a language identification result is obtained. For example, language-detection tool can be utilized, and the tool can perform language detection on the input text so as to output the language corresponding to the text. Specifically, as shown in fig. 2, when the text corresponding to the text identifier is obtained, language recognition may be performed on the "log", "iniiar sesi" text, so as to obtain respective language recognition results.
After determining the language identification result of the obtained text, the language identification result can be compared with the language of the corresponding language package, for example, as shown in fig. 2 for the text "logic", the language identification result can be "english", and at this time, the language of the preset language package can be detected and whether the language identification result is the same as the language identification result. The preset language package may be a text for performing language identification, and the language package to which the text belongs.
As shown in fig. 2, for the text "inijar sesi" the language identification result is spanish, and the text is obtained from a french language pack, so the french language pack can be determined as a translation exception language pack.
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, simplified chinese, traditional chinese (hong kong of china), and traditional chinese (taiwan of china) may be adapted for different countries or regions, respectively, and for english, american, english, australian, etc. may be included. However, in these different language packages of the same language, the same text is likely to appear, for example, the text "complete" is the same for simplified Chinese as for traditional Chinese, and the text "home" is the same for American English and English.
This situation may cause that the language identification is randomly performed, so that the identification result does not correspond to the language of the language pack, and misjudgment is caused. For example, after the "complete" text is obtained from the language package of traditional chinese (taiwan in china), when the language is identified, it is determined that the language package is simplified for a plurality of reasons, and at this time, the language package may be misjudged as the translation exception language package.
Therefore, when detecting whether the application language packet is abnormal, in order to reduce the probability of erroneous judgment, the detection result is more accurate, in one embodiment, the language identification is performed on the text, so as to obtain a language identification result, which may include: and carrying out language identification on the text to obtain a plurality of candidate language identification results. When the language of the preset language pack is detected and is different from the language identification result, determining the preset language pack as the translation abnormal language pack may include: when the language of the preset language package is detected and is different from the recognition results of the plurality of candidate languages, determining the preset language package as a translation abnormal language package.
Specifically, since the same text may exist in different language packs, when the text is subjected to language recognition, multiple candidate language recognition results can be obtained, for example, three candidate language recognition results of simplified Chinese, traditional Chinese (hong Kong) and traditional Chinese (Taiwan of China) can be determined when the text is subjected to language recognition. Therefore, the languages of the language packs to which the texts belong can be matched with the candidate language identification results, and if the languages are different, the language packs are indicated to be most likely to be in errors in translation or language pack generation. If there is one identical, it is indicated that the translated text is correct in language with a high probability.
In practice, some text may be fixed characters in a specific field, such as fixed english abbreviations, or characters containing specific meanings, etc., and in particular, for example, a specific physical examination mode is indicated in medicine, usually in CT (Computed Tomography ). In the application interface, this english abbreviation generally does not need translation, and for example, for international organization for standardization (International Organization for Standardization, abbreviated as ISO), translation is also generally not needed.
Therefore, in a non-english language package, characters such as CT and ISO may appear, for example, in a simplified chinese language package, identification of management system standards such as ISO20000 may appear, and if the character is recognized as english during language recognition, a problem of mismatch with the language of the language package may appear, thereby causing erroneous judgment of translation abnormality.
Therefore, when detecting whether the application language packet is abnormal, 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 preset filtering conditions, and performing language identification on the filtered text to obtain a language identification result.
Specifically, a filtering condition may be pre-established, for example, specific characters such as "ISO", "CT" and the like may be included, and when the text to be subjected to language recognition includes specific characters in the filtering condition, the specific characters may be filtered, so that language recognition may be performed on the filtered text.
For example, for the text "CT check" in the simplified Chinese language package, since "CT" is a specific character in the filtering condition, it can filter this, so as to perform language identification on the text "check", and further at least obtain the language of simplified Chinese. So as to detect whether the language of the language pack is the same as the language of the language pack.
Step 206: and generating text translation exception data for the application according to the text identification and the determined translation exception language package.
In the foregoing step, the translation exception language package has been determined, and then in this step, text translation exception data may also be generated based on the text identification and the determined translation exception language package, similarly to that described in embodiment 1.
For example, the text identifier may be associated with a language name corresponding to the translation exception language package to generate a statistics table, with specific ratios shown in the following table 2, and the generated text translation exception data:
TABLE 2
As can be seen from the table above, for the text identifier "0004", spanish text appears in the french language pack, as in the example shown in fig. 2. For the text identifier "0240", the text in korean appears in the japanese language pack, so that the translation abnormality occurs in both of the japanese language packs.
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 pack, language identification can be performed on the text, so that whether the language of the preset language pack is consistent with the language identification result can be detected, if not, the language pack can be determined to be a translation abnormal language pack, and text translation abnormal data can be generated.
That is, for the text in the application, after the text in the language pack is obtained, the language of the text is matched with the language of the language pack, and if the text is not matched with the language of the language pack, the translation abnormality is indicated. Accordingly, the abnormality detection can be performed on the application language package more efficiently.
Example 3
In the actual translation process, a situation that the size difference of the text between different languages is large may occur, for example, the text may be "logged in" for the chinese text, may be translated into english text "logic", japanese "device", and russian "b" й b in the first, c and c in the second, у ", etc. It can be seen that different languages of text may have different text sizes. However, in practical applications, a relatively fixed display area is usually preset for the text, so that there is a possibility that the size of the text is larger than that of the display area, that is, the text cannot be completely displayed in the display area.
Therefore, in this embodiment, another method for detecting an abnormality of an application language package may be provided on the basis of the foregoing embodiment 1, so that the abnormality detection of the application language package may be performed more efficiently. It is assumed that the execution subject may also be a terminal. The specific flow diagram of the method is shown in fig. 4, and comprises the following steps:
step 302: when the text corresponding to the acquired text mark is detected, determining the size of a display area corresponding to the text mark, and determining the size of the text when the text is displayed in the display area.
The display area may be an area for displaying text, such as that shown in fig. 2, and displaying text such as "welcome", "user name", "password" may correspond to different display areas, respectively. In the development process of the application interface, different area numbers or area identifiers can be preset for different display areas respectively, so that the corresponding text identifiers can be corresponding to the text identifiers, and further, the corresponding text in the language package can be corresponding to the text, and the corresponding text can be loaded accurately. Here, the display area may be a text area for displaying text, a control area that can also display text, or the like. Such as for the "welcome" text in fig. 2, a text area may be associated, and for the "login" text, a control area may be associated.
As already described above, when developing an application interface, a corresponding display range is typically created for a display area, so that text can be displayed within this range. Such as each text in fig. 2, corresponds to a fixed display range. Therefore, in order to detect whether the corresponding text can be displayed in the display range corresponding to the display area, the step can respectively determine the size of the display area corresponding to the text mark and the size of the text when the text is displayed in the display area when the text corresponding to the obtained text mark is detected.
Specifically, a plurality of coordinates may be set in advance when setting the display area. For example, for the text label "0002" in fig. 2, it may include at least an upper left corner coordinate and a lower right corner coordinate, from which the size of the display area may be determined.
When setting the display area, the font type number, the word spacing, the number of rows and columns, etc. used when displaying the text, such as each text identifier in fig. 2, may be preset, and the number of words is smaller, so that the text may be set to be displayed in a single line, and the corresponding type number may be set. Then in performing this step a text simulation may be displayed in the display area so that the text size may be determined. For example, the font is X, the font size is Y, the pitch is P, and the single line display is performed, then the size required for completely displaying the text can be determined by simulating the display in the display area.
In practice, most of the text is displayed from left to right, so in one embodiment, multiple lines of text may be displayed in the display area, and then when determining the size of the display area, the maximum width that the text may be displayed may also be determined as the size of the text in combination with the number of lines. I.e. the size of the display area in this step, may refer to the maximum width of the display area for displaying text, while the size of the text may be the width required for displaying the text completely. 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, and for a display area displaying multiple lines of text, the multiple of the width of the display area may be the maximum width of the displayed text. When determining the size of the text, if a case of a plurality of lines occurs when the display is simulated in the display area, the total width of the plurality of lines of text may be taken as the size of the text.
Step 304: and when the display area size is detected to be smaller than the text size, determining the preset language pack as an abnormal-size language pack.
After determining the size of the display area and the size of the text, it can be detected whether the size of the display area is smaller than the size of the text, and it can be understood that if the size of the display area is smaller than the size of the text, it can be indicated to a certain extent that the display area cannot display the text completely, that is, the situation that the size of the text is too large occurs, so that the language pack can be determined as an abnormal-size language pack.
For example, as shown in fig. 2, for text "logic" in the english language package, the corresponding display area is larger than the text size when displayed in the display area, indicating that the text may be displayed entirely in the corresponding display area. For the text "b o й m in the russian language packet, the t is the frame, the corresponding display area is smaller than the text size when the text is displayed in the display area, and the text can not be completely displayed in the corresponding display area, so that the language packet can be determined to be the abnormal-size language packet at the moment.
Step 306: and generating text size anomaly data for the application according to the text identification and the determined size anomaly language package.
In the foregoing step, the size abnormality language pack has been determined, and then in this step, text size abnormality data may also be generated from the text identification and the determined size abnormality language pack similarly to those described in embodiments 1 and 2.
For example, a statistical table may be generated by identifying a text with a language name corresponding to the size anomaly language package, and a display area size and a text size, and the generated text translation anomaly data is specifically shown in the following table 3:
TABLE 3 Table 3
As can be seen from the above table, for the text label "0004", the text in the russian language bag is simulated to be displayed in the display area, requiring a width of 800 units, whereas the unit width of the actual display area is only 600, as in the example shown in fig. 2. Whereas for the text label "0300", the text in the Vietnam language package is simulated in the display area, a width of 850 units is required, whereas 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 pack, the size of the display area corresponding to the text identifier and the text size 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 text size can be detected, if so, the language pack can be determined to be an abnormal-size language pack, and abnormal-size text data can be generated.
That is, for the text in the application, after the text in the language pack is acquired, whether the text can be completely displayed in the display area or not can be checked according to the size of the display area corresponding to the text and the size occupied when the text is displayed in the display area, and if the text cannot be completely displayed, the presence of the size abnormality is indicated. Accordingly, the abnormality detection can be performed on the application language package more efficiently.
Example 4
Based on the same conception, embodiment 4 of the present application provides an abnormality detection device for an application language packet, which can detect the current display state of a signal lamp more accurately. The structure of the device is schematically shown in fig. 5, and the device comprises: an acquisition unit 402, a detection unit 404, and a generation unit 406, wherein,
the obtaining unit 402 may be configured to obtain a text identifier in an application, where the text identifier is used to load a text corresponding to a language package when an application interface is displayed;
the detecting unit 404 may be configured to determine, for a language pack preset for an application, that the language pack is a missing abnormal language pack when detecting that a text corresponding to a text identifier is not acquired;
the generating unit 406 may be configured to generate text deletion exception data for the application according to the text identifier and the text deletion language package.
In one embodiment, the detection unit 404 may also be configured to:
when the text corresponding to the obtained text mark is detected, carrying out language identification on the text to obtain a language identification result;
when the language of the preset language pack is detected and is different from the language identification result, determining the preset language pack as a translation abnormal language pack; then
The generating unit 406 may be further configured to:
and generating text translation exception data for the application according to the text identification and the translation exception language package.
In one embodiment, the detection unit 404 may be configured to:
performing language identification on the text to obtain a plurality of candidate language identification results;
when the language of the preset language pack is detected and is different from the identification results of the plurality of candidate languages, the preset language pack is determined to be the translation abnormal language pack.
In one embodiment, the detection unit 404 may be configured to:
and filtering the text according to preset filtering conditions, and performing language identification on the filtered text to obtain a language identification result.
In one embodiment, the detection unit 404 may also be configured to:
when detecting that the text corresponding to the obtained text mark is obtained, determining the size of a display area corresponding to the text mark, and determining the size of the text when the text is displayed in the display area;
when the display area size is detected to be smaller than the text size, determining a preset language pack as an abnormal-size language pack; then
The generating unit 406 may be further configured to:
and generating text size exception data for the application according to the text identification and the size exception language packet.
In one embodiment, the detection unit 404 may also be configured to:
when detecting that the text corresponding to the obtained text mark is obtained, determining the size of a display area corresponding to the text mark, and determining the size of the text when the text is displayed in the display area;
when the display area size is detected to be smaller than the text size, determining a preset language pack as an abnormal-size language pack; then
The generating unit 406 may be further configured to:
and generating text size exception data for the application according to the text identification and the size exception language packet.
According to the method provided by the embodiment, after the text identifier of the corresponding text in the language pack is obtained and used for loading the language pack in the application, whether the text corresponding to the text identifier can be obtained can be detected for the language pack preset for the application, if not, the language pack is determined to be the missing abnormal language pack, and the text missing abnormal data can 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 text corresponding to the preset different language package can be acquired, and if the situation that the text cannot be acquired exists, the situation that the language package has the missing exception is explained, so that missing exception data can be generated. Because the deletion detection can be performed based on the text identification in a mode of acquiring the texts corresponding to the different language packages, the abnormality detection can be performed on the application language packages more efficiently.
Fig. 6 is a schematic structural view of an electronic device according to an embodiment of the present application. At the hardware level, the electronic device comprises a processor, optionally an internal bus, a network interface, a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (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, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 6, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program to form an abnormality detection device of the application language packet on a logic level. The processor is used for executing the programs 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 pack when an application interface is displayed;
aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack;
and generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet.
The method executed by the abnormality detection device for an application language package according to the embodiment of fig. 5 of the present application may be applied to a processor or implemented by a 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 by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks 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 embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may also execute the functions of the abnormality detection device for the application language package provided in the embodiment shown in fig. 5 in the embodiment shown in fig. 6, and the embodiments of the present application are not described herein again.
The embodiment of the present application also proposes a computer-readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by an electronic device including a plurality of application programs, enable the electronic device to perform a method performed by an abnormality detection apparatus for an application language package in the embodiment shown in fig. 5, and 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 pack when an application interface is displayed;
Aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack;
and generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, 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 functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile 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 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 storage media for a computer 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 Discs (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 that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
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 one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that 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 of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (7)

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 pack when an application interface is displayed;
aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack;
generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet;
The method further comprises the steps of:
when the text corresponding to the text mark is detected and obtained, carrying out language identification on the text to obtain a language identification result;
when the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack;
generating text translation exception data for the application according to the text identifier and the translation exception language package;
performing language identification on the text to obtain a language identification result, wherein the language identification result comprises:
performing language identification on the text to obtain a plurality of candidate language identification results; then
When the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack comprises the following steps:
and when the languages of the preset language packs are detected to be different from the identification results of the multiple candidate languages, determining the preset language packs as translation abnormal language packs.
2. The method of claim 1, wherein performing language recognition on the text to obtain a language recognition result comprises:
and filtering the text according to preset filtering conditions, and performing language identification on the filtered text to obtain a language identification result.
3. The method of claim 1, wherein the method further comprises:
when detecting that the text corresponding to the text mark is acquired, determining the size of a display area corresponding to the text mark, and determining the size of the text when the text is displayed in the display area;
when the display area size is detected to be smaller than the text size, determining the preset language pack as an abnormal-size language pack;
and generating text size anomaly data for the application according to the text identifier and the size anomaly language package.
4. An abnormality detection device for an application language pack is characterized by comprising an acquisition unit, a detection unit and a generation unit, wherein,
the acquiring unit is used for acquiring text identifiers in the application, and the text identifiers are used for loading corresponding texts in the language package when the application interface is displayed;
the detection unit is used for aiming at a language package preset for the application, and determining the language package as a missing abnormal language package when detecting that the text corresponding to the text mark is not acquired;
the generation unit is used for generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet;
The detection unit is further used for:
when the text corresponding to the text mark is detected and obtained, carrying out language identification on the text to obtain a language identification result;
when the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack;
the generating unit is further configured to:
generating text translation exception data for the application according to the text identifier and the translation exception language package;
the detection unit is used for carrying out language identification on the text to obtain a plurality of candidate language identification results; and when the languages of the preset language packs are detected to be different from the identification results of the multiple candidate languages, determining the preset language packs as translation abnormal language packs.
5. The apparatus of claim 4, wherein the detection unit is further configured to:
when detecting that the text corresponding to the text mark is acquired, determining the size of a display area corresponding to the text mark, and determining the size of the text when the text is displayed in the display area;
when the display area size is detected to be smaller than the text size, determining the preset language pack as an abnormal-size language pack;
The generating unit is further configured to:
and generating text size anomaly data for the application according to the text identifier and the size anomaly language package.
6. 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 pack when an application interface is displayed;
aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack;
generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet;
when the text corresponding to the text mark is detected and obtained, carrying out language identification on the text to obtain a language identification result;
when the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack;
generating text translation exception data for the application according to the text identifier and the translation exception language package;
Performing language identification on the text to obtain a language identification result, wherein the language identification result comprises:
performing language identification on the text to obtain a plurality of candidate language identification results; then
When the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack comprises the following steps:
and when the languages of the preset language packs are detected to be different from the identification results of the multiple candidate languages, determining the preset language packs as translation abnormal language packs.
7. A computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising 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 pack when an application interface is displayed;
aiming at a language pack preset for the application, when detecting that the text corresponding to the text mark is not acquired, determining the language pack as a missing abnormal language pack;
generating text deletion abnormal data for the application according to the text identifier and the text deletion language packet;
When the text corresponding to the text mark is detected and obtained, carrying out language identification on the text to obtain a language identification result;
when the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack;
generating text translation exception data for the application according to the text identifier and the translation exception language package;
performing language identification on the text to obtain a language identification result, wherein the language identification result comprises:
performing language identification on the text to obtain a plurality of candidate language identification results; then
When the language of the preset language pack is detected to be different from the language identification result, determining the preset language pack as a translation abnormal language pack comprises the following steps:
and when the languages of the preset language packs are detected to be different from the identification results of the candidate languages, determining the preset language packs as translation abnormal language packs.
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 CN113220382A (en) 2021-08-06
CN113220382B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880054A (en) * 2021-12-31 2022-08-09 昆仑太科(北京)技术股份有限公司 Local translation method for BIOS Option Rom Setup Option

Citations (6)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346153B (en) * 2013-07-31 2018-04-17 国际商业机器公司 Method and system for the text message of translation application

Patent Citations (6)

* 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
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
CN113220382A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN109062809B (en) Online test case generation method and device and electronic equipment
CN110990276A (en) Automatic testing method and device for interface field and storage medium
CN110704304B (en) Application program testing method and device, storage medium and server
CN109947637B (en) Automatic testing method, device, equipment and medium for webpage compatibility
CN110389941B (en) Database checking method, device, equipment and storage medium
CN107316156B (en) Data processing method, device, server and storage medium
CN107239403A (en) A kind of positioning problems method and apparatus
CN112199268A (en) Software compatibility testing method and electronic equipment
CN113220382B (en) Abnormality detection method and device for application language package
CN112732567A (en) Mock data testing method and device based on ip, electronic equipment and storage medium
CN112035341A (en) Automatic testing method and device
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN109558315B (en) Method, device and equipment for determining test range
JP2019522847A (en) Method, device and terminal device for extracting data
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
US20120310849A1 (en) System and method for validating design of an electronic product
CN116756037A (en) Abnormal code positioning system, method, equipment and computer readable storage medium
CN111782541A (en) Test case generation method, device, equipment and computer readable storage medium
CN110765005A (en) Software reliability evaluation method and device
CN112631852B (en) Macro checking method, macro checking device, electronic equipment and computer readable storage medium
CN112216333B (en) Chip testing method and device
US20160350318A1 (en) Method, system for classifying comment record and webpage management device
CN113515588A (en) Form data detection method, computer device and storage medium
CN110018844B (en) Management method and device of decision triggering scheme and electronic equipment
US10803219B1 (en) Method and system for combined formal static analysis of a design code

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