CN109992502A - Application software performance automatic detection analysis method, apparatus, equipment and medium - Google Patents

Application software performance automatic detection analysis method, apparatus, equipment and medium Download PDF

Info

Publication number
CN109992502A
CN109992502A CN201711492783.XA CN201711492783A CN109992502A CN 109992502 A CN109992502 A CN 109992502A CN 201711492783 A CN201711492783 A CN 201711492783A CN 109992502 A CN109992502 A CN 109992502A
Authority
CN
China
Prior art keywords
analysis
application software
source code
model
result
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.)
Pending
Application number
CN201711492783.XA
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan 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 China Mobile Communications Group Co Ltd, China Mobile Group Sichuan Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201711492783.XA priority Critical patent/CN109992502A/en
Publication of CN109992502A publication Critical patent/CN109992502A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3616Software analysis for verifying properties of programs using software metrics

Abstract

The present invention provides method, apparatus, equipment and the medium of a kind of application software performance automatic detection analysis.This method comprises: obtaining application software;The source code of the application software is analyzed, source code is obtained and analyzes result;The database model connected to the application software is analyzed, and modal analysis results are obtained;And based on source code analysis result, the modal analysis results and/or other customized factors, intellectual analysis is carried out to the application software, obtains intellectual analysis result.According to the technique and scheme of the present invention, discovery source code compliance, data processing performance situation, some hidden danger after solution application software is online in advance applied software development and a large amount of workload of later period O&M can be saved ahead of time.

Description

