CN112328739A - Character query method and device, computer equipment and computer readable storage medium - Google Patents

Character query method and device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN112328739A
CN112328739A CN202011089947.6A CN202011089947A CN112328739A CN 112328739 A CN112328739 A CN 112328739A CN 202011089947 A CN202011089947 A CN 202011089947A CN 112328739 A CN112328739 A CN 112328739A
Authority
CN
China
Prior art keywords
character
target
key values
language
queried
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
CN202011089947.6A
Other languages
Chinese (zh)
Other versions
CN112328739B (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.)
Chengdu Anyixun Technology Co ltd
Original Assignee
Chengdu Anyixun Technology 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 Chengdu Anyixun Technology Co ltd filed Critical Chengdu Anyixun Technology Co ltd
Priority to CN202011089947.6A priority Critical patent/CN112328739B/en
Publication of CN112328739A publication Critical patent/CN112328739A/en
Application granted granted Critical
Publication of CN112328739B publication Critical patent/CN112328739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3337Translation of the query language, e.g. Chinese to English
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • 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)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a character query method, a device, computer equipment and a computer readable storage medium, which relate to the technical field of Internet, when a user requests to query key values, first target key values of characters to be queried under different language types are obtained in a language configuration file, the user can directly check contents related to the characters to be queried in all language types without switching application interfaces, a large amount of manpower and material resources are saved, and the risks of errors and failures are reduced. The method comprises the following steps: acquiring a language configuration file of an application to be verified; receiving a character query request, and determining a character to be queried indicated by the character query request; when the character query request indicates that key value query is carried out based on the characters to be queried, extracting a plurality of first target key values corresponding to the characters to be queried from a language configuration file; and sequencing the first target key values according to a preset sequencing order of the language types, and displaying the sequenced first target key values.

Description

