CN106886684B - The grade of digital quantity determines method - Google Patents

The grade of digital quantity determines method Download PDF

Info

Publication number
CN106886684B
CN106886684B CN201710104815.8A CN201710104815A CN106886684B CN 106886684 B CN106886684 B CN 106886684B CN 201710104815 A CN201710104815 A CN 201710104815A CN 106886684 B CN106886684 B CN 106886684B
Authority
CN
China
Prior art keywords
grade
digital quantity
levelvalue
section
signal digital
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
CN201710104815.8A
Other languages
Chinese (zh)
Other versions
CN106886684A (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.)
Koboda Technology Ltd By Share Ltd
Original Assignee
Koboda Technology Ltd By Share 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 Koboda Technology Ltd By Share Ltd filed Critical Koboda Technology Ltd By Share Ltd
Priority to CN201710104815.8A priority Critical patent/CN106886684B/en
Publication of CN106886684A publication Critical patent/CN106886684A/en
Application granted granted Critical
Publication of CN106886684B publication Critical patent/CN106886684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16ZINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS, NOT OTHERWISE PROVIDED FOR
    • G16Z99/00Subject matter not provided for in other main groups of this subclass

Landscapes

  • Cleaning In Electrography (AREA)
  • Control Or Security For Electrophotography (AREA)
  • Measurement Of Radiation (AREA)

Abstract

The invention discloses the grades of digital quantity to determine method, comprising the following steps: digital quantity a, is divided into N number of grade in advance, each grade corresponds to a grade point LevelValue(i), 0≤i≤N;Section between the grade point of the lowest class and the grade point of highest level has N number of sluggish section and N-1 normal interval, N number of sluggishness section and the arrangement interlaced with each other of N-1 normal interval;Wherein, N number of sluggish section is corresponded with N number of grade respectively, and each sluggishness section is collectively constituted by the grade point and the section adjacent with the grade point of corresponding grade of corresponding grade;B, digital quantity currently entered is received, determines that digital quantity currently entered is in N number of sluggish which of section and N-1 normal interval section: its grade is determined according to section locating for digital quantity currently entered respectively.The present invention can mitigate the phenomenon that grade definitive result caused by the digital quantity fluctuation because of signal is beated repeatedly, and easy to implement.

Description