Application software performance automatic detection analysis method, apparatus, equipment and medium
Technical field
The present invention relates to computer application technology more particularly to a kind of sides of application software performance automatic detection analysis Method, device, equipment and medium.
Background technique
With the development of computer technology, application software is increasingly indispensable in people's lives, while people are to application The performance requirement of software is also higher and higher.Therefore, the performance test of application software becomes more and more important.
Application software method for testing performance relatively common at present, which can be roughly divided into two types:
1. being tested for the property by testing tool to application software.For example, the tool using performance test is simulated Test.The technological means is to a certain extent it has also been discovered that software performance problem, still, it relies on the professional water of tester Gentle digital simulation accuracy and magnitude, and the performance issue tested out can not quick positioning question root;
2. carrying out quality control by reinforcing software development flow.For example, passing through design review, compiling and edit code specification, add Strong code walkthrough to find the performance issue of application program in time.But these require manpower manual to do.On the one hand this is right The requirement of the technical level of production procedure and personnel is relatively high, on the other hand can waste a large amount of manpower and time, higher cost.
In conclusion the performance how to go detection in design, exploitation test phase, analyze, assess application software, accurately Orientation problem root and the technical issues of save testing cost, be application software detection field urgent need to resolve.
Summary of the invention
The embodiment of the invention provides a kind of application software performance automatic detection analysis method, apparatus, equipment and medium, energy Enough improve the efficiency of application software testing.
In a first aspect, the embodiment of the invention provides a kind of application software performance automatic detection analysis method, method includes: Obtain application software;The source code of the application software is analyzed, source code is obtained and analyzes result;To company, the application software institute The database model connect is analyzed, and modal analysis results are obtained;And result, the model analysis knot are analyzed based on the source code Fruit and/or other customized factors carry out intellectual analysis to the application software, obtain intellectual analysis result.
Second aspect, the embodiment of the invention provides a kind of application software performance automatic detection analysis device, device includes: Module is obtained, is configured as obtaining application software;Source code analysis module is configured as analyzing the source code of application software, It obtains source code and analyzes result;Model analysis module, the database model for being configured as connecting application software are analyzed, are obtained Obtain modal analysis results;And intelligent analysis module, it is configured as analyzing result, the modal analysis results based on the source code And/or other customized factors, intellectual analysis is carried out to the application software, obtains intellectual analysis result.
The embodiment of the invention provides a kind of application software performance automatic detection analysis equipment, comprising: at least one processing Device, at least one processor and computer program instructions stored in memory, when computer program instructions are by processor The method such as first aspect in above embodiment is realized when execution.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey The method such as first aspect in above embodiment is realized in sequence instruction when computer program instructions are executed by processor.
Application software performance automatic detection analysis method, apparatus, equipment and medium provided in an embodiment of the present invention, pass through pumping Take source code relevant to data performance processing in application software, analyze relationship between sound code file, call relation between function, The information such as data model compliance, according to code regulation library and model rule base, automatic detection analysis goes out application software performance and deposits The problem of;And recommendation on improvement can be provided by intelligent analysis means.This arrives tradition code inspection promotion once a week Even half a day is primary once a day, effectively improves code quality automatic management level.It can alternatively, it is also possible to find to apply in advance Performance issue existing for energy reduces production environment and breaks down probability.
To sum up, application software performance automatic detection analysis method, apparatus, equipment and medium based on this motion, not only may be used To solve the automation issues of code walkthrough, while application software performance detection can also be worked and advance to the development phase, and is deep Enter to source code grade.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described, for those of ordinary skill in the art, without creative efforts, also Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 shows a kind of structure of the application software performance automatic detection analysis system of exemplary embodiment of the present invention and shows It is intended to;
Fig. 2 shows a kind of process signals of the application software performance automatic detection analysis of exemplary embodiment of the invention Figure;
Fig. 3 shows a kind of flow diagram of the source code analysis of exemplary embodiment of the present invention;
Fig. 4 shows a kind of flow diagram of the source code analysis of exemplary embodiment of the present invention;
Fig. 5 shows a kind of call relation schematic diagram of the sound code file of exemplary embodiment of the present invention;
Fig. 6 shows a kind of flow diagram of the source code analysis of exemplary embodiment of the present invention;
Fig. 7 shows a kind of flow diagram of the model analysis of exemplary embodiment of the present invention;
Fig. 8 shows a kind of flow diagram of the intellectual analysis of exemplary embodiment of the present invention;
Fig. 9 shows a kind of intelligent analytical model of exemplary embodiment of the present invention;
Figure 10 shows a kind of structure of the application software performance automatic detection analysis device of exemplary embodiment of the present invention Schematic diagram;
Figure 11 shows a kind of structural schematic diagram of the source code analysis module of exemplary embodiment of the present invention;
Figure 12 shows a kind of structural schematic diagram of the model analysis module of exemplary embodiment of the present invention;
Figure 13 shows a kind of structural schematic diagram of the intelligent analysis module of exemplary embodiment of the present invention;
Figure 14 shows a kind of signal of the application software performance automatic detection analysis platform of exemplary embodiment of the present invention Figure;And
Figure 15 shows a kind of hardware of the application software performance automatic detection analysis equipment of exemplary embodiment of the present invention Equipment schematic diagram.
Specific embodiment
The feature and exemplary embodiment of various aspects of the invention is described more fully below, in order to make mesh of the invention , technical solution and advantage be more clearly understood, with reference to the accompanying drawings and embodiments, the present invention is further retouched in detail It states.It should be understood that specific embodiment described herein is only configured to explain the present invention, it is not configured as limiting the present invention. To those skilled in the art, the present invention can be real in the case where not needing some details in these details It applies.Below the description of embodiment is used for the purpose of better understanding the present invention to provide by showing example of the invention.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including There is also other identical elements in the process, method, article or equipment of the element.
Fig. 1 shows a kind of structure of the application software performance automatic detection analysis system of exemplary embodiment of the present invention and shows It is intended to.As shown in Figure 1, application software performance automatic detection analysis system 100 include but is not limited to client 110, network 120, Server 130 and database 140.
Client 110 is the device for referring to storage, installation, operation and/or editor's application software.Herein using soft Part refers to user for special-purpose, the set for the application program worked out by various programming languages.Application software is made Programming language includes Java, C, C++, C#, Python, Visual Basic.Net, PHP, Ruby, R, Matlab, Other programming languages of the art can also be used.Client 110 may include mobile phone 111, palm PC 112, notes This 113, desktop computer 114 and other intelligent terminals (such as wearable smart machine, pilotless automobile, unmanned plane, intelligence Energy robot etc.).
Network 120 is to transmit data and information.Network 120 can be cable network or wireless network, such as: cable system Network, cable network, fiber optic network, telecommunications network, Intranet, internet, local area network (LAN), WLAN (WLAN), Metropolitan Area Network (MAN) (MAN), wide area network (WAN), Public Switched Telephone Network (PSTN), blueteeth network, ZigBee-network, near-field communication (NFC) network etc..
Server 130 is used to handle and analyze information and data.It in the present invention, may include application in server 130 Software performance automatic detection analysis device 131, for testing and analyzing the application software sent from client 110.Server 130 It can be local, be also possible to long-range.It is convenient to understand, it is merely exemplary in server 130 to depict a server.So It and may include multiple servers in the present invention, therefore the operation described in the present invention realized by a server and/or side Method jointly or can also be realized independently by multiple servers.Though can also include in server 130 in addition, being not shown One of other assemblies, including but not limited to database, memory, processor, communication interface, display etc. are a variety of.
Database 140 is the warehouse for coming tissue, storage and management data according to data structure.In some embodiments, number It can store the data and/or instruction for executing or using for server 130 according to library 140, server 130 can be by executing or making With the data and/or instruction to realize illustrative methods described in the invention.Database 140 can be simple storage and set It is standby, it is also possible to the server with analysis and processing function.For example, database 140 can be mass storage, move Memory, volatility read-write memory, read-only memory (ROM) etc..Database 140 can also be realized in a cloud platform. The cloud platform may include private clound, public cloud, mixed cloud, community cloud, distribution clouds, between cloud, multiple cloud etc..
Fig. 2 shows a kind of process signals of the application software performance automatic detection analysis of exemplary embodiment of the invention Figure.Application software performance automatic detection analysis method 200 can be implemented by one or more components in server 130.For example, Application software performance automatic detection analysis method 200 can be implemented (to be detailed in by application software performance automatic detection analysis device 131 Figure 10 and its description).
In step 201, server 130 obtains application software.In some embodiments, server 130 can pass through network 120 obtain, or directly acquire the application software that client 110 needs to carry out performance detection.
In step 203, server 130 analyzes the source code of the application software, obtains source code and analyzes result.About The method of source code analysis, refers to Fig. 3 to Fig. 6 and its description.
In step 205, the database model that server 130 connects the application software is analyzed, and obtains model Analyze result.About the method for model analysis, Fig. 7 and its description are referred to.
In step 207, server 130 be based on source code analysis result, the modal analysis results and/or other make by oneself Adopted factor carries out intellectual analysis to the application software, obtains intellectual analysis result.About the method for intellectual analysis, refer to Fig. 8, Fig. 9 and its description.
Fig. 3 shows a kind of flow diagram of the source code analysis of exemplary embodiment of the present invention.Source code analysis method 300 It can be implemented by one or more components in server 130.For example, source code analysis method 300 can be by application software performance Automatic detection analysis device 131 implements (being detailed in Figure 10 and its description).
In step 301, server 130 obtains the sound code file of the application software.Application software to be detected can deposit Storage is local in client 110, also can store in database 140, server 130 can be from client 110 or database 140 In transfer the sound code file of application software.For example, if application software is stored in SVN code database, server 130 can be with The sound code file of the application software is obtained from SVN code server.Sound code file refers to be compiled according to various programming languages The text file write, the inside include source code data.
In step 303, server 130 parses the sound code file according to programming language resolution rules.In parsing source code text When part, both (that is, full dose parsing) can be parsed for all data in sound code file, it can also be in the middle part of sound code file Divided data is parsed (that is, the amount of adopting parses).Sound code file after parsing can be stored in server 130 or database 140.
Sound code file after step 305, the analysis parsing of server 130, obtains source code and analyzes result.The source code analysis It as a result include the call relation between the incidence relation and/or function between sound code file.Analysis for sound code file, can be with By the model algorithm (for example, intelligent analytical model) designed in the application, can also using the art, other are common Method.
After server 130 obtains source code analysis result, user can visually be showed by display module, it can also be with Client 110 is sent to by network 120.It is convenient to understand, Fig. 5 is referred to, it shows sound code file in a certain embodiment Call relation schematic diagram, such as scheme, sound code file A.xml called by B.dao, and B.dao is called by C.service, C.service It is called again by D.action.
Fig. 4 shows a kind of flow diagram of the source code analysis of exemplary embodiment of the present invention.Source code analysis method 400 It can be implemented by one or more components in server 130.For example, source code analysis method 400 can be by application software performance Automatic detection analysis device 131 implements (being detailed in Figure 10 and its description).
In step 401, server 130 extracts data relevant to data processing performance from source code analysis result. The source code analysis result can be obtained by the source code analysis method 300 in Fig. 3.In some embodiments, server 130 extracts source Data relevant to data processing performance are analyzed in code analysis result, can also extract other data.
In step 403, the relevant data of process performance, acquisition data performance are processed based on the data for server 130 The analysis result of journey and/or code logic.It, can be specific to some data processing about the analysis of data performance treatment process Performance.For example, for this data processing performance of data sorting, the source that can first be obtained based on source code analysis method 300 in Fig. 3 The call relation of code file can divide calling and called sound code file end to end on the basis of call relation Analysis.
Code service logic is generally all placed on service layers, convenient to understand, refers to the C.service source code in Fig. 5 File.Assuming that there is a certain method function a (parameter 1, parameter 2) in C.servcie, after carrying out depth analysis to it, letter is found Number a has invoked the function b (parameter 1, parameter 2) of E.service again, and function b is using multiple threads technology.Carrying out generation When code logic analysis, the process performance of the per thread can be assessed.For example, can need to locate according to externally input The data magnitude of reason, whether analysis multithreading can complete the processing of task within period regular hour, to realize to code The performance evaluating of logic.
Fig. 6 shows a kind of flow diagram of the source code analysis of exemplary embodiment of the present invention.Source code analysis method 600 It can be implemented by one or more components in server 130.For example, source code analysis method 600 can be by application software performance Automatic detection analysis device 131 implements (being detailed in Figure 10 and its description).
In step 601, server 130 obtains the SQL statement in the data relevant to data processing performance.SQL language Sentence is used to store, query, update, and manage the database that application software is connected.
In step 603, server 130 analyzes the relevant database model of the SQL statement according to model analysis rule, It obtains object model and analyzes result.Database model includes data base logic model, can be according to the industry constructed by application software Pragmatic body Model is abstracted.The model analysis rule is from rule module 1008, such as may include model rule, rope Draw rule, correlation rule etc. (being detailed in Figure 10 and its description), whether they can reasonable for Test database modelling, example Such as whether there is the quantity of external key, index.Requirement for database model cannot usually have external key, index quantity preferably not It must come into force more than 3, index.Server 130 can analyze the relevant partial database model of SQL statement, Can all database models relevant to SQL statement analyze.According to model analysis rule, server 130 can be positioned Out SQL statement there are the problem of, obtain object model analyze result.
In step 605, server 130 analyzes the execution efficiency of the SQL statement, obtains SQL results of performance analysis.It is described Execution efficiency may include the factors such as the execution duration of SQL statement, executory cost.It is right when analyzing the execution efficiency of SQL statement Different analysis modes can be used in different databases.For example, mysql can use explain, sqlserver can be with Using SETSTATISTICS IO ON or SET STATISTICS TIME ON etc..By execution efficiency to SQL statement from Dynamicization analysis, can orient SQL statement there are the problem of, obtain SQL performance analysis report.
In step 607, server 130 integrates the object model analysis result and the SQL results of performance analysis, obtains Comprehensive analysis report.Integration method may include fusion, comparison, weighting, de-redundant etc..For example, server 130 can will be described right It as modal analysis results and the SQL results of performance analysis, is fused together, after comprehensive analysis, the optimization for providing SQL statement is built View.The Optimizing Suggestions can visually show user by display module, can also be sent to client by network 120 110。
By the way that by the result of application software performance evaluation and journey can be applied for source code analysis method 300,400 and 600 The function of sequence, the relationship of sound code file, which are oriented, to be come, and the efficiency of application performance problems reparation is improved.On the other hand, source code is analyzed As a result client 110 can be exported or be transferred in the form of report, conveniently checked.It is analyzed according to source code as a result, can be quick Relevant functional module and developer are navigated to, so as to quickly solve the problems, such as.
It should be noted that those skilled in the art can be omitted certain for source code analysis method 300,400 and 600 A little steps increase certain steps, adjust the sequence of certain steps.Suchlike deformation, protection scope of the present invention it It is interior.
Fig. 7 shows a kind of flow diagram of the model analysis of exemplary embodiment of the present invention.Model analysis method 700 It can be implemented by one or more components in server 130.For example, model analysis method can be automatic by application software performance It tests and analyzes device 131 and implements (being detailed in Figure 10 and its description).
In step 701, the application software is connected to corresponding database by server 130.The connection type of database It may include Open Database Connection (Open Database Connectivity, ODBC), data access object (Data Access Objects, DAO), remote data object (Remote Data Objects, RDO), OLE DB or ADO (ActiveX Data Object) etc..
In step 703, server 130 obtains the database manipulation object that the application software is related to.The database behaviour It include table, view, index, trigger, storing process, user, sequence etc. as object.In some embodiments, server 130 And/or the database manipulation object that database 140 can also will acquire is stored.
In step 705, server 130 analyzes the database manipulation object, obtains logical model.For example, server 130 Business Entity model constructed by the application software can be abstracted, obtain data base logic model.
In step 707, server 130 matches the logical relation model of acquisition according to model analysis rule, obtains object mould Type analysis result.Model analysis rule can come from rule module 1008, such as model rule, index rule, correlation rule etc. (being detailed in Figure 10 and its description), in addition it can include some customized analysis rules.It, can be with logarithm according to model analysis rule It is analyzed according to major key, external key, index and field length definition in the model of library, type definition, view, slow SQL.According to making by oneself Adopted analysis rule can angularly be carried out whether table data volume size, database model have external key, major key whether to establish index It analyses in depth.
By taking the analysis of the index of table as an example, on the one hand to want whether analytical database model has built index, on the other hand to divide Whether analysis index fails.For example, the model of some tables is in design, designer may not expect data magnitude or be closed The frequency that joint investigation is ask, so this will not design index.But index can not be abused, index is not the The more the better of foundation, Certain control will also be carried out to the quantity of index.These problems will reflect that the object model is analyzed in result, for Family optimizes database model design.
Model analysis method 700 may be implemented to obtain database model automatically from the relevant database of application software, and For table, SQL statement and the external input control condition in database model set, multi dimensional analysis is carried out, is realized to data The problem of library model field, index and main external key are analyzed comprehensively, find modelling, while also supporting custom rule analysis, To fully ensure that the reasonability of model analysis and accurate qualitative.
It should be noted that those skilled in the art can be omitted certain for model analysis method 300,400 and 600 A little steps increase certain steps, adjust the sequence of certain steps.Suchlike deformation, protection scope of the present invention it It is interior.
Fig. 8 shows a kind of flow diagram of the intellectual analysis of exemplary embodiment of the present invention.Intelligent analysis method 800 It can be implemented by one or more components in server 130.For example, model analysis method can be automatic by application software performance It tests and analyzes device 131 and implements (being detailed in Figure 10 and its description).
In step 801, server 130 obtains intelligent analytical model.The acquisition modes of the intelligent analytical model, can be Existing intelligent analytical model directly is transferred from server 130 or database 140, one can also be established in each test New intelligent analytical model.The intelligent analytical model can be based on self-teaching or machine learning algorithm, including but not limited to Linear regression algorithm, logistic regression algorithm, decision Tree algorithms, algorithm of support vector machine (Support Vector Machine, SVM), neural network algorithm (Artificial Neural Network, ANN), Recognition with Recurrent Neural Network algorithm (Recurrent Neural Network, DNN), NB Algorithm (Naive Bayesian, NB), K nearest neighbor algorithm (K-Means), K Mean algorithm, random forests algorithm, dimension-reduction algorithm (Dimensionality Reduction), gradient boosting algorithm (Gradient Boost), confrontation network algorithm (Generative Adversarial Networks, GAN), depth are generated Practise one or more of algorithm etc..
In step 803, server 130 obtain source code analysis result, the modal analysis results and/or other make by oneself Adopted factor.These three types of data are obtained, are to extract feature vector used in intelligent analytical model.
In step 805, server 130 is based on the intelligent analytical model, and processing obtains the source code analysis result, described Modal analysis results and/or other customized factors carry out intellectual analysis to the application software, obtain intellectual analysis result. Due to combining source code analysis result, the modal analysis results and/or other customized factors, the intellectual analysis result pair The evaluation comparison of application software performance is comprehensive, is able to achieve the accuracy of analytical judgment.
The process for establishing intelligent analytical model can be realized by following steps:
S1: the data of application software performance intellectual analysis are obtained.
The data may include described source code analysis result, modal analysis results and other data.In some realities Apply in example, data can also further be pre-processed, for example, change data format, to data sampling, removal noise, data volume Change, Attribute decomposition, attribute merging etc..
S2: feature vector is extracted from the data.
Wherein, each feature vector includes at least one characteristic attribute, and the representative of each characteristic attribute may influence to apply One parameter of software performance.According to the present invention it is possible to extract three classes feature vector, including source code analysis classes feature vector, mould Type analysis category feature vector and other feature vectors.
Wherein, source code analysis classes feature vector can be illustrated so that SQL statement is analyzed as an example.For example, source code analysis classes are special Levying vector includes at least one of following characteristics attribute: SQL statement, type, table set, function used, execution duration etc..Institute It states type and refers to insertion, deletion or inquiry, the duration that executes refers to the time that current SQL is executed.Assuming that in certain embodiment, All of above characteristic attribute is had chosen, then the source code analysis classes feature vector can be denoted as:
SQL=(SQL statement, type, table set, function used execute duration).
Characteristic attribute in model analysis category feature vector may include at least one of the following: table name, whether there is or not major key, Whether there is or not external key, whether there is or not index, index quantity, data magnitude, operating characteristics etc..Wherein, the data magnitude and operating characteristic can To set manually.The data magnitude refers to the maximum size of table, and the operating characteristic is that index expression is inserted into, deletes, looks into It askes and which number of operations is more.Assuming that all of above characteristic attribute is had chosen in certain embodiment, then the model analysis Category feature vector can be denoted as:
Table=(table name, whether there is or not major keys, and whether there is or not external keys, and whether there is or not indexes, index quantity, data magnitude, operating characteristic).
Characteristic attribute in other feature vectors can be some customized factors, such as may include data processing Magnitude, whether batch processing, concurrent processing quantity etc. other with business relevant factor.
S3: being based on described eigenvector, constructs intelligent analytical model.
It is convenient to understand, it is described by taking the building of decision Tree algorithms model as an example below.It should be noted that of the invention It can also include other intelligent analytical models, spirit according to the present invention and the deformation substantially made, such as increase and decrease characteristic attribute, It is substituted for other machines learning algorithm, adjustment objective function etc., within the scope of the present invention.
As shown in figure 9, the decision Tree algorithms construct a tree construction.The tree construction can be binary tree or non-y-bend Tree.Its each nonleaf node indicates the test on a characteristic attribute, and each branch represents this characteristic attribute in some codomain On output, and each leaf node store a classification.
The process that decision is carried out using the decision Tree algorithms model, can test Xiang Zhongxiang to be sorted since root node The characteristic attribute answered, and according to its value select output branch, until reach leaf node, using leaf node storage classification as The result of decision.
For example, root node is " SQL type ", it is about the test in characteristic attribute " type " in its next branch.If " class The test result of type " is " insertion ", then enters nonleaf node " judging whether to be batch processing things ", if the test result of type is " inquiry " then enters nonleaf node " SQL table quantity ".And so on, it repeats no more.
The application can use a kind of tree developing algorithm of local optimum strategy, and steps are as follows for the specific execution of the algorithm:
By the way that sampled data to be divided into different subsets in succession, tree construction is established in a recursive manner.If Mt is and node t Associated sampling record collection, and y=y1, y2 ..., and yc } it is class label, the recursive definition of algorithm is as follows:
(1) if all records belong to same class in Mt, t is leaf node, is marked with yt;
(2) if selecting an attribute test condition comprising belonging to the records of multiple classes in Mt, by record be divided into compared with Small subset.Each output for test condition creates an offspring node, and is divided the record in Mt according to test result Cloth is into daughter nodes.Then, for each daughter nodes, the algorithm is recursively called, to complete a series of not sympathize with Analysis of Policy Making under condition, and export the result of analysis.
S4: optimize the intelligent analytical model.
In some embodiments, the intelligent analytical model of foundation can also be advanced optimized.For example, can be by some Evaluation index makes an appraisal to the intelligent analytical model established.If intelligent analytical model goes wrong, adjustable data Range, feature vector etc., optimize it.
The intelligent analytical model of the foundation can store in server 130 and/or database 140, conveniently next time Use when doing application software performance evaluation test.
Figure 10 shows a kind of structure of the application software performance automatic detection analysis device of exemplary embodiment of the present invention Schematic diagram.As shown in Figure 10, application software performance automatic detection analysis device 131 includes obtaining module 1002, source code analysis mould Block 1004, model analysis module 1006, rule module 1008, intelligent analysis module 1010 and output module 1012.
Wherein, the acquisition module 1002 can be used for obtaining to be detected answer for obtaining application software to be detected With the sound code file of software.
Source code of the source code analysis model 1004 for the application software is analyzed, and is obtained source code and is analyzed result. Specifically, referring to Figure 11, source code analysis model 1004 may further include resolution unit 1102, extracting unit 1104, object Model analysis unit 1106, performance analysis unit 1108 and integral unit 1110.The resolution unit 1102 can be used for root According to programming language resolution rules, sound code file is parsed.The extracting unit 1104 can be used for analyzing in result from the source code Extract data relevant to data processing performance.The object model analytical unit 1106 can be used for being advised according to model analysis Then, the relevant database model of the SQL statement is analyzed, object model is obtained and analyzes result.The performance analysis unit 1108 For analyzing the execution efficiency of the SQL statement, SQL results of performance analysis is obtained.The integral unit 1110 is for integrating institute Object model analysis result and the SQL results of performance analysis are stated, comprehensive analysis report is obtained.
The database model that the model analysis module 1006 is used to connect the application software is analyzed, and is obtained Modal analysis results.Specifically, referring to Figure 12, model analysis module 1006 may further include connection unit 1202, operation Object acquisition unit 1204, logical model construction unit 1206 and object model analytical unit 1208.Wherein, the connection is single Member 1202 is for being connected to corresponding database for the software.The operation object acquiring unit 1204 is for obtaining described answer The database manipulation object 703 being related to software.The logical model construction unit 1206 is for analyzing the database manipulation Object obtains logical model.The object model analytical unit 1208 is used to match the logic of acquisition according to model analysis rule Model obtains object model and analyzes result.
The rule module 1008 is used to mention for the model analysis module 1006 and/or the intelligent analysis module 1010 For rule.Rule module 1008 can separate operational decision making from the frame of application program, use predefined dialect (dialect) semantic modules and operational decision making module are write, using the syntax gauge appointed, receive the input of user, then Further according to business rule, operational decision making is made.
The rule module 1008 can call the built-in or outer rule base connected, and the rule in rule base can pass through It is customized and establish.It is convenient to understand, some illustrative rules are provided in lower Table I.
Table I
The intelligent analysis module 1010 be used for based on the source code analysis result, the modal analysis results and/or its He obtains intellectual analysis result to application software progress intellectual analysis at customized factor.Specifically, described referring to Figure 13 Intelligent analysis module 1010 may further include model of mind construction unit 1302 and intellectual analysis unit 1304.The intelligence Model construction unit 1302 is for obtaining intelligent analytical model and obtaining source code the analysis result, the modal analysis results And/or other customized factors.The intellectual analysis unit 1304 is used to be based on the intelligent analytical model, handles described in obtaining Source code analyzes result, the modal analysis results and/or other customized factors, carries out intellectual analysis to the application software, Obtain intellectual analysis result.
The output module 1012 is for exporting the source code analysis result, the modal analysis results and the intelligence Analyze result.Output module 1012 includes display, microphone, communication interface etc..Divide for example, application software performance detects automatically Analysis apparatus 131 can show intellectual analysis to user by display as a result, or by communication interface by intellectual analysis knot Fruit occurs to client 110.
It should be noted that the structural schematic diagram for Figure 10 into Figure 13, those skilled in the art can be omitted certain A little module/units, increase certain module/unit, integrate certain module/unit.Suchlike deformation, in guarantor of the invention Within the scope of shield.
Figure 14 shows a kind of signal of the application software performance automatic detection analysis platform of exemplary embodiment of the present invention Figure.Application software performance automatic detection analysis platform 1400 can use server 130, and (or application software performance detects point automatically Analysis apparatus 131), application software performance automatic detection analysis equipment 1500 come realize application software testing analysis function.
As shown in figure 14, user is registered to first by the application software information of analysis to be detected by application registration 1424 Application software performance automatic detection analysis platform 1400.Registration information includes one or more of following information: Apply Names, Responsible person, SVN code storage position, database account, password etc..
Then user can be soft to application by task management 1425 and the customized detection and analysis task of configuration management 1426 The code of part is scanned analysis.Detection and analysis task can be executed periodically and can also be executed in real time, and can be performed automatically can also be with It manually performs.
Then, testing and analyzing task can be by the source code analysis engine 1441 of messaging bus 1430 and bottom (referring to source Code analysis module 1004 and its description), model analysis engine 1442 (referring to model analysis module 1006 and its description), intelligence point Analysis engine 1443 (referring to intelligent analysis module 1010 and its description) and regulation engine 1443 (referring to rule module 1008 and its are retouched State) it is communicated, then application software performance automatic detection analysis device 131 will execute according to fig. 2 to source code shown in Fig. 9 Analysis method, model analysis method and intelligent analysis method obtain corresponding source code analysis result, modal analysis results and intelligence Analyze result.In analysis model 1423, user can choose or customized analysis mode, including but not limited to code analysis mould Type, performance analysis models, code neural model etc..
It is completed when testing and analyzing task run, analysis result information can be provided automatically.For example, after to source code analysis, source code Analysis result can be shown with topological form, and user can check the topological structure of source code by source code topology 1421, from And recognize the relationship between different code file.For another example for intellectual analysis as a result, user can pass through analysis report 1422 are checked.
In addition, application software performance automatic detection analysis platform 1400 also may include portal management 1410, portal is carried out Construction.Application software performance automatic detection analysis platform 1400 can also detect multiple application software simultaneously.Such as user can be with Application software A, application software B and application software C are uploaded simultaneously, by the analysis to these three application software, user can be very The information such as version variation, the performance superiority and inferiority of different application software are clearly compared, and then provide suggestion to the improvement of application software.
Source code analysis method, model analysis method and the intelligent analysis method for the embodiment of the present invention that Fig. 2 to Fig. 9 is described, It can be realized by application software performance automatic detection analysis equipment.Figure 15 shows application software provided in an embodiment of the present invention The hardware structural diagram of performance automatic detection analysis equipment.
As shown, application software performance automatic detection analysis equipment 1500 may include processor 1502 and be stored with The memory 1504 of computer program instructions.
Specifically, above-mentioned processor 1504 may include central processing unit (CPU) or specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement implementation of the present invention One or more integrated circuits of example.
Memory 1504 may include the mass storage for data or instruction.For example it rather than limits, storage Device 1504 may include hard disk drive (Hard Disk Drive, HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape Or the combination of universal serial bus (Universal SerialBus, USB) driver or two or more the above. In a suitable case, memory 1504 may include the medium of removable or non-removable (or fixed).In a suitable case, Memory 1504 can be inside or outside data processing equipment.In a particular embodiment, memory 1504 is non-volatile solid State memory.In a particular embodiment, memory 1504 includes read-only memory (ROM).In a suitable case, which can ROM, programming ROM (PROM), erasable PROM (EPROM), electric erasable PROM (EEPROM), electricity to be masked edit program can Rewrite the combination of ROM (EAROM) or flash memory or two or more the above.
Processor 1502 is by reading and executing the computer program instructions stored in memory 1504, to realize above-mentioned reality Apply any one source code analysis method, model analysis method and the intelligent analysis method in example.
In one example, application software performance automatic detection analysis equipment 1500 may also include communication interface 1506 and total Line 1508.Wherein, as shown in figure 15, processor 1502, memory 1504, communication interface 1506 are connected and complete by bus 1508 At mutual communication.
Communication interface 1506 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment Communication.
Bus 1508 includes hardware, software or both, by the component of application software performance automatic detection analysis equipment 1500 It is coupled to each other together.For example it rather than limits, bus 1508 may include that accelerated graphics port (AGP) or other figures are total Line, enhancing Industry Standard Architecture (EISA) bus, front side bus (FSB), super transmission (HT) interconnection, Industry Standard Architecture (ISA) Bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro- channel architecture (MCA) bus, peripheral assembly are mutual Even (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, video electronics standard association The combination of meeting part (VLB) bus or other suitable buses or two or more the above.In a suitable case, Bus 1508 may include one or more buses.Although specific bus has been described and illustrated in the embodiment of the present invention, the present invention Consider any suitable bus or interconnection.
In addition, in conjunction with source code analysis method, model analysis method and intelligent analysis method in above-described embodiment, the present invention Embodiment can provide a kind of computer readable storage medium to realize.Computer journey is stored on the computer readable storage medium Sequence instruction;The computer program instructions realized when being executed by processor any one source code analysis method in above-described embodiment, Model analysis method and intelligent analysis method.
It should be clear that the invention is not limited to specific configuration described above and shown in figure and processing. For brevity, it is omitted here the detailed description to known method.In the above-described embodiments, several tools have been described and illustrated The step of body, is as example.But method process of the invention is not limited to described and illustrated specific steps, this field Technical staff can be variously modified, modification and addition after understanding spirit of the invention, or suitable between changing the step Sequence.
Functional block shown in structures described above block diagram can be implemented as hardware, software, firmware or their group It closes.When realizing in hardware, it may, for example, be electronic circuit, specific integrated circuit (ASIC), firmware appropriate, insert Part, function card etc..When being realized with software mode, element of the invention is used to execute program or the generation of required task Code section.Perhaps code segment can store in machine readable media program or the data-signal by carrying in carrier wave is passing Defeated medium or communication links are sent." machine readable media " may include any medium for capableing of storage or transmission information. The example of machine readable media includes electronic circuit, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), soft Disk, CD-ROM, CD, hard disk, fiber medium, radio frequency (RF) link, etc..Code segment can be via such as internet, inline The computer network of net etc. is downloaded.
It should also be noted that, the exemplary embodiment referred in the present invention, is retouched based on a series of step or device State certain methods or system.But the present invention is not limited to the sequence of above-mentioned steps, that is to say, that can be according in embodiment The sequence referred to executes step, may also be distinct from that the sequence in embodiment or several steps are performed simultaneously.
The above description is merely a specific embodiment, it is apparent to those skilled in the art that, For convenience of description and succinctly, the system, module of foregoing description and the specific work process of unit can refer to preceding method Corresponding process in embodiment, details are not described herein.It should be understood that scope of protection of the present invention is not limited thereto, it is any to be familiar with Those skilled in the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or substitutions, These modifications or substitutions should be covered by the protection scope of the present invention.

Claims (12)

1. a kind of application software performance automatic detection analysis method, which is characterized in that the described method includes:
Obtain application software;
The source code of the application software is analyzed, source code is obtained and analyzes result;
The database model connected to the application software is analyzed, and modal analysis results are obtained;And
Based on source code analysis result, the modal analysis results and/or other customized factors, to the application software into Row intellectual analysis obtains intellectual analysis result.
2. the method according to claim 1, wherein source code analysis result includes one of following information It is or a variety of: the call relation between incidence relation, function, code logic, execution duration between sound code file.
3. the method according to claim 1, wherein the modal analysis results include one of following information It is or a variety of: to build table statement, index, major key, external key, view, index quantity, data magnitude, operating characteristic.
4. obtaining source the method according to claim 1, wherein analyzing the source code of the application software Code analysis is as a result, further comprise:
Obtain the sound code file of the application software;
According to programming language resolution rules, the sound code file is parsed;And
Sound code file after analysis parsing obtains source code and analyzes result.
5. obtaining source the method according to claim 1, wherein analyzing the source code of the application software Code analysis is as a result, further comprise:
From source code analysis result, data relevant to data processing performance are extracted;And
The relevant data of process performance based on the data obtain the analysis knot of data performance treatment process and/or code logic Fruit.
6. obtaining source the method according to claim 1, wherein analyzing the source code of the application software Code analysis is as a result, further comprise:
From source code analysis result, the SQL statement in data relevant to data processing performance is extracted;
According to model analysis rule, the relevant database model of the SQL statement is analyzed, object model is obtained and analyzes result;
The execution efficiency of the SQL statement is analyzed, SQL results of performance analysis is obtained;And
The object model analysis result and the SQL results of performance analysis are integrated, comprehensive analysis report is obtained.
7. the method according to claim 1, wherein the database model connected to the application software carries out Analysis obtains modal analysis results, further comprises:
The application software is connected to corresponding database;
Obtain the database manipulation object that the application software is related to;
The database manipulation object is analyzed, logical model is obtained;And
According to model analysis rule, the logical model of acquisition is matched, object model is obtained and analyzes result.
8. the method according to claim 1, wherein analyzing result, the model analysis knot based on the source code Fruit and/or other customized factors carry out intellectual analysis to the application software, obtain intellectual analysis as a result, further comprising:
Construct intelligent analytical model;
Obtain the source code analysis result, the modal analysis results and/or other customized factors;And
Based on the intelligent analytical model, processing obtain the source code analysis result, the modal analysis results and/or other from Definition factor obtains intellectual analysis result.
9. according to the method described in claim 8, it is characterized in that, the algorithm of the intelligent analytical model is tree construction algorithm.
10. a kind of application software performance automatic detection analysis device, which is characterized in that described device includes:
Module is obtained, is configured as obtaining application software;
Source code analysis module is configured as analyzing the source code of the application software, obtains source code and analyzes result;
Model analysis module is configured as analyzing the database model that the application software is connected, and obtains model point Analyse result;And
Intelligent analysis module is configured as based on source code analysis result, the modal analysis results and/or other is customized Factor carries out intellectual analysis to the application software, obtains intellectual analysis result.
11. a kind of application software performance automatic detection analysis equipment characterized by comprising at least one processor, at least one The computer program instructions of a memory and storage in the memory, when the computer program instructions are by the processing Such as claim 1-9 described in any item methods are realized when device executes.
12. a kind of computer readable storage medium, is stored thereon with computer program instructions, which is characterized in that when the calculating Machine program instruction realizes method as claimed in any one of claims 1-9 wherein when being executed by processor.
CN201711492783.XA 2017-12-30 2017-12-30 Application software performance automatic detection analysis method, apparatus, equipment and medium Pending CN109992502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711492783.XA CN109992502A (en) 2017-12-30 2017-12-30 Application software performance automatic detection analysis method, apparatus, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711492783.XA CN109992502A (en) 2017-12-30 2017-12-30 Application software performance automatic detection analysis method, apparatus, equipment and medium

Publications (1)

Publication Number Publication Date
CN109992502A true CN109992502A (en) 2019-07-09

Family

ID=67111561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711492783.XA Pending CN109992502A (en) 2017-12-30 2017-12-30 Application software performance automatic detection analysis method, apparatus, equipment and medium

Country Status (1)

Country Link
CN (1) CN109992502A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110428333A (en) * 2019-08-01 2019-11-08 上海爱富爱克斯网络科技发展有限责任公司 For the Data Detection and analysis method of financial intermediary MT4 foreign exchange transaction software
CN111008038A (en) * 2019-12-19 2020-04-14 南京邮电大学 Pull request merging probability calculation method based on logistic regression model
CN111352818A (en) * 2020-02-28 2020-06-30 北京思特奇信息技术股份有限公司 Application program performance analysis method and device, storage medium and electronic equipment
CN111597203A (en) * 2020-04-28 2020-08-28 中国银联股份有限公司 Statement query method, device, equipment and medium
CN111767044A (en) * 2020-07-04 2020-10-13 武汉空心科技有限公司 Software development working platform interface visualization method
CN113806214A (en) * 2021-02-10 2021-12-17 京东科技控股股份有限公司 Application program testing method and device, computer equipment and storage medium
CN113835419A (en) * 2021-11-29 2021-12-24 湖南中车时代通信信号有限公司 Test method and system of train control equipment and storage medium
CN114090382A (en) * 2021-11-22 2022-02-25 北京志凌海纳科技有限公司 Health inspection method and device for super-converged cluster

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927473A (en) * 2013-01-16 2014-07-16 广东电网公司信息中心 Method, device and system for detecting source code safety of mobile intelligent terminal
US20150113332A1 (en) * 2012-05-24 2015-04-23 Tencent Technology (Shenzhen) Company Limited Code analysis method, code analysis system and computer storage medium
CN104636257A (en) * 2015-03-13 2015-05-20 胡兢玉 SQL coverage-based automatic testing method for application software in database based on
CN105930277A (en) * 2016-07-11 2016-09-07 南京大学 Defect source code locating method based on defect report analysis
CN106201871A (en) * 2016-06-30 2016-12-07 重庆大学 Based on the Software Defects Predict Methods that cost-sensitive is semi-supervised

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150113332A1 (en) * 2012-05-24 2015-04-23 Tencent Technology (Shenzhen) Company Limited Code analysis method, code analysis system and computer storage medium
CN103927473A (en) * 2013-01-16 2014-07-16 广东电网公司信息中心 Method, device and system for detecting source code safety of mobile intelligent terminal
CN104636257A (en) * 2015-03-13 2015-05-20 胡兢玉 SQL coverage-based automatic testing method for application software in database based on
CN106201871A (en) * 2016-06-30 2016-12-07 重庆大学 Based on the Software Defects Predict Methods that cost-sensitive is semi-supervised
CN105930277A (en) * 2016-07-11 2016-09-07 南京大学 Defect source code locating method based on defect report analysis

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110428333A (en) * 2019-08-01 2019-11-08 上海爱富爱克斯网络科技发展有限责任公司 For the Data Detection and analysis method of financial intermediary MT4 foreign exchange transaction software
CN111008038A (en) * 2019-12-19 2020-04-14 南京邮电大学 Pull request merging probability calculation method based on logistic regression model
CN111008038B (en) * 2019-12-19 2022-08-02 南京邮电大学 Pull request merging probability calculation method based on logistic regression model
CN111352818A (en) * 2020-02-28 2020-06-30 北京思特奇信息技术股份有限公司 Application program performance analysis method and device, storage medium and electronic equipment
CN111352818B (en) * 2020-02-28 2023-06-30 北京思特奇信息技术股份有限公司 Application program performance analysis method and device, storage medium and electronic equipment
CN111597203A (en) * 2020-04-28 2020-08-28 中国银联股份有限公司 Statement query method, device, equipment and medium
CN111767044A (en) * 2020-07-04 2020-10-13 武汉空心科技有限公司 Software development working platform interface visualization method
CN113806214A (en) * 2021-02-10 2021-12-17 京东科技控股股份有限公司 Application program testing method and device, computer equipment and storage medium
CN114090382A (en) * 2021-11-22 2022-02-25 北京志凌海纳科技有限公司 Health inspection method and device for super-converged cluster
CN113835419A (en) * 2021-11-29 2021-12-24 湖南中车时代通信信号有限公司 Test method and system of train control equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109992502A (en) Application software performance automatic detection analysis method, apparatus, equipment and medium
Vu et al. Pgm-explainer: Probabilistic graphical model explanations for graph neural networks
US11422776B2 (en) Intelligent assistant for automating recommendations for analytics programs
Agrawal et al. How to “dodge” complex software analytics
KR101719278B1 (en) Deep learnig framework and image recognition method for content-based visual image recognition
CN107943945B (en) Isomery operator management method in a kind of big data analysis development platform
Maiti et al. Capturing, eliciting, predicting and prioritizing (CEPP) non-functional requirements metadata during the early stages of agile software development
CN112597038B (en) Software defect prediction method and system
CN110168535A (en) A kind of information processing method and terminal, computer storage medium
US20180300333A1 (en) Feature subset selection and ranking
EP3671526A1 (en) Dependency graph based natural language processing
CN110334208B (en) LKJ fault prediction diagnosis method and system based on Bayesian belief network
Khalajzadeh et al. A survey of current end-user data analytics tool support
CN109144481B (en) Component software configuration method of domain-oriented software intensive system
CN112579789A (en) Equipment fault diagnosis method and device and equipment
CN116882978B (en) Deep sea submersible operation and maintenance support system based on product information frame
CN105446705A (en) Method and device used for determining configuration file feature
CN110245232A (en) File classification method, device, medium and calculating equipment
CN112884569A (en) Credit assessment model training method, device and equipment
CN109582562B (en) Intelligent software testing and cloud platform construction method based on generation countermeasure network
Abbas et al. Multi-objective optimization of feature model in software product line: Perspectives and challenges
CN116049376A (en) Method, device and system for retrieving and replying information and creating knowledge
Alalfi et al. Variability identification and representation for automotive Simulink models
CN115062126A (en) Statement analysis method and device, electronic equipment and readable storage medium
CN116340940A (en) Code identification method, terminal device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190709