CN106648822A - User interface character string screening method and system - Google Patents

User interface character string screening method and system Download PDF

Info

Publication number
CN106648822A
CN106648822A CN201611253855.0A CN201611253855A CN106648822A CN 106648822 A CN106648822 A CN 106648822A CN 201611253855 A CN201611253855 A CN 201611253855A CN 106648822 A CN106648822 A CN 106648822A
Authority
CN
China
Prior art keywords
precompile
file
character strings
program
character string
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
CN201611253855.0A
Other languages
Chinese (zh)
Other versions
CN106648822B (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.)
Shenzhen Jiuzhou Electric Appliance Co Ltd
Original Assignee
Shenzhen Jiuzhou Electric Appliance 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 Shenzhen Jiuzhou Electric Appliance Co Ltd filed Critical Shenzhen Jiuzhou Electric Appliance Co Ltd
Priority to CN201611253855.0A priority Critical patent/CN106648822B/en
Publication of CN106648822A publication Critical patent/CN106648822A/en
Priority to PCT/CN2017/108723 priority patent/WO2018121041A1/en
Application granted granted Critical
Publication of CN106648822B publication Critical patent/CN106648822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

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

The invention relates to a user interface character string screening method and system. Through utilization of a pre-compiling function of a compiler, pre-compiling screening is carried out on programs in which UI character strings for carrying out macro switch marking are located; UI layer programs are simplified; second screening is carried out on all pre-compiling files by searching index list file names; each search keyword is searched in the rest N pre-compiling files after screening; if a search result is greater than N, the UI character strings are obtained; all obtained UI character strings are output as screening results, thereby finishing screening. Manual operation is removed in the screening process, the screening process is automatically carried out; the labor cost is greatly reduced; the efficiency is greatly improved; and a mistake is not liable to occur.

Description

