CN106775629A - Search file generation method and device - Google Patents

Search file generation method and device Download PDF

Info

Publication number
CN106775629A
CN106775629A CN201611026372.7A CN201611026372A CN106775629A CN 106775629 A CN106775629 A CN 106775629A CN 201611026372 A CN201611026372 A CN 201611026372A CN 106775629 A CN106775629 A CN 106775629A
Authority
CN
China
Prior art keywords
resource
file
setting option
class name
searching
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
CN201611026372.7A
Other languages
Chinese (zh)
Other versions
CN106775629B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611026372.7A priority Critical patent/CN106775629B/en
Publication of CN106775629A publication Critical patent/CN106775629A/en
Application granted granted Critical
Publication of CN106775629B publication Critical patent/CN106775629B/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/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure is directed to a kind of search file generation method, belong to technical field of software development.Methods described includes:The project information of the first order page of the setting function in acquisition operating system, searching resource of the project information comprising each setting option in corresponding page, the searching resource at least includes jump information and path, determine each resource file in operating system, the jump information of each setting option in the first order page and path, and each resource file, the project information of the pages at different levels in the setting function is determined step by step, project information according to the pages at different levels generates the search file of the setting function, by the searching resource for setting the first order page in function, the searching resource that each resource file of binding operation system automatically generates each setting option in the pages at different levels set in function simplifies manual steps, reduce the artificial development time, improve the effect of software development efficiency.

Description

