CN110262782A - The interface comparison method and device of software systems - Google Patents
The interface comparison method and device of software systems Download PDFInfo
- Publication number
- CN110262782A CN110262782A CN201910389407.0A CN201910389407A CN110262782A CN 110262782 A CN110262782 A CN 110262782A CN 201910389407 A CN201910389407 A CN 201910389407A CN 110262782 A CN110262782 A CN 110262782A
- Authority
- CN
- China
- Prior art keywords
- interface
- software systems
- name
- different editions
- changed
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
Abstract
The embodiment of the present invention is suitable for information technology field, provide the interface comparison method and device of a kind of software systems, the described method includes: extracting the interface message of each interface of software systems of two different editions, which includes interface name and interface parameters;For either interface title, judge whether the corresponding interface of the interface name exists simultaneously in two different editions of software systems;If it is not, then identifying that the interface is to have changed interface;If so, the interface parameters to the interface identifies, interface is not changed to have changed interface or with the determining interface;According to recognition result, the interface comparison information of two different editions of software systems is generated.The present embodiment can accurately and efficiently contrast the difference of the interface under different editions or in different code branch, reduce the case where repetition being likely to occur compares, the confidence level for improving analysis result facilitates related personnel's analysis interface compatibility, assessment system to upgrade the influence to user.
Description
Technical field
The invention belongs to information technology fields, interface comparison method, a kind of software more particularly to a kind of software systems
Interface comparison device, a kind of terminal device and a kind of computer readable storage medium of system.
Background technique
Agile development (Agile Development) is a kind of using the requirement evolution of user as core, using iteration, in proper order
The software development mode that progressive method carries out.In agile development, software project is cut into multiple subitems at building initial stage
Mesh, the achievement of each sub-project all by test, have it is visual, can integrate and can run the feature used.In other words, agility is opened
Hair be exactly a large project is divided into it is multiple connect each other, but can also independently operated small project, and be respectively completed, in this process
Middle software is constantly in serviceable condition.
Under internet agile development process, the changes in demand of user is more and more, the iteration speed between software version
Also it is getting faster.In this context, upgraded in each software systems, reconstruct and multi version more than when disposing, developer
Analysis is usually required relative to some baseline, which kind of variation whether each interface of system changed and had occurred, from
And determine whether changed interface has backward compatible ability, guarantee that the variation of interface will not cause user with old with this
Mode call the interface and generate exception.
Currently, the situation of change for system interface is analyzed mainly by way of artificial treatment and to be carried out,
Analysis is compared to code of each interface under different editions by developer, to obtain analysis result.But manually
The mode of processing needs to spend the more time, expends more human cost, is not only readily incorporated duplicate workload, occurs
It accidentally analyzes, causes to analyze the with a low credibility of result;Moreover, because system version iteration speed is fast, this basic nothing of analysis mode
Method meets the requirement of version iteratively faster, and efficiency is very low.
Summary of the invention
In view of this, the embodiment of the invention provides the interface comparison method and device of a kind of software systems, it is existing to solve
Have and manually compares the lower problem of interface variation situation efficiency in technology.
The first aspect of the embodiment of the present invention provides a kind of interface comparison method of software systems, comprising:
The interface message of each interface of software systems of two different editions is extracted, the interface message includes described each
The interface name and interface parameters of interface;
For either interface title, judge whether the corresponding interface of the interface name exists simultaneously in the software systems
Two different editions in;
If the corresponding interface of the interface name does not exist simultaneously in two different editions of the software systems, know
The not described interface is to have changed interface;
If the corresponding interface of the interface name exists simultaneously in two different editions of the software systems, to institute
The interface parameters for stating interface is identified, does not change to have changed interface or interface with the determination interface;
According to the recognition result for having changed interface or do not change interface of the interface, two of the software systems are generated
The interface comparison information of different editions.
The second aspect of the embodiment of the present invention provides a kind of interface comparison device of software systems, comprising:
Extraction module, the interface message of each interface of software systems for extracting two different editions, the interface letter
Breath includes the interface name and interface parameters of each interface;
Judgment module judges whether the corresponding interface of the interface name exists simultaneously for being directed to either interface title
In two different editions of the software systems;
First identification module, if not existing simultaneously two in the software systems for the corresponding interface of the interface name
In a different editions, then identify that the interface is to have changed interface;
Second identification module, if existing simultaneously for the corresponding interface of the interface name in two of the software systems
In different editions, then the interface parameters of the interface is identified, is to have changed interface or do not changed with the determination interface
Interface;
Generation module, for the recognition result for having changed interface or do not change interface according to the interface, described in generation
The interface comparison information of two different editions of software systems.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
The step of realizing the interface comparison method of above-mentioned software systems.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, and the computer program realizes that the interface of above-mentioned software systems compares other side when being executed by processor
The step of method.
Compared with prior art, the embodiment of the present invention includes following advantages:
The embodiment of the present invention, the interface message of each interface of software systems by extracting two different editions, then needle
To the either interface title in interface message, judge whether the corresponding interface of the interface name exists simultaneously two in software systems
In a different editions, changed interface so as to identify and do not change interface, and generate interface comparison information carry out it is visual
Change and shows.The present embodiment is associated analysis to interface name first when automatically analyzing interface variation situation, then again into one
Step is associated analysis to information such as the parameter of each interface and types, very can accurately and efficiently contrast different editions
The difference of lower interface or the interface in different code branch reduces the case where repetition being likely to occur compares, improves analysis
As a result confidence level;By being visualized to interface comparison information, facilitate related personnel more intuitively understand it is each
The situation of change of interface, to help its management interface change information, analysis interface compatibility, assessment system upgrading to user's
It influences.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described.It should be evident that the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is a kind of step flow diagram of the interface comparison method of software systems of one embodiment of the invention;
Fig. 2 is that the interface of one embodiment of the invention compares the architecture diagram of tool;
Fig. 3 is the schematic diagram of the interface message of each interface of extraction software systems of one embodiment of the invention;
Fig. 4 is the interface name association analysis schematic diagram of one embodiment of the invention;
Fig. 5 is the interface parameters analysis comparison schematic diagram of one embodiment of the invention;
Fig. 6 is that the interface comparison information of one embodiment of the invention visualizes schematic diagram;
Fig. 7 is a kind of schematic diagram of the interface comparison device of software systems of one embodiment of the invention;
Fig. 8 is a kind of schematic diagram of terminal device of one embodiment of the invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.It should be apparent, however, to those skilled in the art that there is no these specific thin
The present invention also may be implemented in the other embodiments of section.In other cases, it omits to well-known system, device, circuit
And the detailed description of method, in case unnecessary details interferes description of the invention.
Illustrate technical solution of the present invention below by specific embodiment.
Referring to Fig.1, a kind of step process of the interface comparison method of software systems of one embodiment of the invention is shown
Schematic diagram can specifically include following steps:
S101, extract two different editions each interface of software systems interface message, the interface message includes institute
State the interface name and interface parameters of each interface;
It should be noted that can be for each software system being deployed in cloud platform using method provided in this embodiment
The interface variation situation of system is compared and analyzes, can also connecing for each software systems being deployed in other servers
Mouth situation of change is compared and analyzes, and the present embodiment is not construed as limiting the type of software systems and deployed environment etc..
In embodiments of the present invention, the interface of above-mentioned software systems can refer to API (Application
Programming Interface, application programming interface).
In general, api interface may include two major classes, i.e., the internal interface and user oriented called between service opens outer
Portion's interface.
Wherein, the open interface of user oriented refers to that software systems are open to user, allow user by OPENAPI or
The mode of secondary development calls the interface of software systems, and customizes the application of user oneself on this basis.It is such
Interface is usually required that has backward compatible ability after interface variation, to guarantee that the variation of interface will not cause user with old
Mode calls the interface and generates exception.
The interface called between service refers to software systems to complete the request of user, cooperates between difference service
The request of a series of activities is completed with calling, this request is usually noninductive for user terminal.
Since the interface called between service is mainly directed towards developer, and the interface opened to the outside world is then mainly directed towards user,
Influence of the variation of interface to developer and user is very big, so when doing interface change, need to accomplish it is backward compatible, with drop
Low changed as interface is influenced caused by software systems.
In embodiments of the present invention, interface variation situation analysis of the tool to software systems can be compared by an interface.
Above-mentioned interface compares tool and can be by the way of programming, runs program based on what JAVA language was developed, can mention automatically
It takes the software code of two different editions to be compared and analyzed automatically, show that the API of the software systems of two different editions connects
Difference between mouthful.
It is made a presentation in order to make it easy to understand, comparing tool to above-mentioned interface first.
As shown in Fig. 2, being that the interface of one embodiment of the invention compares the architecture diagram of tool.The interface compares tool can be with
It is designed to the framework of a five-layer structure, including data management layer, information extraction layer, information analysis layer, structured message are deposited
Layer and presentation layer are taken, every layer is made of several basic modules again, to complete specific task.
In the concrete realization, data management layer includes predefined script module, source code Version module and source code
Download module.Source code download module can be used for downloading the software source code under software systems different editions, then transfer to source code
Version module and predefined script module carry out the management and pretreatment of data.
Information extraction layer includes that class scan module, scanning rule loading module, self defined class loader and category information extract
Module, the source code that can be got for above-mentioned data management layer are scanned accordingly, extract letter respectively according to different classes
Breath.
Information analysis layer belongs to the core layer of this tool, including interface name analysis module, parameter name analysis module, ginseng
Several classes of type mutation analysis modules, parameter analysis on Necessity module and compatibility analysis module.Modules are according to respective function
Each interface is analyzed and compared respectively.For example, interface name analysis module can compare the interface according to interface name
It is all to have under different editions, still falls within deleted or increased in new version.If some interface is new and old
It is all existing in two versions, then parameter and type of the interface etc. further can be judged using parameter name analysis module etc.
Whether change.
Structured message level of access includes interface message structured storage module and interface message structuring loading module.It is right
It, can be by two moulds in structured message level of access in the situation of change of each interface obtained by information analysis layer analysis
Block is stored, and is loaded onto the visual presentation module of presentation layer, by visual mode by the variation of each interface
Situation shows related personnel.
It in embodiments of the present invention, can be first using upper when the interface variation situation to software systems is analyzed
State the interface message that tool extracts each interface of software systems of two different editions.
In general, developer when carrying out the exploitation of software code, can establish code baseline by point in different times.It is based on
Branch management code, the different functional module of the exploitation that developer can be made parallel.
In computerese, it is based on some time point or some version, baseline (Baseline) is software document or source
One stable release of code (or other output objects), it is that software systems are done with the basis further developed.
Therefore, in the concrete realization, tool can be compared using above-mentioned interface, is based on appointment codes branch, extracts respectively
The interface message of each interface of software systems under two different editions.Wherein, each interface in software systems may include face
The external interface opened to user and the internal interface called between service, the interface message of each interface may include interface name
Claim, be passed to parameter, outflow parameter, parameter type etc..
As shown in figure 3, being the schematic diagram of the interface message of each interface of extraction software systems of one embodiment of the invention.
The soft of two different editions can be obtained respectively first when extracting the interface message of each interface according to process shown in Fig. 3
The assigned finger code of part system includes the source code information of special interface in above-mentioned assigned finger code.By to above-mentioned source
Code information is compiled, and class scanning can be carried out according to preset scanning rule and class loads, obtain assigned finger generation
Multiple classes under code.For example, interface class, request class, response class, custom object class and enumerating class, etc..Obtain it is above-mentioned more
After a class, the category information extraction module in interface comparison tool can extract the interface message of each interface in multiple classes respectively.
It in embodiments of the present invention, can also be by the way of structuring after the interface message for extracting each interface
The interface message of above-mentioned each interface is stored.
In the concrete realization, all information of each interface can be stored in the form of JSON character string.
In general, the complete information item of one interface of description may include: interface name, interface requests parameter name, interface
Whether required parameter type, interface requests parameter are that must pass parameter, interface response parameter title, interface response parameter type, connect
Associated enumeration type in mouthful response parameter, associated object type, interface version, etc. in interface response parameter.
The memory interface information in the form of JSON character string, it may be convenient to it is deserialized as JAVA object, thus
Convenient for further comparing and analyzing.
S102, it is directed to either interface title, judges whether the corresponding interface of the interface name exists simultaneously in described soft
In two different editions of part system;
In embodiments of the present invention, two different editions of software systems may include new version and legacy version.Therefore, it is
Judge whether the corresponding interface of a certain interface name exists simultaneously in two different editions of software systems, can divide first
Not Que Ding in new version software system and legacy version software systems each interface interface name, then to new version software system
Be associated with the interface of interface name having the same in legacy version software systems, and by identification new version software system and
The interface name not being associated in legacy version software systems, by identifying each interface name in new version software system and old edition
Whether it is associated in this software systems, it can be determined that whether the corresponding interface of each interface name exists simultaneously in new version software
In system and legacy version software systems.Wherein, the corresponding interface of associated each interface name can be identified as depositing simultaneously
The interface being in new version software system and legacy version software systems, and the not associated corresponding interface of each interface name
It should then be identified as not existing simultaneously the interface in new version software system and legacy version software systems.
The interface name that can refer to by comparing under different editions is associated to each interface according to interface name, really
Fixed each interface is to belong to the existing interface in new and old edition, or the interface increased newly in new version, alternatively, being from old
The interface being deleted in version.
In the concrete realization, when being associated analysis to each interface, can first determine whether between each interface whether
Corresponding incidence relation can be established.If failing to establish corresponding incidence relation according to interface name, step can be executed
S103 identifies that the interface is to have changed interface, and judge that the interface is the interface newly increased or one as the case may be
A deleted interface.If corresponding incidence relation can be established according to interface name, it may be considered that the interface is new
Existing interface, then executes step S104, is identified by the interface parameters to the interface, with true in old two versions
The interface is determined to have changed interface or not changed interface.
S103, the identification interface are to have changed interface;
In embodiments of the present invention, if the corresponding interface of a certain interface name does not exist simultaneously the software system in different editions
In system, then the interface can be identified as having changed interface, having changed interface may include that new version has deleted interface or new edition
This newly-increased interface.
In the concrete realization, the corresponding interface of interface name not being associated in above-mentioned new version software system can be identified
Interface is increased newly for new version, identifies that the associated corresponding interface of interface name is not new version in above-mentioned legacy version software systems
Interface is deleted.
As shown in figure 4, being the interface name association analysis schematic diagram of one embodiment of the invention.To shown in Fig. 4
After the interface message of two versions of v1.0 and v1.1 is analyzed, it is known that include in legacy version, that is, v1.0 version interface A, B,
C, D, E, F, G totally 7 interfaces, and in new version, that is, v1.1 version then include interface A, B, C, D, F, H, I totally 7 interfaces.
By being associated analysis to the interface name under above-mentioned two version, it can be seen that interface A, B, C, D, F this 5
A interface belongs to the existing interface in new and old two versions, and interface E, G are then to belong to two be deleted in new version
A interface, interface H, I are to belong to two interfaces newly increased in new version.
S104, the interface parameters of the interface is identified, is to have changed interface or do not changed with the determination interface
Interface;
In embodiments of the present invention, if the association in new and old edition between interface can be successfully established according to interface name
Relationship can only explain this interface and all exist in the code of two versions, not can determine that the interface does not change, need into
The interface parameters of one step analysis interface is either with or without variation.
In embodiments of the present invention, the type of interface parameters to be identified, the class of above-mentioned interface parameters can be determined first
Type may include whether parameter name, parameter type and parameter are that must pass parameter etc..It is then possible to determine that new version is soft respectively
In part system and legacy version software systems the type of each interface parameters of the corresponding interface of associated interface name whether phase
Together.That is, can further analyze parameter name, the parameter of two interfaces for two interfaces for being successfully established incidence relation
Whether whether type, parameter are whether must pass parameter etc. parameter type identical, determined with this identical between two interfaces.
If the type of each interface parameters of the interface is all the same, it can identify that the interface is not change interface, if should
There is difference in the type of any each interface parameters of interface, then can identify that the interface is parameter modification interface.
As shown in figure 5, being the interface parameters analysis comparison schematic diagram of one embodiment of the invention.Show according to shown in fig. 5
The parameters for existing simultaneously the interface A in v1.0 version and v1.1 version can be analyzed and be compared by example.
Interface A includes parameter A, B, C, D in v1.0 version, and in v1.1 version interface A include parameter A, B, C,
E.It is right by being analyzed parameter name it is found that parameter A, B, C belong in the interface A of new and old edition existing parameter
In this kind of parameter, it can further compare whether the projects such as type, the parameter necessity of parameters change.And parameter D
It is then merely present in legacy version i.e. v1.0 version, parameter E is merely present in new version i.e. v1.1 version.Therefore, can recognize
Belong to a parameter being deleted in new version for parameter D, and parameter E is then to belong to the ginseng newly increased in new version
Number.For the parameter newly increased, it is also necessary to analyze the parameter with the presence or absence of compatibility issue.
For example, there are the interface message of two versions, respectively v1.0 and v1.1 wherein increase an inquiry in v1.1
The interface of user can then be found if that check what variation the version interface from v1.0 to v1.1 has occurred from v1.0
To v1.1, an interface is increased;If check had occurred from v1.1 to v1.0 what variation, can find from v1.1 to
V1.0 reduces an interface.V1.0 to v1.1 and v1.1 to v1.0 refers respectively to the code of two identical versions, different ratios
Compared with direction.
For above-mentioned example, if comparison direction is v1.0 to v1.1, parameter D belongs to deleted parameter, and parameter E belongs to
The parameter newly increased.
S105, the recognition result for having changed interface or do not change interface according to the interface, generate the software systems
Two different editions interface comparison information.
In embodiments of the present invention, it is compared analysis in each interface to different editions, generates corresponding interface ratio
After information, which can be visualized, allow changed interface message with more straight
It sees, friendly mode shows related personnel.
As shown in fig. 6, being the interface comparison information visual presentation schematic diagram of one embodiment of the invention.In Fig. 6, sequence
Number corresponding interface of 1-5 is the interface newly increased, and the corresponding interface of serial number 12-14 is then deleted interface.
In embodiments of the present invention, tool is compared by one interface of design, and using the tool to two different editions
Api interface information is analyzed and is compared, and different editions API or different code branch very can be accurately and efficiently contrasted
On API difference;Based on above-mentioned comparison in difference as a result, developer can more intuitively understand API between different editions
Situation of change, so that its Administration API interface variation information, analysis API compatibility, assessment system be helped to upgrade the shadow to user
It rings.
The present embodiment compares the situation of change that tool automatically analyzes each interface by interface, improves analysis efficiency;?
When analysis, each interface is associated according to whether interface name is identical first, existing in new and old edition will be connect
Mouth is as associated interface, so as to directly be identified as not associated interface to have changed interface;On this basis, then into
One step analyzes the situation of change of the information such as parameter and the type of each associated interface, if the various information of associated interface are equal
It does not change, it may be considered that the interface, which belongs to, does not change interface, if there is at least one information hair in associated interface
Variation has been given birth to, then it will be understood that the interface is changed, can be identified as having changed interface, has improved analysis result
Confidence level;Visually show analysis result, it helps related personnel intuitively understands the situation of change of interface.
It should be noted that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment,
The execution sequence of each process should be determined by its function and internal logic, and the implementation process without coping with the embodiment of the present invention, which is constituted, appoints
What is limited.
Referring to Fig. 7, a kind of schematic diagram of the interface comparison device of software systems of one embodiment of the invention is shown, is had
Body may include following module:
Extraction module 701, the interface message of each interface of software systems for extracting two different editions, the interface
Information includes the interface name and interface parameters of each interface;
Judgment module 702, for be directed to either interface title, judge the corresponding interface of the interface name whether and meanwhile deposit
It is in two different editions of the software systems;
First identification module 703, if not existing simultaneously for the corresponding interface of the interface name in the software systems
Two different editions in, then identify the interface be changed interface;
Second identification module 704, if existing simultaneously for the corresponding interface of the interface name in the software systems
In two different editions, then the interface parameters of the interface is identified, is to have changed interface or not with the determination interface
Change interface;
Generation module 705 generates institute for the recognition result for having changed interface or do not change interface according to the interface
State the interface comparison information of two different editions of software systems.
In embodiments of the present invention, the extraction module 701 can specifically include following submodule:
Assigned finger Code obtaining submodule, specified point of the software systems for obtaining described two different editions respectively
Branch code, the assigned finger code include the source code information of special interface;
Source code information compiles submodule and obtains the assigned finger generation for being compiled to the source code information
Multiple classes under code;
Interface message extracting sub-module, for extracting the interface message of each interface in the multiple class respectively.
In embodiments of the present invention, described device can also include following module:
Interface message memory module, for being deposited by the way of structuring to the interface message of each interface
Storage.
In embodiments of the present invention, the different editions include new version and legacy version, and the judgment module 702 specifically may be used
To include following submodule:
Interface name determines submodule, for determining each in new version software system and legacy version software systems connect respectively
The interface name of mouth;
Interface name is associated with submodule, for identical to having in the new version software system and legacy version software systems
The interface of interface name be associated;
Judging submodule, for by identifying each interface name in the new version software system and legacy version software system
Whether it is associated in system, judges whether the corresponding interface of each interface name exists simultaneously in the new version software system
In legacy version software systems;
Wherein, the corresponding interface of associated each interface name is to exist simultaneously in the new version software system and old
Interface in version software system, the associated corresponding interface of each interface name is not exist simultaneously in the new version
Interface in software systems and legacy version software systems.
In embodiments of the present invention, the interface that changed includes that new version has deleted interface or the newly-increased interface of new version,
First identification module 703 can specifically include following submodule:
Identify submodule, the associated corresponding interface of interface name is not in the new version software system for identification
New version increases interface newly, identifies the corresponding interface of interface name not being associated in the legacy version software systems for new version
Delete interface.
In embodiments of the present invention, the interface that changed includes parameter modification interface, and second identification module 704 has
Body may include following submodule:
Parameter type determines submodule, for determining the type of interface parameters to be identified, the type of the interface parameters
It whether is that must pass parameter including parameter name, parameter type and parameter;
Associated interface parameter type determines submodule, for determining the new version software system and the old edition respectively
Whether the type of each interface parameters of the corresponding interface of associated interface name is identical in this software systems;
Second identification submodule connects described in identification if the type of each interface parameters for the interface is all the same
Mouth is not change interface;If the type of the either interface parameter of the interface has difference, identify the interface for parameter change
More interface.
For device embodiment, since it is basically similar to the method embodiment, related so describing fairly simple
Place referring to embodiment of the method part explanation.
Referring to Fig. 8, a kind of schematic diagram of terminal device of one embodiment of the invention is shown.As shown in figure 8, this implementation
The terminal device 800 of example includes: processor 810, memory 820 and is stored in the memory 820 and can be at the place
The computer program 821 run on reason device 810.The processor 810 realizes above-mentioned software when executing the computer program 821
Step in each embodiment of interface comparison method of system, such as step S101 to S105 shown in FIG. 1.Alternatively, the place
Reason device 810 realizes the function of each module/unit in above-mentioned each Installation practice, such as Fig. 7 when executing the computer program 821
The function of shown module 701 to 705.
Illustratively, the computer program 821 can be divided into one or more module/units, it is one or
Multiple module/the units of person are stored in the memory 820, and are executed by the processor 810, to complete the present invention.Institute
Stating one or more module/units can be the series of computation machine program instruction section that can complete specific function, the instruction segment
It can be used for describing implementation procedure of the computer program 821 in the terminal device 800.For example, the computer journey
Sequence 821 can be divided into extraction module, judgment module, the first identification module, the second identification module and generation module, each module
Concrete function is as follows:
Extraction module, the interface message of each interface of software systems for extracting two different editions, the interface letter
Breath includes the interface name and interface parameters of each interface;
Judgment module judges whether the corresponding interface of the interface name exists simultaneously for being directed to either interface title
In two different editions of the software systems;
First identification module, if not existing simultaneously two in the software systems for the corresponding interface of the interface name
In a different editions, then identify that the interface is to have changed interface;
Second identification module, if existing simultaneously for the corresponding interface of the interface name in two of the software systems
In different editions, then the interface parameters of the interface is identified, is to have changed interface or do not changed with the determination interface
Interface;
Generation module, for the recognition result for having changed interface or do not change interface according to the interface, described in generation
The interface comparison information of two different editions of software systems.
The terminal device 800 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device 800 may include, but be not limited only to, processor 810, memory 820.Those skilled in the art can manage
Solution, Fig. 8 is only a kind of example of terminal device 800, does not constitute the restriction to terminal device 800, may include than diagram
More or fewer components perhaps combine certain components or different components, such as the terminal device 800 can also wrap
Include input-output equipment, network access equipment, bus etc..
The processor 810 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 820 can be the internal storage unit of the terminal device 800, such as terminal device 800 is hard
Disk or memory.The memory 820 is also possible to the External memory equipment of the terminal device 800, such as the terminal device
The plug-in type hard disk being equipped on 800, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the memory 820 can also both include the end
The internal storage unit of end equipment 800 also includes External memory equipment.The memory 820 is for storing the computer program
821 and the terminal device 800 needed for other programs and data.The memory 820 can be also used for temporarily storing
The data that has exported or will export.
Those skilled in the art can be understood that, for convenience of description and succinctly, only with above-mentioned each function
The division of unit, module is illustrated.In practical application, it can according to need and by above-mentioned function distribution by different function
Energy unit, module are completed, i.e., described device/terminal device internal structure is divided into different functional unit or module, with
Complete all or part of function described above.Each functional unit in embodiment, module can integrate single in a processing
In member, it is also possible to each unit and physically exists alone, can also be integrated in one unit with two or more units, on
It states integrated unit both and can take the form of hardware realization, can also realize in the form of software functional units.In addition, each
Functional unit, module specific name be also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.On
The specific work process for stating unit in system, module, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein
It states.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load, reference can be made to the related descriptions of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes in other way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
On the one hand, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, dress
It sets or the INDIRECT COUPLING or communication connection of unit, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the calculating by computer program
Machine program can be stored in computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each
The step of a embodiment of the method.Wherein, the computer program includes computer program code, and the computer program code can
Think source code form, object identification code form, executable file or certain intermediate forms etc..The computer readable storage medium
It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code
Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
It is appropriate that the content that computer readable storage medium includes can be carried out according to the requirement made laws in jurisdiction with patent practice
Increase and decrease, such as do not include electric carrier wave according to legislation and patent practice, computer readable storage medium in certain jurisdictions
Signal and telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations.Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of interface comparison method of software systems characterized by comprising
The interface message of each interface of software systems of two different editions is extracted, the interface message includes each interface
Interface name and interface parameters;
For either interface title, judge whether the corresponding interface of the interface name exists simultaneously two in the software systems
In a different editions;
If the corresponding interface of the interface name does not exist simultaneously in two different editions of the software systems, institute is identified
Stating interface is to have changed interface;
If the corresponding interface of the interface name exists simultaneously in two different editions of the software systems, connect to described
The interface parameters of mouth is identified, does not change to have changed interface or interface with the determination interface;
According to the recognition result for having changed interface or do not change interface of the interface, two differences of the software systems are generated
The interface comparison information of version.
2. being connect the method according to claim 1, wherein the software systems for extracting two different editions are each
Mouthful interface message the step of include:
The assigned finger code of the software systems of described two different editions is obtained respectively, and the assigned finger code includes specific
The source code information of interface;
The source code information is compiled, multiple classes under the assigned finger code are obtained;
The interface message of each interface in the multiple class is extracted respectively.
3. according to the method described in claim 2, it is characterized in that, extracting each interface in the multiple class respectively described
After the step of interface message, further includes:
The interface message of each interface is stored by the way of structuring.
4. the method according to claim 1, wherein described two different editions include new version and legacy version,
It is described to be directed to either interface title, judge whether the corresponding interface of the interface name exists simultaneously two in the software systems
Step in a different editions includes:
The interface name of each interface in new version software system and legacy version software systems is determined respectively;
The interface of interface name having the same in the new version software system and legacy version software systems is associated;
By identifying whether each interface name is associated in the new version software system and legacy version software systems, judge
Whether the corresponding interface of each interface name exists simultaneously in the new version software system and legacy version software systems;
Wherein, the corresponding interface of associated each interface name is to exist simultaneously in the new version software system and legacy version
Interface in software systems, the associated corresponding interface of each interface name is not exist simultaneously in the new version software
Interface in system and legacy version software systems.
5. according to the method described in claim 4, it is characterized in that, it is described changed interface include new version deleted interface or
New version increases interface newly, if the corresponding interface of the interface name does not exist simultaneously two differences in the software systems
In version, then identify that the interface is the step of having changed interface and includes:
Identify that the associated corresponding interface of interface name is not that new version increases interface, identification newly in the new version software system
The associated corresponding interface of interface name is not that new version has deleted interface in the legacy version software systems.
6. described according to the method described in claim 4, it is characterized in that, the interface that changed includes parameter modification interface
If the corresponding interface of the interface name exists simultaneously in two different editions of the software systems, to the interface
Interface parameters identified, is to have changed interface or the step of not changing interface includes: with the determination interface
Determine that the type of interface parameters to be identified, the type of the interface parameters include parameter name, parameter type and ginseng
Whether number is that must pass parameter;
It determines in the new version software system and the legacy version software systems that associated interface name is corresponding respectively to connect
Whether the type of each interface parameters of mouth is identical;
If the type of each interface parameters of the interface is all the same, identify that the interface is not change interface;
If the type of the either interface parameter of the interface has difference, identify that the interface is parameter modification interface.
7. a kind of interface comparison device of software systems characterized by comprising
Extraction module, the interface message of each interface of software systems for extracting two different editions, the interface message packet
Include the interface name and interface parameters of each interface;
Judgment module judges whether the corresponding interface of the interface name exists simultaneously in institute for being directed to either interface title
It states in two different editions of software systems;
First identification module, if not existed simultaneously in two of the software systems not for the corresponding interface of the interface name
With in version, then identify the interface be changed interface;
Second identification module, if existing simultaneously two differences in the software systems for the corresponding interface of the interface name
In version, then the interface parameters of the interface is identified, interface is not changed to have changed interface or with the determination interface;
Generation module generates the software for the recognition result for having changed interface or do not change interface according to the interface
The interface comparison information of two different editions of system.
8. device according to claim 7, which is characterized in that the extraction module includes:
Assigned finger Code obtaining submodule, the assigned finger generation of the software systems for obtaining described two different editions respectively
Code, the assigned finger code includes the source code information of special interface;
Source code information compiling submodule obtains under the assigned finger code for being compiled to the source code information
Multiple classes;
Interface message extracting sub-module, for extracting the interface message of each interface in the multiple class respectively.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 6 when executing the computer program
The step of interface comparison method of any one software systems.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In the interface of realization software systems as described in any one of claim 1 to 6 compares when the computer program is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910389407.0A CN110262782A (en) | 2019-05-10 | 2019-05-10 | The interface comparison method and device of software systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910389407.0A CN110262782A (en) | 2019-05-10 | 2019-05-10 | The interface comparison method and device of software systems |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110262782A true CN110262782A (en) | 2019-09-20 |
Family
ID=67914574
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910389407.0A Pending CN110262782A (en) | 2019-05-10 | 2019-05-10 | The interface comparison method and device of software systems |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110262782A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110688315A (en) * | 2019-09-26 | 2020-01-14 | 招商局金融科技有限公司 | Interface code detection report generation method, electronic device, and storage medium |
CN110752950A (en) * | 2019-10-23 | 2020-02-04 | 中国联合网络通信集团有限公司 | Update detection method and device for cloud resource pool and terminal equipment |
CN111459492A (en) * | 2020-03-19 | 2020-07-28 | 南京行而知网络科技有限公司 | Method, device, storage medium and equipment for detecting compatibility of Dubbo service interface |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105045577A (en) * | 2015-06-29 | 2015-11-11 | 用友优普信息技术有限公司 | Interface change prompting method and interface change prompting system |
CN106528071A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Selection method and device for target code |
CN108268253A (en) * | 2017-05-05 | 2018-07-10 | 平安科技(深圳)有限公司 | Interface code generation method and terminal device |
CN109240696A (en) * | 2017-05-19 | 2019-01-18 | 腾讯科技(深圳)有限公司 | A kind of Oftware updating method and device |
CN109344050A (en) * | 2018-08-20 | 2019-02-15 | 中国平安人寿保险股份有限公司 | A kind of interface parameters analysis method and device based on structure tree |
CN109710301A (en) * | 2018-11-30 | 2019-05-03 | 福建天泉教育科技有限公司 | A kind of method and terminal of automatic relatively interface document difference |
-
2019
- 2019-05-10 CN CN201910389407.0A patent/CN110262782A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105045577A (en) * | 2015-06-29 | 2015-11-11 | 用友优普信息技术有限公司 | Interface change prompting method and interface change prompting system |
CN106528071A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Selection method and device for target code |
CN108268253A (en) * | 2017-05-05 | 2018-07-10 | 平安科技(深圳)有限公司 | Interface code generation method and terminal device |
CN109240696A (en) * | 2017-05-19 | 2019-01-18 | 腾讯科技(深圳)有限公司 | A kind of Oftware updating method and device |
CN109344050A (en) * | 2018-08-20 | 2019-02-15 | 中国平安人寿保险股份有限公司 | A kind of interface parameters analysis method and device based on structure tree |
CN109710301A (en) * | 2018-11-30 | 2019-05-03 | 福建天泉教育科技有限公司 | A kind of method and terminal of automatic relatively interface document difference |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110688315A (en) * | 2019-09-26 | 2020-01-14 | 招商局金融科技有限公司 | Interface code detection report generation method, electronic device, and storage medium |
CN110752950A (en) * | 2019-10-23 | 2020-02-04 | 中国联合网络通信集团有限公司 | Update detection method and device for cloud resource pool and terminal equipment |
CN111459492A (en) * | 2020-03-19 | 2020-07-28 | 南京行而知网络科技有限公司 | Method, device, storage medium and equipment for detecting compatibility of Dubbo service interface |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220253298A1 (en) | Systems and methods for transformation of reporting schema | |
CN107147704B (en) | block chain-oriented universal service middleware system | |
US10324690B2 (en) | Automated enterprise software development | |
US10481884B2 (en) | Systems and methods for dynamically replacing code objects for code pushdown | |
CN107979508B (en) | Micro-service test method and device | |
CN109976761A (en) | Generation method, device and the terminal device of Software Development Kit | |
US8533667B2 (en) | Call wizard for information management system (IMS) applications | |
CN109542399A (en) | Software development methodology, device, terminal device and computer readable storage medium | |
CN110262782A (en) | The interface comparison method and device of software systems | |
CN110221968A (en) | Method for testing software and Related product | |
JP7394211B2 (en) | Methods, devices, equipment, and media for parallel execution of smart contracts | |
US20040172637A1 (en) | Code morphing manager | |
CN108052340A (en) | A kind of application upgrade method, apparatus | |
WO2015195418A1 (en) | Software package management | |
US20220214931A1 (en) | System and method for exposing features of integration platform adapters as first-class actions in an orchestration template | |
CN109240733A (en) | A kind of method and terminal updating advertisement SDK based on Android system | |
CN109471620A (en) | A kind of automatic generation method of APP, device, terminal device and readable storage medium storing program for executing | |
US20080127128A1 (en) | Type Validation for Applications Incorporating A Weakly-Typed Language | |
CN109032685A (en) | A kind of method and terminal accelerating Android system starting | |
CN113918637A (en) | BPMN2.0 specification-based process engine platform creation method and system | |
CN109697076A (en) | A kind of dynamic updating method of application software resources, device and equipment | |
CN114579334A (en) | Communication method, communication device, electronic equipment and storage medium | |
CN110019501A (en) | A kind of collecting method, device and terminal device | |
CN114710395B (en) | Method for constructing network service implementation example based on digital twin technology | |
CN109271212A (en) | A kind of advertisement in application program shields method, device and equipment |
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 |