CN109101234A - Determine the method and device of corresponding relationship between the page and business module - Google Patents

Determine the method and device of corresponding relationship between the page and business module Download PDF

Info

Publication number
CN109101234A
CN109101234A CN201810731037.XA CN201810731037A CN109101234A CN 109101234 A CN109101234 A CN 109101234A CN 201810731037 A CN201810731037 A CN 201810731037A CN 109101234 A CN109101234 A CN 109101234A
Authority
CN
China
Prior art keywords
file
code
page
application program
business module
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
CN201810731037.XA
Other languages
Chinese (zh)
Other versions
CN109101234B (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 Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201810731037.XA priority Critical patent/CN109101234B/en
Publication of CN109101234A publication Critical patent/CN109101234A/en
Application granted granted Critical
Publication of CN109101234B publication Critical patent/CN109101234B/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/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application provides a kind of method and device of corresponding relationship between the determining page and business module, method comprises determining that the relation list between the code library of application program and the code file of the application program, the code library are corresponding with the business module of the application program;The page belonging to the class file for belonging to page type and the class file is determined in the inheritance link for traversing the code file of the application program;Based on the relation list and the class file for belonging to page type, the corresponding relationship between the page and business module of the application program is determined.The application may insure that the corresponding relationship between the page of application program and business module is accurate and reliable, and then can avoid burying an information error in the prior art or obscure business module and bury the problem of a little reporting mistake or failing to report;Due to do not need it is additional bury information and test environment, reduce and maintenance cost invasive to the code file code of application program.

Description

Determine the method and device of corresponding relationship between the page and business module
Technical field
This application involves corresponding relationships between Internet technical field more particularly to a kind of determining page and business module Method and device.
Background technique
The structure of the application program (APP) of mobile terminal, it will usually be divided according to operation level, may include more under an APP A business module corresponds to multiple pages under each business module.Each business mould in the runtime to APP is needed after APP publication Block is monitored, and monitoring system and buries the correspondence that dot system requires to know the corresponding business module of the page shown in APP Relationship, and then analyze the data such as the business information of business module, operation conditions.
In the prior art, when burying page, the identification information of business module belonging to the upper page, client can be attached to It can report and bury a little to the dot system that buries of server end in any page entered in APP, bury dot system and buried from what is reported The identification information of the corresponding business module of the page is extracted in point, to know the corresponding relationship of the page and business module.By In needing developer's manual setting redundancy when developing APP to bury information, therefore to the invasive height of code.
Summary of the invention
In view of this, the application provides a kind of method and device of corresponding relationship between the determining page and business module, no It needs additional to bury information and can accurately know that the corresponding relationship of the page and business module, code are invasive low.
To achieve the above object, it is as follows to provide technical solution by the application:
According to a first aspect of the present application, a kind of method of corresponding relationship between the determining page and business module is proposed, Include:
Determine the relation list between the code library of application program and the code file of the application program, the code library It is corresponding with the business module of the application program;
The inheritance link for traversing the code file of the application program, determine the class file for belonging to page type and such The page belonging to file;
Based on the relation list and the class file for belonging to page type, the page and industry of the application program are determined Corresponding relationship between module of being engaged in.
According to a second aspect of the present application, a kind of device of corresponding relationship between the determining page and business module is proposed, Include:
First determining module, for determining the pass between the code library of application program and the code file of the application program Series of tables, the code library are corresponding with the business module of the application program;
Spider module, the inheritance link of the code file for traversing the application program, determines to belong to page type The page belonging to class file and the class file;
Second determining module, the relation list and the spider module for being determined based on first determining module The obtained class file for belonging to page type determines the corresponding pass between the page of the application program and business module System.
According to the third aspect of the application, a kind of computer readable storage medium is proposed, the storage medium is stored with Computer program, the computer program are used to execute corresponding between the determination page and business module that above-mentioned first aspect provides The method of relationship.
By above technical scheme as it can be seen that since the corresponding relationship between the page and business module of application program is direct base In the related information that code file parses, it can be ensured that the corresponding relationship between the page and business module of application program is accurate Reliably, and then it can avoid burying the error of information in the prior art or obscure business module and bury and a little report mistake or fail to report Problem;Due to do not need it is additional bury information and test environment, reduce and the code file code of application program invaded Entering property and maintenance cost;It, can be by holding again when having the page being newly added or the discarded page in need in application program Row method provided by the present application is the corresponding relationship between the page and business module of renewable application program, so that it is guaranteed that using The new page of program obtains timely updates, and the discarded page is cleared up in time.
Detailed description of the invention
Figure 1A is the method for corresponding relationship between the determination page and business module shown in one exemplary embodiment of the application Flow diagram.
Figure 1B is the schematic diagram of corresponding relationship between the page and business module of the application program in Figure 1A.
Fig. 2 be the determination page shown in the application another exemplary embodiment and between business module corresponding relationship method Flow diagram.
Fig. 3 is the method for corresponding relationship between the determination page and business module shown in the another exemplary embodiment of the application Flow diagram.
Fig. 4 be the determination page shown in the application another exemplary embodiment and between business module corresponding relationship method Flow diagram.
Fig. 5 is the device of corresponding relationship between the determination page and business module shown in one exemplary embodiment of the application Structural schematic diagram.
Fig. 6 be the determination page shown in the application another exemplary embodiment and between business module corresponding relationship device Structural schematic diagram.
Fig. 7 is the structural schematic diagram of the electronic equipment shown in one exemplary embodiment of the application.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application. It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Figure 1A is the method for corresponding relationship between the determination page and business module shown in one exemplary embodiment of the application Flow diagram, Figure 1B is the schematic diagram of corresponding relationship between the page and business module of the application program in Figure 1A;Such as figure Shown in 1A, the method for determining corresponding relationship between the page and business module may include following steps:
Step 101, the relation list between the code library of application program and the code file of application program is determined, wherein Code library is corresponding with the business module of application program.
In one embodiment, the code library of application program can be by the developer of the corresponding project of development and application program itself Creation is also possible to the Open Source Code library of third party's offer, can also be the code library for being supplied to item body and using.For The application program of iOS type, a code library can correspond to a pod.In one embodiment, the code file of application program is It is code file written by exploration project that not compiled source code file, which is developer, which can not directly run, The code file of application program may include class file, also may include non-class files.
In one embodiment, what the relation list between code library and code file recorded is the mark and code of code library Corresponding relationship between the title of file, for example, for the ABC1 that is identified as of code library, the entitled EFG1 of code file, then Corresponding relationship between the two is indicated by such as the following table 1.
Table 1
The mark of code library The title of code file
ABC1 EFG1
ABC1 EFG2
ABC2 DEF1
In one embodiment, compiling link file can be generated by the code file of compiling application program, from compiling chain Connect the relation list determined between the code library of application program and the code file of application program in file.Wherein, compiling link The structure of file (LinkMap) may include file destination list (Objectfiles), segment table (Sections), symbol table (Symbols), wherein file destination list includes the corresponding pass between all class files and code library of all application programs System, the corresponding class file of key in the class file of each page of all class files for example including application program, the page, etc. Deng.In one embodiment, application program can be determined from compiling link file by the methods of file division, canonical matching Relation list between code library and the code file of application program.
Step 102, the inheritance link of the code file of traversal applications program, determine the class file for belonging to page type and The page belonging to the class file.
In one embodiment, inheritance link is a kind of abstract concept by Objectivec language definition, wherein Objectivec is a kind of programming language of ios application.Code inside one class file, can be with some by objectivec Defined grammer is inherited from some other class file to identify it.When needing to be compiled code file, knowledge can be passed through A series of grammer as defined in other objectivec, it is established that the inheritance namely inheritance link of code files.In an embodiment In, the class file for belonging to view controller can be found out from the code file of application program, will belong to the class of view controller File is determined to belong to the class file of page type.Further, since view controller and the page correspond, therefore, work as determination It is inherited from after the class file of view controller, that is, may know that the corresponding page of such file.
Step 103, based on relation list and the class file for belonging to page type, the page and business mould of application program are determined Corresponding relationship between block.
In one embodiment, it can be presented by the data mode of structuring between the page and business module of application program Corresponding relationship.In one embodiment, since what is recorded in relation list is that the mark of code library and the name of code file are referred to as Between corresponding relationship, and code library is corresponding with the business module of application program, therefore is belonged to by searching in relation list The mark of the corresponding code library of the class file of page type can determine that and belong to page type by the mark of code library The corresponding business module of class file, this makes it possible to obtain the corresponding relationships between the page of application program and business module.
As shown in Figure 1B, application program includes three business modules: business module one, business module two, business module three, Altogether include 100 code files: code file EFG1, EFG2, EFG3 ..., EFG20, code file DEF21, DEF22, DEF23 ..., DEF70, code file MNP71, MNP72, MNP73 ..., MNP100.101- step 103 through the above steps needs Determine one corresponding page A of business module, page B, page C, two corresponding page D of business module, page E, page F, business Three corresponding page G of module, page H, page I.Business module one corresponds to first code library, the corresponding second code of business module two Library, the corresponding third code library of business module three.It should be noted that business module one, business module two, business module three may be used also With comprising components such as its key, list, text box, input frame, video player, picture display devices, since the application is determining Corresponding relationship between the page and business module, thus the application to the other assemblies for including in business module without explaining in detail It states.
By the description of step 101, the mark in first code library, the mark in second code library, the third generation can be determined Corresponding relationship between the mark and the title of this 100 code files in code library, for example, first code library corresponds to code file EFG1, EFG2, EFG3 ..., EFG20, second code library correspond to code file DEF21, DEF22, DEF23 ..., DEF70, third Code library correspond to code file MNP71, MNP72, MNP73 ..., MNP100 generates and compiles by compiling this 100 code files Threaded file is translated, from pair determined between the mark of code library and the title of this 100 code files in compiling link file Should be related to, for example, relation list may include first code library mark and code file EFG1, EFG2, EFG3 ..., EFG20 Corresponding relationship between title, the mark in second code library and code file DEF21, DEF22, DEF23 ..., the title of DEF70 Between corresponding relationship, the mark of third code library and code file MNP71, MNP72, MNP73 ..., the name of MNP100 is referred to as Between corresponding relationship, that is, having recorded the mark in first code library, the mark in second code library, third code in relation list Corresponding relationship between the mark and the title of this 100 code files in library.
By step 102, the inheritance link of this 100 code files can be traversed, finds out and belongs to from this 100 code files The class file of view controller, for example, passing through the inheritance link for traversing this 100 code files it is found that code file EFG11 is inherited From the view controller of page A, therefore it can determine that code file EFG11 belongs to the class file of page A, code file EFG15 It is inherited from the view controller of page B, therefore can determine that code file EFG15 belongs to the class file of page B, code file EFG16 is inherited from the view controller of page C, therefore can determine that code file EFG16 belongs to the class file of page B, code text Part DEF21 is inherited from the view controller of page D, therefore can determine that code file DEF21 belongs to the class file of page D, code File DEF54 is inherited from the view controller of page E, therefore can determine that code file DEF54 belongs to the class file of page E.Class As, code file DEF65 belongs to the class file of page F, code file MNP71 belongs to the class file of page G, code file MNP85 belongs to the class file of page H, code file MNP87 belongs to the class file of page I.
102 it is found that code file EFG11, code file EFG15, code file EFG16 belong to page through the above steps The class file of noodles type, therefore by step 103, searched in relation list with code file EFG11, code file EFG15, The mark of the respective corresponding code library of code file EFG16, it is known that, code file EFG11, code file EFG15, code text Part EFG16 corresponds to first code library.Since code file EFG11 is the class file for belonging to page A, code file EFG15 is to belong to In the class file of page B, code file EFG16 belongs to the class file of page C, therefore can determine that page A, page B, page C Corresponding business module one.The description of corresponding relationship between other pages and business module shown in Figure 1B can be found in above-mentioned retouch It states, this will not be detailed here.
It should be noted that can also be first carried out between above-mentioned steps 101 and step 102 without temporal successive limitation Complete step 102, then step 101 is executed, it may also be performed simultaneously step 101 and step 102.
In the present embodiment, since the corresponding relationship between application program and business module is based on directly on code file parsing Related information out, it can be ensured that the corresponding relationship between the page and business module of application program is accurate and reliable, and then can keep away Exempt to bury an information error in the prior art or obscures business module and bury the problem of a little reporting mistake or failing to report;Due to being not required to Will be additional bury information and test environment, therefore reduce and maintenance invasive to the code file code of application program at This;When having the page being newly added or the discarded page in need in application program, can be provided by re-executing the application Method be corresponding relationship between the page and business module of renewable application program, so that it is guaranteed that the page that application program is new It obtains timely updates, the discarded page is cleared up in time.
Fig. 2 be the determination page shown in the application another exemplary embodiment and between business module corresponding relationship method Flow diagram;The present embodiment is on the basis of above-mentioned Figure 1A embodiment, how to be based on relation list and belong to classes of pages The class file of type determines for the corresponding relationship between the page of application program and business module and to combine Figure 1B to carry out exemplary Illustrate, as shown in Fig. 2, including the following steps:
Step 201, the relation list between the code library of application program and the code file of application program is determined, wherein Code library is corresponding with the business module of application program.
The description of step 201 may refer to the description of above-mentioned Figure 1A illustrated embodiment, and this will not be detailed here.
Step 202, the inheritance link of the code file of traversal applications program, determine the class file for belonging to page type and The page belonging to the class file.
The description of step 202 may refer to the description of above-mentioned Figure 1A illustrated embodiment, and this will not be detailed here.
Step 203, the file name for belonging to the class file of page type is determined.
Based on being illustrated on the basis of above-mentioned Figure 1A, for example, belonging to the class text of page type shown in Figure 1B The file name of part are as follows: EFG11, EFG15, EFG16, DEF21, DEF54, DEF65, MNP71, MNP85, MNP87, wherein EFG11 is the code file of page A, and EFG15 is the code file of page B, and EFG16 is the code file of page C, and DEF21 is The code file of page D, DEF54 are the code file of page E, and DEF65 is the code file of page F, and MNP71 is page G's Code file, MNP85 are the code file of page H, and MNP87 is the code file of page I.
Step 204, the code library name of code library corresponding with file name is searched from relation list.
As had recorded in relation list business module one, business module two shown in Figure 1B, business module three and this 100 Corresponding relationship between a code file, thus can by relation list search EFG11, EFG15, EFG16, DEF21, DEF54, DEF65, MNP71, MNP85, MNP87 can find the code library name of code library corresponding with file name, example Such as code library entitled ABC1, ABC2, ABC3.
Step 205, pair between the page of application program and business module is determined based on file name and code library name It should be related to.
The file name of class file be EFG11, EFG15, EFG16, DEF21, DEF54, DEF65, MNP71, MNP85, MNP87, by respectively corresponding page A, page B, page C, page D, page known to the description of step 102 in Figure 1A illustrated embodiment Face E, page F, page G, page H, page I, code library entitled ABC1, ABC2, the ABC3 determined by step 204, and And EFG11, EFG15, EFG16 belong to code library ABC1, DEF21, DEF54, DEF65, belong to code library ABC2, MNP71, MNP85, MNP87 belong to code library ABC3, wherein code library ABC1, code library ABC2, code library ABC3 respectively correspond business mould Block one, business module two, business module three, thus based on corresponding relationship i.e. can determine that file name be EFG11, EFG15, The class file of EFG16 corresponds to business module one, the class file of file name DEF21, DEF54, DEF65 correspond to business module Two, the class file of file name MNP71, MNP85, MNP87 corresponds to business module three.
The present embodiment is on the basis of above-mentioned Figure 1A illustrated embodiment, since file name and code library name are applying journey There is uniqueness in sequence, therefore determined between the page of application program and business module based on file name and code library name Corresponding relationship substantially increases the reliability of the corresponding relationship between the statistics page and business module.
Fig. 3 is the method for corresponding relationship between the determination page and business module shown in the another exemplary embodiment of the application Flow diagram;The present embodiment on the basis of above-mentioned Figure 1A embodiment, with how the code file of traversal applications program Inheritance link is determined for the page belonging to the class file for belonging to page type and the class file and Figure 1B is combined to carry out example Property explanation, as shown in figure 3, including the following steps:
Step 301, the relation list between the code library of application program and the code file of application program is determined, wherein Code library is corresponding with the business module of application program.
The description of step 301 may refer to the description of above-mentioned Figure 1A illustrated embodiment, and this will not be detailed here.
Step 302, the file name based on the code file of application program determines the code file of application program in file File path in folder.
In one embodiment, the source code of an application program can correspond to a file, beat in file comprising compiling Code file needed for packet application program, resource file and configuration file etc..In one embodiment, file path is relatively literary Part is clipped in for the position in disk space.
Step 303, the inheritance link of code file corresponding with file path, the generation based on the code file in inheritance link are traversed Digital content determines the class file for being inherited from view controller, and the class file for being inherited from view controller is determined to belong to classes of pages The class file of type.
It in step 303, can for example, the form of the file path of code file B is " the code file B under file A " The code file B under file A is found based on file path.The code content in code file B is parsed, if being based on code file The code content of B determines that code file B is inherited from code file C, then the code content of code file C is further parsed, if base It determines that code file C is inherited from code file D in the code content of code file C, then further parses the code of code file D Content, if the code content based on code file D determines that code file D is inherited from view controller (UIViewController), then code file B is determined to belong to the code file of the page, wherein the succession of code file B Code file on chain includes code file C and code file D.By the process, it can be achieved that the inheritance link of code file B Traversal.
Step 304, based on relation list and the class file for belonging to page type, the page and business mould of application program are determined Corresponding relationship between block.
The description of step 304 may refer to the description of above-mentioned Figure 1A or embodiment illustrated in fig. 2, and this will not be detailed here.
The present embodiment is on the basis of above-mentioned Figure 1A illustrated embodiment, by traversing code file corresponding with file path Inheritance link, it can be ensured that the code file in application program is scanned, and then is guaranteed to find and all belonged to classes of pages The class file of type, it is ensured that the corresponding relationship between the subsequent obtained page and business module is more acurrate reliable.
Further, before executing the step 101 in above-mentioned Figure 1A, the step 201 in Fig. 2, the step 301 in Fig. 3, It can be with following steps:
If detecting the non-traffic module in application program, the corresponding code library of non-traffic module is filtered;
After by the corresponding code library filtering of non-traffic module, the code library for determining application program and the application are executed The step of relation list between the code file of program.
By filtering the corresponding code library of non-traffic module, it can be ensured that only record traffic module is corresponding in relation list Corresponding relationship between code library and code file is being determined with the class file for belonging to page type using journey based on relation list When corresponding relationship between the page and business module of sequence, time that the page and business module are matched in relation list can be reduced Number.
On the basis of above-mentioned Figure 1A-embodiment illustrated in fig. 3, obtain the corresponding relationship between the page and business module it Afterwards, method can also include:
Corresponding relationship between the page and business module of application program is uploaded to server, server record is corresponding to close System.
In one embodiment, the corresponding relationship between the page and business module of application program can be by way of file It is uploaded to server, certainly, the present embodiment is not limited to corresponding relationship being uploaded to server in a manner of file, as long as can The data for indicating corresponding relationship are transferred to server.
By the way that the corresponding relationship between the page and business module is uploaded to server, know server using journey The business module of sequence whole, therefore server-side can be made not need in the case of knowing the information of business module from client, just It can classify to the page of application program according to business module.
Fig. 4 is the flow diagram how the application uses corresponding relationship between the page and business module;The present embodiment In application program be compiled and can be performed, as shown in figure 4, including the following steps:
Step 401, when application program is run, determine the page of application program buries information.
Step 402, the page of application program is uploaded to server buries information, and server determines page based on information is buried Face determines business module corresponding with the page from corresponding relationship.
For example, user opens the page of application program, Page Name ABC, if being provided in page ABC in user side Information is buried, then what terminal can be opened to server upload page ABC buries information, and burying information is, for example, " { PageId =ABC } ", server determines that page ABC belongs to business module OPQ from corresponding relationship.
In the present embodiment, due to the corresponding relationship between memory page and business module in server, work as server It receives after burying information, based on burying information you can learn that the corresponding business module of the page, server are not needed from client In the case of knowing the information of business module, it can classify to the page of application program according to business module.
The embodiment of method of corresponding relationship is corresponding between the aforementioned determining page and business module, and the application also provides The embodiment of the device of corresponding relationship between the determining page and business module.
Fig. 5 is the device of corresponding relationship between the determination page and business module shown in one exemplary embodiment of the application Structural schematic diagram, as shown in figure 5, device includes:
First determining module 51, for determining the relationship between the code library of application program and the code file of application program List, code library are corresponding with the business module of application program;
The class for belonging to page type is determined in spider module 52, the inheritance link of the code file for traversal applications program The page belonging to file and the class file;
Second determining module 53, what relation list and spider module 52 for being determined based on the first determining module 51 were obtained The class file for belonging to page type determines the corresponding relationship between the page of application program and business module.
Fig. 6 be the determination page shown in the application another exemplary embodiment and between business module corresponding relationship device Structural schematic diagram, as shown in fig. 6, on the basis of above-mentioned embodiment illustrated in fig. 5, the second determining module 53 can include:
First determination unit 531, for determining the file name for belonging to the class file of page type;
Searching unit 532, it is corresponding with the file name that the first determination unit 531 determines for being searched from relation list Code library code library name;
Second determination unit 533, file name and searching unit 532 for being determined based on the first determination unit 531 are looked into The code library name found determines the corresponding relationship between the page of application program and business module.
In one embodiment, spider module 52 can include:
Third determination unit 521, the file name for the code file based on application program determine the generation of application program File path of the code file in file;
Traversal Unit 522, for traverse the corresponding code file of file path determined with third determination unit 521 after Chain is held, based on the determining class file for being inherited from view controller of code content of the code file in the inheritance link, will be inherited The class file of page type is determined to belong to from the class file of view controller.
In one embodiment, the first determining module 51 can include:
Compilation unit 511 generates compiling link file for compiling the code file of application program;
4th determination unit 512 determines application program for compiling from compilation unit 511 in obtained compiling link file Code library and application program code file between relation list.
In one embodiment, device further include:
Filtering module 54, if filtering non-traffic module corresponding generation for detecting the non-traffic module in application program Code library;
After filtering module 54 is by the corresponding code library filtering of non-traffic module, the first determining module 51 executes determination and answers The step of with relation list between the code library of program and the code file of application program.
In one embodiment, device further include:
Uploading module 55, pair between the page and business module of the application program for determining the second determining module 53 It should be related to and be uploaded to server, server records corresponding relationship.
The application determines that the embodiment of the device of corresponding relationship between the page and business module can be applied in electronic equipment On.Installation practice can also be realized by software realization by way of hardware or software and hardware combining.With software reality It is that non-volatile memories are situated between by the processor of electronic equipment where it as the device on a logical meaning for existing Corresponding computer program instructions are read into memory what operation was formed in matter, calculate machine program and appoint for executing above-mentioned Figure 1A-Fig. 3 The method of corresponding relationship between the determination page and business module that one embodiment provides.For hardware view, as shown in fig. 7, A kind of hardware structure diagram of electronic equipment where determining the device of corresponding relationship between the page and business module for the application, in addition to Except processor shown in Fig. 7, memory, network interface and nonvolatile memory, the electronics in embodiment where device is set The standby actual functional capability generally according to the electronic equipment can also include other hardware, repeat no more to this.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein being used as separate part description Unit may or may not be physically separated, component shown as a unit may or may not be Physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to the actual needs Some or all of the modules therein is selected to realize the purpose of application scheme.Those of ordinary skill in the art are not paying wound In the case that the property made is worked, it can understand and implement.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following Claim is pointed out.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.

Claims (10)

1. a kind of method of corresponding relationship between determining page and business module, which is characterized in that the described method includes:
Determine the relation list between the code library of application program and the code file of the application program, the code library and institute The business module for stating application program is corresponding;
The class file for belonging to page type and the class file are determined in the inheritance link for traversing the code file of the application program The affiliated page;
Based on the relation list and the class file for belonging to page type, the page and business mould of the application program are determined Corresponding relationship between block.
2. based on the relation list and described belonging to classes of pages the method according to claim 1, wherein described The class file of type determines the corresponding relationship between the page and business module of the application program, comprising:
Belong to the file name of the class file of page type described in determination;
The code library name of code library corresponding with the file name is searched from the relation list;
Pair between the page and business module of the application program is determined based on the file name and the code library name It should be related to.
3. the method according to claim 1, wherein the succession of the code file of the traversal application program Chain determines the page belonging to the class file for belonging to page type and the class file, comprising:
Determine the code file of the application program in file based on the file name of the code file of the application program File path;
Traverse the inheritance link of code file corresponding with the file path;
Based on the determining class file for being inherited from view controller of code content of the code file in the inheritance link, will be inherited from The class file of view controller is determined to belong to the class file of page type.
4. the method according to claim 1, wherein the code library of the determining application program applies journey with described Relation list between the code file of sequence, comprising:
The code file of the application program is compiled, compiling link file is generated;
Pass between the code file of code library and the application program for determining application program in the compiling link file Series of tables.
5. according to the method described in claim 4, it is characterized in that, it is described the method also includes:
If detecting the non-traffic module in the application program, the corresponding code library of the non-traffic module is filtered;
After by the corresponding code library filtering of the non-traffic module, execute the code library of the determining application program with it is described The step of relation list between the code file of application program.
6. -5 any method according to claim 1, which is characterized in that the method also includes:
Corresponding relationship between the page and business module of the application program is uploaded to server, the server records institute State corresponding relationship.
7. the device of corresponding relationship between a kind of determining page and business module, which is characterized in that described device includes:
First determining module, for determining that the relationship between the code library of application program and the code file of the application program arranges Table, the code library are corresponding with the business module of the application program;
The class text for belonging to page type is determined in spider module, the inheritance link of the code file for traversing the application program The page belonging to part and the class file;
Second determining module, the relation list and the spider module for being determined based on first determining module are obtained The class file for belonging to page type, determine the corresponding relationship between the page and business module of the application program.
8. device according to claim 7, which is characterized in that second determining module includes:
First determination unit, the file name of the class file for belonging to page type described in determination;
Searching unit, it is opposite with the file name that first determination unit determines for being searched from the relation list The code library name for the code library answered;
Second determination unit, the file name and the searching unit for being determined based on first determination unit are searched To the code library name determine the corresponding relationship between the page and business module of the application program.
9. device according to claim 7, which is characterized in that the spider module includes:
Third determination unit, the file name for the code file based on the application program determine the generation of the application program File path of the code file in file;
Traversal Unit, for traversing the succession of code file corresponding with the determining file path of the third determination unit Chain will be inherited from based on the determining class file for being inherited from view controller of code content of the code file in the inheritance link The class file of view controller is determined to belong to the class file of page type.
10. a kind of computer readable storage medium, which is characterized in that the storage medium is stored with computer program, the meter Calculation machine program is used to execute the side of corresponding relationship between the claims 1-6 any the determination page and business module Method.
CN201810731037.XA 2018-07-05 2018-07-05 Method and device for determining corresponding relation between page and business module Active CN109101234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810731037.XA CN109101234B (en) 2018-07-05 2018-07-05 Method and device for determining corresponding relation between page and business module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810731037.XA CN109101234B (en) 2018-07-05 2018-07-05 Method and device for determining corresponding relation between page and business module

Publications (2)

Publication Number Publication Date
CN109101234A true CN109101234A (en) 2018-12-28
CN109101234B CN109101234B (en) 2022-03-08

Family

ID=64845494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810731037.XA Active CN109101234B (en) 2018-07-05 2018-07-05 Method and device for determining corresponding relation between page and business module

Country Status (1)

Country Link
CN (1) CN109101234B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090433A (en) * 2019-10-23 2020-05-01 贝壳技术有限公司 Data processing method, device and storage medium
CN113901022A (en) * 2021-09-22 2022-01-07 成都飞机工业(集团)有限责任公司 Method, device, equipment and storage medium for establishing business and data relation model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412820A (en) * 2013-08-30 2013-11-27 曙光信息产业(北京)有限公司 Test method and tester for pages in Web system
CN106648555A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Page generation method and device
CN107391163A (en) * 2017-04-21 2017-11-24 阿里巴巴集团控股有限公司 page data loading method, device and application in mobile terminal
CN107908404A (en) * 2017-11-17 2018-04-13 深圳市泉眼网络科技有限公司 program packaging method, system and terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412820A (en) * 2013-08-30 2013-11-27 曙光信息产业(北京)有限公司 Test method and tester for pages in Web system
CN106648555A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Page generation method and device
CN107391163A (en) * 2017-04-21 2017-11-24 阿里巴巴集团控股有限公司 page data loading method, device and application in mobile terminal
CN107908404A (en) * 2017-11-17 2018-04-13 深圳市泉眼网络科技有限公司 program packaging method, system and terminal device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090433A (en) * 2019-10-23 2020-05-01 贝壳技术有限公司 Data processing method, device and storage medium
CN111090433B (en) * 2019-10-23 2023-10-20 贝壳技术有限公司 Data processing method, device and storage medium
CN113901022A (en) * 2021-09-22 2022-01-07 成都飞机工业(集团)有限责任公司 Method, device, equipment and storage medium for establishing business and data relation model
CN113901022B (en) * 2021-09-22 2024-03-15 成都飞机工业(集团)有限责任公司 Method, device, equipment and storage medium for establishing business and data relationship model

Also Published As

Publication number Publication date
CN109101234B (en) 2022-03-08

Similar Documents

Publication Publication Date Title
US9983984B2 (en) Automated modularization of graphical user interface test cases
US10997059B2 (en) Generating test scripts for testing a network-based application
US20240061680A1 (en) Methods and Apparatus for Finding Long Methods in Code
US9417991B2 (en) Translation verification testing
US11074119B2 (en) Automatic root cause analysis for web applications
CN110457578A (en) A kind of customer service demand recognition methods and device
Stocco et al. Why creating web page objects manually if it can be done automatically?
CN112241370B (en) API interface class checking method, system and device
CN110018954A (en) Code quality detection, the appraisal procedure of code detection quality, device and equipment
CN109101234A (en) Determine the method and device of corresponding relationship between the page and business module
CN106547658A (en) A kind of automated testing method and device
Nguyen et al. Generating and selecting resilient and maintainable locators for Web automated testing
CN102929729A (en) Method and device for tracking fault
CN113934617A (en) Data processing method, device, equipment and storage medium
US9697103B2 (en) Automatic knowledge base generation for root cause in application performance management
US10257055B2 (en) Search for a ticket relevant to a current ticket
Kalaki et al. Anomaly detection on OpenStack logs based on an improved robust principal component analysis model and its projection onto column space
WO2023275887A1 (en) System and method for automated software testing
Schluter Restarting automata with auxiliary symbols restricted by lookahead size
TWI709905B (en) Data analysis method and data analysis system thereof
Bonifácio et al. A new method for testing timed systems
CN106649337A (en) Method and device for identifying webpage column
Azimi et al. Adaptv: A model-based test adaptation approach for end-to-end user interface testing of smart tvs
JP5516277B2 (en) Test case relation extraction method, test case relation extraction device, and test case relation extraction program
US20220414316A1 (en) Automated language assessment for web applications using natural language processing

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