CN109783131B - Method, device and equipment for acquiring version function difference and storage medium - Google Patents

Method, device and equipment for acquiring version function difference and storage medium Download PDF

Info

Publication number
CN109783131B
CN109783131B CN201910003302.7A CN201910003302A CN109783131B CN 109783131 B CN109783131 B CN 109783131B CN 201910003302 A CN201910003302 A CN 201910003302A CN 109783131 B CN109783131 B CN 109783131B
Authority
CN
China
Prior art keywords
version
function
word vector
function point
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910003302.7A
Other languages
Chinese (zh)
Other versions
CN109783131A (en
Inventor
赵慧
杨子文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201910003302.7A priority Critical patent/CN109783131B/en
Publication of CN109783131A publication Critical patent/CN109783131A/en
Application granted granted Critical
Publication of CN109783131B publication Critical patent/CN109783131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for acquiring version function difference. The method comprises the steps of obtaining a text annotation of a first version and a text annotation of a second version; obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version; the function points of the first version and the second version are compared to obtain the changed function points of the second version relative to the first version, so that the function points of the first version and the second version are identified from the annotation text, the difference between the function points of the two versions is automatically compared to obtain the changed function points of the two versions, and the function difference between the two versions can be quickly obtained.

Description

Method, device and equipment for acquiring version function difference and storage medium
Technical Field
The present invention relates to the field of software upgrading technologies, and in particular, to a method, an apparatus, a device, and a storage medium for obtaining version function differences.
Background
An application program is developed for a certain application purpose, and can be installed in an electronic device such as a computer or a mobile phone to run a computer program that executes an application task corresponding to an operating system of the electronic device.
Due to the diversification and multiple changes of user requirements, the application program is developed frequently in an iterative manner, and the changed functional content among all versions is more. In the process of adding or deleting some function points and developing the second version for the first version, a developer is required to record which function points are added or deleted, and people except the developer in charge of the function points cannot know whether the function points are added or deleted. Therefore, how to quickly acquire the function difference between the two versions is a technical problem to be solved urgently.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for acquiring version function difference, which are used for solving the problem of how to quickly acquire the function difference between two versions.
One aspect of the present invention provides a method for acquiring version function difference, including:
acquiring a text annotation of a first version and a text annotation of a second version;
obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version;
and comparing the function points of the first version with the function points of the second version to obtain changed function points of the second version relative to the first version.
Another aspect of the present invention provides an apparatus for acquiring a version function difference, including:
the annotation acquisition module is used for acquiring the text annotation of the first version and the text annotation of the second version;
the function point acquisition module is used for acquiring the function points of the first version and the second version according to the text annotations of the first version and the second version;
and the comparison module is used for comparing the function points of the first version with the function points of the second version to obtain the changed function points of the second version relative to the first version.
Another aspect of the present invention is to provide an apparatus for acquiring a version function difference, including:
a memory, a processor, and a computer program stored on the memory and executable on the processor,
the processor, when running the computer program, implements the method described above.
Another aspect of the present invention provides a computer-readable storage medium storing a computer program,
which when executed by a processor implements the method described above.
According to the method, the device, the equipment and the storage medium for acquiring the version function difference, the text annotation of the first version and the text annotation of the second version are acquired; obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version; the function points of the first version and the second version are compared to obtain the changed function points of the second version relative to the first version, so that the function points of the first version and the second version are identified from the annotation text, the difference between the function points of the two versions is automatically compared to obtain the changed function points of the two versions, and the function difference between the two versions can be quickly obtained.
Drawings
Fig. 1 is a flowchart of a method for obtaining version function differences according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for obtaining version function differences according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for acquiring version function differences according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for acquiring version function differences according to a fifth embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terms to which the present invention relates will be explained first:
functional points are as follows: for measuring the functionality provided by the software product to the user. For example, a user management function module may include the following three function points: user queries, user modifications, and for deletion. Further, a user management function module may include: querying a user password, modifying a user login name, modifying user personal basic information, deleting a user, and the like. One function point corresponds to one specific business process. In this embodiment, the granularity of dividing the function points is not specifically limited.
Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following examples, "plurality" means two or more unless specifically limited otherwise.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Example one
Fig. 1 is a flowchart of a method for obtaining version function differences according to an embodiment of the present invention. The embodiment of the invention provides a method for acquiring the function difference of the versions, aiming at the problem of how to quickly acquire the function difference between the two versions. The method in the embodiment is applied to computer equipment. As shown in fig. 1, the method comprises the following specific steps:
and S101, acquiring the text annotation of the first version and the text annotation of the second version.
In this embodiment, obtaining the text annotation of the first version may specifically be implemented in the following manner:
and acquiring the program code of the first version, and extracting all text annotations in the program code of the first version according to the annotation rule corresponding to the program code to obtain the text annotations of the first version.
And similarly, acquiring the program code of the second version, and extracting all text annotations in the program code of the first version according to the annotation rule corresponding to the program code to obtain the text annotations of the second version.
Wherein, the annotation rule records preset character information used for representing the annotation content in the program code. For example, the symbol used to represent the annotation in the python language may be "#", the symbol used to represent the annotation in the C/C + + language may be "//", and so on.
Optionally, after obtaining the first version of text annotation and the second version of text annotation, the first version of text annotation and the second version of text annotation may be saved in two text files, respectively. For example, a first version of a text annotation may be saved as document a and a second version of a text annotation may be saved as document B.
And S102, obtaining the function points of the first version and the second version according to the text annotations of the first version and the text annotations of the second version.
In this embodiment, in order to enable all technicians to know the function difference between the two versions, the program codes of all versions have annotation information of function points. And pre-designating the annotation identification of the function point, wherein the annotation identification is used for distinguishing the annotation information of the function point from other annotation information.
Alternatively, a start identifier and an end identifier of a function point annotation may be preset, and the annotation content between a group of adjacent previous start identifiers and subsequent end identifiers in the text annotation is a function point.
For example, in the text annotation, "FUN-START" may be used as the START identifier of the functional point annotation, and "FUN-END" may be used as the END identifier of the functional point annotation. Then, the text annotation "FUN-START database adding FUN-END" can extract a function point: increasing a database; a functional point can be extracted from the text annotation "FUN-START My locate FUN-END": my positioning; one functional point can be extracted from the text comment "FUN-START added user information FUN-END": user information is added.
After the text annotation of the first version and the text annotation of the second version are obtained, the function point of the first version and the function point of the second version can be extracted according to the preset function point annotation identification.
Step S103, comparing the function points of the first version with the function points of the second version to obtain changed function points of the second version relative to the first version.
After the function points of the first version and the second version are obtained, by comparing the function points of the first version and the function points of the second version, the function points which are included in the function points of the first version and not included in the function points of the second version and the function points which are not included in the function points of the first version and are included in the function points of the second version can be obtained; i.e. the functional points at which the change of the second version with respect to the first version is available.
The embodiment of the invention obtains the text annotation of the first version and the text annotation of the second version; obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version; the function points of the first version and the second version are compared to obtain the changed function points of the second version relative to the first version, so that the function points of the first version and the second version are identified from the annotation text, the difference between the function points of the two versions is automatically compared to obtain the changed function points of the two versions, and the function difference between the two versions can be quickly obtained.
Example two
Fig. 2 is a flowchart of a method for obtaining version function differences according to a second embodiment of the present invention. On the basis of the first embodiment, in this embodiment, comparing the function point of the first version with the function point of the second version to obtain a changed function point of the second version relative to the first version includes: generating a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version according to the function point of the first version and the function point of the second version; and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector. As shown in fig. 2, the method comprises the following specific steps:
step S201, obtaining the text annotation of the first version and the text annotation of the second version.
In this embodiment, obtaining the text annotation of the first version may specifically be implemented in the following manner:
and acquiring the program code of the first version, and extracting all text annotations in the program code of the first version according to the annotation rule corresponding to the program code to obtain the text annotations of the first version.
And similarly, acquiring the program code of the second version, and extracting all text annotations in the program code of the first version according to the annotation rule corresponding to the program code to obtain the text annotations of the second version.
Wherein, the annotation rule records preset character information used for representing the annotation content in the program code. For example, the symbol used to represent the annotation in the python language may be "#", the symbol used to represent the annotation in the C/C + + language may be "//", and so on.
Optionally, after obtaining the first version of text annotation and the second version of text annotation, the first version of text annotation and the second version of text annotation may be saved in two text files, respectively. For example, a first version of a text annotation may be saved as document a and a second version of a text annotation may be saved as document B.
Step S202, obtaining the function point of the first version and the function point of the second version according to the text annotation of the first version and the text annotation of the second version.
In this embodiment, in order to enable all technicians to know the function difference between the two versions, the program codes of all versions have annotation information of function points. And pre-designating the annotation identification of the function point, wherein the annotation identification is used for distinguishing the annotation information of the function point from other annotation information.
Alternatively, a start identifier and an end identifier of a function point annotation may be preset, and the annotation content between a group of adjacent previous start identifiers and subsequent end identifiers in the text annotation is a function point.
For example, in the text annotation, "FUN-START" may be used as the START identifier of the functional point annotation, and "FUN-END" may be used as the END identifier of the functional point annotation. Then, the text annotation "FUN-START database adding FUN-END" can extract a function point: increasing a database; a functional point can be extracted from the text annotation "FUN-START My locate FUN-END": my positioning; one functional point can be extracted from the text comment "FUN-START added user information FUN-END": user information is added.
In this step, the function point of the first version and the function point of the second version are obtained according to the text annotation of the first version and the text annotation of the second version, which may be specifically implemented in the following manner:
identifying a function point in the text annotation of the first version according to the text annotation of the first version and a preset first annotation identifier to obtain the function point of the first version; and identifying the function point in the text annotation of the second version according to the text annotation of the second version and a preset second annotation identifier to obtain the function point of the second version.
The first annotation identifier and the second annotation identifier may be the same or different.
Step S203, generating a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version according to the function point of the first version and the function point of the second version.
In this embodiment, according to the function point of the first version and the function point of the second version, a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version are generated, which may specifically be implemented by steps S2031 to S2034 as follows:
step S2031, a function point total set including all the function points of the first version and the function points of the second version is obtained.
The function point total set comprises function points of a first version and function points of a second version, and any two function points in the function point total set are different.
And S2032, sorting the function points in the function point total set to obtain a function point total sequence.
Optionally, the function points in the function point total set may be sorted according to the content of each function point. In addition, in this embodiment, the function points in the function point total quantity set may be sorted according to any specified order to obtain a function point total quantity sequence, which is not specifically limited in this embodiment.
Step S2033, generating a first word vector corresponding to the function point of the first version according to the function point of the first version and the full-scale sequence of the function points.
The components in the first word vector correspond to the function points in the function point full quantity sequence one by one, the component value of the first word vector is 0 or 1, the component value of the first word vector is 0, which means that the first version does not include the function points in the function point full quantity sequence corresponding to the components, and the component value of the first word vector is 1, which means that the first version includes the function points in the function point full quantity sequence corresponding to the components.
Step S2034, generating a second word vector corresponding to the function point of the second version according to the function point of the second version and the full-scale sequence of function points.
The components in the second word vector correspond to the function points in the function point full quantity sequence one by one, the component value of the second word vector is 0 or 1, the component value of the second word vector is 0, which means that the second version does not include the function points in the function point full quantity sequence corresponding to the components, and the component value of the second word vector is 1, which means that the second version includes the function points in the function point full quantity sequence corresponding to the components.
In addition, the steps S2032 and S2034 may be performed in parallel, and the order of execution of the steps S2032 and S2034 is not specifically limited in this embodiment.
Step S204, calculating the cosine distance between the first word vector and the second word vector.
In this step, the cosine distance between the first word vector and the second word vector may be calculated by any method for calculating the cosine distance between the two vectors in the prior art, which is not specifically limited in this embodiment.
Step S205 determines whether the cosine distance is equal to 0.
If the cosine distance between the first word vector and the second word vector is equal to 0, step S206 is executed to determine that the function point of the second version is not different from the function point of the first version. At this time, the first word vector and the second word vector do not need to be compared, and the efficiency of obtaining the version function difference can be further improved.
If the cosine distance between the first word vector and the second word vector is not equal to 0, step S207 is executed to continue comparing the first word vector and the second word vector to obtain a function point corresponding to a component of the first word vector and the second word vector whose corresponding component value is not equal to each other.
In this embodiment, the steps S204 to S206 are optional, and after the step S203 obtains the first word vector corresponding to the function point of the first version and the second word vector corresponding to the function point of the second version, the step S207 may be directly executed to compare the first word vector and the second word vector, so as to obtain the function point corresponding to the component with unequal component values in the first word vector and the second word vector.
Step S206, if the cosine distance between the first word vector and the second word vector is equal to 0, determining that the function point of the second version is not different from the function point of the first version.
Step S207, comparing the first word vector with the second word vector to obtain a function point corresponding to a component having an unequal component value in the first word vector and the second word vector.
In this embodiment, comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector may specifically be implemented in the following manner:
respectively comparing whether the components in the first word vector and the second word vector are equal to obtain the dimensions of the unequal components in the first word vector and the second word vector; and determining the function points corresponding to the dimensions of the unequal components in the function point full quantity sequence to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
Optionally, the first word vector and the second word vector are compared to obtain a function point corresponding to a component with an unequal component value in the first word vector and the second word vector, and the following method may also be adopted:
performing XOR operation on a group of components of each same dimension in the first word vector and the second word vector; if the result of the XOR operation is 0, it indicates that the set of components are not equal; if the result of the exclusive-or operation is 1, the group of components are equal; determining the dimensionality corresponding to each component with the XOR operation result of 0 in the first word vector and the second word vector; and determining the corresponding function points of the dimensionalities corresponding to the sets of components with the XOR operation result of 0 in the first word vector and the second word vector in the function point full quantity sequence to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
According to the embodiment of the invention, a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version are generated according to the function point of the first version and the function point of the second version; and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector, thereby improving the efficiency of obtaining the version function difference.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an apparatus for acquiring version function differences according to a third embodiment of the present invention. The device for acquiring the version function difference provided by the embodiment of the invention can execute the processing flow provided by the method for acquiring the version function difference. As shown in fig. 3, the apparatus 30 includes: a comment acquisition module 301, a function point acquisition module 302 and a comparison module 303.
Specifically, the annotation acquisition module 301 is configured to acquire a first version of a text annotation and a second version of the text annotation.
The function point obtaining module 302 is configured to obtain a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version.
The comparison module 303 is configured to compare the function points of the first version with the function points of the second version to obtain changed function points of the second version relative to the first version.
The apparatus provided in the embodiment of the present invention may be specifically configured to execute the method embodiment provided in the first embodiment, and specific functions are not described herein again.
The embodiment of the invention obtains the text annotation of the first version and the text annotation of the second version; obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version; the function points of the first version and the second version are compared to obtain the changed function points of the second version relative to the first version, so that the function points of the first version and the second version are identified from the annotation text, the difference between the function points of the two versions is automatically compared to obtain the changed function points of the two versions, and the function difference between the two versions can be quickly obtained.
Example four
On the basis of the third embodiment, in this embodiment, the function point obtaining module is further configured to:
identifying a function point in the text annotation of the first version according to the text annotation of the first version and a preset first annotation identifier to obtain the function point of the first version; and identifying the function point in the text annotation of the second version according to the text annotation of the second version and a preset second annotation identifier to obtain the function point of the second version.
Optionally, the alignment module is further configured to:
generating a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version according to the function point of the first version and the function point of the second version; and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
Optionally, the alignment module is further configured to:
acquiring a function point full set comprising all function points of the first version and function points of the second version; sequencing the function points in the function point total set to obtain a function point total sequence; generating a first word vector corresponding to the function point of the first version according to the function point of the first version and the function point full-scale sequence; the components in the first word vector correspond to the function points in the function point full quantity sequence one by one, the component value of the first word vector is 0 or 1, the component value of the first word vector is 0, the first version does not comprise the function points in the function point full quantity sequence corresponding to the components, and the component value of the first word vector is 1, the first version comprises the function points in the function point full quantity sequence corresponding to the components; and generating a second word vector corresponding to the function point of the second version according to the function point of the second version and the function point full quantity sequence, wherein components in the second word vector correspond to the function points in the function point full quantity sequence one by one, the component value of the second word vector is 0 or 1, the component value of the second word vector is 0, which means that the second version does not include the function point in the function point full quantity sequence corresponding to the component, and the component value of the second word vector is 1, which means that the second version includes the function point in the function point full quantity sequence corresponding to the component.
Optionally, the alignment module is further configured to:
calculating the cosine distance between the first word vector and the second word vector; if the cosine distance between the first word vector and the second word vector is equal to 0, determining that the function point of the second version is not different from the function point of the first version; and if the cosine distance between the first word vector and the second word vector is not equal to 0, determining that the function point of the second version is different from the function point of the first version.
The apparatus provided in the embodiment of the present invention may be specifically configured to execute the method embodiment provided in the second embodiment, and specific functions are not described herein again.
According to the embodiment of the invention, a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version are generated according to the function point of the first version and the function point of the second version; and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector, thereby improving the efficiency of obtaining the version function difference.
EXAMPLE five
Fig. 4 is a schematic structural diagram of a device for acquiring version function differences according to a fifth embodiment of the present invention. As shown in fig. 4, the apparatus 40 includes: a processor 401, a memory 402, and computer programs stored on the memory 402 and executable by the processor 401.
The processor 401, when executing the computer program stored on the memory 402, implements the method of obtaining version function differences provided by any of the method embodiments described above.
The embodiment of the invention obtains the text annotation of the first version and the text annotation of the second version; obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version; the function points of the first version and the second version are compared to obtain the changed function points of the second version relative to the first version, so that the function points of the first version and the second version are identified from the annotation text, the difference between the function points of the two versions is automatically compared to obtain the changed function points of the two versions, and the function difference between the two versions can be quickly obtained.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method for acquiring the version function difference provided in any of the above method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (12)

1. A method for obtaining version function difference, comprising:
acquiring a text annotation of a first version and a text annotation of a second version;
obtaining a function point of the first version and a function point of the second version according to the text annotation of the first version and the text annotation of the second version;
comparing the function points of the first version with the function points of the second version to obtain changed function points of the second version relative to the first version;
the comparing the function point of the first version with the function point of the second version to obtain the changed function point of the second version relative to the first version includes:
acquiring a function point full set comprising all the function points of the first version and the function points of the second version;
sequencing the function points in the function point total set to obtain a function point total sequence;
generating a first word vector corresponding to the function point of the first version according to the function point of the first version and the full-scale sequence of the function point;
generating a second word vector corresponding to the function point of the second version according to the function point of the second version and the full-scale sequence of the function point;
and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
2. The method of claim 1, wherein obtaining the function points of the first version and the function points of the second version according to the text annotations of the first version and the text annotations of the second version comprises:
identifying a function point in the text annotation of the first version according to the text annotation of the first version and a preset first annotation identifier to obtain the function point of the first version;
and identifying a function point in the text annotation of the second version according to the text annotation of the second version and a preset second annotation identifier to obtain the function point of the second version.
3. The method according to claim 1 or 2, wherein the comparing the function points of the first version and the second version to obtain the changed function points of the second version relative to the first version comprises:
generating a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version according to the function point of the first version and the function point of the second version;
and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
4. The method according to claim 1, wherein the components in the first word vector correspond to the function points in the full-quantity sequence of function points one by one, the component value of the first word vector is 0 or 1, the component value of the first word vector being 0 indicates that the first version does not include the function point in the full-quantity sequence of function points corresponding to the component, and the component value of the first word vector being 1 indicates that the first version includes the function point in the full-quantity sequence of function points corresponding to the component;
the components in the second word vector correspond to the function points in the function point full quantity sequence one by one, the component value of the second word vector is 0 or 1, the component value of the second word vector is 0, which means that the second version does not include the function points in the function point full quantity sequence corresponding to the component, and the component value of the second word vector is 1, which means that the second version includes the function points in the function point full quantity sequence corresponding to the component.
5. The method according to claim 4, wherein before said comparing said first word vector with said second word vector to obtain function points corresponding to components of said first word vector and said second word vector whose corresponding component values are not equal, further comprising:
calculating cosine distances of the first word vector and the second word vector;
if the cosine distance between the first word vector and the second word vector is equal to 0, determining that the function point of the second version is not different from the function point of the first version;
and if the cosine distance between the first word vector and the second word vector is not equal to 0, determining that the function point of the second version is different from the function point of the first version.
6. An apparatus for obtaining version function differences, comprising:
the annotation acquisition module is used for acquiring the text annotation of the first version and the text annotation of the second version;
the function point acquisition module is used for acquiring the function points of the first version and the second version according to the text annotations of the first version and the second version;
the comparison module is used for comparing the function points of the first version with the function points of the second version to obtain changed function points of the second version relative to the first version;
the alignment module is further configured to:
acquiring a function point full set comprising all the function points of the first version and the function points of the second version;
sequencing the function points in the function point total set to obtain a function point total sequence;
generating a first word vector corresponding to the function point of the first version according to the function point of the first version and the full-scale sequence of the function point;
generating a second word vector corresponding to the function point of the second version according to the function point of the second version and the full-scale sequence of the function point;
and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
7. The apparatus of claim 6, wherein the function point obtaining module is further configured to:
identifying a function point in the text annotation of the first version according to the text annotation of the first version and a preset first annotation identifier to obtain the function point of the first version;
and identifying a function point in the text annotation of the second version according to the text annotation of the second version and a preset second annotation identifier to obtain the function point of the second version.
8. The apparatus of claim 6 or 7, wherein the alignment module is further configured to:
generating a first word vector corresponding to the function point of the first version and a second word vector corresponding to the function point of the second version according to the function point of the first version and the function point of the second version;
and comparing the first word vector with the second word vector to obtain the function points corresponding to the components with unequal corresponding component values in the first word vector and the second word vector.
9. The apparatus according to claim 6, wherein the components in the first word vector correspond to the function points in the full-quantity sequence of function points one-to-one, the component value of the first word vector is 0 or 1, the component value of the first word vector being 0 indicates that the first version does not include the function point in the full-quantity sequence of function points corresponding to the component, and the component value of the first word vector being 1 indicates that the first version includes the function point in the full-quantity sequence of function points corresponding to the component;
the components in the second word vector correspond to the function points in the function point full quantity sequence one by one, the component value of the second word vector is 0 or 1, the component value of the second word vector is 0, which means that the second version does not include the function points in the function point full quantity sequence corresponding to the component, and the component value of the second word vector is 1, which means that the second version includes the function points in the function point full quantity sequence corresponding to the component.
10. The apparatus of claim 9, wherein the alignment module is further configured to:
calculating cosine distances of the first word vector and the second word vector;
if the cosine distance between the first word vector and the second word vector is equal to 0, determining that the function point of the second version is not different from the function point of the first version;
and if the cosine distance between the first word vector and the second word vector is not equal to 0, determining that the function point of the second version is different from the function point of the first version.
11. An apparatus for acquiring version function difference, comprising:
a memory, a processor, and a computer program stored on the memory and executable on the processor,
the processor, when executing the computer program, implements the method of any of claims 1-5.
12. A computer-readable storage medium, in which a computer program is stored,
the computer program, when executed by a processor, implementing the method of any one of claims 1-5.
CN201910003302.7A 2019-01-03 2019-01-03 Method, device and equipment for acquiring version function difference and storage medium Active CN109783131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910003302.7A CN109783131B (en) 2019-01-03 2019-01-03 Method, device and equipment for acquiring version function difference and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910003302.7A CN109783131B (en) 2019-01-03 2019-01-03 Method, device and equipment for acquiring version function difference and storage medium

Publications (2)

Publication Number Publication Date
CN109783131A CN109783131A (en) 2019-05-21
CN109783131B true CN109783131B (en) 2022-04-15

Family

ID=66499872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910003302.7A Active CN109783131B (en) 2019-01-03 2019-01-03 Method, device and equipment for acquiring version function difference and storage medium

Country Status (1)

Country Link
CN (1) CN109783131B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156198A (en) * 2013-05-14 2014-11-19 广东电网公司信息中心 Method and device for automatically generating software integration version updating description

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10713432B2 (en) * 2017-03-31 2020-07-14 Adobe Inc. Classifying and ranking changes between document versions

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156198A (en) * 2013-05-14 2014-11-19 广东电网公司信息中心 Method and device for automatically generating software integration version updating description

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于word2vec的中文文本相似度研究与实现;吴多坚;《中国优秀硕士学位论文全文数据库信息科技辑》;20170315;第23-39页 *

Also Published As

Publication number Publication date
CN109783131A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN110765770A (en) Automatic contract generation method and device
CN111797594B (en) Character string processing method based on artificial intelligence and related equipment
CN111553151A (en) Question recommendation method and device based on field similarity calculation and server
US20200125532A1 (en) Fingerprints for open source code governance
CN109241075B (en) Index basic data processing method and equipment and computer readable storage medium
CN111930610B (en) Software homology detection method, device, equipment and storage medium
CN110865828A (en) Data upgrading method, device, equipment and computer readable storage medium
CN106202440B (en) Data processing method, device and equipment
CN114356968A (en) Query statement generation method and device, computer equipment and storage medium
CN110019762B (en) Problem positioning method, storage medium and server
CN109783131B (en) Method, device and equipment for acquiring version function difference and storage medium
CN109101541A (en) Newly-increased INDEX MANAGEMENT method, equipment and computer readable storage medium
CN112364022A (en) Information derivation management method and device, computer equipment and readable storage medium
JP2018005633A (en) Related content extraction device, related content extraction method, and related content extraction program
CN113703753B (en) Method and device for product development and product development system
CN114661671A (en) File processing method and device, computer readable storage medium and electronic equipment
CN113448985A (en) API (application program interface) interface generation method, calling method and device and electronic equipment
CN115617773A (en) Data migration method, device and system
JP6870454B2 (en) Analytical equipment, analytical programs and analytical methods
CN113065025A (en) Video duplicate checking method, device, equipment and storage medium
EP3543882A1 (en) Method and system for identifying original data by using data order
CN112559195B (en) Database deadlock detection method and device, test terminal and medium
CN111079391B (en) Report generation method and device
CN110851456B (en) Information processing method, electronic equipment and storage medium
WO2021121338A1 (en) Fingerprints for open source code governance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant