WO2018121041A1 - Procédé et système de filtrage de chaîne de caractères d'interface - Google Patents

Procédé et système de filtrage de chaîne de caractères d'interface Download PDF

Info

Publication number
WO2018121041A1
WO2018121041A1 PCT/CN2017/108723 CN2017108723W WO2018121041A1 WO 2018121041 A1 WO2018121041 A1 WO 2018121041A1 CN 2017108723 W CN2017108723 W CN 2017108723W WO 2018121041 A1 WO2018121041 A1 WO 2018121041A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
string
index
compiled
compiled files
Prior art date
Application number
PCT/CN2017/108723
Other languages
English (en)
Chinese (zh)
Inventor
唐鸿飞
Original Assignee
深圳市九洲电器有限公司
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 深圳市九洲电器有限公司 filed Critical 深圳市九洲电器有限公司
Publication of WO2018121041A1 publication Critical patent/WO2018121041A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Definitions

  • the present application relates to the field of communications, and in particular, to an interface (UI) string screening method and system.
  • UI interface
  • set-top box software development is divided into full-featured predictive development and product development. It is predicted that the software in the development stage is large and complete, and the software in the product development stage is simple and precise.
  • it is necessary to filter the actual UI (interface) strings from a large number of UI strings for translation. It is very cumbersome and time-consuming to accurately find the actual UI strings.
  • the set-top box software development will make all the UI strings that may be used into an index list, and then manually search according to the index, manually in the massive code according to the index one by one filter confirmation, and also Need to pay attention to the macro control problem, the result of such a search is completely dependent on labor, time-consuming and error-prone.
  • the method for screening an interface string provided by the application includes the following steps:
  • S30 Perform one-to-one search on the M pre-compiled files, remove the pre-compiled files that do not contain the index list file name, and remove all the pre-compiled files after the removal;
  • the step S20 further includes: detecting a UI layer program storage location, and if stored in an external USB flash drive, the UI layer program is first cached in the set top box memory and then pre-compiled.
  • the step S40 further includes: splicing the N pre-compiled files into one large file.
  • An interface string screening system provided by the present application includes:
  • the markup module in the development process of the set top box program, performs macro switch mark on the program of the UI string to be actually used in the UI layer program;
  • the pre-compilation processing module converts the UI layer program into the compiler for pre-compilation, filters the UI layer program, filters the program of the marked UI string, and generates M pre-compiled files;
  • the pre-compiled file filtering module performs a one-to-one search on the M pre-compiled files, removes the pre-compiled files that do not contain the index list file name, and removes all the pre-compiled files after the removal;
  • the UI string obtaining module searches for each index keyword in the index list in N pre-compiled files. If the number of search results in the N pre-compiled files is greater than N, the index keyword corresponding UI is obtained. The string is reserved. After all the index keywords are searched, all the UI strings that are finally retained are output as the result.
  • the pre-compilation processing module detects a UI layer program storage location, and if stored in an external USB flash drive, the UI layer program is first cached in the set top box memory and then pre-compiled.
  • the UI string acquisition module concatenates the N pre-compiled files into one large file.
  • An electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, The instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.
  • the present application provides a non-transitory computer readable storage medium storing computer executable instructions for causing an electronic device to perform the method as described above.
  • a computer program product provided by the present application includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by an electronic device, causing the electronic The device performs the method as described above.
  • the interface string filtering method and system of the present application utilizes a precompilation function of the compiler to pre-compile and filter the program of the UI string in which the macro switch is marked, streamline the UI layer program, and then search for the index list file name for all
  • the pre-compiled file is subjected to secondary screening, and each search keyword is searched in the remaining N pre-compiled files. If the search result is greater than N, the UI string is obtained, and finally all the acquired UI strings are output as a screening result.
  • the screening and screening process is carried out automatically without manual operation, which greatly saves labor costs, greatly improves efficiency and is not prone to errors.
  • FIG. 1 is a flowchart of a method for screening an interface string in an embodiment of the present application
  • FIG. 2 is a structural diagram of an interface string screening system in an embodiment of the present application.
  • FIG. 3 is a structural diagram of an electronic device in an embodiment of the present application.
  • the compiler In the development process of the set-top box software, the compiler is used to compile the program, and the compiler has the pre-compilation function.
  • the pre-compilation function can filter the source program and filter the marked or defined actual used program.
  • this application uses the existing compiler and the precompilation function provided by the compiler to filter the UI string and quickly obtain the actual UI string.
  • FIG. 1 is a flowchart of an interface string screening method in an embodiment, where the method includes the following steps:
  • the macro switch can be marked for the actual use or required program (or file), and the macro switch can be used to set whether it is necessary, so that the program of the macro switch mark can be filtered out after being pre-compiled by the compiler. , thereby streamlining large programs, reducing the amount of processing and development work of the compiler.
  • the program of the UI string to be actually used is marked in the UI layer program to facilitate subsequent pre-compilation filtering.
  • the UI layer program is input into the compiler for precompilation.
  • the precompilation will filter the marked program according to the identifiable markup, which greatly simplifies the UI layer program.
  • the M pre-compiled files are pre-compiled according to the number M of the UI layer program files, that is, the number M of pre-compiled files generated after pre-compilation is the same as the number of initial files of the UI layer.
  • the UI layer program is stored in the cache or the U disk. If the pre-compilation in the U disk affects the efficiency of the compilation, the step further includes: detecting the UI layer program storage location, if stored in In the external U disk, the UI layer program is first cached in the set-top box memory and then pre-compiled.
  • S30 Perform one-to-one search on the M pre-compiled files, remove the pre-compiled files that do not contain the index list file name, and remove all the pre-compiled files after the removal.
  • the index list contains multiple index keywords, and each index keyword corresponds to indexing one UI string.
  • the file will contain the index list file name for reference, and if it does not contain the actual UI character to be used.
  • the string does not contain an index list file name.
  • the pre-compiled file contains the UI string to be actually used, and the pre-compiled file is to be retained; If the index file name is not included, the pre-compiled file does not contain the UI string to be actually used.
  • the pre-compiled file is to be removed to reduce the number of pre-compiled files. Pre-compiled files for further streamlining.
  • the compiler will add all the index keywords in the index list to each precompiled file, so for N precompiled files, each index keyword appears at least N times, due to each index key
  • the word also corresponds to indexing a UI string. If the UI string is actually used, the index keyword can find the corresponding UI string, so that the number of search results is greater than N, so by searching for each index keyword, If the search result is greater than N, it indicates that the index keyword corresponds to the UI string to be actually used, and needs to be retained. After all index keywords are searched, all the UI strings that are finally retained are output as results, that is, the filtering is completed. .
  • this step also includes: N pre- The compiled files are spliced into one large file. This way, for each index keyword, the compiler only needs to be started once, which greatly reduces the number of compiler startups.
  • the interface string filtering method uses the precompilation function of the compiler to pre-compile and filter the program of the UI string marked with the macro switch, streamline the UI layer program, and then search for all pre-compiled files by looking up the index list file name. Perform a secondary screening to find each search keyword in the remaining N pre-compiled files. If the search result is greater than N, the UI string is obtained, and finally all the obtained UI strings are output as a screening result to be filtered and filtered.
  • the process is automatically performed without manual operation, which greatly saves labor costs, greatly improves efficiency and is not prone to errors.
  • the application also provides an interface string screening system, as shown in FIG. 2, the system includes:
  • the tagging module 100 performs macro switch marking on the program of the UI string to be actually used in the UI layer program during the development of the set top box program.
  • the macro switch can be marked for the actual use or required program (or file), and the macro switch can be used to set whether it is necessary, so that the program of the macro switch mark can be filtered out after being pre-compiled by the compiler. , thereby streamlining large programs, reducing the amount of processing and development work of the compiler.
  • the tag module 100 tags the programs of the UI strings to be actually used in the UI layer program to facilitate subsequent pre-compilation screening.
  • the pre-compilation processing module 200 pre-compiles the UI layer program into the compiler, filters the UI layer program, filters the program of the marked UI string, and generates M pre-compiled files.
  • the post-markup pre-compilation processing module 200 pre-compiles the UI layer program into the compiler, and the pre-compilation filters the marked program according to the identifiable markup, thus greatly simplifying the UI layer program.
  • the pre-compilation processing module 200 pre-compiles and generates M pre-compiled files according to the number M of UI layer program files, that is, the number M of pre-compiled files generated after pre-compilation is the same as the number of initial files of the UI layer.
  • the UI layer program is stored in the cache or the U disk. If the pre-compilation in the U disk affects the efficiency of the compilation, the pre-compilation processing module 200 detects the UI layer program storage location, if stored externally. In the U disk, the UI layer program is first cached in the set-top box memory and then pre-compiled.
  • the pre-compiled file screening module 300 performs a one-to-one search on the M pre-compiled files, removes the pre-compiled files that do not contain the index list file name, and removes all the remaining N pre-compiled files.
  • the index list contains multiple index keywords, and each index keyword corresponds to indexing one UI string.
  • the file will contain the index list file name for reference, and if it does not contain the actual UI character to be used.
  • the string does not contain an index list file name.
  • the pre-compiled file contains the UI string to be actually used, and the pre-compiled file is to be retained; if the index list file name is not included, the pre-compilation file indicates If the compiled file does not contain the UI string to be actually used, the precompiled file should be removed to reduce the number of precompiled files. After removing all the remaining N precompiled files, further streamlining is performed. .
  • the UI string obtaining module 400 is for each index keyword in the index list.
  • the search file is searched. If the number of search results in the N pre-compiled files is greater than N, the UI string corresponding to the index keyword is obtained for reservation, and all UI strings that will be retained after all index keywords are searched are completed. Output as a result.
  • the compiler will add all the index keywords in the index list to each precompiled file, so for N precompiled files, each index keyword appears at least N times, due to each index key
  • the word also corresponds to indexing a UI string. If the UI string is actually used, the index keyword can find the corresponding UI string, so that the number of search results is greater than N, so the UI string obtaining module 400 passes each If the search result is greater than N, it means that the index keyword corresponds to the UI string to be actually used, and needs to be retained. After all index keywords are searched, all UI strings that are finally retained are used as The result is output, that is, the screening is completed.
  • the compiler For N pre-compiled files, the compiler needs to be started N times for each index keyword, so that too many compiler startups will take a lot of time. To reduce the number of compiler startups, the UI string acquisition module 400 will N The precompiled files are spliced into one large file. This way, for each index keyword, the compiler only needs to be started once, which greatly reduces the number of compiler startups.
  • the interface string screening system utilizes a precompilation function of the compiler, and the precompilation processing module 200 precompiles and filters the program of the UI string in which the macro switch is marked, and simplifies the UI layer program, and then precompiles the file screening module 300.
  • the UI string obtaining module 400 searches for each search keyword in the remaining N pre-compiled files by searching the index list file name, and obtains the UI string if the search result is greater than N. Finally, all the acquired UI strings are filtered out as screening results, and the screening process is automatically performed without manual operations, thereby greatly saving labor costs, greatly improving efficiency and being less prone to errors.
  • the interface string filtering method and system of the present application utilizes a precompilation function of the compiler to pre-compile and filter the program of the UI string in which the macro switch is marked, streamline the UI layer program, and then search for the index list file name for all
  • the pre-compiled file is subjected to secondary screening, and each search keyword is searched in the remaining N pre-compiled files. If the search result is greater than N, the UI string is obtained, and finally all the acquired UI strings are output as a screening result.
  • the screening and screening process is carried out automatically without manual operation, which greatly saves labor costs, greatly improves efficiency and is not prone to errors.
  • FIG. 3 is a schematic diagram of a hardware structure of an electronic device 300 according to an interface string screening method according to an embodiment of the present disclosure. As shown in FIG. 3, the electronic device 300 includes:
  • One or more processors 310 and memory 320 are exemplified by one processor 310 in FIG.
  • the processor 310 and the memory 320 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 320 is a non-volatile computer readable storage medium, and is applicable to a non-volatile software program, a non-volatile computer executable program, and a module, as in the interface string filtering method in the embodiment of the present application.
  • Program instructions/modules eg, the various modules shown in Figure 2).
  • the processor 310 executes various functional applications and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 320, that is, implementing the interface string filtering method of the above method embodiment.
  • the memory 320 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the interface character string filtering device, and the like.
  • memory 320 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • memory 320 can optionally include memory remotely located relative to processor 310, which can be connected to the interface string screening device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the one or more modules are stored in the memory 320, and when executed by the one or more processors 310, perform an interface string screening method in any of the above method embodiments, for example, performing the above described graph
  • the method steps S10 to S40 in 1 implement the functions of the modules 100-440 in FIG.
  • Embodiments of the present application provide a non-transitory computer readable storage medium storing computer-executable instructions that are executed by one or more processors Executing, for example, a processor 310 in FIG. 3, such that the one or more processors may perform the interface string screening method in any of the above method embodiments, for example, performing the method step S10 in FIG. 1 described above.
  • step S40 the functions of the modules 100-440 in Fig. 2 are implemented.
  • the embodiment of the present application provides a computer program product.
  • the interface string screening method in any of the foregoing method embodiments may be implemented, for example, performing the method steps S10 to S40 in FIG. 1 described above.
  • the functions of the modules 100-440 in Figure 2 are implemented.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

L'invention concerne un procédé et un système de filtrage de chaîne de caractères d'interface. À l'aide d'une fonction de pré-compilation d'un compilateur, un filtrage de pré-compilation est effectué sur un programme où se situe une chaîne de caractères UI permettant d'effectuer un marquage de macro-commutateur, et une simplification est effectuée sur un programme de couche UI. Un second filtrage est ensuite effectué sur tous les fichiers de pré-compilation en recherchant les noms de fichier d'une liste d'index. Chaque mot-clé de recherche est recherché dans les N fichiers de pré-compilation restants après le filtrage. Si un résultat de recherche est supérieur à N, la chaîne de caractères UI est acquise. Enfin, toutes les chaînes de caractères UI acquises sont générées sous la forme d'un résultat de filtrage de façon à terminer le filtrage. Le processus de filtrage ne requiert pas d'opération manuelle et est effectué automatiquement, ce qui permet d'économiser les coûts de main-d'œuvre et d'améliorer l'efficacité sans commettre d'erreurs.
PCT/CN2017/108723 2016-12-30 2017-10-31 Procédé et système de filtrage de chaîne de caractères d'interface WO2018121041A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611253855.0 2016-12-30
CN201611253855.0A CN106648822B (zh) 2016-12-30 2016-12-30 界面字符串筛选方法及系统

Publications (1)

Publication Number Publication Date
WO2018121041A1 true WO2018121041A1 (fr) 2018-07-05

Family

ID=58836980

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108723 WO2018121041A1 (fr) 2016-12-30 2017-10-31 Procédé et système de filtrage de chaîne de caractères d'interface

Country Status (2)

Country Link
CN (1) CN106648822B (fr)
WO (1) WO2018121041A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648822B (zh) * 2016-12-30 2019-09-06 深圳市九洲电器有限公司 界面字符串筛选方法及系统
CN110728113A (zh) * 2018-06-28 2020-01-24 北京金山办公软件股份有限公司 一种电子表格的信息筛选方法、装置及终端设备
CN113342323B (zh) * 2021-06-29 2024-03-29 银清科技有限公司 软件在线开发的方法及装置
CN114579135B (zh) * 2022-03-01 2023-09-05 抖音视界有限公司 一种安装包生成方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6802059B1 (en) * 1999-08-02 2004-10-05 Ricoh Corporation Transforming character strings that are contained in a unit of computer program code
CN101853174A (zh) * 2009-04-03 2010-10-06 中兴通讯股份有限公司 一种字符串资源定义与调用的同步方法及装置
CN102103493A (zh) * 2009-12-16 2011-06-22 新奥特(北京)视频技术有限公司 一种软件语言国际化的方法
CN102521222A (zh) * 2011-12-08 2012-06-27 深圳众为兴技术股份有限公司 一种系统文字的多语言翻译装置及翻译方法
CN106648822A (zh) * 2016-12-30 2017-05-10 深圳市九洲电器有限公司 界面字符串筛选方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7895570B2 (en) * 2005-12-22 2011-02-22 International Business Machines Corporation Accessible role and state information in HTML documents
CN101930466B (zh) * 2010-08-31 2012-08-15 北京捷通华声语音技术有限公司 跨平台内存文件的管理方法及管理系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6802059B1 (en) * 1999-08-02 2004-10-05 Ricoh Corporation Transforming character strings that are contained in a unit of computer program code
CN101853174A (zh) * 2009-04-03 2010-10-06 中兴通讯股份有限公司 一种字符串资源定义与调用的同步方法及装置
CN102103493A (zh) * 2009-12-16 2011-06-22 新奥特(北京)视频技术有限公司 一种软件语言国际化的方法
CN102521222A (zh) * 2011-12-08 2012-06-27 深圳众为兴技术股份有限公司 一种系统文字的多语言翻译装置及翻译方法
CN106648822A (zh) * 2016-12-30 2017-05-10 深圳市九洲电器有限公司 界面字符串筛选方法及系统

Also Published As

Publication number Publication date
CN106648822B (zh) 2019-09-06
CN106648822A (zh) 2017-05-10

Similar Documents

Publication Publication Date Title
WO2018121041A1 (fr) Procédé et système de filtrage de chaîne de caractères d'interface
Gu et al. DeepAM: Migrate APIs with multi-modal sequence to sequence learning
US8381095B1 (en) Automated document revision markup and change control
CN108376160A (zh) 一种中文知识图谱构建方法和系统
CN108491228B (zh) 一种二进制漏洞代码克隆检测方法及系统
US10503712B2 (en) Container repository optimization
CN111324577B (zh) 一种Yml文件读写的方法及装置
CN107305488A (zh) 一种应用国际化方法、装置及终端
US20130067435A1 (en) Method and apparatus for programming assistance
CN105446725A (zh) 用于模型驱动开发的方法和系统
US20160055156A1 (en) Database query caching and reuse
CN111597243A (zh) 基于数据仓库抽象数据加载的方法及系统
CN102870116A (zh) 内容匹配方法和装置
CN103970662A (zh) 一种gui软件输入边界值获取方法和系统
CN112579466A (zh) 测试用例的生成方法、装置及计算机可读存储介质
CN105094941B (zh) 一种实现多语言的方法及装置
US10338891B2 (en) Migration between model elements of different types in a modeling environment
TWI756867B (zh) 在作業系統標記物件標籤及產生安全政策的方法及系統
CN111767123B (zh) 运行优化方法及装置
KR102365434B1 (ko) 컨텐츠 검색 방법 및 컨텐츠 검색 시스템
CN110780919B (zh) 一种应用程序语言包的制作维护方法及系统
JP2016051367A (ja) データ解析装置、データ解析方法、および、プログラム。
CN108241695B (zh) 信息处理方法及装置
US10120968B1 (en) System and method for hierarchical library searching
JP2009053767A (ja) プログラム解析装置、および、プログラム解析方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17888423

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.10.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17888423

Country of ref document: EP

Kind code of ref document: A1