The grade of digital quantity determines method
Technical field
The present invention relates to signal processing technology more particularly to the processing techniques of digital quantity.
Background technique
It is needed in many applications to continuous signal divided rank.For example, it is known that A/D conversion in quantization be exactly will Signal amplitude is divided into several quantization levels, and each quantization level is represented with a quantized value.Since signal often exists Certain fluctuation directly carries out grade classification to the digital quantity of signal if without certain processing, exports result It is just very easy to beat repeatedly between two grades, to cause the unstable of system.
Summary of the invention
Technical problem to be solved by the present invention lies in the grades for providing a kind of digital quantity to determine method, can mitigate because of letter Number digital quantity fluctuation the phenomenon that causing grade definitive result to beat repeatedly, and it is easy to implement.
In order to solve the above technical problems, the technical solution used in the present invention is:
The grade of digital quantity determines method, comprising the following steps:
A, digital quantity is divided into N number of grade in advance, each grade corresponds to a grade point LevelValue(i), i table Show i-th of grade, 0≤i≤N, N are the integer more than or equal to 3;Also, the grade point of the lowest class and the grade of highest level Section between value has N number of sluggish section and N-1 normal interval, and N number of sluggish section and N-1 normal interval are each other It is staggered;Wherein, N number of sluggish section is corresponded with N number of grade respectively, each sluggishness section by the grade point of corresponding grade with And the section adjacent with the grade point of corresponding grade collectively constitutes;
B, digital quantity currently entered is received, determines that digital quantity currently entered is in N number of sluggish section and N-1 normal Which of section section:
If digital quantity currently entered is in normal interval, the grade of current input digital quantity is determined as and is deserved That lower grade in two adjacent grades of preceding input digital quantity;
If digital quantity currently entered is in the sluggish section of the lowest class, determine digital quantity currently entered without Effect;
If digital quantity currently entered is in the sluggish section of remaining grade other than the lowest class, according to the last time Digital quantity grade determine result to determine the grade of digital quantity currently entered, and be for the first time in digital quantity currently entered When input, defaults last digital quantity grade and determine that result is the lowest class;If last digital quantity grade determines result In two grades adjacent greater than with the current input digital quantity when higher grade, then digital quantity will be currently inputted Grade be determined as and that higher grade in adjacent two grades of current input digital quantity;If last digital quantity It, then will be current when grade determines that result is below or equal to lower grade in two grades adjacent with current input digital quantity The grade of input digital quantity is determined as that lower grade in two grades adjacent with currently input digital quantity.
After adopting the above technical scheme, the present invention at least has following technical effect that
1, the application corresponds to each grade and is provided with sluggish section, falls into the sluggishness section in digital quantity currently entered When interior, the grade of digital quantity currently entered determines the result is that determining what result was made according to last grade, so as to mitigate The phenomenon that grade definitive result is beated repeatedly caused by fluctuating because of the digital quantity of input;
2, for the present processes when with software implementation, software code amount is few, and resource occupation amount is few, easy to implement.
Detailed description of the invention
The grade that Fig. 1 shows digital quantity according to the present invention determines the digital quantity grade classification of one embodiment of method Exemplary diagram.
Fig. 2 shows the flow diagrams that the grade of digital quantity according to the present invention determines one embodiment of method.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
The grade of digital quantity according to an embodiment of the invention determines method, comprising the following steps:
Step a, digital quantity is divided into N number of grade in advance, each grade corresponds to a grade point LevelValue (i), i indicates i-th of grade, and 0≤i≤N, N are the integer more than or equal to 3;Also, the grade point of the lowest class with it is most high Section between the grade point of grade has N number of sluggish section and N-1 normal interval, and N number of sluggish section and N-1 are normally Section arrangement interlaced with each other;Wherein, described N number of sluggish section is corresponded with N number of grade respectively, each sluggishness section by The grade point of corresponding grade and the section adjacent with the grade point of corresponding grade collectively constitute.
The grade that Fig. 1 shows digital quantity according to the present invention determines the digital quantity grade classification of one embodiment of method Exemplary diagram.Fig. 1 is by taking digital quantity is divided into 5 grades as an example.5 grades are respectively 0 grade, 1 grade, 2 grades, 3 grades and 4 grades, Corresponding grade point is respectively LevelValue(0), LevelValue(1), LevelValue(2), LevelValue(3) and LevelValue(4).It can be seen from the figure that LevelValue(0) and LevelValue(4) between section have 5 late Between dead zone and 4 normal intervals, this 5 sluggish sections and 4 normal interval arrangements interlaced with each other;Wherein, described 5 late Between dead zone respectively with 5 grades correspond, it is each sluggishness section by corresponding grade grade point and with corresponding grade The adjacent section of grade point collectively constitutes.
Step b, digital quantity currently entered is received, determines that digital quantity currently entered is in N number of sluggish section and N-1 Which of normal interval section:
If digital quantity currently entered is in normal interval, the grade of current input digital quantity is determined as and is deserved That lower grade in two adjacent grades of preceding input digital quantity;
If digital quantity currently entered is in the sluggish section of the lowest class, determine digital quantity currently entered without Effect;
If digital quantity currently entered is in the sluggish section of remaining grade other than the lowest class, according to the last time Digital quantity grade determine result to determine the grade of digital quantity currently entered, and be for the first time in digital quantity currently entered When input, defaults last digital quantity grade and determine that result is the lowest class;If last digital quantity grade determines result In two grades adjacent greater than with the current input digital quantity when higher grade, then digital quantity will be currently inputted Grade be determined as and that higher grade in adjacent two grades of current input digital quantity;If last grade is sentenced When determining lower grade in result two grades adjacent below or equal to current input digital quantity, then number will be currently inputted The grade of word amount is determined as that lower grade in two grades adjacent with the current input digital quantity.
To keep the technical solution of the above embodiment of the present invention clearer, below in conjunction with flow chart shown in Fig. 2 and 4 Specifically it is illustrated using example.In this 4 application examples, the digital quantity of input is divided into 9 grades, and 0 grade is most Inferior grade, 8 grades are highest level.Wherein, LevelValue(0)=400, LevelValue(1)=350, LevelValue(2)= 300, LevelValue(3)=250, LevelValue(4)=200, LevelValue(5)=150, LevelValue(6)=100, LevelValue(7)=50, LevelValue(8)=0, higher grade, and grade point is smaller.It is corresponding with grade point to be, input Digital quantity input be similarly metric digital quantity.In other embodiments, grade point can also be hexadecimal, input Digital quantity is also hexadecimal digital quantity.It is corresponding with the lowest class sluggishness section be LevelValue(0), (LevelValue(0)-lag) ], it is corresponding with highest level sluggishness section be (LevelValue(N)+lag), LevelValue(N) ], the sluggish section of each grade of remaining other than the lowest class and highest level is [ (LevelValue (i)-lag), (LevelValue(i)+lag).These sluggish sections are closed interval.Correspondingly, normal interval is to open area Between.Lag indicates the size in sluggish section, in this 4 application examples, lag=5.OutputLevel indicates the judgement etc. of output Grade.
Using example 1
Controller receives externally input input quantity input=360 for the first time.It is started counting from i=0, controller is first sentenced Whether disconnected 360 be less than (LevelValue(0) -5) and it is greater than (LevelValue(1)+5).Due to 355 <, 360 < 395, that is, locate Normal interval between 355 and 395, controller determine that the grade of digital quantity 360 is 0 grade.
Next, controller receives externally input input quantity input=351 for the second time.Controller is again from i=0 Start counting, controller first judges whether 351 be less than (LevelValue(0) -5) and it is greater than (LevelValue(1)+5).By In 351 < 355, therefore, controller further judges whether 351 be less than or equal to (LevelValue(1)+5) and be more than or equal to (LevelValue(1) -5), that is, judge whether 351 be in sluggish section corresponding with grade 1.Due to 345 <, 351 < 355, controller further judges that last digital quantity determines whether result is less than or equal to i.Current i=0, on controller The primary grade for determining digital quantity 360 is also 0 grade, meets outputLevel≤0, thus controller judge digital quantity 351 etc. Grade is 0 grade.This determines that result is below or equal to two adjacent with current input digital quantity with last grade described in step b Then the grade of current input digital quantity is sentenced when lower grade in a grade (two grades adjacent with 351 are 0 grade and 1 grade) It is set to that lower grade in two grades adjacent with the current input digital quantity to match.
Using example 2
Controller receives externally input input quantity input=340 for the first time.It is started counting from i=0, controller is first sentenced Whether disconnected 340 be less than (LevelValue(0) -5) and it is greater than (LevelValue(1)+5).Due to 340 < 355, it is not at 355 With the normal interval between 395, therefore, controller further judges whether 340 be less than or equal to (LevelValue(1)+5) and More than or equal to (LevelValue(1) -5).Since 340 not also in sluggish section corresponding with grade 1, then according to public affairs Formula i=i+1, makes i=1.Controller judges that 340 are less than (LevelValue(1) -5) and it is greater than (LevelValue(2)+5), into And determine that the grade of digital quantity 340 is 1 grade.
Next, controller receives externally input input quantity input=351 for the second time.Controller is again from i=0 Start counting, controller first judges whether 351 be less than (LevelValue(0) -5) and it is greater than (LevelValue(1)+5).By In 351 < 355, therefore, controller further judges whether 351 be less than or equal to (LevelValue(1)+5) and be more than or equal to (LevelValue(1) -5), that is, judge whether 351 be in sluggish section corresponding with grade 1.Due to 345 <, 351 < 355, controller further judges that last digital quantity determines whether result is less than or equal to i.Current i=0, on controller The primary grade for determining digital quantity 340 is 1 grade, meets outputLevel > 0, so controller judges the grade of digital quantity 351 OutputLevel=0+1=1 grade.This determines that result is greater than and the digital quantity phase with last grade described in step b In adjacent two grades (two grades adjacent with 351 are 0 grade and 1 grade) when higher grade, then digital quantity will be currently inputted Grade be judged to matching with that higher grade in adjacent two grades of current input digital quantity.
Using example 3
Controller receives externally input input quantity input=396 for the first time, starts counting from i=0, controller judgement 396 in 0 grade of the lowest class of sluggish section [ 400,395 ], then determines that the digital quantity of input is invalid.Preferably, at other Example application in, by the way that LevelValue(0 is rationally arranged), LevelValue(N) and lag size, can make current The digital quantity of input is located at section ((LevelValue(N)+lag), (LevelValue(0)-lag)), in this case will not It is in there is a situation where the digital quantity inputted in the sluggish section of the lowest class.That is, in this case, if will LevelValue(0), LevelValue(N) and lag when being set to 400,0 and 5, it can guarantee digital quantity currently entered only Section (5,395) can be fallen into, are not in above-mentioned currently entered without falling into section [ 400,395 ] and section [ 0,5 ] The case where digital quantity is 396.
Using example 4
Controller receives externally input input quantity input=351 for the first time.It is started counting from i=0, controller is first sentenced Whether disconnected 351 be less than (LevelValue(0) -5) and it is greater than (LevelValue(1)+5).Due to 351 < 355, control Device further judges whether 351 be less than or equal to (LevelValue(1)+5) and it is more than or equal to (LevelValue(1) -5), i.e., Judge whether 351 be in sluggish section corresponding with grade 1.Due to 345 <, 351 < 355, controller further judges Last digital quantity determines whether result is less than or equal to i.Since 351 be the digital quantity inputted for the first time, controller is defaulted The digital quantity grade that last time determines is 0 grade, meets outputLevel≤0, so controller judges the grade of digital quantity 351 It is 0 grade.
It in Fig. 2 and above-mentioned application example, is determined by way of circulation searching at digital quantity currently entered In N number of sluggish which of section and N-1 normal interval section.N+1 circulation is at most executed, is at most held under each circulation Row 5 times judgements.(N+1) * 5 judgements are come to, have the advantages that software code amount is few, easy to implement when with software implementation.
Above-mentioned application example is only example rather than limits.For example, in other application example when divided rank, it can also Division mode using higher grade, grade point is bigger.It is corresponding with the lowest class sluggishness section be LevelValue(0), (LevelValue(0)+lag) ], it is corresponding with highest level sluggishness section be (LevelValue(N)-lag), LevelValue(N) ], the sluggish section of each grade of remaining other than the lowest class and highest level is [ (LevelValue (i)-lag), (LevelValue(i)+lag).Similarly, by the way that LevelValue(0 is rationally arranged), LevelValue(N) With the size of lag, digital quantity currently entered can be made to be located at section ((LevelValue(0)+lag), (LevelValue (N)-lag)), without being in the sluggish section of the lowest class there is a situation where the digital quantity inputted.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (9)

1. the grade of signal digital quantity determines method, which comprises the following steps:
A, signal digital quantity is divided into N number of grade in advance, each grade corresponds to a grade point LevelValue(i), i table Show i-th of grade, 0≤i≤N, N are the integer more than or equal to 3;Also, the grade point of the lowest class and the grade of highest level Section between value has N number of sluggish section and N-1 normal interval, and N number of sluggish section and N-1 normal interval are each other It is staggered;Wherein, N number of sluggish section is corresponded with N number of grade respectively, and each sluggishness section is by corresponding grade Grade point and the section adjacent with the grade point of corresponding grade collectively constitute;
B, signal digital quantity currently entered is received, determines that signal digital quantity currently entered is in N number of sluggish section and N-1 Which of normal interval section:
If signal digital quantity currently entered is in normal interval, by the grade of current input signal digital quantity be determined as with That lower grade in two adjacent grades of the current input signal digital quantity;
If signal digital quantity currently entered is in the sluggish section of the lowest class, signal digital quantity currently entered is determined In vain;
If signal digital quantity currently entered is in the sluggish section of remaining grade other than the lowest class, according to the last time Signal digital quantity grade determine result to determine the grade of signal digital quantity currently entered, and in signal number currently entered Word amount is to default last signal digital quantity grade when inputting for the first time and determine that result is the lowest class;If last time letter Number digital quantity grade determines that result is higher greater than in two grades adjacent with the current input signal digital quantity When grade, then the grade of current input signal digital quantity is determined as to two grades adjacent with the current input signal digital quantity In that higher grade;If last signal digital quantity grade determines that result is below or equal to and current input signal number In two adjacent grades of word amount when lower grade, then the grade of current input signal digital quantity is determined as and is currently inputted That lower grade in two adjacent grades of signal digital quantity.
2. the grade of signal digital quantity according to claim 1 determines method, which is characterized in that higher grade, grade point It is smaller.
3. the grade of signal digital quantity according to claim 2 determines method, which is characterized in that corresponding with the lowest class Sluggish section be [ LevelValue(0), (LevelValue(0)-lag) ], sluggishness section corresponding with highest level For (LevelValue(N)+lag), LevelValue(N), remaining each grade other than the lowest class and highest level Sluggish section be [ (LevelValue(i)-lag), (LevelValue(i)+lag) ];Lag indicates the size in sluggish section.
4. the grade of signal digital quantity according to claim 3 determines method, which is characterized in that set LevelValue(0), LevelValue(N) and lag make signal digital quantity currently entered be located at section ((LevelValue (N)+lag), (LevelValue(0)-lag)).
5. the grade of signal digital quantity according to claim 1 determines method, which is characterized in that higher grade, grade point It is bigger.
6. the grade of signal digital quantity according to claim 5 determines method, which is characterized in that corresponding with the lowest class Sluggish section be [ LevelValue(0), (LevelValue(0)+lag) ], sluggishness section corresponding with highest level be (LevelValue(N)-lag), LevelValue(N), remaining each grade other than the lowest class and highest level Sluggish section is [ (LevelValue(i)-lag), (LevelValue(i)+lag) ], and lag indicates the size in sluggish section.
7. the grade of signal digital quantity according to claim 6 determines method, which is characterized in that set LevelValue(0), LevelValue(N) and lag make signal digital quantity currently entered be located at section ((LevelValue (0)+lag), (LevelValue(N)-lag)).
8. the grade of signal digital quantity according to claim 1 determines method, which is characterized in that the digital quantity is ten System or hexadecimal.
9. the grade of signal digital quantity according to claim 1 determines method, which is characterized in that in the step b, It is to determine that signal digital quantity currently entered is in N number of sluggish section and N-1 normal interval by way of circulation searching Which section.
CN201710104815.8A 2017-02-24 2017-02-24 The grade of digital quantity determines method Active CN106886684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710104815.8A CN106886684B (en) 2017-02-24 2017-02-24 The grade of digital quantity determines method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710104815.8A CN106886684B (en) 2017-02-24 2017-02-24 The grade of digital quantity determines method

Publications (2)

Publication Number Publication Date
CN106886684A CN106886684A (en) 2017-06-23
CN106886684B true CN106886684B (en) 2019-06-04

Family

ID=59179968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710104815.8A Active CN106886684B (en) 2017-02-24 2017-02-24 The grade of digital quantity determines method

Country Status (1)

Country Link
CN (1) CN106886684B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742627A (en) * 2010-01-14 2010-06-16 京信通信系统(中国)有限公司 Digital automatic gain control method of communication system and control system thereof
CN102804721A (en) * 2010-03-16 2012-11-28 日本电气株式会社 Transmitter apparatus, transmission method and transmission system
CN105911046A (en) * 2016-07-04 2016-08-31 哈尔滨工业大学(威海) Filtering method based on frequency distribution principle

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742627A (en) * 2010-01-14 2010-06-16 京信通信系统(中国)有限公司 Digital automatic gain control method of communication system and control system thereof
CN102804721A (en) * 2010-03-16 2012-11-28 日本电气株式会社 Transmitter apparatus, transmission method and transmission system
CN105911046A (en) * 2016-07-04 2016-08-31 哈尔滨工业大学(威海) Filtering method based on frequency distribution principle

Also Published As

Publication number Publication date
CN106886684A (en) 2017-06-23

Similar Documents

Publication Publication Date Title
CN110209496B (en) Task fragmentation method and device based on data processing and fragmentation server
Masquelier et al. Oscillations, phase-of-firing coding, and spike timing-dependent plasticity: an efficient learning scheme
US7231652B2 (en) Adaptive sampling technique for selecting negative examples for artificial intelligence applications
CN109815084A (en) Abnormality recognition method, device and electronic equipment and storage medium
CN111294819B (en) Network optimization method and device
US11010451B2 (en) Techniques for automated Bayesian posterior sampling using Markov Chain Monte Carlo and related schemes
CN112507866B (en) Chinese character vector generation method and device, computer equipment and storage medium
CN103730118A (en) Voice signal collecting method and mobile terminal
CN113268403B (en) Time series analysis and prediction method, device, equipment and storage medium
EP4202799A1 (en) Machine learning data generation program, machine learning data generation method, machine learning data generation device, classification data generation program, classification data generation method, and classification data generation device
CN106886684B (en) The grade of digital quantity determines method
CN115062480A (en) Method for recommending production process parameters, and related apparatus and program medium
Correa et al. A critical look at prospective surveillance using a scan statistic
CN110851333A (en) Monitoring method and device of root partition and monitoring server
CN109218829B (en) Video playing quantity predictability classification method based on Fourier transform
CN111209399A (en) Text classification method and device and electronic equipment
CN103678072A (en) Method and device for testing system
CN109286408B (en) Method for energy harvesting and energy receiver
CN103365703B (en) The method of raising system maximum recyclable memory and the system of execution thereof
CN112954732A (en) Network load balancing method, device, equipment and storage medium
CN112148706A (en) Variable grouping method and related equipment
CN112149121A (en) Malicious file identification method, device, equipment and storage medium
CN117371431A (en) Corpus processing method and device
Abu-Mostafa An algorithm for learning from hints
CN112295231A (en) Operation training method and server

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
CB02 Change of applicant information

Address after: 201203 Shanghai city Zuchongzhi road Pudong New Area Zhangjiang hi tech Park No. 2388

Applicant after: Koboda technology, Limited by Share Ltd

Address before: 201203 Shanghai city Zuchongzhi road Pudong New Area Zhangjiang hi tech Park No. 2388

Applicant before: Keboda Technology Corp.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant