CN104820676A - Method and device for judging magnitude of version number - Google Patents

Method and device for judging magnitude of version number Download PDF

Info

Publication number
CN104820676A
CN104820676A CN201510176002.0A CN201510176002A CN104820676A CN 104820676 A CN104820676 A CN 104820676A CN 201510176002 A CN201510176002 A CN 201510176002A CN 104820676 A CN104820676 A CN 104820676A
Authority
CN
China
Prior art keywords
length
mark
version number
edition
segment data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510176002.0A
Other languages
Chinese (zh)
Other versions
CN104820676B (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.)
TVM Beijing Education Technology Co Ltd
Original Assignee
TVM Beijing Education Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TVM Beijing Education Technology Co Ltd filed Critical TVM Beijing Education Technology Co Ltd
Priority to CN201510176002.0A priority Critical patent/CN104820676B/en
Publication of CN104820676A publication Critical patent/CN104820676A/en
Application granted granted Critical
Publication of CN104820676B publication Critical patent/CN104820676B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method and a device for judging the magnitude of a version number. The method comprises the steps of acquiring first version number information and second version number information; determining length identification information; determining first section data and second section data; determining magnitude identification information; and determining that the second version number is greater than the first version number when the length identification information is a first length identifier and the magnitude identification information is a second magnitude sign, or the length identification information is a second length identifier and the magnitude identification information is a first magnitude sign. The method for judging the magnitude of the version number takes the parameter of version number length into account, is applicable to simple or complex version number naming, and can judge the magnitude of a complex version number accurately.

Description

A kind of method and device judging version number's size
Technical field
The present invention relates to technical field of data processing, particularly a kind of method and device judging version number's size.
Background technology
Version number (version number) is the identification number of version.Each operating system (or the saying of broad sense, each software) Dou Youyige version number.Whether version number can make user understand used operating system is up-to-date version and its function of providing and facility.Each version number mainly can be divided into major version number and time version number's two parts.Such as: DOS4.0, major version number is 4, and secondary version number is 0.Generally, point three: < major version number >.< the version number >.< revision number > of version number's definition completely, as 1.0.0.
Version number's upgrading principle: major version number: functional module has large variation, such as increases multiple module or overall architecture changes.Secondary version number: with key plate originally comparatively speaking, the variation of the just local of the upgrading correspondence of secondary version number.But the variation of this local causes program and former version can not be compatible, or creates destruction to the cooperation relation before this program, or functionally has large improvement or enhancing.Revision number: the variation of local, mainly the function of local functions is improved, or the correction of bug, or the expansion of function.In principle, after first stable release is issued, revision number can regular change, and secondary version number then changes according to situation, and the frequency of major version number change is very low, unless there are large reconstruct or function improvement.
Other release-naming specifications: shown in Figure 1, this software version number is made up of four parts, first 1 is major version number, second 1 is sub-version number, 3rd 1 is stage version number, Part IV is that date version number adds Greek alphabet version number, and general 5 kinds of Greek alphabet version number, is respectively: base, alpha, beta, RC, release.Such as: 1.1.1.051021_beta.
Alpha version: this version represents this software in this stage mainly to realize software function, usually only at software developer's internal communication, generally speaking, the Bug of this version software is more, needs to continue amendment.
Beta version: this version there has been very large improvement relative to α version, eliminates grave error, but there are some defects, needs to eliminate further through repeatedly testing, and the main amendment of this version is to the UI similarly being software.
RC version: this version is quite ripe, substantially there is not the BUG led to errors, very nearly the same with forthcoming formal version.
Release version: this version meaning " final version ", after a series of beta versions of version above, has an official release after all, is finally to pay the version that user uses.This version is sometimes also referred to as standard edition.Generally, Release can not appear on Software Cover with word forms, instead is-symbol (R).
Realizing in process of the present invention, inventor finds that in prior art, at least there are the following problems:
Because each software existing or system all have the naming rule of version number alone, and the length of version number also not identical (such as, above-mentioned version number 4.0,1.0.0, the length difference of the two).By comparing version number, existing method judges that software is the need of renewal, the main method comparing version number judges that whether new version number is identical with old version number, if difference, and update software.But the method is only applicable to the situation that new version number is greater than legacy version number, be suitable for scene limited.And, when the naming rule more complicated of version number or version number's length not identical time, the method for existing judgement version number size accurately can not judge the size of version number.
Summary of the invention
The invention provides a kind of method and the device that judge version number's size, in order to solve the problem that complex version number faced by existing method cannot carry out accurately judging, the accurate judgement to version number's size can be realized.
The invention provides a kind of method judging version number's size, comprising:
Obtain first version information and second edition information, first version information comprises the length of every segment data of first version number and first version number, and second edition information comprises the length of every segment data of the second edition number and the second edition number;
Determine length mark information, and when the length of first version number is not less than the length of the second edition number, length mark information is the first length mark; When the length of first version number is less than the length of the second edition number, length mark information is the second length mark;
Determine first paragraph data and second segment data, and when length mark information is the first length mark information, first paragraph data are every segment data of first version number, and second segment data are every segment data of the second edition number; When length mark information is the second length mark information, first paragraph data are every segment data of the second edition number, and second segment data are every segment data of first version number;
Determine size identification information, and when first paragraph data are greater than second segment data, size identification information is first little mark; When first paragraph data are less than second segment data, size identification information is second largest little mark;
When length mark information is the first length mark and size identification information is second largest little mark, or when length mark information is the second length mark and size identification information is first little mark, determine that the second edition number is greater than first version number.
A kind of method judging version number's size that the embodiment of the present invention provides, in conjunction with the size of length mark information and size identification information judgment version number, the length scale of Liang Ge version number can be determined by length mark information, and then the size of Liang Ge version number can be determined in conjunction with length mark information by size identification information.The determination methods of this version number's size considers version number's this parameter of length, and therefore the method goes for simple or complicated version number's name, accurately can judge the size of complex version number.
In one embodiment, obtain first version information and second edition information, comprising:
Obtain first version number and the second edition number;
According to segmentation mark and the second edition number segmentation mark of first version number, respectively dividing processing is carried out to first version number and the second edition number, obtain every segment data of every segment data of first version number and the second edition number;
According to the quantity of the segmentation mark of first version number and the quantity of the second edition number segmentation mark, determine the length of the length of first version number and the second edition number respectively.
In one embodiment, after obtaining the step of first version number and the second edition number, also comprise:
Respectively first version number is converted to character string with the second edition number.
In one embodiment, the length of first version number is that the quantity of the segmentation mark of first version number adds 1; The length of the second edition number is that the quantity of the segmentation mark of the second edition number adds 1.
In one embodiment, determine size identification information, comprising: determine number of comparisons threshold value, number of comparisons threshold value is the hop count of first paragraph data; Compare first paragraph data piecemeal and whether be greater than second segment data, and the number of times compared piecemeal is not more than number of comparisons threshold value; When there are first paragraph data and being greater than second segment data, stop comparison step piecemeal, and size identification information is first little mark; When there are first paragraph data and being less than second segment data, stop comparison step piecemeal, and size identification information is second largest little mark.
Judge a device for version number's size, comprising:
Acquisition module, for obtaining first version information and second edition information, first version information comprises the length of every segment data of first version number and first version number, and second edition information comprises the length of every segment data of the second edition number and the second edition number;
First determination module, for determining length mark information, and when the length of first version number is greater than the length of the second edition number, length mark information is the first length mark; When the length of first version number is less than the length of the second edition number, length mark information is the second length mark;
Second determination module, for determining first paragraph data and second segment data, and when length mark information is the first length mark information, first paragraph data are every segment data of first version number, and second segment data are every segment data of the second edition number; When length mark information is the second length mark information, first paragraph data are every segment data of the second edition number, and second segment data are every segment data of first version number;
3rd determination module, for determining size identification information, and when first paragraph data are greater than second segment data, size identification information is first little mark; When first paragraph data are less than second segment data, size identification information is second largest little mark;
Processing module, for when length mark information is the first length mark and size identification information is second largest little mark, or when length mark information is the second length mark and size identification information is first little mark, determine that the second edition number is greater than first version number.
In one embodiment, acquisition module comprises:
Acquiring unit, for obtaining first version number and the second edition number;
Cutting unit, for according to the segmentation mark of first version number and the second edition number segmentation mark, carries out dividing processing to first version number and the second edition number respectively, obtains every segment data of every segment data of first version number and the second edition number;
Determining unit, for the quantity of the segmentation mark according to first version number and the quantity of the second edition number segmentation mark, determines the length of the length of first version number and the second edition number respectively.
In one embodiment, acquisition module also comprises: converting unit, for respectively first version number being converted to character string with the second edition number.
In one embodiment, the length of first version number is that the quantity of the segmentation mark of first version number adds 1; The length of the second edition number is that the quantity of the segmentation mark of the second edition number adds 1.
In one embodiment, the 3rd determination module comprises:
Threshold value determination unit, for determining number of comparisons threshold value, number of comparisons threshold value is the hop count of first paragraph data;
Comparing unit piecemeal, compares first paragraph data piecemeal and whether be greater than second segment data, and the number of times compared piecemeal is not more than number of comparisons threshold value;
Size determining unit, for when there are first paragraph data and being greater than second segment data, stops comparison step piecemeal, and size identification information is first little mark; When there are first paragraph data and being less than second segment data, stop comparison step piecemeal, and size identification information is second largest little mark.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write instructions, claims and accompanying drawing and obtain.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, together with embodiments of the present invention for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is prior art version number naming rule schematic diagram;
Fig. 2 is a kind of process flow diagram judging the method for version number's size in the embodiment of the present invention;
Fig. 3 is the method flow diagram obtaining version number information in the embodiment of the present invention;
Fig. 4 is the method flow diagram determining size identification information in the embodiment of the present invention;
Fig. 5 is the method flow diagram judging version number's size in the embodiment of the present invention one;
Fig. 6 is the structure drawing of device judging version number's size in the embodiment of the present invention;
Fig. 7 is the first structural drawing of acquisition module in the embodiment of the present invention;
Fig. 8 is the second structural drawing of acquisition module in the embodiment of the present invention;
Fig. 9 is the structural drawing of the 3rd determination module in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 2 is a kind of process flow diagram judging the method for version number's size in the embodiment of the present invention.As shown in Figure 2, S101-S104 is comprised the following steps:
Step S101: obtain first version information and second edition information, first version information comprises the length of every segment data of first version number and first version number, and second edition information comprises the length of every segment data of the second edition number and the second edition number.
Concrete, version number generally comprises multiple part, and every part all includes one piece of data.In the embodiment of the present invention, version number is made up of numeral and point, and such as: 4.2.11, this version number is divided into three segment datas, and namely the length of version number is 3, and this three segment data is respectively " 4 ", " 2 ", " 11 ".
Preferably, shown in Figure 3, obtain first version information and second edition information in step S101, specifically comprise the following steps S201-S203:
Step S201: obtain first version number and the second edition number.
Step S202: according to segmentation mark and the second edition number segmentation mark of first version number, carries out dividing processing to first version number and the second edition number respectively, obtains every segment data of every segment data of first version number and the second edition number.
Concrete, for the version number be made up of numeral and point, such as version number: 4.2.11, point ". " is wherein segmentation mark, namely can split version number, and then determine every segment data according to segmentation mark.
Step S203: according to the quantity of the segmentation mark of first version number and the quantity of the second edition number segmentation mark, determines the length of the length of first version number and the second edition number respectively.
In the embodiment of the present invention, owing to there being segmentation mark between every segment data, and the head of version number and tail are not all provided with segmentation mark, so the length of version number identifies relevant with this segmentation, and the length of version number is add one on the basis of segmentation mark.Concrete, in above-mentioned steps S203:
The length of first version number is that the quantity of the segmentation mark of first version number adds 1;
The length of the second edition number is that the quantity of the segmentation mark of the second edition number adds 1.
Step S102: determine length mark information, and when the length of first version number is not less than the length of the second edition number, length mark information is the first length mark; When the length of first version number is less than the length of the second edition number, length mark information is the second length mark.
In the embodiment of the present invention, length mark information is for identifying the magnitude relationship of Liang Ge version number.Concrete, when the length L1 of first version number is not less than the length L2 of (being namely more than or equal to) second edition number, length mark information is the first length mark S1; When the length L1 of first version number is less than the length L2 of the second edition number, length mark information is the second length mark S2.
Step S103: determine first paragraph data and second segment data, and when length mark information is the first length mark information, first paragraph data are every segment data of first version number, and second segment data are every segment data of the second edition number; When length mark information is the second length mark information, first paragraph data are every segment data of the second edition number, and second segment data are every segment data of first version number.
Concrete, when the length L1 of first version number is more than or equal to the length L2 of the second edition number, first paragraph data D1 is every segment data of first version number, and second segment data D2 is every segment data of the second edition number.When the length L1 of first version number is less than the length L2 of the second edition number, first paragraph data D1 is every segment data of the second edition number, and second segment data D2 is every segment data of first version number.
Such as, first version number is 4.2.11, and the second edition number is 4.3.15 (i.e. L1=L2), and now first paragraph data D1 is " 4 ", " 2 ", " 11 ", and second segment data D2 is " 4 ", " 3 ", " 15 ".If first version number is 4.2, the second edition number is 4.3.15 (i.e. L1 < L2), then first paragraph data D1 is " 4 ", " 3 ", " 15 ", and second segment data D2 is 4 ", " 2 ".
Step S104: determine size identification information, and when first paragraph data are greater than second segment data, size identification information is first little mark; When first paragraph data are less than second segment data, size identification information is second largest little mark.
In step S104, judge the size of the every segment data in the second segment data D2 of every segment data and relevant position in first paragraph data D1 successively, when certain one piece of data in first paragraph data D1 is not identical with the segment data of the relevant position in second segment data D2 (when two segment datas can distinguish size), namely can determine size identification information.Concrete, when first paragraph data D1 is greater than second segment data D2, size identification information is first little mark B1; When first paragraph data D1 is less than second segment data D2, size identification information is second largest little mark B2.
Wherein, respectively first version number can be converted to character string with the second edition number, judge the size of segment data according to the size of character string.
Step S105: when length mark information is the first length mark and size identification information is second largest little mark, or when length mark information is the second length mark and size identification information is first little mark, determine that the second edition number is greater than first version number.
Concrete, when length mark information is the first length mark S1 (namely the length L1 of first version number is not less than the length L2 of the second edition number) and size identification information is second largest little mark during B2 (first paragraph data D1 is less than second segment data D2), the second edition number is greater than first version number.
When length mark information is the second length mark S2 (when namely the length L1 of first version number is less than the length L2 of the second edition number) and size identification information is first little mark B1 (first paragraph data D1 is greater than second segment data D2), the second edition number is greater than first version number.
A kind of method judging version number's size that the embodiment of the present invention provides, in conjunction with the size of length mark information and size identification information judgment version number, the length scale of Liang Ge version number can be determined by length mark information, and then the size of Liang Ge version number can be determined in conjunction with length mark information by size identification information.The determination methods of this version number's size considers version number's this parameter of length, and therefore the method goes for simple or complicated version number's name, accurately can judge the size of complex version number.
In one embodiment, shown in Figure 4, determine in step S104 that size identification information specifically comprises step S301-S303:
Step S301: determine number of comparisons threshold value, number of comparisons threshold value is the hop count of first paragraph data.
Wherein, as mentioned above, the hop count of first paragraph data D1 and length mark information-related.When the length L1 of first version number is more than or equal to the length L2 of the second edition number, first paragraph data D1 is every segment data of first version number; When the length L1 of first version number is less than the length L2 of the second edition number, first paragraph data D1 is every segment data of the second edition number.Therefore, the hop count of first paragraph data is the hop count of the version number of length longer (or equal) in Liang Ge version number.
Step S302: compare first paragraph data piecemeal and whether be greater than second segment data, and the number of times compared piecemeal is not more than number of comparisons threshold value.
Step S303: when there are first paragraph data and being greater than second segment data, stop comparison step piecemeal, and size identification information is first little mark; When there are first paragraph data and being less than second segment data, stop comparison step piecemeal, and size identification information is second largest little mark.
In the embodiment of the present invention, for first version number be 4.2.11, the second edition number for 4.3.15, then first compare the major version number of Liang Ge version number, namely compare the size of " 4 " and " 4 ", compare the size of " 2 " and " 3 " afterwards successively.When the data of a certain section are not identical, then stop comparing, and then determine size identification information.In the embodiment of the present invention, " 2 " in first version number are less than " 3 " in the second edition number, and namely first paragraph data are less than second segment data, and therefore size identification information is second largest little mark B2.
Meanwhile, because the length of first version number and the second edition number is identical, namely the length L1 of first version number is not less than the length L2 of the second edition number, and now length mark information is the first length mark S1.According to step S105, length mark information is the first length mark S1 and size identification information is second largest little mark B2, and second edition 4.3.15 is greater than first version 4.2.11.
The flow process of the method for the data processing based on recognition of face that the embodiment of the present invention provides is described below by specific embodiment.
Embodiment one
In embodiment one, respectively first version number is converted to character string with the second edition number, judge the size of segment data according to the size of character string, shown in Figure 5, the method for the judgement version number size that embodiment one provides specifically comprises step S401-S40:
Step S401: obtain first version information and second edition information.
In embodiment one, with first version number for 4.2.11, the second edition number for 4.3.10.14 be example.
Step S402: first version number is converted to character string with the second edition number.
Step S403: according to segmentation mark and the second edition number segmentation mark of first version number, carries out dividing processing to first version number and the second edition number respectively, obtains every segment data of every segment data of first version number and the second edition number.
Every segment data of first version number is respectively " 4 ", " 2 ", " 11 ", and every segment data of the second edition number is respectively " 4 ", " 3 ", " 10 ", " 14 ".
Step S404: according to the quantity of the segmentation mark of first version number and the quantity of the second edition number segmentation mark, determines the length of the length of first version number and the second edition number respectively.
Step S405: determine length mark information.
Concrete, the length L1=3 of first version number, the length L2=4 of the second edition number, i.e. L1 < L2, therefore length mark information is the second length mark S2.
Step S406: determine first paragraph data and second segment data.
In embodiment one, because length mark information is the second length mark S2, therefore first paragraph data D1 is every segment data of the second edition number, i.e. " 4 ", " 3 ", " 10 ", " 14 "; Second segment data D2 is every segment data of first version number, i.e. " 4 ", " 2 ", " 11 ".
Step S407: determine number of comparisons threshold value, number of comparisons threshold value is the hop count of first paragraph data.
Concrete, first paragraph data D1 is " 4 ", " 3 ", " 10 ", " 14 ", and its hop count is 4, and namely number of comparisons threshold value is 4.
Step S408: compare first paragraph data piecemeal and whether be greater than second segment data, and the number of times compared piecemeal is not more than number of comparisons threshold value.
Step S409: determine size identification information.
Concrete, compare the size of first paragraph data D1 " 4 ", " 3 ", " 10 ", " 14 " and second segment data D2 " 4 ", " 2 ", " 11 " every segment data piecemeal, because " 3 " in first paragraph data D1 are greater than " 2 " of relevant position in second segment data D2, therefore first paragraph data are greater than second segment data, and namely size identification information is first little mark B1.
Step S410: the size determining Liang Ge version number according to length mark information and size identification information.
In embodiment one, length mark information is the second length mark S2, and size identification information is first little mark B1, and therefore, second edition 4.3.10.14 is greater than first version 4.2.11.
Corresponding to a kind of method judging version number's size that above-described embodiment provides, the embodiment of the present invention also provides a kind of device judging version number's size.As shown in Figure 6, this device comprises:
Acquisition module 61, for obtaining first version information and second edition information, first version information comprises the length of every segment data of first version number and first version number, and second edition information comprises the length of every segment data of the second edition number and the second edition number;
First determination module 62, for determining length mark information, and when the length of first version number is greater than the length of the second edition number, length mark information is the first length mark; When the length of first version number is less than the length of the second edition number, length mark information is the second length mark;
Second determination module 63, for determining first paragraph data and second segment data, and when length mark information is the first length mark information, first paragraph data are every segment data of first version number, and second segment data are every segment data of the second edition number; When length mark information is the second length mark information, first paragraph data are every segment data of the second edition number, and second segment data are every segment data of first version number;
3rd determination module 64, for determining size identification information, and when first paragraph data are greater than second segment data, size identification information is first little mark; When first paragraph data are less than second segment data, size identification information is second largest little mark;
Processing module 65, for when length mark information is the first length mark and size identification information is second largest little mark, or when length mark information is the second length mark and size identification information is first little mark, determine that the second edition number is greater than first version number.
In one embodiment, shown in Figure 7, acquisition module 61 comprises:
Acquiring unit 611, for obtaining first version number and the second edition number;
Cutting unit 612, for according to the segmentation mark of first version number and the second edition number segmentation mark, carries out dividing processing to first version number and the second edition number respectively, obtains every segment data of every segment data of first version number and the second edition number;
Determining unit 613, for the quantity of the segmentation mark according to first version number and the quantity of the second edition number segmentation mark, determines the length of the length of first version number and the second edition number respectively.
In one embodiment, shown in Figure 8, acquisition module 61 also comprises:
Converting unit 614, for being converted to character string by first version number with the second edition number respectively.
In one embodiment, the length of first version number is that the quantity of the segmentation mark of first version number adds 1; The length of the second edition number is that the quantity of the segmentation mark of the second edition number adds 1.
In one embodiment, shown in Figure 9, the 3rd determination module 64 comprises:
Threshold value determination unit 641, for determining number of comparisons threshold value, number of comparisons threshold value is the hop count of first paragraph data;
Comparing unit 642 piecemeal, compares first paragraph data piecemeal and whether be greater than second segment data, and the number of times compared piecemeal is not more than number of comparisons threshold value;
Size determining unit 643, for when there are first paragraph data and being greater than second segment data, stops comparison step piecemeal, and size identification information is first little mark; When there are first paragraph data and being less than second segment data, stop comparison step piecemeal, and size identification information is second largest little mark.
A kind of method and apparatus judging version number's size that the embodiment of the present invention provides, the method is by the size in conjunction with length mark information and size identification information judgment version number, the length scale of Liang Ge version number can be determined by length mark information, and then the size of Liang Ge version number can be determined in conjunction with length mark information by size identification information.The determination methods of this version number's size considers version number's this parameter of length, and therefore the method goes for simple or complicated version number's name, accurately can judge the size of complex version number.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. judge a method for version number's size, it is characterized in that, comprising:
Obtain first version information and second edition information, described first version information comprises the length of every segment data of first version number and first version number, and described second edition information comprises the length of every segment data of the second edition number and the second edition number;
Determine length mark information, and when the length of described first version number is not less than the length of the described second edition number, described length mark information is the first length mark; When the length of described first version number is less than the length of the described second edition number, described length mark information is the second length mark;
Determine first paragraph data and second segment data, and when described length mark information is the first length mark information, described first paragraph data are every segment data of first version number, and described second segment data are every segment data of the second edition number; When described length mark information is the second length mark information, described first paragraph data are every segment data of the second edition number, and described second segment data are every segment data of first version number;
Determine size identification information, and when described first paragraph data are greater than described second segment data, described size identification information is first little mark; When described first paragraph data are less than described second segment data, described size identification information is second largest little mark;
When described length mark information is the first length mark and described size identification information is second largest little mark, or when described length mark information is the second length mark and described size identification information is first little mark, determine that the second edition number is greater than first version number.
2. method according to claim 1, is characterized in that, described acquisition first version information and second edition information, comprising:
Obtain first version number and the second edition number;
According to segmentation mark and the described second edition number segmentation mark of described first version number, respectively with the described second edition number, dividing processing is carried out to described first version number, obtain every segment data of every segment data of described first version number and the described second edition number;
According to the quantity of the segmentation mark of described first version number and the quantity of the described second edition number segmentation mark, determine the length of the length of described first version number and the described second edition number respectively.
3. method according to claim 2, is characterized in that, after the step of described acquisition first version number and the second edition number, also comprises:
Respectively described first version number is converted to character string with the described second edition number.
4. method according to claim 2, is characterized in that,
The length of described first version number is that the quantity of the segmentation mark of described first version number adds 1;
The length of the described second edition number is that the quantity of the segmentation mark of the described second edition number adds 1.
5. according to the arbitrary described method of claim 1-4, it is characterized in that, describedly determine size identification information, comprising:
Determine number of comparisons threshold value, described number of comparisons threshold value is the hop count of described first paragraph data;
Whether more described first paragraph data are greater than described second segment data piecemeal, and the number of times compared piecemeal is not more than described number of comparisons threshold value;
When there are described first paragraph data and being greater than described second segment data, stop comparison step piecemeal, and described size identification information is first little mark; When there are described first paragraph data and being less than described second segment data, stop comparison step piecemeal, and described size identification information is second largest little mark.
6. judge a device for version number's size, it is characterized in that, comprising:
Acquisition module, for obtaining first version information and second edition information, described first version information comprises the length of every segment data of first version number and first version number, and described second edition information comprises the length of every segment data of the second edition number and the second edition number;
First determination module, for determining length mark information, and when the length of described first version number is greater than the length of the described second edition number, described length mark information is the first length mark; When the length of described first version number is less than the length of the described second edition number, described length mark information is the second length mark;
Second determination module, for determining first paragraph data and second segment data, and when described length mark information is the first length mark information, described first paragraph data are every segment data of first version number, described second segment data are every segment data of the second edition number; When described length mark information is the second length mark information, described first paragraph data are every segment data of the second edition number, and described second segment data are every segment data of first version number;
3rd determination module, for determining size identification information, and when described first paragraph data are greater than described second segment data, described size identification information is first little mark; When described first paragraph data are less than described second segment data, described size identification information is second largest little mark;
Processing module, for when described length mark information is the first length mark and described size identification information is second largest little mark, or when described length mark information is the second length mark and described size identification information is first little mark, determine that the second edition number is greater than first version number.
7. device according to claim 6, is characterized in that, described acquisition module comprises:
Acquiring unit, for obtaining first version number and the second edition number;
Cutting unit, for identifying according to the segmentation mark of described first version number and number segmentation of the described second edition, respectively dividing processing is carried out to described first version number and the described second edition number, obtain every segment data of every segment data of described first version number and the described second edition number;
Determining unit, for the quantity of the segmentation mark according to described first version number and the quantity of the described second edition number segmentation mark, determines the length of the length of described first version number and the described second edition number respectively.
8. device according to claim 7, is characterized in that, described acquisition module also comprises:
Converting unit, for being converted to character string by described first version number with the described second edition number respectively.
9. device according to claim 7, is characterized in that,
The length of described first version number is that the quantity of the segmentation mark of described first version number adds 1;
The length of the described second edition number is that the quantity of the segmentation mark of the described second edition number adds 1.
10., according to the arbitrary described device of claim 6-9, it is characterized in that, described 3rd determination module comprises:
Threshold value determination unit, for determining number of comparisons threshold value, described number of comparisons threshold value is the hop count of described first paragraph data;
Comparing unit piecemeal, whether more described first paragraph data are greater than described second segment data piecemeal, and the number of times compared piecemeal is not more than described number of comparisons threshold value;
Size determining unit, for when there are described first paragraph data and being greater than described second segment data, stops comparison step piecemeal, and described size identification information is first little mark; When there are described first paragraph data and being less than described second segment data, stop comparison step piecemeal, and described size identification information is second largest little mark.
CN201510176002.0A 2015-04-14 2015-04-14 A kind of method and device for judging version number's size Expired - Fee Related CN104820676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510176002.0A CN104820676B (en) 2015-04-14 2015-04-14 A kind of method and device for judging version number's size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510176002.0A CN104820676B (en) 2015-04-14 2015-04-14 A kind of method and device for judging version number's size

Publications (2)

Publication Number Publication Date
CN104820676A true CN104820676A (en) 2015-08-05
CN104820676B CN104820676B (en) 2018-06-19

Family

ID=53730973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510176002.0A Expired - Fee Related CN104820676B (en) 2015-04-14 2015-04-14 A kind of method and device for judging version number's size

Country Status (1)

Country Link
CN (1) CN104820676B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648679A (en) * 2016-12-29 2017-05-10 南威软件股份有限公司 Version management method of structural data
CN108182150A (en) * 2017-12-29 2018-06-19 五八有限公司 Test method, device, readable storage medium storing program for executing and the equipment that version number compares
CN111147560A (en) * 2019-12-18 2020-05-12 河北远东通信系统工程有限公司 Data synchronization method based on HTTP (hyper text transport protocol) protocol high speed, high stability and breakpoint continuous transmission
CN112667306A (en) * 2019-10-15 2021-04-16 华为终端有限公司 Method, device and storage medium for installing plug-in
CN112698852A (en) * 2020-11-30 2021-04-23 厦门亿联网络技术股份有限公司 APP gray scale upgrading method and device, terminal equipment and computer readable storage medium
WO2021174830A1 (en) * 2020-03-04 2021-09-10 平安科技(深圳)有限公司 Management method and apparatus for code versions of multi-module system, and computer device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964820A (en) * 2010-10-08 2011-02-02 中兴通讯股份有限公司 Method and system for keeping data consistency
CN102882974A (en) * 2012-10-15 2013-01-16 焦点科技股份有限公司 Method for saving website access resource by website identification version number
CN103049283A (en) * 2012-11-28 2013-04-17 镇江为天下信息服务有限公司 Automatic updating method for setting version numbers for every software file
CN103248524A (en) * 2013-05-09 2013-08-14 北京泛华恒兴科技有限公司 Flexible test technology based test data version control method, device and system
EP2735983A1 (en) * 2012-11-21 2014-05-28 Exagrid Systems, Inc. Adaptive scheduled periodic caching
WO2014099521A1 (en) * 2012-12-21 2014-06-26 Google Inc. Providing content items for non-standard content item slots

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964820A (en) * 2010-10-08 2011-02-02 中兴通讯股份有限公司 Method and system for keeping data consistency
CN102882974A (en) * 2012-10-15 2013-01-16 焦点科技股份有限公司 Method for saving website access resource by website identification version number
EP2735983A1 (en) * 2012-11-21 2014-05-28 Exagrid Systems, Inc. Adaptive scheduled periodic caching
CN103049283A (en) * 2012-11-28 2013-04-17 镇江为天下信息服务有限公司 Automatic updating method for setting version numbers for every software file
WO2014099521A1 (en) * 2012-12-21 2014-06-26 Google Inc. Providing content items for non-standard content item slots
CN103248524A (en) * 2013-05-09 2013-08-14 北京泛华恒兴科技有限公司 Flexible test technology based test data version control method, device and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648679A (en) * 2016-12-29 2017-05-10 南威软件股份有限公司 Version management method of structural data
CN106648679B (en) * 2016-12-29 2020-04-07 南威软件股份有限公司 Version management method for structured data
CN108182150A (en) * 2017-12-29 2018-06-19 五八有限公司 Test method, device, readable storage medium storing program for executing and the equipment that version number compares
CN112667306A (en) * 2019-10-15 2021-04-16 华为终端有限公司 Method, device and storage medium for installing plug-in
CN111147560A (en) * 2019-12-18 2020-05-12 河北远东通信系统工程有限公司 Data synchronization method based on HTTP (hyper text transport protocol) protocol high speed, high stability and breakpoint continuous transmission
CN111147560B (en) * 2019-12-18 2022-05-17 河北远东通信系统工程有限公司 Data synchronization method based on HTTP (hyper text transport protocol) and breakpoint continuous transmission
WO2021174830A1 (en) * 2020-03-04 2021-09-10 平安科技(深圳)有限公司 Management method and apparatus for code versions of multi-module system, and computer device
CN112698852A (en) * 2020-11-30 2021-04-23 厦门亿联网络技术股份有限公司 APP gray scale upgrading method and device, terminal equipment and computer readable storage medium
CN112698852B (en) * 2020-11-30 2022-09-20 厦门亿联网络技术股份有限公司 APP gray scale upgrading method and device, terminal equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN104820676B (en) 2018-06-19

Similar Documents

Publication Publication Date Title
CN104820676A (en) Method and device for judging magnitude of version number
CN103914564B (en) Method and system for updating and warehousing urban pipelines on basis of ArcGIS (geographic information system)
CN102662833B (en) Method for managing test cases
CN105404519A (en) Version control method, code testing method and system
CN103106138B (en) The method that test case is synchronous with test script and device
CN104932973A (en) Version compatibility test method and apparatus
CN102495733A (en) Methods for detecting compatibility of application program and relevant database script and performing upgrading maintenance on application program and relevant database script
EP3185027B1 (en) Information processing method and device and computer storage medium
CN108205560B (en) Data synchronization method and device
CN102984737B (en) A kind of improve parameter unification collocation method of wireless network and device
CN103092748A (en) Method and system of test cases surely needing to perform regression testing
US9032346B2 (en) Method and apparatus for creating and managing waiver descriptions for design verification
CN103955429B (en) Determine the method and device of regression test scope
CN111309581B (en) Application performance detection method and device in database upgrading scene
CN106603289B (en) LMT configuration file smooth upgrading method
CN106951593B (en) Method and device for generating configuration file of protection measurement and control device
CN104573083A (en) Automatic map cache service updating method
CN104216823A (en) Automatic testing method and master control device
CN105808559A (en) Data conflict processing method and apparatus
CN101673200B (en) The detection method of user input model and device
US20230384750A1 (en) Efficient controller data generation and extraction
CN103902445A (en) Regression test object determination method and device
CN104881455B (en) A kind of architectural difference processing method and system based on MYSQL
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN105354144A (en) Method and system for automatically testing consistency of business support system information models

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180619

Termination date: 20210414

CF01 Termination of patent right due to non-payment of annual fee