Interface character string selection method and system
Technical field
The present invention relates to the communications field, more particularly to a kind of interface (UI) character string selection method and system.
Background technology
At present, set-top box software exploitation is divided into Full Featured prophesy exploitation, and two stages of product development.Prophesy exploitation The software in stage is large and complete, the letter of the software of product development stage and it is smart.The multilingual set-top box product development phase is being supported, is being needed It is actually used to UI (interface) character strings search by screening for translating in substantial amounts of UI character strings, precisely it is actual The UI character strings for using are very loaded down with trivial details time-consuming.
Generally, set-top box software exploitation can make index (index) row all UI character strings that may be used Table, then by manually according to index lookup is done, the manually screening according to index one by one in the code of magnanimity confirms, And grand control problem is noted also, the result of such lookup places one's entire reliance upon manually, time-consuming and easy error.
The content of the invention
In view of this, it is necessary to completed by manually for above-mentioned UI character string selections, the problem of time-consuming and easy error, A kind of interface character string selection method and system are provided.
A kind of interface character string selection method that the present invention is provided, comprises the steps:
S10:In Set Top Box program development process, to wanting actually used UI character strings place program in UI layer programs Carry out macro switch mark;
S20:UI layers program input compiler is carried out into precompile, UI layer programs are screened, by the UI characters of mark String place program is screened, and generates M precompile file;
S30:M precompile file is searched one by one, the precompile file for not containing index list filename is moved Remove, obtain after all removing and be left N number of precompile file;
S40:For each indexing key words in index list, make a look up in N number of precompile file, if in N Lookup result number of times is more than N in individual precompile file, then obtain the indexing key words correspondence UI character strings and retained, will be all Indexing key words is searched after finishing, and the final all UI character strings for retaining are exported as a result.
In one of which embodiment, step S20 also includes:Detection UI layer program locations, if storage In outside USB flash disk, then UI layers program is first cached in Set Top Box internal memory carries out again precompile.
In one of which embodiment, step S40 also includes:N number of precompile file is spliced into into one greatly File.
A kind of interface character string selection system that the present invention is provided, including:
Mark module, in Set Top Box program development process, to wanting actually used UI character strings institute in UI layer programs Macro switch mark is carried out in program;
Precompile processing module, by UI layers program input compiler precompile is carried out, and UI layer programs are screened, and will be marked The UI character strings place program of note is screened, and generates M precompile file;
Precompile document screening module, is searched one by one M precompile file, will not contain index list filename Precompile file remove, after all removing obtain be left N number of precompile file;
UI character string acquisition modules, for each indexing key words in index list, enter in N number of precompile file Row is searched, if lookup result number of times is more than N in N number of precompile file, is obtained the indexing key words correspondence UI character strings and is entered Row retains, and all indexing key wordses is searched after finishing, and the final all UI character strings for retaining are exported as a result.
In one of which embodiment, the precompile processing module detects UI layer program locations, if storage In outside USB flash disk, then UI layers program is first cached in Set Top Box internal memory carries out again precompile.
In one of which embodiment, N number of precompile file is spliced into one by the UI character strings acquisition module Big file.
Character string selection method and system in interface of the present invention, using the precompile function of compiler, to carrying out macro switch mark The UI character strings place program of note carries out precompile screening, and UI layer programs are simplified, then by searching index list text Part name carries out postsearch screening to all precompile files, each retrieval is searched in remaining N number of precompile file is screened crucial Word, if lookup result is more than N the UI character strings are obtained, and most at last the UI character strings of all acquisitions have been exported as the selection result Into screening, screening process is carried out without the need for manually operating automatically, so as to greatly save cost of labor, greatly improve efficiency and Do not allow error-prone.
Description of the drawings
Fig. 1 is the flow chart of the interface character string selection method in one embodiment;
Fig. 2 is the structure chart of the interface character string selection system in one embodiment.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, not For limiting the present invention.
In set-top box software development process, the compiling work that compiler enters line program can be used, and compiler all possesses and has Precompile function, precompile function can carry out screening operation to source program, the actually used journey that will be marked or define Sequence is screened, and simplifies the size of source program, and the present invention utilizes existing compiler, and the precompile function pair that compiler is carried UI character strings are screened, the actually used UI character strings of quick obtaining.
If Fig. 1 is the flow chart of the interface character string selection method in one embodiment, the method comprises the steps:
S10:In Set Top Box program development process, to wanting actually used UI character strings place program in UI layer programs Carry out macro switch mark.
In set-top box software program development process, for it is actually used or need programs (or file) can carry out it is grand Switch mark, whether needed, just can be by macro switch mark so after compiler precompile if can be set by macro switch The program of note is screened, and so as to simplify to big program, reduces the treating capacity of compiler and the workload of exploitation.At this In embodiment, because UI character strings are all in each program of UI layers or file, therefore to wanting actually used in UI layer programs UI character strings place program is marked, and subsequently carry out precompile screening to facilitate.
S20:UI layers program input compiler is carried out into precompile, UI layer programs are screened, by the UI characters of mark String place program is screened, and generates M precompile file.
UI layers program input compiler is carried out into precompile after mark, precompile be able to will be carried according to the mark being capable of identify that The program of mark is screened, and UI layer programs have thus been simplified significantly.Generated according to the quantity M precompile of UI layer program files M precompile file, i.e., the number M and UI layer original document number that precompile file is generated after precompile is identical.
When precompile is carried out, UI layers program storage is being prelisted in caching or USB flash disk if in USB flash disk The efficiency for compiling can be affected when translating, therefore the step also includes:Detection UI layer program locations, if being stored in outside USB flash disk, UI layers program is first cached in Set Top Box internal memory carries out again precompile.
S30:M precompile file is searched one by one, the precompile file for not containing index list filename is moved Remove, obtain after all removing and be left N number of precompile file.
Want actually used UI character strings all to make an index list due to all, multiple indexes are contained in index list Keyword, one UI character string of each index key manipulative indexing.In each file of UI layer programs, if in this document Containing the UI character strings for being actually subjected to use, then can contain index list filename in this document, to be quoted, and if Do not contain the UI character strings for being actually subjected to use and then do not contain index list filename.After precompile, in precompile file such as Fruit then illustrates to contain in the precompile file containing index list filename wants the actually used UI character strings for arriving, the then precompile File will retain;Illustrate not contained in the precompile file if index list filename is not contained and want the actually used UI for arriving Character string, then the precompile file to remove, to reduce the number of precompile file, obtain remaining N number of pre- after all removing Compiling file, so as to further be simplified.
S40:For each indexing key words in index list, make a look up in N number of precompile file, if in N Lookup result number of times is more than N in individual precompile file, then obtain the indexing key words correspondence UI character strings and retained, will be all Indexing key words is searched after finishing, and the final all UI character strings for retaining are exported as a result.
After precompile, all of indexing key words in index list can be added to each precompile file by compiler In, so for N number of precompile file, then at least there are n times in each indexing key words, because each indexing key words is also corresponded to Index one UI character string, if UI character strings be it is actually used arrive, indexing key words can find corresponding UI characters String, such lookup result number of times is more than N, therefore by the lookup to each indexing key words, if lookup result is more than N, says The bright indexing key words correspondence UI character strings want actually used, need to retain, then the lookup of all indexing key wordses is finished Afterwards, the final all UI character strings for retaining are exported as a result, i.e. screening is finished.
For N number of precompile file, each indexing key words, compiler are required to start n times, such compiler starts secondary Number can take in a large number too much, be to reduce the number of times that compiler starts, and the step also includes:N number of precompile file is spliced into into one Individual big file.So for each indexing key words, compiler only needs to start once, greatly reduces compiler startup time Number.
The interface character string selection method, using the precompile function of compiler, the UI characters to carrying out macro switch mark String place program carries out precompile screening, and UI layer programs are simplified, then by searching index list filename to all Precompile file carries out postsearch screening, and in remaining N number of precompile file is screened each search key is searched, if searching knot Fruit then obtains the UI character strings more than N, and most at last the UI character strings of all acquisitions complete screening, screening as the selection result output Process is carried out automatically without the need for manually operating, and so as to greatly save cost of labor, is greatly improved efficiency and is not allowed error-prone.
Meanwhile, the present invention also provides a kind of interface character string selection system, as shown in Fig. 2 the system includes:
Mark module 100, in Set Top Box program development process, to wanting actually used UI character strings in UI layer programs Place program carries out macro switch mark.
In set-top box software program development process, for it is actually used or need programs (or file) can carry out it is grand Switch mark, whether needed, just can be by macro switch mark so after compiler precompile if can be set by macro switch The program of note is screened, and so as to simplify to big program, reduces the treating capacity of compiler and the workload of exploitation.At this In embodiment, because UI character strings are all in each program of UI layers or file, therefore mark module 100 in UI layer programs to will Actually used UI character strings place program is marked, and subsequently carry out precompile screening to facilitate.
Precompile processing module 200, by UI layers program input compiler precompile is carried out, and UI layer programs are screened, The UI character strings place program of mark is screened, and generates M precompile file.
UI layers program input compiler is carried out precompile by precompile processing module 200 after mark, and precompile can be according to energy The mark of enough identification will be screened with markd program, and UI layer programs have thus been simplified significantly.Precompile processing module 200 generate M precompile file according to the quantity M precompile of UI layer program files, i.e., precompile file is generated after precompile Number M it is identical with UI layer original document numbers.
When precompile is carried out, UI layers program storage is being prelisted in caching or USB flash disk if in USB flash disk The efficiency for compiling can be affected when translating, precompile processing module 200 detects UI layer program locations, if being stored in outside USB flash disk, Then UI layers program is first cached in Set Top Box internal memory carries out again precompile.
Precompile document screening module 300, is searched one by one M precompile file, will not contain index list text The precompile file of part name is removed, and is obtained after all removing and is left N number of precompile file.
Want actually used UI character strings all to make an index list due to all, multiple indexes are contained in index list Keyword, one UI character string of each index key manipulative indexing.In each file of UI layer programs, if in this document Containing the UI character strings for being actually subjected to use, then can contain index list filename in this document, to be quoted, and if Do not contain the UI character strings for being actually subjected to use and then do not contain index list filename.After precompile, in precompile file such as Fruit then illustrates to contain in the precompile file containing index list filename wants the actually used UI character strings for arriving, the then precompile File will retain;Illustrate not contained in the precompile file if index list filename is not contained and want the actually used UI for arriving Character string, then the precompile file to remove, to reduce the number of precompile file, obtain remaining N number of pre- after all removing Compiling file, so as to further be simplified.
UI character strings acquisition module 400, for each indexing key words in index list, in N number of precompile file In make a look up, if lookup result number of times is more than N in N number of precompile file, obtain indexing key words correspondence UI characters String is retained, and all indexing key wordses is searched after finishing, and the final all UI character strings for retaining are exported as a result.
After precompile, all of indexing key words in index list can be added to each precompile file by compiler In, so for N number of precompile file, then at least there are n times in each indexing key words, because each indexing key words is also corresponded to Index one UI character string, if UI character strings be it is actually used arrive, indexing key words can find corresponding UI characters String, such lookup result number of times is more than N, therefore UI character strings acquisition module 400 is by the lookup to each indexing key words, if Lookup result is more than N, then illustrate that the indexing key words correspondence UI character strings want actually used, needs to retain, then will be all Indexing key words is searched after finishing, and the final all UI character strings for retaining are exported as a result, i.e. screening is finished.
For N number of precompile file, each indexing key words, compiler are required to start n times, such compiler starts secondary Number can take in a large number too much, be to reduce the number of times that compiler starts, and UI character strings acquisition module 400 spells N number of precompile file It is connected into a big file.So for each indexing key words, compiler only needs to start once, greatly reduces compiler The number of starts.
The interface character string selection system, using the precompile function of compiler, precompile processing module 200 pairs carries out grand The UI character strings place program of switch mark carries out precompile screening, and UI layer programs are simplified, then precompile file sieve Modeling block 300 carries out postsearch screening, UI character string acquisition modules to all precompile files by searching index list filename 400 search each search key in remaining N number of precompile file is screened, and if lookup result is more than N the UI words are obtained Symbol string, most at last the UI character strings of all acquisitions complete screening as the selection result output, and screening process need not be operated manually, Automatically carry out, so as to greatly save cost of labor, greatly improve efficiency and do not allow error-prone.
Character string selection method and system in interface of the present invention, using the precompile function of compiler, to carrying out macro switch mark The UI character strings place program of note carries out precompile screening, and UI layer programs are simplified, then by searching index list text Part name carries out postsearch screening to all precompile files, each retrieval is searched in remaining N number of precompile file is screened crucial Word, if lookup result is more than N the UI character strings are obtained, and most at last the UI character strings of all acquisitions have been exported as the selection result Into screening, screening process is carried out without the need for manually operating automatically, so as to greatly save cost of labor, greatly improve efficiency and Do not allow error-prone.
These are only presently preferred embodiments of the present invention, not to limit the present invention, all spirit in the present invention and Any modification, equivalent and improvement for being made within principle etc., should be included within the scope of the present invention.

Claims (6)

1. a kind of interface character string selection method, it is characterised in that comprise the steps:
S10:In Set Top Box program development process, to wanting actually used UI character strings place program to carry out in UI layer programs Macro switch is marked;
S20:UI layers program input compiler is carried out into precompile, UI layer programs are screened, by the UI character strings institute of mark Screen in program, and generate M precompile file;
S30:M precompile file is searched one by one, the precompile file for not containing index list filename is removed, entirely Portion obtains after removing is left N number of precompile file;
S40:For each indexing key words in index list, make a look up in N number of precompile file, if N number of pre- Lookup result number of times is more than N in compiling file, then obtain the indexing key words correspondence UI character strings and retained, by all indexes After keyword lookup is finished, the final all UI character strings for retaining are exported as a result.
2. character string selection method in interface according to claim 1, it is characterised in that step S20 also includes:Detection UI layer program locations, if being stored in outside USB flash disk, UI layers program are first cached in Set Top Box internal memory and are prelisted again Translate.
3. character string selection method in interface according to claim 1, it is characterised in that step S40 also includes:By N Individual precompile file is spliced into a big file.
4. a kind of interface character string selection system, it is characterised in that include:
Mark module, in Set Top Box program development process, to wanting actually used UI character strings place journey in UI layer programs Sequence carries out macro switch mark;
Precompile processing module, by UI layers program input compiler precompile is carried out, and UI layer programs is screened, by mark UI character strings place program is screened, and generates M precompile file;
Precompile document screening module, is searched one by one M precompile file, will not contain the pre- of index list filename Compiling file is removed, and is obtained after all removing and is left N number of precompile file;
UI character string acquisition modules, for each indexing key words in index list, are looked in N number of precompile file Look for, if lookup result number of times is more than N in N number of precompile file, obtains the indexing key words correspondence UI character strings and protected Stay, all indexing key wordses are searched after finishing, the final all UI character strings for retaining are exported as a result.
5. character string selection system in interface according to claim 4, it is characterised in that the precompile processing module detection UI layer program locations, if being stored in outside USB flash disk, UI layers program are first cached in Set Top Box internal memory and are prelisted again Translate.
6. character string selection system in interface according to claim 4, it is characterised in that the UI character strings acquisition module will N number of precompile file is spliced into a big file.
CN201611253855.0A 2016-12-30 2016-12-30 Interface character string selection method and system Active CN106648822B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611253855.0A CN106648822B (en) 2016-12-30 2016-12-30 Interface character string selection method and system
PCT/CN2017/108723 WO2018121041A1 (en) 2016-12-30 2017-10-31 Interface character string screening method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611253855.0A CN106648822B (en) 2016-12-30 2016-12-30 Interface character string selection method and system

Publications (2)

Publication Number Publication Date
CN106648822A true CN106648822A (en) 2017-05-10
CN106648822B CN106648822B (en) 2019-09-06

Family

ID=58836980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611253855.0A Active CN106648822B (en) 2016-12-30 2016-12-30 Interface character string selection method and system

Country Status (2)

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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018121041A1 (en) * 2016-12-30 2018-07-05 深圳市九洲电器有限公司 Interface character string screening method and system
CN110728113A (en) * 2018-06-28 2020-01-24 北京金山办公软件股份有限公司 Information screening method and device of electronic forms and terminal equipment
CN113342323A (en) * 2021-06-29 2021-09-03 银清科技有限公司 Method and device for software online development
CN114579135A (en) * 2022-03-01 2022-06-03 北京字节跳动网络技术有限公司 Installation package generation method and device

Citations (4)

* 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
CN1987863A (en) * 2005-12-22 2007-06-27 国际商业机器公司 Method and system comprising accessible role and state information in html documents
CN101853174A (en) * 2009-04-03 2010-10-06 中兴通讯股份有限公司 Method and device for synchronizing defining and calling of string resource
CN101930466A (en) * 2010-08-31 2010-12-29 北京捷通华声语音技术有限公司 Method and system for managing cross-platform memory file

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103493A (en) * 2009-12-16 2011-06-22 新奥特(北京)视频技术有限公司 Method for internationalizing software language
CN102521222B (en) * 2011-12-08 2015-05-20 深圳众为兴技术股份有限公司 Multi-language translation device and translation method of system text
CN106648822B (en) * 2016-12-30 2019-09-06 深圳市九洲电器有限公司 Interface character string selection method and system