Character query method and device, computer equipment and computer readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a character query method, apparatus, computer device, and computer-readable storage medium.
Background
With the continuous development of internet technology, many application products are internationalized, and under different internationalized system language environments, the application products need to have different language expressions. Therefore, when the version of the application product is iterated, the translation contents need to be verified in all languages supported by the application product, characters in the translation contents need to be inquired, and the characters need to be checked, so that the displayed contents of the application product are ensured to be correct.
In the related art, when performing multi-language verification, a worker is required to check a use interface after switching languages of an application product, confirm whether translation is performed, query characters needing to be checked in a translated document, and judge whether the characters in the translated document are correct.
In carrying out the present application, the applicant has found that the related art has at least the following problems:
generally, the types of languages supported by application products are more, the scale of the application products is larger, the time cost for manually inquiring and checking characters is higher, interfaces need to be frequently switched, all the interfaces of the application products cannot be guaranteed to be covered, a large amount of manpower and material resources are wasted, the efficiency is low, the error rate is higher, and the risk rate of test failure is increased.
Disclosure of Invention
In view of this, the present application provides a character query method, device, computer device, and computer readable storage medium, and mainly aims to solve the problems that the time cost for manually querying and checking characters is high, interfaces need to be frequently switched, all interfaces of application products cannot be guaranteed to be covered, a large amount of manpower and material resources are wasted, the efficiency is low, the error rate is high, and the risk rate of test failure is increased.
According to a first aspect of the present application, there is provided a character query method, including:
acquiring a language configuration file of an application to be verified, wherein the language configuration file comprises a plurality of character information corresponding to a plurality of language types supported by the application to be verified;
receiving a character query request, and determining a character to be queried indicated by the character query request;
when the character query request indicates that key value query is carried out based on the character to be queried, extracting a plurality of first target key values corresponding to the character to be queried from the language configuration file, wherein the plurality of first target key values correspond to different language types;
and sequencing the first target key values according to the preset arrangement sequence of the language types, and displaying the sequenced first target key values.
In another embodiment, the obtaining the language configuration file of the application to be verified includes:
determining the selected application to be verified, and acquiring an application installation package of the application to be verified;
compiling and analyzing the application installation package to obtain a resource file of the application installation package;
and extracting the language configuration file from the resource file.
In another embodiment, after receiving a character query request and determining a character to be queried indicated by the character query request, the method further includes:
when the character query request indicates that character string query is carried out based on the character to be queried, determining a target language type to which the character to be queried belongs in the plurality of language types;
extracting at least one related character string from the target character information corresponding to the target language type, wherein each related character string in the at least one related character string carries the character to be queried;
acquiring a plurality of second target key values in the plurality of kinds of character information based on the at least one related character string, wherein the plurality of second target key values are key values indicated by a target single key corresponding to the at least one related character string in the plurality of kinds of character information of the language configuration file;
and sequencing the plurality of second target key values according to the preset sequencing order, and displaying the sequenced plurality of second target key values.
In another embodiment, the extracting at least one related character string from the target character information corresponding to the target language type includes:
determining character information corresponding to the target language type as target character information in the multiple kinds of character information included in the language configuration file;
and reading the target character information, and extracting a character string carrying the character to be queried in the target character information as a related character string to obtain the at least one related character string.
In another embodiment, the obtaining a plurality of second target key values in the plurality of character information based on the at least one related character string includes:
for each related character string in the at least one related character string, inquiring a target single key corresponding to the related character string in the target character information;
respectively inquiring and extracting second target key values corresponding to the target single key in the multiple kinds of character information of the language configuration file to obtain at least one second target key value;
and repeating the process of executing the query and extracting the second target key values, and respectively extracting at least one second target key value corresponding to the target single key of each related character string in the at least one related character string to obtain the plurality of second target key values.
In another embodiment, the extracting, from the language configuration file, a plurality of first target key values corresponding to the character to be queried includes:
for each character information in the multiple character information included in the language configuration file, determining a key value corresponding to the character to be queried in the character information as a first target key value, and extracting the first target key value;
and repeatedly executing the process of querying the key values corresponding to the characters to be queried, and querying the key values corresponding to the characters to be queried in the various character information respectively to obtain the plurality of first target key values.
In another embodiment, the sorting the plurality of first target key values according to the preset sorting order of the plurality of language types and displaying the sorted plurality of first target key values includes:
respectively determining a type brevity code corresponding to each language type in the plurality of language types to obtain a plurality of type brevity codes;
marking the type brevity codes at preset positions of the first target key values according to the corresponding relation between the type brevity codes and the language types;
and acquiring the preset arrangement sequence, and sequencing and displaying the marked first target key values.
According to a second aspect of the present application, there is provided a character query apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a verification module, wherein the first acquisition module is used for acquiring a language configuration file of an application to be verified, and the language configuration file comprises a plurality of character information corresponding to a plurality of language types supported by the application to be verified;
the first determining module is used for receiving a character query request and determining a character to be queried indicated by the character query request;
an extracting module, configured to extract, when the character query request indicates that key value query is performed based on the character to be queried, a plurality of first target key values corresponding to the character to be queried in the language configuration file, where the plurality of first target key values correspond to different language types;
and the display module is used for sequencing the first target key values according to the preset arrangement sequence of the language types and displaying the sequenced first target key values.
In another embodiment, the first obtaining module includes:
the obtaining unit is used for determining the selected application to be verified and obtaining an application installation package of the application to be verified;
the compiling unit is used for compiling and analyzing the application installation package to obtain a resource file of the application installation package;
and the extraction unit is used for extracting the language configuration file from the resource file.
In another embodiment, the apparatus further comprises:
a second determining module, configured to determine, when the character query request indicates to perform a character string query based on the character to be queried, a target language type to which the character to be queried belongs among the multiple language types;
the extraction module is further configured to extract at least one related character string from the target character information corresponding to the target language type, where each related character string in the at least one related character string carries the character to be queried;
a second obtaining module, configured to obtain, based on the at least one relevant character string, a plurality of second target key values in the multiple kinds of character information, where the plurality of second target key values are key values indicated by a target single key corresponding to the at least one relevant character string in the multiple kinds of character information of the language configuration file;
the display module is further configured to sort the plurality of second target key values according to the preset sorting order, and display the sorted plurality of second target key values.
In another embodiment, the extracting module is configured to determine, as target character information, character information corresponding to the target language type from the plurality of kinds of character information included in the language profile; and reading the target character information, and extracting a character string carrying the character to be queried in the target character information as a related character string to obtain the at least one related character string.
In another embodiment, the second obtaining module is configured to, for each relevant character string in the at least one relevant character string, query a target single key corresponding to the relevant character string in the target character information; respectively inquiring and extracting second target key values corresponding to the target single key in the multiple kinds of character information of the language configuration file to obtain at least one second target key value; and repeating the process of executing the query and extracting the second target key values, and respectively extracting at least one second target key value corresponding to the target single key of each related character string in the at least one related character string to obtain the plurality of second target key values.
In another embodiment, the extracting module is configured to determine, for each of the plurality of types of character information included in the language configuration file, a key value corresponding to the character to be queried in the character information as a first target key value, and extract the first target key value; and repeatedly executing the process of querying the key values corresponding to the characters to be queried, and querying the key values corresponding to the characters to be queried in the various character information respectively to obtain the plurality of first target key values.
In another embodiment, the display module includes:
the determining unit is used for respectively determining a type brevity code corresponding to each language type in the plurality of language types to obtain a plurality of type brevity codes;
the marking unit is used for marking the type brevity codes at preset positions of the first target key values according to the corresponding relation between the type brevity codes and the language types;
and the display unit is used for acquiring the preset arrangement sequence and displaying the marked first target key values in a sequencing manner.
According to a third aspect of the present application, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of the first aspect when the processor executes the computer program.
According to a fourth aspect of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect described above.
By means of the technical scheme, the character query method, the device, the computer equipment and the computer readable storage medium are provided, the language configuration file of the application to be verified is obtained, when a user requests to query key values, a plurality of first target key values corresponding to the character to be queried under different language types are obtained in the language configuration file according to the character to be queried input by the user, the obtained first target key values are directly displayed according to the preset arrangement sequence, the user can directly verify the contents related to the character to be queried in all language types, the application interface does not need to be switched, all interfaces covering application products are guaranteed, a large amount of manpower and material resources are saved, the efficiency is improved, and the risks of errors and failures are reduced.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flow chart illustrating a character query method according to an embodiment of the present application;
fig. 2A is a schematic flowchart illustrating a character query method according to an embodiment of the present application;
FIG. 2B is a diagram illustrating a method for querying characters according to an embodiment of the present disclosure;
fig. 3A is a schematic structural diagram illustrating a character query apparatus according to an embodiment of the present application;
FIG. 3B is a schematic structural diagram of a character query apparatus according to an embodiment of the present application;
fig. 3C is a schematic structural diagram illustrating a character query apparatus according to an embodiment of the present application;
fig. 3D is a schematic structural diagram of a character query apparatus according to an embodiment of the present application;
fig. 4 shows a schematic device structure diagram of a computer apparatus according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present application provides a character query method, as shown in fig. 1, the method includes:
101. the method comprises the steps of obtaining a language configuration file of an application to be verified, wherein the language configuration file comprises a plurality of character information corresponding to a plurality of language types supported by the application to be verified.
102. Receiving a character query request, and determining the character to be queried indicated by the character query request.
103. When the character query request indicates that key value query is carried out based on the characters to be queried, a plurality of first target key values corresponding to the characters to be queried are extracted from the language configuration file, and the first target key values correspond to different language types.
104. And sequencing the first target key values according to a preset sequencing order of the language types, and displaying the sequenced first target key values.
According to the method provided by the embodiment of the application, the language configuration file of the application to be verified is obtained, when a user requests to query key values, the first target key values corresponding to the character to be queried under different language types are obtained in the language configuration file according to the character to be queried input by the user, the obtained first target key values are directly displayed according to the preset arrangement sequence, the user can directly verify the contents related to the character to be queried in all language types, the application interfaces do not need to be switched, all interfaces of application products are guaranteed to be covered, a large amount of manpower and material resources are saved, the efficiency is improved, and the risks of errors and failures are reduced.
An embodiment of the present application provides a character query method, as shown in fig. 2A, the method includes:
201. and acquiring a language configuration file of the application to be verified.
With the continuous development of internet technology, application products gradually go to internationalization, and more language types are supported, so that when versions of the application products are iterated, character information corresponding to the language types supported by the application products needs to be checked. When the application product has enough functions and enough engineering, the verification process is more and more complicated. At present, verification aiming at multiple languages is usually realized manually, and workers check the use interface after language switching and verify and confirm character information in the use interface so as to determine whether the content displayed on the use interface is correct. However, applicants have recognized that frequent switching of interfaces requires significant time costs and may not necessarily cover all application interfaces. In addition, some workers probably do not know a certain language supported by an application product, check is needed one by one when verification is carried out, omission is likely to occur, and the non-standardized verification method has a plurality of defects in the execution process. Therefore, the application provides a character query method, a language configuration file of an application to be verified is obtained, target key values corresponding to the character to be queried in different language types are extracted from the application to be verified based on the character to be queried input by a user, contents to be verified corresponding to the character to be queried are directly extracted in a unified mode and displayed in a sequencing mode, the user can simultaneously verify the contents related to the character to be queried in all language types, application interfaces do not need to be switched, all interfaces covering application products are guaranteed, a large amount of manpower and material resources are saved, efficiency is improved, and risks of errors and test failures are reduced. It should be noted that, in order to implement the method in the present application, in the process of practical application, the present application provides a query tool, and based on the query tool, the query tool obtains the requirements of the user and displays the queried content to the user, so as to implement interaction with the user.
In order to implement the technical scheme in the application, a language configuration file of an application to be verified needs to be obtained first, and the language configuration file is used as a basis for character query. The language configuration file includes multiple character information corresponding to multiple language types supported by the application to be verified, and in the process of actual application, the language configuration file may be string.xml (a file for defining characters displayed by the application) configuration file of the application to be verified. When the language configuration file is obtained, firstly, the selected application to be verified needs to be determined, that is, which application product is subjected to multi-language verification, and an application installation Package of the application to be verified is obtained, wherein the application installation Package can be in an Android Package (APK) form or an installation Package of a terminal such as a computer, and the type of the installation Package is not specifically limited in the application. And then, compiling and analyzing the application installation package to obtain a resource file of the application installation package. The resource file may specifically be a resources. The process of obtaining the resource file is actually the decompilation of the installation package, and can be realized by decompilation tools such as jadx (a decompilation tool) and apktool (a decompilation tool). The decompilation tool can be packaged in the query tool of the application, and an execution command for calling the decompilation tool is packaged in the query tool, so that the decompilation tool can be directly called in a practical application. When the application installation package is decompiled, a user can input the name, the address or the directory of the application installation package in the query tool, so that the query tool can acquire the application installation package, and the packaged decompilation tool is called to compile and analyze the application installation package to obtain the resource file. Finally, a language profile can be extracted in the resource file. In the process of practical application, it is very likely that a developer can provide the resource file, so that the developer directly inputs the file name, address or directory of the resource file into the query tool, the query tool can omit the process of decompiling the application installation package to obtain the resource file, and the process of obtaining the following language configuration file can be directly executed based on the resource file provided by the developer. The method for acquiring the resource file is not particularly limited.
It should be noted that, in some resource files of application products, character information corresponding to different language types is separately configured, for example, chinese corresponds to a string.xml configuration file, english corresponds to a string.xml configuration file, and russian corresponds to a string.xml configuration file, so that configuration files corresponding to each language type need to be extracted as language configuration files. And character information corresponding to different language types in resource files of some application products is all configured in a uniform string.xml configuration file, so that the uniform string.xml configuration file is directly used as a language configuration file. In addition, considering that some items may not need to check character information corresponding to all language types or need to additionally check other contents, a configuration input box can be provided in the query tool, and a user can input a file name or select a file address or a file path in the configuration input box to realize the self-selection of the language configuration file, so that different requirements of the user in testing different items are met, and the flexible configuration of the file is realized. For example, if the user wants to check the file name "values-ar" as well as the language configuration file, the user may input the file name "values-ar" in the configuration input box, where the file name is merely an example, and the form and content of the file name are not specifically limited in the present application.
202. Receiving a character query request, determining a character to be queried indicated by the character query request, and executing the following steps 203 to 204 when the character query request indicates that key value query is performed based on the character to be queried; when the character query request indicates that the character string query is performed based on the character to be queried, the following steps 205 to 207 are performed.
In the embodiment of the application, after the language configuration file of the application to be verified is prepared, the character query operation for the application to be verified is started to be provided. In order to enable a user to carry out character query in a targeted manner, the query tool provides a query page, on which the user can input characters to be queried, and then the query tool executes corresponding matching query according to the characters to be queried. In the process of practical application, the query operation provided by the query tool is actually a query implemented based on a single key, that is, a single key (key), during the query, a user needs to input the single key to be queried as a character to be queried, for example, the single key may be "clean", the query tool extracts a key Value corresponding to the single key, that is, a Value as a query result and displays the key Value to the user, and the query operation is an accurate query based on the character to be queried provided by the user. However, considering that in some cases, a user may not know what a specific single key is, and cannot provide the single key in detail, but only provide a keyword or a keyword, such as a keyword "cancel", of a content that the user wants to query, the query tool in the present application can perform fuzzy query based on a character to be queried provided by the user, determine which language type the character to be queried input by the user belongs to, determine related character strings including the character to be queried in the language type, determine a single key corresponding to each related character string respectively, and then use the determined single key to precisely match a corresponding key value in other languages as a query result to be displayed to the user. For example, assuming that the user requests to perform the fuzzy query based on "cancel", the query tool searches the related character strings including "cancel" in chinese, and specifically, the character strings of "cancel operation", "request to cancel", and the like may be all used as the related character strings including "cancel". And then, determining target single keys corresponding to the related character strings such as the cancel operation, the request cancel and the like in Chinese, and further querying corresponding key values in other language types based on the determined target single keys to serve as query results.
In order to enable a user to select whether precise query or fuzzy query is required, precise query and fuzzy query options are provided on a query page provided by a query tool, and the user indicates the query tool how to query characters by checking the options. Therefore, after the user completes the input of the character to be queried and the selection and confirmation of the option, the query tool receives the character query request, determines the character to be queried indicated by the character query request, and reads which option is checked by the user when the character query request is issued. If the user selects the accurate query, the query tool may determine that the character query request indicates to perform key value query based on the character to be queried, which means that the character to be queried input by the user is a single key, and directly query the key value corresponding to the character to be queried, that is, perform the following processes in steps 203 to 204. If the user selects the fuzzy query, the query tool may determine that the character query request indicates to perform a character string query based on the character to be queried, which means that the character to be queried input by the user is in a form of a keyword or a keyword, and is not a single key, and search results included in each language type and obtained by full matching need to be searched one by one and displayed one by one, that is, the following processes in step 205 to step 207 are performed.
203. When the character query request indicates that key value query is carried out based on the characters to be queried, a plurality of first target key values corresponding to the characters to be queried are extracted from the language configuration file.
In the embodiment of the application, when the character query request indicates to perform key value query based on the character to be queried, it indicates that the character to be queried input by the user is a single key, the user wants to perform accurate query, and the query tool directly queries the key value corresponding to the character to be queried, so that the query tool can extract a plurality of first target key values corresponding to the character to be queried in the language configuration file. The plurality of first target key values correspond to different language types, that is, each first target key value is from character information of different language types, so that when the plurality of first target key values are queried, for each character information in the plurality of character information included in the language configuration file, a key value corresponding to a character to be queried in the character information needs to be determined as the first target key value, and the first target key value is extracted. And then, repeatedly executing the process of inquiring the key values corresponding to the characters to be inquired, and inquiring the key values corresponding to the characters to be inquired in the various character information respectively to obtain a plurality of first target key values. For example, if the character to be queried input by the user is "CLEAN", and "CLEAN" is a single key, the first target key value queried by the query tool in chinese is "CLEAN", and the first target key values queried in english are "CLEAN", and "CLEAN", that is, the plurality of first target key values corresponding to the character to be queried.
204. And sequencing the first target key values according to a preset sequencing order of the language types, and displaying the sequenced first target key values.
In the embodiment of the application, after the plurality of first target key values are obtained, the plurality of first target key values need to be displayed for reference and viewing by a user. The query tool is provided with a preset arrangement sequence of a plurality of language types, so that when the plurality of first target key values are displayed, the plurality of first target key values can be sequenced according to the preset arrangement sequence of the plurality of language types, and the sequenced plurality of first target key values are displayed. For example, if the preset arrangement order is chinese and english, the order of "cleaning" and "CLEAN" is "cleaning" and "CLEAN", and "cleaning" and "CLEAN" are displayed in order. It should be noted that the preset arrangement sequence may be set by the user, the query tool may provide a sequence configuration box, and the user sets a desired preset arrangement sequence in the sequence configuration box, so that the query tool may perform sorting according to the preset arrangement sequence set by the user after obtaining the query result. And the query tool can also default a preset arrangement sequence, so that when the user does not self-define the preset arrangement sequence, the queried results are sorted according to the default preset arrangement sequence.
In the actual application process, in order to distinguish the obtained multiple first target key values, a user can know the language type corresponding to each first target key value, and when the query tool displays the multiple first target key values, a type brevity code corresponding to each language type in the multiple language types can be actually determined respectively first, so as to obtain multiple type brevity codes. For example, the type brevity code corresponding to Chinese is "zh", the type brevity code corresponding to English is "en", the type brevity code corresponding to Russian is "ru", and so on. And then, the query tool marks the plurality of type brevity codes at preset positions of the plurality of first target key values according to the corresponding relation between the plurality of type brevity codes and the plurality of language types. For example, assuming that the preset position is in front of the key value, when the first target key value "clear" is marked, the type brevity code "zh" needs to be adopted for marking, and the result obtained after marking may be "zh: and (4) cleaning. It should be noted that the preset position may also be an upper left corner, an upper right corner, a lower left corner, a lower right corner, and the like of the first target key value, so as to establish an association relationship between the type brevity code and the corresponding first target key value, and the content of the preset position is not specifically limited in the present application. After the labeling of the first target key values is completed, a preset arrangement sequence is obtained, and the labeled first target key values are displayed in a sequencing mode. In addition, in consideration of the query efficiency, the labeling process may be omitted, and the plurality of first target key values may be directly displayed according to the preset arrangement sequence. Whether the type brevity code is marked or not is not particularly limited. Specifically, referring to fig. 2B, taking the example that the character to be queried is "clean", when the first target key value corresponding to "clean" is shown, the "key: clear is displayed as the first line, so that the display content is reminded that clear is obtained by inquiring as a single key. Subsequently, the inquired content "zh: cleaning "," en: CLEAN "is shown in the list.
205. When the character query request indicates that the character string query is carried out based on the character to be queried, determining a target language type to which the character to be queried belongs in a plurality of language types, and extracting at least one related character string from target character information corresponding to the target language type.
In the embodiment of the application, when the character query request indicates that the character string query is performed based on the character to be queried, the character to be queried input by the user is in a keyword or keyword form, and is not a single key, search results included in each language type and obtained by full matching need to be searched one by one and displayed one by one, so that a target language type to which the character to be queried belongs in a plurality of language types needs to be determined, at least one related character string is extracted from target character information corresponding to the target language type, namely, each related character string in the at least one related character string carries the character to be queried, then target single keys of the related character strings are determined in the follow-up process, and accurate matching is performed according to the target single keys.
When extracting at least one related character string, firstly, character information corresponding to a target language type is determined as target character information in a plurality of kinds of character information included in a language configuration file. For example, if the character to be queried is chinese, the character information corresponding to chinese is used as the target character information. Specifically, since a string.xml configuration file is usually used in the resource file to store the multilingual character information, the string.xml configuration file corresponding to the chinese language may be used as the target character information, or if all the characters of the language type are stored in the same string.xml configuration file, the paragraph corresponding to the chinese language in the string.xml configuration file may be used as the target character information. And then, reading the target character information, extracting the character string carrying the character to be inquired in the target character information as a related character string, and obtaining at least one related character string. For example, assuming that the character to be queried input by the user is "cancel" and the target language type to which the "cancel" belongs is chinese, extracting the related character string to the "cancel" in chinese may be "cancel operation" or "request cancel".
206. And acquiring a plurality of second target key values in the various character information based on the at least one related character string.
In this embodiment of the application, after the at least one related character string is determined, a plurality of second target key values may be obtained in the multiple kinds of character information based on the at least one related character string. The multiple second target key values are key values indicated by a target single key corresponding to at least one related character string in multiple character information of the language configuration file, that is, the target single key corresponding to each related character string is determined, and the corresponding key values are inquired in the character information of each language type based on the target single key, so that the multiple second target key values are obtained, and the process of specifically obtaining the multiple second target key values is as follows:
for each related character string in at least one related character string, firstly, a target single key corresponding to the related character string in the target character information is inquired, namely, a target single key corresponding to the related character string in the character information of the target language type to which the related character string belongs is inquired. For example, if the related character string is "cancel", and the single key corresponding to "cancel" is determined to be "verify _ code _ exit _ cancel" in the character information of the chinese character, the target single key of the related character string "cancel" is "verify _ code _ exit _ cancel". And then, respectively inquiring and extracting second target key values corresponding to the target single key in the multiple kinds of character information of the language configuration file to obtain at least one second target key value. Continuing to explain by taking the example that the target single key of the related character string "cancel" is "verify _ code _ exit _ cancel", the target single key "verify _ code _ exit _ cancel" is used to go to the corresponding character information of english, russian and the like to extract the corresponding key value, so that the corresponding content of the target single key "verify _ code _ exit _ cancel" in different language types can be obtained, and the character query based on the related character string "cancel" is completed. Subsequently, the process of executing the query and extracting the second target key values is repeated, and at least one second target key value corresponding to the target single key of each related character string in at least one related character string is respectively extracted, so that a plurality of second target key values can be obtained. For example, if there is a related character string "request to cancel" in addition to the related character string "cancel", a target single key a corresponding to the "request to cancel" is determined in the character information of chinese, and a corresponding key value is searched for in the character information corresponding to english, russian, and the like by using the target single key a as a second target key value.
207. And sequencing the plurality of second target key values according to a preset sequencing order, and displaying the sequenced plurality of second target key values.
In the embodiment of the application, after the plurality of second target key values are obtained, the plurality of second target key values are sorted according to a preset sorting order, and the sorted plurality of second target key values are displayed. The process of displaying the plurality of second target key values in the sorting manner is consistent with the process of displaying the plurality of first target key values in step 204, which is not repeated here, and when the plurality of second target key values are displayed, type brevity codes can be used for labeling or omitting labeling, which is not specifically limited in the present application. It should be noted that, when the second target key value corresponding to each target single key is displayed, the method shown in fig. 2B may also be adopted, and the query result corresponding to each target single key may be listed. In the process of practical application, no matter the query result is obtained by accurate query or fuzzy query, the user can copy and paste by using the copy and paste function of the query tool, so that different requirements of the user are met.
According to the method provided by the embodiment of the application, the language configuration file of the application to be verified is obtained, when a user requests to query key values, the first target key values corresponding to the character to be queried under different language types are obtained in the language configuration file according to the character to be queried input by the user, the obtained first target key values are directly displayed according to the preset arrangement sequence, the user can directly verify the contents related to the character to be queried in all language types, the application interfaces do not need to be switched, all interfaces of application products are guaranteed to be covered, a large amount of manpower and material resources are saved, the efficiency is improved, and the risks of errors and failures are reduced.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present application provides a character query apparatus, as shown in fig. 3A, the apparatus includes: a first obtaining module 301, a first determining module 302, an extracting module 303 and a presenting module 304.
The first obtaining module 301 is configured to obtain a language configuration file of an application to be verified, where the language configuration file includes multiple character information corresponding to multiple language types supported by the application to be verified;
the first determining module 302 is configured to receive a character query request, and determine a character to be queried indicated by the character query request;
the extracting module 303 is configured to, when the character query request indicates that key value query is performed based on the character to be queried, extract a plurality of first target key values corresponding to the character to be queried in the language configuration file, where the plurality of first target key values correspond to different language types;
the displaying module 304 is configured to sort the plurality of first target key values according to a preset sorting order of the plurality of language types, and display the sorted plurality of first target key values.
In a specific application scenario, as shown in fig. 3B, the first obtaining module 301 includes: an acquisition unit 3011, a compiling unit 3012, and an extraction unit 3013.
The obtaining unit 3011 is configured to determine the selected application to be verified, and obtain an application installation package of the application to be verified;
the compiling unit 3012 is configured to compile and analyze the application installation package to obtain a resource file of the application installation package;
the extracting unit 3013 is configured to extract the language configuration file from the resource file.
In a specific application scenario, as shown in fig. 3C, the apparatus further includes: a second determination module 305 and a second acquisition module 306.
The second determining module 305 is configured to determine a target language type to which the character to be queried belongs in the plurality of language types when the character query request indicates that a character string query is performed based on the character to be queried;
the extracting module 303 is further configured to extract at least one related character string from the target character information corresponding to the target language type, where each related character string in the at least one related character string carries the character to be queried;
the second obtaining module 306 is configured to obtain a plurality of second target key values in the multiple kinds of character information based on the at least one related character string, where the plurality of second target key values are key values indicated by a target single key corresponding to the at least one related character string in the multiple kinds of character information of the language configuration file;
the displaying module 304 is further configured to sort the plurality of second target key values according to the preset sorting order, and display the sorted plurality of second target key values.
In a specific application scenario, the extracting module 303 is configured to determine, as target character information, character information corresponding to the target language type from the multiple kinds of character information included in the language configuration file; and reading the target character information, and extracting a character string carrying the character to be queried in the target character information as a related character string to obtain the at least one related character string.
In a specific application scenario, the second obtaining module 306 is configured to, for each related character string in the at least one related character string, query a target single key corresponding to the related character string in the target character information; respectively inquiring and extracting second target key values corresponding to the target single key in the multiple kinds of character information of the language configuration file to obtain at least one second target key value; and repeating the process of executing the query and extracting the second target key values, and respectively extracting at least one second target key value corresponding to the target single key of each related character string in the at least one related character string to obtain the plurality of second target key values.
In a specific application scenario, the extracting module 303 is configured to determine, for each character information of the multiple kinds of character information included in the language configuration file, a key value corresponding to the character to be queried in the character information as a first target key value, and extract the first target key value; and repeatedly executing the process of querying the key values corresponding to the characters to be queried, and querying the key values corresponding to the characters to be queried in the various character information respectively to obtain the plurality of first target key values.
In a specific application scenario, as shown in fig. 3D, the presentation module 304 includes: a determination unit 3041, an annotation unit 3042 and a display unit 3043.
The determining unit 3041 is configured to determine a type brevity code corresponding to each of the plurality of language types, respectively, to obtain a plurality of type brevity codes;
the labeling unit 3042 is configured to label the multiple type brevity codes at preset positions of the multiple first target key values according to the corresponding relationship between the multiple type brevity codes and the multiple language types;
the displaying unit 3043 is configured to obtain the preset arrangement order, and display the labeled first target key values in a sorted manner.
The device provided by the embodiment of the application acquires the language configuration file of the application to be checked, when a user requests to query key values, according to the character to be queried input by the user, a plurality of first target key values corresponding to the character to be queried in different language types are acquired in the language configuration file, the acquired first target key values are directly displayed according to the preset arrangement sequence, the user can directly check the contents related to the character to be queried in all language types, the application interface does not need to be switched, all interfaces of application products are guaranteed to be covered, a large amount of manpower and material resources are saved, the efficiency is improved, and the risks of errors and failures are reduced.
It should be noted that other corresponding descriptions of the functional units related to the character query apparatus provided in the embodiment of the present application may refer to the corresponding descriptions in fig. 1 and fig. 2A, and are not described herein again.
In an exemplary embodiment, referring to fig. 4, there is further provided a device, where the device 400 includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, where the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the character query method in the embodiment.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the character query method.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by hardware, and also by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules. The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A method for querying characters, comprising:
acquiring a language configuration file of an application to be verified, wherein the language configuration file comprises a plurality of character information corresponding to a plurality of language types supported by the application to be verified;
receiving a character query request, and determining a character to be queried indicated by the character query request;
when the character query request indicates that key value query is carried out based on the character to be queried, extracting a plurality of first target key values corresponding to the character to be queried from the language configuration file, wherein the plurality of first target key values correspond to different language types;
and sequencing the first target key values according to the preset arrangement sequence of the language types, and displaying the sequenced first target key values.
2. The method of claim 1, wherein obtaining the language profile of the application to be verified comprises:
determining the selected application to be verified, and acquiring an application installation package of the application to be verified;
compiling and analyzing the application installation package to obtain a resource file of the application installation package;
and extracting the language configuration file from the resource file.
3. The method according to claim 1, wherein after receiving the character query request and determining the character to be queried indicated by the character query request, the method further comprises:
when the character query request indicates that character string query is carried out based on the character to be queried, determining a target language type to which the character to be queried belongs in the plurality of language types;
extracting at least one related character string from the target character information corresponding to the target language type, wherein each related character string in the at least one related character string carries the character to be queried;
acquiring a plurality of second target key values in the plurality of kinds of character information based on the at least one related character string, wherein the plurality of second target key values are key values indicated by a target single key corresponding to the at least one related character string in the plurality of kinds of character information of the language configuration file;
and sequencing the plurality of second target key values according to the preset sequencing order, and displaying the sequenced plurality of second target key values.
4. The method according to claim 3, wherein the extracting at least one related character string from the target character information corresponding to the target language type includes:
determining character information corresponding to the target language type as target character information in the multiple kinds of character information included in the language configuration file;
and reading the target character information, and extracting a character string carrying the character to be queried in the target character information as a related character string to obtain the at least one related character string.
5. The method according to claim 3, wherein the obtaining a plurality of second target key values in the plurality of character information based on the at least one related character string comprises:
for each related character string in the at least one related character string, inquiring a target single key corresponding to the related character string in the target character information;
respectively inquiring and extracting second target key values corresponding to the target single key in the multiple kinds of character information of the language configuration file to obtain at least one second target key value;
and repeating the process of executing the query and extracting the second target key values, and respectively extracting at least one second target key value corresponding to the target single key of each related character string in the at least one related character string to obtain the plurality of second target key values.
6. The method according to claim 1, wherein the extracting a plurality of first target key values corresponding to the character to be queried in the language configuration file comprises:
for each character information in the multiple character information included in the language configuration file, determining a key value corresponding to the character to be queried in the character information as a first target key value, and extracting the first target key value;
and repeatedly executing the process of querying the key values corresponding to the characters to be queried, and querying the key values corresponding to the characters to be queried in the various character information respectively to obtain the plurality of first target key values.
7. The method according to claim 1, wherein the sorting the first target key values according to the preset sorting order of the language types and displaying the sorted first target key values comprises:
respectively determining a type brevity code corresponding to each language type in the plurality of language types to obtain a plurality of type brevity codes;
marking the type brevity codes at preset positions of the first target key values according to the corresponding relation between the type brevity codes and the language types;
and acquiring the preset arrangement sequence, and sequencing and displaying the marked first target key values.
8. A character inquiry apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a verification module, wherein the first acquisition module is used for acquiring a language configuration file of an application to be verified, and the language configuration file comprises a plurality of character information corresponding to a plurality of language types supported by the application to be verified;
the first determining module is used for receiving a character query request and determining a character to be queried indicated by the character query request;
an extracting module, configured to extract, when the character query request indicates that key value query is performed based on the character to be queried, a plurality of first target key values corresponding to the character to be queried in the language configuration file, where the plurality of first target key values correspond to different language types;
and the display module is used for sequencing the first target key values according to the preset arrangement sequence of the language types and displaying the sequenced first target key values.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011089947.6A 2020-10-13 2020-10-13 Character query method, device, computer equipment and computer readable storage medium Active CN112328739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011089947.6A CN112328739B (en) 2020-10-13 2020-10-13 Character query method, device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011089947.6A CN112328739B (en) 2020-10-13 2020-10-13 Character query method, device, computer equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112328739A true CN112328739A (en) 2021-02-05
CN112328739B CN112328739B (en) 2023-11-03

Family

ID=74314896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011089947.6A Active CN112328739B (en) 2020-10-13 2020-10-13 Character query method, device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112328739B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593181A (en) * 2008-05-30 2009-12-02 英业达股份有限公司 Cross word stock word translation inquiring system and method thereof
CN101727450A (en) * 2008-10-16 2010-06-09 英业达股份有限公司 Network translation system and method thereof for acquiring multi-language translation interpretations through one query
CN102279847A (en) * 2011-08-17 2011-12-14 瑞斯康达科技发展股份有限公司 Method and device for internationalizing software system
CN104268280A (en) * 2014-10-17 2015-01-07 中国人民解放军国防科学技术大学 Layering storage and inquiring method based on key value database
CN106776584A (en) * 2016-11-24 2017-05-31 网易(杭州)网络有限公司 Character displaying method, translation table generating method, document translation method and device
US10235432B1 (en) * 2016-07-07 2019-03-19 Google Llc Document retrieval using multiple sort orders
CN110674362A (en) * 2019-08-22 2020-01-10 视联动力信息技术股份有限公司 Search recommendation method and device, electronic equipment and readable storage medium
CN111240781A (en) * 2020-01-07 2020-06-05 杭州涂鸦信息技术有限公司 Client multi-language dynamic configuration method and system
CN111538768A (en) * 2020-06-23 2020-08-14 平安国际智慧城市科技股份有限公司 Data query method and device based on N-element model, electronic equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593181A (en) * 2008-05-30 2009-12-02 英业达股份有限公司 Cross word stock word translation inquiring system and method thereof
CN101727450A (en) * 2008-10-16 2010-06-09 英业达股份有限公司 Network translation system and method thereof for acquiring multi-language translation interpretations through one query
CN102279847A (en) * 2011-08-17 2011-12-14 瑞斯康达科技发展股份有限公司 Method and device for internationalizing software system
CN104268280A (en) * 2014-10-17 2015-01-07 中国人民解放军国防科学技术大学 Layering storage and inquiring method based on key value database
US10235432B1 (en) * 2016-07-07 2019-03-19 Google Llc Document retrieval using multiple sort orders
CN106776584A (en) * 2016-11-24 2017-05-31 网易(杭州)网络有限公司 Character displaying method, translation table generating method, document translation method and device
CN110674362A (en) * 2019-08-22 2020-01-10 视联动力信息技术股份有限公司 Search recommendation method and device, electronic equipment and readable storage medium
CN111240781A (en) * 2020-01-07 2020-06-05 杭州涂鸦信息技术有限公司 Client multi-language dynamic configuration method and system
CN111538768A (en) * 2020-06-23 2020-08-14 平安国际智慧城市科技股份有限公司 Data query method and device based on N-element model, electronic equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YU, MH等: "String similarity search and join: a survey", 《FRONTIERS OF COMPUTER SCIENCE》, vol. 10, no. 3, pages 399 - 417, XP035973443, DOI: 10.1007/s11704-015-5900-5 *
王金宝等: "外存中高效的字符串相似性查询处理", 《计算机研究与发展》, vol. 52, no. 3, pages 738 - 748 *