Search file generation method and device
Technical field
This disclosure relates to technical field of software development, more particularly to a kind of search file generation method and device.
Background technology
It is one of the function on basis in the Mobile operating systems such as Android to set function, and user can be by terminal The setting function of providing of uniting is configured to terminal.
The setting function of many operating systems both provides search entrance, so as to certain setting option of user's quickly look-up.Mesh Before, the search file that the function of search in setting function is used is safeguarded and updated by the developer of operating system, that is, develop The corresponding searching resource of each setting option in the setting function of personnel's housekeeping operation system, and searching resource is added into search File.
The content of the invention
The embodiment of the present disclosure provides a kind of search file generation method and device, and technical scheme is as follows:
First aspect, there is provided a kind of search file generation method, methods described includes:
Search file generation method, it is characterised in that methods described includes:
The project information of the first order page of the setting function in acquisition operating system, the project information includes correspondence page The searching resource of each setting option in face, the searching resource at least includes jump information and path, in the jump information Class name comprising corresponding source file;
Determine each resource file in operating system;
The jump information of each setting option in the first order page and path, and described each resource text Part, determines the project information of the pages at different levels in the setting function step by step;
The project information generation search file that function is set according to the pages at different levels.
Optionally, the jump information of each setting option in the first order page and path, and it is described Each resource file, determines the project information of the pages at different levels in the setting function step by step, including:
Searching resource with each setting option in the first order page is the initial resource that has determined that, searching loop institute Each resource file in each resource file is stated, the jump information of the resource file is obtained;
When it is described have determined that resource in comprising in the resource file each setting option correspondence it is described setting function in Upper level setting option searching resource when, each in resource file described in the coordinates measurement according to the upper level setting option The path of setting option;
The path of each setting option in the resource file and the jump information of the resource file, generate institute State the searching resource of each setting option in resource file;
The searching resource of each setting option in the resource file is added into and described has determined that resource.
Optionally, the jump information for obtaining the resource file, including:
Judge in the resource file whether the jump information comprising the resource file;
If judged result is the jump information comprising the resource file in the resource file, from the resource file The middle jump information for obtaining the resource file;
If judged result is the jump information not comprising the resource file in the resource file, inquiry is quoted described The target source file of resource file, according to the inheritance of the target source file, determines the class name of the target source file, root The jump information of the resource file is determined according to the class name of the target source file.
Optionally, each setting option in the resource file according to the coordinates measurement of the upper level setting option Before path, also include:
It is determined that quoting the class name of the target source file of the resource file;
When it is described have determined that resource in class name comprising the target source file when, had determined that described in resource comprising institute The searching resource of the class name of target source file is stated, is defined as each setting option correspondence in the resource file in the setting work( The searching resource of the upper level setting option in energy.
Optionally, methods described also includes:
When it is described have determined that resource in class name not comprising the target source file when, inquire about the son of the target source file The class name of class;
When it is described have determined that resource in class name comprising the subclass when, had determined that described in resource comprising the subclass Class name searching resource, be defined as in the resource file each setting option correspondence it is described setting function in upper level The searching resource of setting option.
Optionally, methods described also includes:
When it is described have determined that resource in the class name not comprising the target source file, and the class of the target source file is entitled During the class name of Activity classes, the code of the target source file is analyzed, determine the new class name of the target source file, it is described New class name is the class name of the Fragment classes that the resource file is quoted under the Activity classes;
When it is described have determined that resource in comprising the new class name when, had determined that described in resource comprising the new class The searching resource of name, upper level of each setting option correspondence being defined as in the resource file in the setting function is set The searching resource of item.
Optionally, methods described also includes:
When it is described have determined that resource in the class name not comprising the target source file, and the class of the target source file is entitled During the class name of intent classes, the class name of the corresponding source file of the intent classes is inquired about;
When it is described have determined that resource in class name comprising the corresponding source file of the intent classes when, have determined that money by described The searching resource of the class name comprising the corresponding source file of the intent classes in source, each being defined as in the resource file sets Put the searching resource of upper level setting option of the item correspondence in the setting function.
Optionally, methods described also includes:
The corresponding configuration information of each setting option in the pages at different levels that function is set is obtained, the configuration information is used Whether shown in specified type and/or given scenario in the corresponding setting option of instruction;
According to the configuration information, corresponding configuration parameter is set in the searching resource of the setting option.
Second aspect, there is provided a kind of search file generating means, described device includes:
Data obtaining module, the project information of the first order page for obtaining the setting function in operating system is described Searching resource of the project information comprising each setting option in corresponding page, the searching resource at least includes jump information and road Footpath, the class name comprising corresponding source file in the jump information;
File determining module, for determining each resource file in operating system;
Information generating module, jump information and path for each setting option in the first order page, with And described each resource file, the project information of the pages at different levels in the setting function is determined step by step;
File generating module, for according to the project information of the pages at different levels generation search text for setting function Part.
Optionally, described information generation module, including:
Acquisition of information submodule, for the searching resource with each setting option in the first order page be it is initial Determine resource, each resource file in each resource file described in searching loop, obtain the resource file redirects letter Breath;
Coordinates measurement submodule, for when it is described have determined that resource in comprising each setting option pair in the resource file Should be in the searching resource of the upper level setting option in the setting function, the coordinates measurement institute according to the upper level setting option State the path of each setting option in resource file;
Resource generates submodule, path and the resource text for each setting option in the resource file The jump information of part, generates the searching resource of each setting option in the resource file;
Addition submodule, for the searching resource of each setting option in the resource file to be added into described having determined that Resource.
Optionally, described information acquisition submodule, including:
Judging submodule, for judge in the resource file whether the jump information comprising the resource file;
First acquisition submodule, if being to redirect letter comprising the resource file in the resource file for judged result Breath, then obtain the jump information of the resource file from the resource file;
Second acquisition submodule, if being redirecting not comprising the resource file in the resource file for judged result The target source file of the resource file is quoted in information, then inquiry, according to the inheritance of the target source file, it is determined that described The class name of target source file, the class name according to the target source file determines the jump information of the resource file.
Optionally, described information generation module, also includes:
First class name determination sub-module, in the coordinates measurement submodule according to the path of the upper level setting option Before generating the path of each setting option in the resource file, it is determined that quoting the class of the target source file of the resource file Name;
First resource determination sub-module, for when it is described have determined that resource in class name comprising the target source file when, By the searching resource for having determined that the class name comprising the target source file in resource, it is defined as each in the resource file The searching resource of upper level setting option of the individual setting option correspondence in the setting function.
Optionally, described information generation module also includes:
First class name inquires about submodule, for when it is described have determined that resource in the class name not comprising the target source file When, inquire about the class name of the subclass of the target source file;
Secondary resource determination sub-module, for when it is described have determined that resource in class name comprising the subclass when, will be described The searching resource of the class name comprising the subclass in resource is had determined that, is defined as each setting option correspondence in the resource file The searching resource of the upper level setting option in the setting function.
Optionally, described information generation module also includes:
Second class name determination sub-module, for when it is described have determined that resource in the class name not comprising the target source file, And during the class name of the entitled Activity classes of class of the target source file, the code of the target source file is analyzed, it is determined that described The new class name of target source file, the new class name is the Fragment that the resource file is quoted under the Activity classes The class name of class;
Information resources determination sub-module, for when it is described have determined that resource in comprising the new class name when, will described in Determine the searching resource comprising the new class name in resource, be defined as each setting option correspondence in the resource file in institute State the searching resource that the upper level setting option in function is set.
Optionally, described information generation module also includes:
Second class name inquires about submodule, for when it is described have determined that resource in the class name not comprising the target source file, And during the class name of the entitled intent classes of class of the target source file, inquire about the class name of the corresponding source file of the intent classes;
4th resource determination sub-module, for when it is described have determined that resource in comprising the corresponding source file of the intent classes Class name when, by the searching resource for having determined that the class name comprising the corresponding source file of the intent classes in resource, it is determined that It is the searching resource of upper level setting option of each setting option correspondence in the resource file in the setting function.
Optionally, described device also includes:
Configuration acquisition module, it is corresponding with confidence for each setting option in the pages at different levels for obtaining the setting function Breath, the configuration information is used to indicate whether corresponding setting option shows in specified type and/or given scenario;
Parameter setting module, for according to the configuration information, setting corresponding in the searching resource of the setting option Configuration parameter.
The third aspect, there is provided a kind of search file generating means, described device includes:
Processor;
Memory for storing the executable instruction of the processor;
Wherein, the processor is configured as:
The project information of the first order page of the setting function in acquisition operating system, the project information includes correspondence page The searching resource of each setting option in face, the searching resource at least includes jump information and path, in the jump information Class name comprising corresponding source file;
Determine each resource file in operating system;
The jump information of each setting option in the first order page and path, and described each resource text Part, determines the project information of the pages at different levels in the setting function step by step;
The project information generation search file that function is set according to the pages at different levels.
The technical scheme that the embodiment of the present disclosure is provided can include the following benefits:
The project information of the first order page of the setting function in acquisition operating system, the project information includes corresponding page In each setting option searching resource, the searching resource at least includes jump information and path, determines each in operating system Individual resource file, the jump information of each setting option in the first order page and path, and each resource file, The project information of the pages at different levels in the setting function is determined step by step, and the project information according to the pages at different levels generates the setting function Search file, it is basic open shown in scheme, can be by setting the searching resource of the first order page in function, with reference to behaviour Each resource file for making system automatically generates the searching resource of each setting option in the pages at different levels set in function, is not required to The searching resource of all of setting option of developer's manual sorting is wanted, simplified manual steps are reached, when reducing artificial exploitation Between, improve the effect of software development efficiency.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure Example, and it is used to explain the principle of the disclosure together with specification.
Fig. 1 is a kind of flow chart of the search file generation method according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of the search file generation method according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of project information generation method that embodiment illustrated in fig. 2 is related to;
Fig. 4 is a kind of block diagram of the search file generating means according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of the search file generating means according to an exemplary embodiment;
Fig. 6 is the structural representation of the electronic equipment provided according to an exemplary embodiment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in implementation method do not represent all implementation methods consistent with the disclosure.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects described in detail in claims, the disclosure.
Scheme shown in the embodiment of the present disclosure can apply in all kinds of Software Development Platform equipment.Such as, this programme can In being applied to have an electronic equipment of SDK based on the operation such as PC or work station.
Setting function in operating system is generally made up of some grades of pages, is set comprising one or more in every first level pages Item is put, some setting option of higher level's page can be as the entrance of subordinate's page.In the scheme shown in the embodiment of the present disclosure, SDK only needs to get the searching resource of each setting option in the first order page for setting function, you can to tie The setting option that each resource file in closing operation system is searched in other pages at different levels set in function automatically redirects letter Breath, generates path of each setting option in function is set, and the complete search file of function is set to automatically obtain.Specifically , the implementation process of the scheme shown in the disclosure may be referred to the following examples.
Fig. 1 is a kind of flow chart of the search file generation method according to an exemplary embodiment, and the method can be with In for running and having an electronic equipment of SDK.As shown in figure 1, the search file generation method can be including following several Individual step:
Step 101, the project information of the first order page of the setting function in acquisition operating system, project information is included The searching resource of each setting option in corresponding page, the searching resource at least includes jump information and path, the jump information In comprising corresponding source file class name.
Step 102, determines each resource file in operating system.
Step 103, the jump information of each setting option in the first order page and path, and each resource File, determines the project information of the pages at different levels in the setting function step by step.
Step 104, the project information according to the pages at different levels generates the search file of the setting function.
In sum, the method shown in the embodiment of the present disclosure, obtains the first order page of the setting function in operating system Project information, searching resource of the project information comprising each setting option in corresponding page, the searching resource at least includes Jump information and path, determine each resource file in operating system, each setting option in the first order page Jump information and path, and each resource file, determine the project information of the pages at different levels in the setting function step by step, according to The project information of the pages at different levels generates the search file of the setting function, basic open shown scheme, can be by setting The searching resource of the first order page in function, each resource file of binding operation system is automatically generated and sets each in function The searching resource of each setting option in the level page, it is not necessary to the searching resource of all of setting option of developer's manual sorting, Simplified manual steps are reached, the artificial development time is reduced, the effect of software development efficiency is improve.
Fig. 2 is a kind of flow chart of the search file generation method according to an exemplary embodiment, and the method can be with In for running and having an electronic equipment of SDK.As shown in Fig. 2 the search file generation method can be including following several Individual step:
Step 201, the project information of the first order page of the setting function in acquisition operating system.
Wherein, searching resource of the project information comprising each setting option in corresponding page, the searching resource is at least wrapped Jump information and path are included, the class name comprising corresponding source file in the jump information.
Such as, by taking searching resource in Android system as an example, the searching resource for setting each setting option in function can be wrapped Display information, the match information of user input data and jump information are included, wherein, display information is used to carry out Search Results It has been shown that, such as, can include resource name (resource_name) and path (path) information in display information, user is defeated The match information for entering data can be keyword (keywords), and the corresponding source file of setting option can be included in jump information Class name, such as, the jump information can be the class name of the class of the resource file for quoting the setting option.In Android system, source document Part can be Java files, can set four kinds of labels in jump information, respectively intent labels, class labels, Package labels and fragment labels, wherein, the content in intent labels can be the corresponding intent classes of setting option Class name, the content in class labels can be the class name of the corresponding Activity classes of setting option, interior in package labels Appearance can be the class name of the corresponding package classes of setting option, and the content in fragment labels can be that setting option is corresponding The class name of fragment classes.
In the embodiment of the present disclosure, SDK needs the first order page for first obtaining setting function (to set homepage Face) in each setting option searching resource.Such as, the first order page of the setting function in certain operating system is comprising " even Connect ", " equipment ", " control " and " general " this four setting options, and included below each setting option in this four setting options At least one-level sets interface, such as, by clicking on " practicing level " setting option, can enter corresponding linkage interface, in the linkage interface Again comprising several setting options, such as " WLAN ", " bluetooth " and " network share and mobile focus " etc., wherein, the connection It is likely to include the next stage page again below each setting option in interface, by that analogy.In this step, SDK is only Need obtain the first order page in " connection ", " equipment ", " control " and " general " this four searching resources of setting option i.e. Can.
Step 202, determines each resource file in operating system.
In the scheme shown in the disclosure, SDK can be with all resource files of traversing operation system (such as, Resource file in Android system can be .xml files).
Or, it is also possible to by developer tagging by way of (TAG) from each resource file in operating system Middle finger makes the related resource file of setting option.
Step 203, the jump information of each setting option in the first order page and path, and each resource File, determines the project information of the pages at different levels in the setting function step by step.
In scheme shown in the disclosure, the class name of the source file included in jump information can quote corresponding setting Resource file class class name, having been able to determine that each setting option of the first order page for setting function redirects letter In the case of breath, if certain specified setting option in each setting option in quoting the class of certain resource file and the first order page Jump information in class matching, then illustrate that each setting option included in the resource file is exactly the next of the specified setting option Level setting option, can obtain the searching resource of each setting option included in the resource file accordingly, similar, according to the resource The searching resource of each setting option included in file, with reference to other resource files, can obtain again include in the resource file Each setting option the next stage page setting option searching resource, by that analogy, until get setting function in own The searching resource of the setting option in the pages at different levels.
Fig. 3 is refer to, a kind of flow chart of the project information generation method being related to it illustrates the embodiment of the present disclosure.As schemed Shown in 3, the method may include steps of:
Step 31, the searching resource with each setting option in the first order page is the initial resource that has determined that, circulation Each resource file in each resource file is traveled through, the jump information of the resource file is obtained.
Wherein, when the conditional information of resource file is obtained, it can be determined that whether comprising resource text in the resource file The jump information of part;If judged result is the jump information comprising the resource file in the resource file, from the resource file The middle jump information for obtaining the resource file;If judged result is to redirect letter not comprising the resource file in the resource file The target source file of the resource file is quoted in breath, then inquiry, according to the inheritance of the target source file, determines the target source document The class name of part, the class name according to the target source file determines the jump information of the resource file.
In operating system part resource file itself may contain can as the relevant information of jump information, than Such as, intent labels, class labels, package marks may have been contained by taking Android system as an example, in part resource file One or more in label and fragment labels, and at least one label is not sky in these labels, at this point it is possible to directly Intent labels in the resource file, class labels, package labels and fragment labels are retrieved as resource text The jump information of part.
In other resource files, may not simultaneously exist jump information, now, SDK can inquire about reference The source file of the resource information, the inheritance (base class inquired about in source file and each subclass) according to source file, it is determined that The class name of the source file, i.e., by the base class of source file and each subclass determine the corresponding class of source file be Activity classes or Fragment classes, and record corresponding class name and type, such as, it is the money if the corresponding class of source file is Activity classes Source file generates class labels, and the class name of Activity classes is added in class labels, if the resource file is Fragment classes, then for the resource file generates Fragment labels, and add Fragment classes in Fragment labels Class name.
Step 32, when corresponding in the setting function comprising each setting option in the resource file during this has determined that resource Upper level setting option searching resource when, each setting in the coordinates measurement resource file according to the upper level setting option The path of item.
When the upper level in having determined that resource comprising each setting option correspondence in the resource file in the setting function During the searching resource of setting option, SDK can set the title of each setting option in the resource file with upper level The path for putting item is combined, you can to generate the path of each setting option.
Such as, so that upper level setting option is " connection " as an example, the path of the upper level setting option is " setting/connection ", if Each setting option in resource file is " WLAN ", " bluetooth " and " network share and mobile focus ", then be correspondingly arranged item The path of " WLAN " is " setting/connection/WLAN ", and accordingly, the path of correspondence " bluetooth " is " setting/connection/bluetooth ", with this Analogize.
Optionally, the path of each setting option in the coordinates measurement according to the upper level setting option resource file it Before, SDK can by the following method, come from having determined that each setting option pair found out in resource in resource file The searching resource of the upper level setting option answered:
1) SDK determines the class name of the target source file for quoting the resource file;Wrapped in this has determined that resource During class name containing the target source file, this is had determined that the searching resource of the class name comprising the target source file in resource, it is determined that It is the searching resource of upper level setting option of each setting option correspondence in the resource file in the setting function.
SDK can first determine the class name of the source file (Java files) for quoting the resource file, and true from Determine to search the class name of the source file in resource, if finding the class name of the source file, the source document in resource will be had determined that The corresponding setting option of class name of part is defined as upper level setting option.
2) when this has determined that the class name for not including the target source file in resource, SDK inquires about the target source The class name of the subclass of file;When this has determined that in resource the class name comprising the subclass, this is had determined that in resource comprising the son The searching resource of the class name of class, upper level of each setting option correspondence being defined as in the resource file in the setting function sets Put the searching resource of item.
By taking Android system as an example, if step (1) searches the class name less than the source file for quoting the resource file, having can Can be that the Java files found in step (1) are base class, and have determined that write in resource is its subclass, therefore need to be by step (1) class name of the subclass of the Java files found in is all found out, and is searched in resource is had determined that, if finding the class of the subclass Name, then be defined as upper level setting option by the corresponding setting option of the class name of the subclass.
3) class name not comprising the target source file in this has determined that resource, and the class of the target source file is entitled During the class name of Activity classes, the code of the target source file is analyzed, determine the new class name of the target source file, the new class Name is the class name of the Fragment classes that the resource file is quoted under the Activity classes;It is new comprising this in this has determined that resource During class name, this is had determined that into the searching resource comprising the new class name in resource, be defined as each setting in the resource file The searching resource of upper level setting option of the item correspondence in the setting function.
By taking Android system as an example, if step (1) searches the class name less than the source file for quoting the resource file, may The jump information for being statement in above-mentioned resource file is the class name of Activity classes, and the source file found at step (1) Class is Fragment classes, and both of these documents cannot set up contact, can now be drawn according to the code in Activity classes, search With the Java files of the resource file, the class name of Fragment classes is determined, the class of Fragment classes is searched in resource is had determined that Name, if finding the class name of the Fragment classes, upper level is defined as by the corresponding setting option of the class name of the Fragment classes Setting option.
4) class name not comprising the target source file in this has determined that resource, and the class of the target source file is entitled During the class name of intent classes, the class name of the corresponding source file of intent classes is inquired about;Being included in this has determined that resource should During the class name of the corresponding source file of intent classes, this is had determined that into the class name comprising the corresponding source file of intent classes in resource Searching resource, each setting option upper level setting option of the correspondence in the setting function for being defined as in the resource file search Suo Ziyuan.
By taking Android system as an example, if step (1) searches the class name less than the source file for quoting the resource file, may It is that the jump information stated in above-mentioned resource file is Intent, and found in step (1) is Java files, now needs root Determine relation according to AndroidManifest files (Activity states file), i.e., marked by scanning each activity The information of label sets up the corresponding relation of Intent and Java files, and obtains the class name of corresponding Java files, is having determined that The class name of the Java files is searched in resource, if finding the class name of the Java files, by the class name correspondence of the Java files Setting option be defined as upper level setting option.
Step 33, the path of each setting option in the resource file and the jump information of the resource file, it is raw Into the searching resource of each setting option in the resource file.
Step 34, is added into the searching resource of each setting option in the resource file this and has determined that resource.
After SDK determines the path of the setting option in resource file, the keyword of the setting option is obtained, and By the searching resource of the jump information combination producing of the path of the setting option, the keyword and resource file setting option, and will Newly-generated searching resource is added into and has determined that resource, subsequently to continually look for the next stage setting option of the setting option.
Accordingly, if failing to determine each setting option in resource file to step (4) by above-mentioned steps (1) Upper level setting option of the correspondence in the setting function, then be probably that the upper level setting option is not yet set up, and now, waits all Resource file all travel through one time and generate and add the searching resource of setting option after, it is true from then again according to above-mentioned steps Determine to search in resource the upper level setting option of each setting option in the resource file.
Step 204, the project information according to the pages at different levels generates the search file of the setting function.
After SDK generates the searching resource of each setting option and is added into and has determined that resource, resource will be had determined that All write a search file (such as, being named as functionindex.xml).
Step 205, obtains the corresponding configuration information of each setting option in the pages at different levels of the setting function, should match somebody with somebody confidence Cease for indicating whether corresponding setting option shows in specified type and/or given scenario.
Step 206, according to the configuration information, sets corresponding configuration parameter in the searching resource of the setting option.
In actual applications, operating system may match multiple different types, and in different type, set work( The display of the setting option of energy is likely to difference, such as, certain setting option is shown in the setting function in some types, and another The setting option may not be shown in some types;Or, under some scenes (such as old man's pattern or second space etc.), set Some setting options of function may not show.In this regard, in this programme, the corresponding configuration of each setting option can be pre-set Information, the configuration information is used to indicate whether corresponding setting option shows in specified type and/or given scenario, and according to matching somebody with somebody Confidence breath sets the configuration parameter of the setting option of response, such as, can set is_searchable and is_secondspace etc. Field describes whether setting option shows in specified type and/or given scenario, wherein, is_searchable can be used to The corresponding control condition of storage type, is_secondspace can be used to whether description shows in second space.
Specifically, by taking Android system as an example, the entire flow of the embodiment of the present disclosure can be as follows:
<1>The first class catalogue that the setting tree of function will be set writes file search.
Initialize installation data tree structure, and head node is write into (head node can be " setting ").The node of tree is set, Mainly comprising data and children, data storage setting option correspondence searching resource (mainly comprising path, resource_name, Fragment, class, package, is_searchable, is_secondspace), the son under children storage setting options The page.Setting tree first nodes can correspond to settings_headers.xml files in systems, set what is set as whole Trunk, while for the coordinates measurement of searching resource below is prepared.
<2>Other related resources are write into search file successively.
1>Determine each resource file in system, these resource files are loaded onto internal memory successively;
2>Replace one of resource file with A, if enough generation search that is available for have been included in resource file provided The information (i.e. jump information) in source, then write direct file these jump informations, and;
3>If there is no jump information (the i.e. intent, class, package, fragment of correlation in resource file All it is sky), then can obtain refer to A resource files (typically only in which java file by scanning java files Individual java files), then determined by the base class and subclass of this java file this Java file be Fragment classes or Activity classes, most at last in type and class name write-in file, as the searching resource of resource file;
4>Searching resource is grouped (search for upper level setting option) and generates the path of current setting;
Specific implementation:
(1) by scanning java files, confirm the Java files that A resource files are cited, described with J;
(2) J is searched in the searching resource being had been written into search file, if it is found, then can confirm that packet, A is provided The corresponding resource file title of each setting option is spliced with the path (i.e. the path of upper level setting option) of packet in source file Get up, the path as the corresponding searching resource of this setting option;
(3) it is likely to be that the Java files found in step (1) are base class if step (2) can not find, What is write in the searching resource of write-in is its subclass, therefore need to all be found the subclass of this Java file, and in searching for having been written into Searched in Suo Ziyuan, if it is found, then establishing packet, write the path of the searching resource of setting option;
(4) if step (3) can not find, it is likely that the jump information for being statement in A resource files is Activity, and The Java files found at step (1) are Fragment, and both of these documents cannot set up contact, now can basis Code in Activity, the Java files that A resource files are quoted in search carry out opening relationships, and then establish packet, and write-in is set The path of the searching resource of item;
(5) if step (4) can not find, it is more likely that the jump information stated in A resource files is Intent, and in step Suddenly what is found in (1) is Java files, now needs to confirm relation according to AndroidManifest files, each by scanning The information of individual activity labels sets up the corresponding relation of Intent and Java files, and then confirms packet, writes setting option Searching resource path;
(6) if step (5) can not find, the upper level setting option of very possible resource file does not write also, it is impossible to Packet is set up, now by the mark write-in array Array of A resource files;
(7) it is input, repeat step (1) to step (5) with the resource in array Array.
5>Type differences (such as is_searchable) and special screne differences (such as is_ are set Secondspace searching resource).
The beneficial effect that the disclosure is brought is mainly reflected in the flexibility of search, when certain engineer develops a certain New function When, it is no longer necessary to search for engineer and coordinate the related exploitation of the search to complete this function, the artificial dimension of search needs of early version Shield searching resource, setting option quantity is larger and relatively complicated, and omission phenomenon occurs unavoidably, cause user search for less than, And this programme later maintenance cost is very low, while improve engineer's operating efficiency, relatively low engineer's later maintenance Cost, and the experience that user uses function of search can be substantially improved.
Because above-mentioned automation process is completed in compiling, belong to static treatment, it is impossible to situation during treatment operation, In order to ensure to search for normal operation and accurate, it is necessary to set layer identification code on Java updates number according to the situation of the dynamic operation of system According to the content in storehouse, such as, there is " screen locking and password " in setting option, and in the mobile phone of part be " screen-lock password and fingerprint ", system Operationally can judge display " screen locking and password " or " screen-lock password and refer to according to whether mobile phone supports fingerprint recognition Line ", and the resource in resource file is " screen locking and password ", system cannot obtain dynamic operation value, therefore write search money In source only can be " screen locking and password ", in this regard, code can be set on Java upper stratas, mobile phone be judged in system with installation and operation Whether fingerprint recognition is supported, if so, being then updated to " screen-lock password and fingerprint " " screen locking and password ".
In sum, the scheme shown in the embodiment of the present disclosure, obtains the first order page of the setting function in operating system Project information, searching resource of the project information comprising each setting option in corresponding page, the searching resource at least includes Jump information and path, determine each resource file in operating system, each setting option in the first order page Jump information and path, and each resource file, determine the project information of the pages at different levels in the setting function step by step, according to The project information of the pages at different levels generates the search file of the setting function, basic open shown scheme, can be by setting The searching resource of the first order page in function, each resource file of binding operation system is automatically generated and sets each in function The searching resource of each setting option in the level page, it is not necessary to the searching resource of all of setting option of developer's manual sorting, Simplified manual steps are reached, the artificial development time is reduced, the effect of software development efficiency is improve.
Following is disclosure device embodiment, can be used for performing method of disclosure embodiment.For disclosure device reality The details not disclosed in example is applied, method of disclosure embodiment is refer to.
Fig. 4 is refer to, it illustrates a kind of block diagram of the search file generating means shown in an exemplary embodiment.This is searched Rope file creating apparatus can be embodied as all or part of of electronic equipment by way of hardware or soft or hard combination.This is searched Rope file creating apparatus can include:
Data obtaining module 401, the project information of the first order page for obtaining the setting function in operating system, institute State searching resource of the project information comprising each setting option in corresponding page, the searching resource at least include jump information and Path, the class name comprising corresponding source file in the jump information;
File determining module 402, for determining each resource file in operating system;
Information generating module 403, jump information and path for each setting option in the first order page, And described each resource file, the project information of the pages at different levels in the setting function is determined step by step;
File generating module 404, for according to the project information of the pages at different levels generation search for setting function File.
Based on the device shown in Fig. 4, Fig. 5 is refer to, searched it illustrates the one kind shown in the exemplary embodiment of the disclosure one The block diagram of rope file creating apparatus.As shown in figure 5, described information generation module 403, including:
Acquisition of information submodule 403a, for the searching resource of each setting option in the first order page be initial Have determined that resource, each resource file in each resource file described in searching loop obtains the jump of the resource file Transfering the letter breath;
Coordinates measurement submodule 403b, for when it is described have determined that resource in comprising each setting in the resource file During the searching resource of upper level setting option of the item correspondence in the setting function, the path life according to the upper level setting option Into the path of each setting option in the resource file;
Resource generates submodule 403c, path and the money for each setting option in the resource file The jump information of source file, generates the searching resource of each setting option in the resource file;
Addition submodule 403d, for by the searching resource of each setting option in the resource file be added into it is described Determine resource.
Optionally, described information acquisition submodule 403a, including:
Judging submodule 403a1, for judge in the resource file whether the jump information comprising the resource file;
First acquisition submodule 403a2, if being comprising the resource file in the resource file for judged result Jump information, then obtain the jump information of the resource file from the resource file;
Second acquisition submodule 403a3, if for judged result be the resource file in do not include the resource file Jump information, then inquiry quotes the target source file of the resource file, according to the inheritance of the target source file, really The class name of the fixed target source file, the class name according to the target source file determines the jump information of the resource file.
Optionally, described information generation module 403, also includes:
First class name determination sub-module 403e, in the coordinates measurement submodule according to the upper level setting option Before the path of each setting option in resource file described in coordinates measurement, it is determined that quoting the target source file of the resource file Class name;
First resource determination sub-module 403f, for when it is described have determined that resource in the class name comprising the target source file When, the searching resource for having determined that the class name comprising the target source file in resource is defined as in the resource file Each setting option correspondence it is described setting function in upper level setting option searching resource.
Optionally, described information generation module 403 also includes:
First class name inquires about submodule 403g, for when it is described have determined that resource in the class not comprising the target source file During name, the class name of the subclass of the target source file is inquired about;
Secondary resource determination sub-module 403h, for when it is described have determined that resource in class name comprising the subclass when, will The searching resource for having determined that the class name comprising the subclass in resource, is defined as each setting option in the resource file The searching resource of upper level setting option of the correspondence in the setting function.
Optionally, described information generation module 403 also includes:
Second class name determination sub-module 403i, for when it is described have determined that resource in the class not comprising the target source file Name, and during the class name of the entitled Activity classes of class of the target source file, the code of the target source file is analyzed, determine institute State the new class name of target source file, the new class name is to quote the resource file under the Activity classes The class name of Fragment classes;
Information resources determination sub-module 403j, for when it is described have determined that resource in comprising the new class name when, by institute State and have determined that the searching resource comprising the new class name in resource, be defined as each setting option correspondence in the resource file The searching resource of the upper level setting option in the setting function.
Optionally, described information generation module 403 also includes:
Second class name inquires about submodule 403k, for when it is described have determined that resource in the class not comprising the target source file Name, and during the class name of the entitled intent classes of class of the target source file, inquire about the class of the corresponding source file of the intent classes Name;
4th resource determination sub-module 403m, for when it is described have determined that resource in comprising the corresponding source of the intent classes During the class name of file, by the searching resource for having determined that the class name comprising the corresponding source file of the intent classes in resource, It is defined as the searching resource of upper level setting option of each setting option correspondence in the resource file in the setting function.
Optionally, described device also includes:
Configuration acquisition module 405, matches somebody with somebody for each setting option in the pages at different levels for obtaining the setting function to be corresponding Confidence ceases, and the configuration information is used to indicate whether corresponding setting option shows in specified type and/or given scenario;
Parameter setting module 406, for according to the configuration information, correspondence being set in the searching resource of the setting option Configuration parameter.
In sum, the device shown in the embodiment of the present disclosure, obtains the first order page of the setting function in operating system Project information, searching resource of the project information comprising each setting option in corresponding page, the searching resource at least includes Jump information and path, determine each resource file in operating system, each setting option in the first order page Jump information and path, and each resource file, determine the project information of the pages at different levels in the setting function step by step, according to The project information of the pages at different levels generates the search file of the setting function, basic open shown scheme, can be by setting The searching resource of the first order page in function, each resource file of binding operation system is automatically generated and sets each in function The searching resource of each setting option in the level page, it is not necessary to the searching resource of all of setting option of developer's manual sorting, Simplified manual steps are reached, the artificial development time is reduced, the effect of software development efficiency is improve.
The embodiment of the present disclosure also provides a kind of search file generating means, and described device includes:Processor;For storing State the memory of the executable instruction of processor;Wherein, the processor is used to perform the executable instruction stored in memory, To realize all or part of step of any shown methods of above-mentioned Fig. 1 or Fig. 2, i.e., described processor is configured as:
The project information of the first order page of the setting function in acquisition operating system, the project information includes correspondence page The searching resource of each setting option in face, the searching resource at least includes jump information and path, in the jump information Class name comprising corresponding source file;
Determine each resource file in operating system;
The jump information of each setting option in the first order page and path, and described each resource text Part, determines the project information of the pages at different levels in the setting function step by step;
The project information generation search file that function is set according to the pages at different levels.
Optionally, the jump information of each setting option in the first order page and path, and it is described Each resource file, determines the project information of the pages at different levels in the setting function step by step, including:
Searching resource with each setting option in the first order page is the initial resource that has determined that, searching loop institute Each resource file in each resource file is stated, the jump information of the resource file is obtained;
When it is described have determined that resource in comprising in the resource file each setting option correspondence it is described setting function in Upper level setting option searching resource when, each in resource file described in the coordinates measurement according to the upper level setting option The path of setting option;
The path of each setting option in the resource file and the jump information of the resource file, generate institute State the searching resource of each setting option in resource file;
The searching resource of each setting option in the resource file is added into and described has determined that resource.
Optionally, the jump information for obtaining the resource file, including:
Judge in the resource file whether the jump information comprising the resource file;
If judged result is the jump information comprising the resource file in the resource file, from the resource file The middle jump information for obtaining the resource file;
If judged result is the jump information not comprising the resource file in the resource file, inquiry is quoted described The target source file of resource file, according to the inheritance of the target source file, determines the class name of the target source file, root The jump information of the resource file is determined according to the class name of the target source file.
Optionally, each setting option in the resource file according to the coordinates measurement of the upper level setting option Before path, also include:
It is determined that quoting the class name of the target source file of the resource file;
When it is described have determined that resource in class name comprising the target source file when, had determined that described in resource comprising institute The searching resource of the class name of target source file is stated, is defined as each setting option correspondence in the resource file in the setting work( The searching resource of the upper level setting option in energy.
Optionally, the processor is additionally configured to:
When it is described have determined that resource in class name not comprising the target source file when, inquire about the son of the target source file The class name of class;
When it is described have determined that resource in class name comprising the subclass when, had determined that described in resource comprising the subclass Class name searching resource, be defined as in the resource file each setting option correspondence it is described setting function in upper level The searching resource of setting option.
Optionally, the processor is additionally configured to:
When it is described have determined that resource in the class name not comprising the target source file, and the class of the target source file is entitled During the class name of Activity classes, the code of the target source file is analyzed, determine the new class name of the target source file, it is described New class name is the class name of the Fragment classes that the resource file is quoted under the Activity classes;
When it is described have determined that resource in comprising the new class name when, had determined that described in resource comprising the new class The searching resource of name, upper level of each setting option correspondence being defined as in the resource file in the setting function is set The searching resource of item.
Optionally, the processor is additionally configured to:
When it is described have determined that resource in the class name not comprising the target source file, and the class of the target source file is entitled During the class name of intent classes, the class name of the corresponding source file of the intent classes is inquired about;
When it is described have determined that resource in class name comprising the corresponding source file of the intent classes when, have determined that money by described The searching resource of the class name comprising the corresponding source file of the intent classes in source, each being defined as in the resource file sets Put the searching resource of upper level setting option of the item correspondence in the setting function.
The embodiment of the present disclosure additionally provides a kind of non-transitorycomputer readable storage medium including instructing, for example, include The memory of instruction, above-mentioned instruction can be as the computing device of database management apparatus completing shown in the disclosure each embodiment Search file generation method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory Device (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Fig. 6 is the structural representation of a kind of electronic equipment according to an exemplary embodiment.The electronic equipment can be with It is embodied as running the equipment for having SDK in disclosure such scheme.The electronic equipment 600 includes that center treatment is single Unit (CPU) 601, the system storage 604 including random access memory (RAM) 602 and read-only storage (ROM) 603, and The system bus 605 of connection system memory 604 and CPU 601.The electronic equipment 600 is also calculated including help The basic input/output (I/O systems) 606 of transmission information between each device in machine, and for storage program area 613rd, the mass-memory unit 607 of application program 614 and other program modules 615.
The basic input/output 606 is included for the display 608 of display information and for user input letter The input equipment 609 of such as mouse, keyboard etc of breath.Wherein described display 608 and input equipment 609 are all by being connected to The IOC 610 of system bus 605 is connected to CPU 601.The basic input/output 606 Can also including IOC 610 for receive and process from etc. keyboard, mouse or electronic touch pen it is multiple its The input of his equipment.Similarly, IOC 610 also provides output to display screen, printer or other kinds of defeated Go out equipment.
The mass-memory unit 607 is by being connected to the bulk memory controller (not shown) of system bus 605 It is connected to CPU 601.The mass-memory unit 607 and its associated computer-readable medium set for electronics Standby 600 provide non-volatile memories.That is, the mass-memory unit 607 can include such as hard disk or CD- The computer-readable medium (not shown) of ROM drive etc.
Without loss of generality, the computer-readable medium can include computer-readable storage medium and communication media.Computer Storage medium is including for storage computer-readable instruction, data structure, program module or information etc. other data Volatibility and non-volatile, removable and irremovable medium that any method or technique is realized.Computer-readable storage medium includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, tape Box, tape, disk storage or other magnetic storage apparatus.Certainly, skilled person will appreciate that the computer-readable storage medium It is not limited to above-mentioned several.Above-mentioned system storage 604 and mass-memory unit 607 may be collectively referred to as memory.
According to the various embodiments of the disclosure, the electronic equipment 600 can also be by network connections such as internets Remote computer operation on to network.Namely electronic equipment 600 can be by the network that is connected on the system bus 605 Interface unit 611 is connected to network 612, in other words, it is also possible to other kinds of net is connected to using NIU 611 Network or remote computer system (not shown).
The memory also include one or more than one program, one or more than one program storage in In memory, central processing unit 601 realizes the search text shown in Fig. 1 or Fig. 2 by performing one or more programs Part generation method.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice scheme disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to the precision architecture for being described above and being shown in the drawings, and And can without departing from the scope carry out various modifications and changes.The scope of the present disclosure is only limited by appended claim.

Claims (17)

1. a kind of search file generation method, it is characterised in that methods described includes:
The project information of the first order page of the setting function in acquisition operating system, the project information is comprising in corresponding page Each setting option searching resource, the searching resource at least include jump information and path, included in the jump information The class name of corresponding source file;
Determine each resource file in operating system;
The jump information of each setting option in the first order page and path, and described each resource file, by Level determines the project information for setting the pages at different levels in function;
The project information generation search file that function is set according to the pages at different levels.
2. method according to claim 1, it is characterised in that described each setting option in the first order page Jump information and path, and described each resource file, the project letter of the pages at different levels in the setting function is determined step by step Breath, including:
Searching resource with each setting option in the first order page is the initial resource that has determined that, each described in searching loop Each resource file in individual resource file, obtains the jump information of the resource file;
When it is described have determined that resource in comprising in the resource file each setting option correspondence it is described setting function in it is upper During the searching resource of one-level setting option, each setting in resource file described in the coordinates measurement according to the upper level setting option The path of item;
The path of each setting option in the resource file and the jump information of the resource file, generate the money The searching resource of each setting option in source file;
The searching resource of each setting option in the resource file is added into and described has determined that resource.
3. method according to claim 2, it is characterised in that the jump information of the acquisition resource file, including:
Judge in the resource file whether the jump information comprising the resource file;
If judged result is the jump information comprising the resource file in the resource file, obtained from the resource file Take the jump information of the resource file;
If judged result is the jump information not comprising the resource file in the resource file, the resource is quoted in inquiry The target source file of file, according to the inheritance of the target source file, determines the class name of the target source file, according to institute The class name for stating target source file determines the jump information of the resource file.
4. method according to claim 2, it is characterised in that the coordinates measurement institute according to the upper level setting option Before stating the path of each setting option in resource file, also include:
It is determined that quoting the class name of the target source file of the resource file;
When it is described have determined that resource in class name comprising the target source file when, had determined that described in resource comprising the mesh The searching resource of the class name of source file is marked, is defined as each setting option in the resource file corresponding in the setting function Upper level setting option searching resource.
5. method according to claim 4, it is characterised in that methods described also includes:
When it is described have determined that resource in class name not comprising the target source file when, inquire about the subclass of the target source file Class name;
When it is described have determined that resource in class name comprising the subclass when, have determined that the class comprising the subclass in resource by described The searching resource of name, upper level of each setting option correspondence being defined as in the resource file in the setting function is set The searching resource of item.
6. method according to claim 4, it is characterised in that methods described also includes:
When it is described have determined that resource in the class name not comprising the target source file, and the class of the target source file is entitled During the class name of Activity classes, the code of the target source file is analyzed, determine the new class name of the target source file, it is described New class name is the class name of the Fragment classes that the resource file is quoted under the Activity classes;
When it is described have determined that resource in comprising the new class name when, had determined that described in resource comprising the new class name Searching resource, is defined as upper level setting option of each setting option correspondence in the resource file in the setting function Searching resource.
7. method according to claim 4, it is characterised in that methods described also includes:
When it is described have determined that resource in the class name not comprising the target source file, and the class of the target source file is entitled During the class name of intent classes, the class name of the corresponding source file of the intent classes is inquired about;
When it is described have determined that resource in class name comprising the corresponding source file of the intent classes when, have determined that resource by described The searching resource of the class name comprising the corresponding source file of the intent classes, is defined as each setting option in the resource file The searching resource of upper level setting option of the correspondence in the setting function.
8. method according to claim 1, it is characterised in that methods described also includes:
The corresponding configuration information of each setting option in the pages at different levels that function is set is obtained, the configuration information is used to refer to Show whether corresponding setting option shows in specified type and/or given scenario;
According to the configuration information, corresponding configuration parameter is set in the searching resource of the setting option.
9. a kind of search file generating means, it is characterised in that described device includes:
Data obtaining module, the project information of the first order page for obtaining the setting function in operating system, the project Searching resource of the packet containing each setting option in corresponding page, the searching resource at least includes jump information and path, Class name comprising corresponding source file in the jump information;
File determining module, for determining each resource file in operating system;
Information generating module, jump information and path for each setting option in the first order page, Yi Jisuo Each resource file is stated, the project information of the pages at different levels in the setting function is determined step by step;
File generating module, for according to the project information of the pages at different levels generation search file for setting function.
10. device according to claim 9, it is characterised in that described information generation module, including:
Acquisition of information submodule, is initial having determined that for the searching resource with each setting option in the first order page Resource, each resource file in each resource file described in searching loop obtains the jump information of the resource file;
Coordinates measurement submodule, for when it is described have determined that resource in exist comprising each setting option correspondence in the resource file During the searching resource of the upper level setting option in the setting function, provided described in the coordinates measurement according to the upper level setting option The path of each setting option in source file;
Resource generates submodule, the path and the resource file for each setting option in the resource file Jump information, generates the searching resource of each setting option in the resource file;
Addition submodule, described money is had determined that for the searching resource of each setting option in the resource file to be added into Source.
11. devices according to claim 10, it is characterised in that described information acquisition submodule, including:
Judging submodule, for judge in the resource file whether the jump information comprising the resource file;
First acquisition submodule, if being the jump information comprising the resource file in the resource file for judged result, The jump information of the resource file is then obtained from the resource file;
Second acquisition submodule, if being to redirect letter not comprising the resource file in the resource file for judged result The target source file of the resource file is quoted in breath, then inquiry, according to the inheritance of the target source file, determines the mesh The class name of source file is marked, the class name according to the target source file determines the jump information of the resource file.
12. devices according to claim 10, it is characterised in that described information generation module, also include:
First class name determination sub-module, in the coordinates measurement submodule according to the coordinates measurement of the upper level setting option Before the path of each setting option in the resource file, it is determined that quoting the class name of the target source file of the resource file;
First resource determination sub-module, for when it is described have determined that resource in class name comprising the target source file when, by institute The searching resource for having determined that the class name comprising the target source file in resource is stated, each being defined as in the resource file sets Put the searching resource of upper level setting option of the item correspondence in the setting function.
13. devices according to claim 12, it is characterised in that described information generation module also includes:
First class name inquire about submodule, for when it is described have determined that resource in not comprising the target source file class name when, look into Ask the class name of the subclass of the target source file;
Secondary resource determination sub-module, for when it is described have determined that resource in class name comprising the subclass when, will described in it is true Determine the searching resource of the class name comprising the subclass in resource, be defined as each setting option correspondence in the resource file in institute State the searching resource that the upper level setting option in function is set.
14. devices according to claim 12, it is characterised in that described information generation module also includes:
Second class name determination sub-module, for when it is described have determined that resource in the class name not comprising the target source file, and institute When stating the class name of the entitled Activity classes of class of target source file, the code of the target source file is analyzed, determine the target The new class name of source file, the new class name is the Fragment classes that the resource file is quoted under the Activity classes Class name;
Information resources determination sub-module, for when it is described have determined that resource in comprising the new class name when, had determined that described Searching resource comprising the new class name in resource, each setting option correspondence being defined as in the resource file sets described Put the searching resource of the upper level setting option in function.
15. devices according to claim 12, it is characterised in that described information generation module also includes:
Second class name inquires about submodule, for when it is described have determined that resource in the class name not comprising the target source file, and institute When stating the class name of the entitled intent classes of class of target source file, the class name of the corresponding source file of the intent classes is inquired about;
4th resource determination sub-module, for when it is described have determined that resource in the class comprising the corresponding source file of the intent classes During name, by the searching resource for having determined that the class name comprising the corresponding source file of the intent classes in resource, it is defined as institute State the searching resource of upper level setting option of each setting option correspondence in resource file in the setting function.
16. devices according to claim 9, it is characterised in that described device also includes:
Configuration acquisition module, for the corresponding configuration information of each setting option in the pages at different levels for obtaining the setting function, The configuration information is used to indicate whether corresponding setting option shows in specified type and/or given scenario;
Parameter setting module, for according to the configuration information, corresponding configuration being set in the searching resource of the setting option Parameter.
17. a kind of search file generating means, it is characterised in that described device includes:
Processor;
Memory for storing the executable instruction of the processor;
Wherein, the processor is configured as:
The project information of the first order page of the setting function in acquisition operating system, the project information is comprising in corresponding page Each setting option searching resource, the searching resource at least include jump information and path, included in the jump information The class name of corresponding source file;
Determine each resource file in operating system;
The jump information of each setting option in the first order page and path, and described each resource file, by Level determines the project information for setting the pages at different levels in function;
The project information generation search file that function is set according to the pages at different levels.
CN201611026372.7A 2016-11-18 2016-11-18 Search file generation method and device Active CN106775629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611026372.7A CN106775629B (en) 2016-11-18 2016-11-18 Search file generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611026372.7A CN106775629B (en) 2016-11-18 2016-11-18 Search file generation method and device

Publications (2)

Publication Number Publication Date
CN106775629A true CN106775629A (en) 2017-05-31
CN106775629B CN106775629B (en) 2020-08-11

Family

ID=58970521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611026372.7A Active CN106775629B (en) 2016-11-18 2016-11-18 Search file generation method and device

Country Status (1)

Country Link
CN (1) CN106775629B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552666A (en) * 2020-03-23 2020-08-18 苏州沁游网络科技有限公司 Resource acquisition method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104036A1 (en) * 2006-10-25 2008-05-01 Qisda Corporation Mobile phone capable of building a quick launch item according a search result and related method
CN103020277A (en) * 2012-12-27 2013-04-03 北京百度网讯科技有限公司 Method and device for suggesting search term
CN104331465A (en) * 2014-10-30 2015-02-04 广东欧珀移动通信有限公司 Searching method and device for mobile terminal
US20160037005A1 (en) * 2014-08-01 2016-02-04 Kyocera Document Solutions Inc. Electronic device and information providing method
CN105930477A (en) * 2016-04-28 2016-09-07 北京小米移动软件有限公司 Information search method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104036A1 (en) * 2006-10-25 2008-05-01 Qisda Corporation Mobile phone capable of building a quick launch item according a search result and related method
CN103020277A (en) * 2012-12-27 2013-04-03 北京百度网讯科技有限公司 Method and device for suggesting search term
US20160037005A1 (en) * 2014-08-01 2016-02-04 Kyocera Document Solutions Inc. Electronic device and information providing method
CN104331465A (en) * 2014-10-30 2015-02-04 广东欧珀移动通信有限公司 Searching method and device for mobile terminal
CN105930477A (en) * 2016-04-28 2016-09-07 北京小米移动软件有限公司 Information search method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552666A (en) * 2020-03-23 2020-08-18 苏州沁游网络科技有限公司 Resource acquisition method, device, equipment and storage medium
CN111552666B (en) * 2020-03-23 2021-02-26 苏州沁游网络科技有限公司 Resource acquisition method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN106775629B (en) 2020-08-11

Similar Documents

Publication Publication Date Title
US11120299B2 (en) Installation and operation of different processes of an AI engine adapted to different configurations of hardware located on-premises and in hybrid environments
CN107562626B (en) Method for realizing Web automatic test by encapsulating Selenium and Sikuli
US7260562B2 (en) Solutions for constraint satisfaction problems requiring multiple constraints
US9449278B2 (en) Cloud-based diagnostics and remediation
US20170213156A1 (en) Artificial intelligence engine having multiple independent processes on a cloud based platform configured to scale
CN101165688B (en) Temporal association method and system between assets in a knowledge system
JP2021510429A (en) Machine learning to integrate knowledge and natural language processing
US20110099536A1 (en) Determining Context Specific Content
US20140310053A1 (en) Method and systems for providing business process suggestions and recommendations utilizing a business process modeler
CN110806873B (en) Target control determining method and device, electronic equipment and storage medium
WO2017078686A1 (en) Translation of natural language into user interface actions
CN110162464A (en) Mcok test method and system, electronic equipment and readable storage medium storing program for executing
US10671361B2 (en) Automatically determining data dependencies to facilitate code execution
CN109614312A (en) Method for generating test case, device, electronic equipment and storage medium
CN107408125A (en) For inquiring about the image of answer
US9069873B2 (en) Apparatus and method for creating mashup web application
CN107391535A (en) The method and device of document is searched in document application
CN111144132B (en) Semantic recognition method and device
CN116560683A (en) Software updating method, device, equipment and storage medium
CN1976353B (en) Method and system for recovering and debugging failed network-accessible service construction
CN106055567A (en) Providing app store search results
KR102310589B1 (en) Method for inspecting of annotation product using scripts, and computer program recorded on record-medium for executing method therefor
JP2023540266A (en) Concept prediction for creating new intents and automatically assigning examples in dialogue systems
US8001122B2 (en) Relating similar terms for information retrieval
CN117035065A (en) Model evaluation method and related device

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