Patent Citations (4)

* 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
CN1987863A (en) * 2005-12-22 2007-06-27 国际商业机器公司 Method and system comprising accessible role and state information in html documents
CN101853174A (en) * 2009-04-03 2010-10-06 中兴通讯股份有限公司 Method and device for synchronizing defining and calling of string resource
CN101930466A (en) * 2010-08-31 2010-12-29 北京捷通华声语音技术有限公司 Method and system for managing cross-platform memory file

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018121041A1 (en) * 2016-12-30 2018-07-05 深圳市九洲电器有限公司 Interface character string screening method and system
CN110728113A (en) * 2018-06-28 2020-01-24 北京金山办公软件股份有限公司 Information screening method and device of electronic forms and terminal equipment
CN113342323A (en) * 2021-06-29 2021-09-03 银清科技有限公司 Method and device for software online development
CN113342323B (en) * 2021-06-29 2024-03-29 银清科技有限公司 Method and device for online development of software
CN114579135A (en) * 2022-03-01 2022-06-03 北京字节跳动网络技术有限公司 Installation package generation method and device
CN114579135B (en) * 2022-03-01 2023-09-05 抖音视界有限公司 Installation package generation method and device

Also Published As

Publication number Publication date
CN106648822B (en) 2019-09-06
WO2018121041A1 (en) 2018-07-05

Similar Documents

Publication Publication Date Title
US9195738B2 (en) Tokenization platform
EP2784665B1 (en) Program and version control method
CN106462399B (en) Code is recommended
CN106648822A (en) User interface character string screening method and system
US7756859B2 (en) Multi-segment string search
CN111160045B (en) Game resource file translation method, device and equipment
JP2006018693A (en) Similar source code extraction program, similar source code extraction device and similar source code extraction method
CN110109681B (en) Method and system for converting codes between different platforms
CN102467498A (en) Translation method and device
CN105404688A (en) Searching method and searching device
CN106598628A (en) Editing method and device of internationalized configuration files
CN105094941B (en) It is a kind of to realize multilingual method and device
CN108446115A (en) A kind of method and device of code reuse
CN106570095B (en) XML data operation method and equipment
CN111984673B (en) Fuzzy retrieval method and device for tree structure of power grid electric energy metering system
US8484221B2 (en) Adaptive routing of documents to searchable indexes
US11947577B2 (en) Auto-completion based on content similarities
CN104424223A (en) Input method-based APP (Application) search and fast boot method and related input method system
KR100659370B1 (en) Method for constructing a document database and method for searching information by matching thesaurus
KR100964207B1 (en) Method and apparatus for indexing and retrieving documents based on hashing
KR100843075B1 (en) Apparatus and method for managing data
JPH05135102A (en) Document retrieval system
CN112380445B (en) Data query method, device, equipment and storage medium
CN111679747A (en) Code input method, device, electronic equipment and storage medium
CN107220390A (en) A kind of method and device for creating Chinese index

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