Also Published As

Publication number Publication date
CN112328739B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN109857667B (en) Interface automation test method, test device, test equipment and storage medium
US7149971B2 (en) Method, apparatus, and system for providing multi-language character strings within a computer
US7313514B2 (en) Validating content of localization data files
EP0668558A1 (en) Method and apparatus for automating the localization of a computer program
US10346159B2 (en) Systems and methods for software scanning tool
US8352913B2 (en) Generating and resolving component names in an integrated development environment
CN109308254B (en) Test method, test device and test equipment
CN107783786B (en) Method and device for creating equipment resources
JPH1083293A (en) Error correction compiler
EP1890235A1 (en) Test case management
CN108197024B (en) Embedded browser debugging method, debugging terminal and computer readable storage medium
JP6440895B2 (en) Software analysis apparatus and software analysis method
US20210208996A1 (en) Verification automation apparatus, verification automation method, and computer-readable recording medium
US20080022263A1 (en) Identifying The Origin Of Application Resources
US7100039B2 (en) Systems and methods for a bootstrap mechanism for software execution
CN112364667B (en) Character checking method and device, computer equipment and computer readable storage medium
JP6110139B2 (en) File management program, file management apparatus, and file management method
CN111026407B (en) Installation package packing method, computer device and computer readable storage medium
CN111552466A (en) Project file generation method, system, computer equipment and storage medium
CN109683900B (en) Universal upper computer symbol searching and analyzing method for ELF file debugging information
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN112328739A (en) Character query method and device, computer equipment and computer readable storage medium
CN113177392B (en) Method for synchronizing row segment information in proofreading interface, computing device and storage medium
CN107766228B (en) Multi-language-based automatic testing method and device
CN109117176B (en) Version automatic deployment method and system based on host

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