CN106648822B - Interface character string selection method and system - Google Patents
Interface character string selection method and system Download PDFInfo
- Publication number
- CN106648822B CN106648822B CN201611253855.0A CN201611253855A CN106648822B CN 106648822 B CN106648822 B CN 106648822B CN 201611253855 A CN201611253855 A CN 201611253855A CN 106648822 B CN106648822 B CN 106648822B
- Authority
- CN
- China
- Prior art keywords
- precompile
- character string
- program
- file
- layers
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
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 present invention relates to a kind of interface character string selection method and system, utilize the precompile function of compiler, precompile screening is carried out to program where carrying out the UI character string of macro switch label, UI layers of program are simplified, then postsearch screening is carried out to all precompile files by searching for index list filename, each search key is searched in screening remaining N number of precompile file, the UI character string is obtained if lookup result is greater than N, the UI character string of all acquisitions is exported as the selection result finally and completes screening, screening process is without human intervention, it is automatic to carry out, to which cost of labor be greatly saved, it greatly improves efficiency and does not allow error-prone.
Description
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 technique
Currently, 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, and the software of product development stage is simple and smart.It is supporting the multilingual set-top box product development phase, is needing
Actual use to UI (interface) character string by screening in a large amount of UI character string for translating, precisely search practical
The very cumbersome time-consuming of the UI character string used.
In general, set-top box software exploitation can be made into all UI character strings that may be used one index (index) column
Table, then by manually doing lookup according to index, the manually screening confirmation in the code of magnanimity according to index one by one,
And note also macro control problem, the result of such lookup places one's entire reliance upon manually, time-consuming and easy error.
Summary of the invention
In view of this, it is necessary to for the problem that above-mentioned UI character string selection is completed by manually, 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 provided by the invention, includes the following steps:
S10: in set-top box program development process, to program where the UI character string to be actually used in UI layers of program
Carry out macro switch label;
S20: UI layers of program input compiler are subjected to precompile, UI layers of program are screened, by the UI character of label
Program where string screens, and generates M precompile file;
S30: searching M precompile file one by one, and the precompile file without containing index list filename is moved
It removes, is obtained after all removing and be left N number of precompile file;
S40: it for each indexing key words in index list, is searched in N number of precompile file, if in N
Lookup result number is greater than N in a precompile file, then obtains the indexing key words and correspond to UI character string and retained, and will own
After indexing key words are searched, all UI character strings finally retained are exported as a result.
In one of them embodiment, the step S20 further include: UI layers of program location of detection, if storage
In external USB flash disk, then UI layers of program is first cached in set-top box memory and carries out precompile again.
In one of them embodiment, the step S40 further include: be spliced into N number of precompile file one big
File.
A kind of interface character string selection system provided by the invention, comprising:
Mark module, in set-top box program development process, to the UI character string institute to be actually used in UI layers of program
Macro switch label is carried out in program;
UI layers of program input compiler are carried out precompile, screen, will mark to UI layers of program by precompile processing module
Program where the UI character string of note screens, and generates M precompile file;
Precompile document screening module searches M precompile file one by one, will not contain index list filename
Precompile file remove, all remove after obtain is left N number of precompile file;
UI character string obtain module, for each indexing key words in index list, in N number of precompile file into
Row search, if in N number of precompile file lookup result number be greater than N, obtain the indexing key words correspond to UI character string into
Row retains, and after all indexing key words are searched, all UI character strings finally retained are exported as a result.
In one of them embodiment, the precompile processing module detects UI layers of program location, if storage
In external USB flash disk, then UI layers of program is first cached in set-top box memory and carries out precompile again.
In one of them embodiment, the UI character string obtains module and N number of precompile file is spliced into one
Big file.
Character string selection method and system in interface of the present invention, using the precompile function of compiler, to progress macro switch mark
Program where the UI character string of note carries out precompile screening, simplifies to UI layers of program, then by searching for index list text
Part name carries out postsearch screening to all precompile files, and it is crucial that each retrieval is searched in screening remaining N number of precompile file
Word obtains the UI character string if lookup result is greater than N, has finally exported the UI character string of all acquisitions as the selection result
At screening, screening process is without human intervention, automatic to carry out, so that cost of labor be greatly saved, greatly improve efficiency and
Do not allow error-prone.
Detailed description of the invention
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 to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.
In set-top box software development process, the compiling work that compiler carries out program can be used, and compiler all has
Precompile function, precompile function can carry out screening operation to source program, by the journey for the actual use for marking or defining
Sequence screens, and simplifies the size of source program, the present invention precompile function pair included using existing compiler and compiler
UI character string is screened, the UI character string of quick obtaining actual use.
If Fig. 1 is the flow chart of the interface character string selection method in one embodiment, this method comprises the following steps:
S10: in set-top box program development process, to program where the UI character string to be actually used in UI layers of program
Carry out macro switch label.
In set-top box software program development process, the program (or file) for actually using or needing can be carried out macro
Whether switch label, can be set by macro switch and be needed, so later can be by macro switch mark by compiler precompile
The program of note screens, to simplify to big program, reduces the treating capacity of compiler and the workload of exploitation.At this
In embodiment, since UI character string is all in UI layers of each program or file, therefore to being actually used in UI layers of program
Program where UI character string is marked, to facilitate subsequent progress precompile screening.
S20: UI layers of program input compiler are subjected to precompile, UI layers of program are screened, by the UI character of label
Program where string screens, and generates M precompile file.
UI layers of program input compiler are subjected to precompile after label, precompile can will have according to the label that can be identified
The program of label screens, and has thus simplified UI layers of program significantly.It is generated according to the quantity M precompile of UI layers of program file
The number M that precompile file is generated after M precompile file, i.e. precompile is identical as UI layers of original document number.
When carrying out precompile, UI layers of program are stored in caching or USB flash disk, are being prelisted if be stored in USB flash disk
It will affect the efficiency of compiling when translating, therefore the step further include: UI layers of program location of detection, if being stored in external USB flash disk,
UI layers of program are first cached in set-top box memory and carry out precompile again.
S30: searching M precompile file one by one, and the precompile file without containing index list filename is moved
It removes, is obtained after all removing and be left N number of precompile file.
Since all UI character strings to be actually used all are made into an index list, contain multiple indexes in index list
Keyword, one UI character string of each index key manipulative indexing.In each file of UI layers of program, if in this document
Containing being actually subjected to using the UI character string arrived, then it can contain index list filename in this document, to be quoted, and if
Without containing be actually subjected to using to UI character string do not contain index list filename then.After precompile, in precompile file such as
Fruit contains index list filename and then illustrates in the precompile file containing the UI character string to actually use, the then precompile
File will retain;Illustrate in the precompile file if without containing index list filename without containing the UI to actually use
Character string, then the precompile file will remove, and to reduce the number of precompile file, obtain after all removing remaining N number of pre-
Compiling file, to further be simplified.
S40: it for each indexing key words in index list, is searched in N number of precompile file, if in N
Lookup result number is greater than N in a precompile file, then obtains the indexing key words and correspond to UI character string and retained, and will own
After indexing key words are searched, all UI character strings finally retained are exported as a result.
After precompile, indexing key words all in index list can be added to each precompile file by compiler
In, in this way for N number of precompile file, then at least there are n times in each indexing key words, since each indexing key words are also corresponding
A UI character string is indexed, if the actual use of UI character string is arrived, indexing key words can find corresponding UI character
String, such lookup result number is greater than N, therefore is said by the lookup to each indexing key words if lookup result is greater than N
The bright indexing key words correspond to UI character string and to actually use, and need to retain, then the lookup of all indexing key words is finished
Afterwards, all UI character strings finally retained are exported as a result, i.e. screening finishes.
For N number of precompile file, each indexing key words, compiler is required to starting n times, such compiler starting time
Number too much can be a large amount of time-consuming, for the number for reducing compiler starting, the step further include: N number of precompile file is spliced into one
A big file.In this way for each indexing key words, compiler only needs to start once, greatly reduces compiler starting time
Number.
The interface character string selection method, using the precompile function of compiler, to the UI character for carrying out macro switch label
Program carries out precompile screening where string, simplifies to UI layers of program, then by searching for index list filename to all
Precompile file carries out postsearch screening, searches each search key in screening remaining N number of precompile file, if searching knot
Fruit is greater than N and then obtains the UI character string, finally exports the UI character string of all acquisitions as the selection result and completes screening, screening
Process is without human intervention, automatic to carry out, so that cost of labor be greatly saved, greatly improve efficiency and do not allow error-prone.
Meanwhile the present invention also provides a kind of interface character string selection systems, as shown in Fig. 2, the system includes:
Mark module 100, in set-top box program development process, to the UI character string to be actually used in UI layers of program
Place program carries out macro switch label.
In set-top box software program development process, the program (or file) for actually using or needing can be carried out macro
Whether switch label, can be set by macro switch and be needed, so later can be by macro switch mark by compiler precompile
The program of note screens, to simplify to big program, reduces the treating capacity of compiler and the workload of exploitation.At this
In embodiment, since UI character string is all in UI layers of each program or file, therefore mark module 100 in UI layers of program to wanting
Program where the UI character string of actual use is marked, to facilitate subsequent progress precompile screening.
UI layers of program input compiler are carried out precompile, screened to UI layers of program by precompile processing module 200,
Program where the UI character string of label is screened, and generates M precompile file.
UI layers of program input compiler are carried out precompile by precompile processing module 200 after label, and precompile can be according to energy
The label enough identified will be screened with markd program, thus simplify UI layers of program significantly.Precompile processing module
200 generate M precompile file according to the quantity M precompile of UI layers of program file, i.e., precompile file is generated after precompile
Number M it is identical as UI layers of original document number.
When carrying out precompile, UI layers of program are stored in caching or USB flash disk, are being prelisted if be stored in USB flash disk
Will affect the efficiency of compiling when translating, precompile processing module 200 detects UI layers of program location, if being stored in external USB flash disk,
Then UI layers of program are first cached in set-top box memory and carry out precompile again.
Precompile document screening module 300 searches M precompile file one by one, will be without containing index list text
The precompile file of part name removes, and obtains after all removing and is left N number of precompile file.
Since all UI character strings to be actually used all are made into an index list, contain multiple indexes in index list
Keyword, one UI character string of each index key manipulative indexing.In each file of UI layers of program, if in this document
Containing being actually subjected to using the UI character string arrived, then it can contain index list filename in this document, to be quoted, and if
Without containing be actually subjected to using to UI character string do not contain index list filename then.After precompile, in precompile file such as
Fruit contains index list filename and then illustrates in the precompile file containing the UI character string to actually use, the then precompile
File will retain;Illustrate in the precompile file if without containing index list filename without containing the UI to actually use
Character string, then the precompile file will remove, and to reduce the number of precompile file, obtain after all removing remaining N number of pre-
Compiling file, to further be simplified.
UI character string obtains module 400, for each indexing key words in index list, in N number of precompile file
In searched, if in N number of precompile file lookup result number be greater than N, obtain the indexing key words and correspond to UI character
String is retained, and after all indexing key words are searched, all UI character strings finally retained are exported as a result.
After precompile, indexing key words all in index list can be added to each precompile file by compiler
In, in this way for N number of precompile file, then at least there are n times in each indexing key words, since each indexing key words are also corresponding
A UI character string is indexed, if the actual use of UI character string is arrived, indexing key words can find corresponding UI character
String, such lookup result number is greater than N, therefore UI character string obtains module 400 by the lookup to each indexing key words, if
Lookup result is greater than N, then illustrates that the indexing key words correspond to UI character string and to actually use, need to retain, then will own
After indexing key words are searched, all UI character strings finally retained are exported as a result, i.e. screening finishes.
For N number of precompile file, each indexing key words, compiler is required to starting n times, such compiler starting time
Number too much can be a large amount of time-consuming, and for the number for reducing compiler starting, UI character string obtains module 400 and spells N number of precompile file
It is connected into a big file.In this way 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, the 200 pairs of progress of precompile processing module are macro
Program carries out precompile screening where switching the UI character string of label, simplifies to UI layers of program, and then precompile file sieves
Modeling block 300 carries out postsearch screening to all precompile files by searching for index list filename, and UI character string obtains module
400 search each search key in screening remaining N number of precompile file, obtain the UI word if lookup result is greater than N
Symbol string, finally using the UI character string of all acquisitions as the selection result output complete screen, screening process without human intervention,
It is automatic to carry out, so that cost of labor be greatly saved, 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 progress macro switch mark
Program where the UI character string of note carries out precompile screening, simplifies to UI layers of program, then by searching for index list text
Part name carries out postsearch screening to all precompile files, and it is crucial that each retrieval is searched in screening remaining N number of precompile file
Word obtains the UI character string if lookup result is greater than N, has finally exported the UI character string of all acquisitions as the selection result
At screening, screening process is without human intervention, automatic to carry out, so that cost of labor be greatly saved, greatly improve efficiency and
Do not allow error-prone.
The above is merely preferred embodiments of the present invention, be not intended to limit the invention, it is all in spirit of the invention and
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within principle.
Claims (6)
1. a kind of interface character string selection method, which comprises the steps of:
S10: in set-top box program development process, program where the UI character string to be actually used is carried out in UI layers of program
Macro switch label, wherein all UI character strings to be actually used are made into index list;
S20: UI layers of program input compiler are subjected to precompile, UI layers of program are screened, by the UI character string institute of label
It is screened in program, and generates M precompile file, wherein to be actually used described in existing in the precompile file
When UI character string, index list filename is contained in the precompile file;
S30: searching M precompile file one by one, the precompile file without containing index list filename is removed, entirely
Portion obtains after removing is left N number of precompile file;
S40: it for each indexing key words in index list, is searched in N number of precompile file, if N number of pre-
Lookup result number is greater than N in compiling file, then obtains the indexing key words and correspond to UI character string and retained, by all indexes
After keyword is searched, all UI character strings finally retained are exported as a result.
2. character string selection method in interface according to claim 1, which is characterized in that the step S20 further include: detection
UI layers of program are first cached in set-top box memory and prelist again if being stored in external USB flash disk by UI layers of program location
It translates.
3. character string selection method in interface according to claim 1, which is characterized in that before the step S40 further include:
N number of precompile file is spliced into a big file.
4. a kind of interface character string selection system characterized by comprising
Mark module, in set-top box program development process, to journey where the UI character string to be actually used in UI layers of program
Sequence carries out macro switch label, wherein all UI character strings to be actually used are made into index list;
UI layers of program input compiler are carried out precompile, screened to UI layers of program, by label by precompile processing module
Program where UI character string screens, and generates M precompile file, wherein there is described want in the precompile file
When the UI character string of actual use, index list filename is contained in the precompile file;
Precompile document screening module searches M precompile file one by one, will be pre- without containing index list filename
Compiling file removes, and obtains after all removing and is left N number of precompile file;
UI character string obtains module and each indexing key words in index list is looked into N number of precompile file
It looks for, if lookup result number is greater than N in N number of precompile file, obtains the indexing key words and correspond to UI character string and protected
It stays, after all indexing key words are searched, all UI character strings finally retained is exported as a result.
5. character string selection system in interface according to claim 4, which is characterized in that the precompile processing module detection
UI layers of program are first cached in set-top box memory and prelist again if being stored in external USB flash disk by UI layers of program location
It translates.
6. character string selection system in interface according to claim 4, which is characterized in that the UI character string obtains module and exists
For each indexing key words in index list, before being searched in N number of precompile file, by N number of translation that prelists
Part is spliced into a big file.
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 CN106648822A (en) | 2017-05-10 |
CN106648822B true 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) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648822B (en) * | 2016-12-30 | 2019-09-06 | 深圳市九洲电器有限公司 | Interface character string selection method and system |
CN110728113A (en) * | 2018-06-28 | 2020-01-24 | 北京金山办公软件股份有限公司 | A kind of electronic form information screening method, device and terminal equipment |
CN113342323B (en) * | 2021-06-29 | 2024-03-29 | 银清科技有限公司 | Method and device for online development of software |
CN114397859A (en) * | 2022-01-13 | 2022-04-26 | 四川汇造智能科技有限公司 | Method for removing material residual quantity for outputting NC code translator |
CN114579135B (en) * | 2022-03-01 | 2023-09-05 | 抖音视界有限公司 | Installation package generation method and device |
Citations (4)
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)
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 |
-
2016
- 2016-12-30 CN CN201611253855.0A patent/CN106648822B/en active Active
-
2017
- 2017-10-31 WO PCT/CN2017/108723 patent/WO2018121041A1/en active Application Filing
Patent Citations (4)
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 |
Also Published As
Publication number | Publication date |
---|---|
WO2018121041A1 (en) | 2018-07-05 |
CN106648822A (en) | 2017-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106648822B (en) | Interface character string selection method and system | |
EP2784665B1 (en) | Program and version control method | |
US8301437B2 (en) | Tokenization platform | |
US8704687B2 (en) | Code set conversion management optimization | |
WO2013158758A1 (en) | Semantic source code searching | |
US7756859B2 (en) | Multi-segment string search | |
US9292595B2 (en) | Creating new documents based on global intent and local context | |
CN105094941B (en) | It is a kind of to realize multilingual method and device | |
CN113821496B (en) | Database migration method, system, device and computer readable storage medium | |
US20160196303A1 (en) | String search device, string search method, and string search program | |
CN104424222A (en) | Database indexing method and device | |
US9984065B2 (en) | Optimizing generation of a regular expression | |
CN119179520A (en) | Conversion method, device and storage medium based on RISC-V architecture built-in function | |
US9509757B2 (en) | Parallel sorting key generation | |
CN116150093B (en) | Method for realizing object storage enumeration of objects and electronic equipment | |
JP7131119B2 (en) | Systems and methods for merging source data from a source application with target data in a target application | |
CN105824976A (en) | Method and device for optimizing word segmentation banks | |
US8682644B1 (en) | Multi-language sorting index | |
CN104424223A (en) | Input method-based APP (Application) search and fast boot method and related input method system | |
CN115563116A (en) | Database table scanning method, device and equipment | |
CN104268296A (en) | Hypernym search method and device | |
CN111857809A (en) | Front-end development file updating method and device and electronic equipment | |
CN105117420A (en) | Method and apparatus for updating word stock of input method | |
US10120968B1 (en) | System and method for hierarchical library searching | |
CN111679747B (en) | Code input method, device, electronic device and storage medium |
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 |