CN108197688A - A kind of coding mode with check code - Google Patents

A kind of coding mode with check code Download PDF

Info

Publication number
CN108197688A
CN108197688A CN201810120078.5A CN201810120078A CN108197688A CN 108197688 A CN108197688 A CN 108197688A CN 201810120078 A CN201810120078 A CN 201810120078A CN 108197688 A CN108197688 A CN 108197688A
Authority
CN
China
Prior art keywords
code
data
check
coding mode
field
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
CN201810120078.5A
Other languages
Chinese (zh)
Other versions
CN108197688B (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201810120078.5A priority Critical patent/CN108197688B/en
Publication of CN108197688A publication Critical patent/CN108197688A/en
Application granted granted Critical
Publication of CN108197688B publication Critical patent/CN108197688B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Pipeline Systems (AREA)
  • Optical Transform (AREA)

Abstract

A kind of coding mode with check code of the present invention, it is characterized in that numeric data code is encoded by determining code length and becoming the coding mode of code length, calculate in numeric data code 1 number, and the binary number of this number is calculated, in numeric data code 0 is mended before the binary number of 1 number, until total bit is A, check code as this data bit, know code instrument reading code since location hole or the latter position of positioning bar code, when examining end of data hole or positioning bar code, terminate reading code, knowledge code check is carried out with numeric data code by knowing code instrument itself Inspection code.The present invention is compared with prior art, on the basis of original quarter code, increase check code, it is equivalent to and adds primary inspection to identification data, if inspection show that reading code is correct, instrument is normally read, and otherwise instrument reports an error, it solves the problems, such as that identification instrument misreads code itself and can not proofread, has the characteristics that recognition speed is fast, efficient.

Description

A kind of coding mode with check code
First, technical field
The present invention relates to a kind of code identification and calibration technology more particularly to a kind of coding modes with check code.
2nd, background technology
Identify the coding of this object using the method for mechanical engraving in many metal surfaces at present, it is simplest to be exactly Using binary bar code.This code is suitable for the surface of metal objects, the end face of pipe cylindricality and arc surface.But severe Operating mode under, often the part in these yard of area can be by mechanical damage and corrosion chemically, and the recess of data can be by foreign matter The data identification for the methods of filling gives identified by image in this way, ranging identification, touch identification causes difficulty or even identification Go out a wrong data.
Code according to mistake carrys out typing tube rod information and normally enters database, and database can be caused chaotic, cause following ask Topic:
(1) when reusing the pipe of this yard, in fact it could happen that two, need to screen again and typing information is examined to enter data Library, considerably increases workload, and working efficiency is low;
(2) since the long short life access times of every pipe and present situation are all different, distributing these pipes can be according to typing Information be configured, information error causes this root pipe to be used in unsuitable position, security risk occurs;
(3) for different pipes from different producers, when quality problems occurs in pipe, reading code is correct, this is inquired with this The producer of pipe to solve the problems, such as, optimizes our oil pipe quality, if reading code identifies mistake, None- identified producer, tracking pipe The source of son can not then improve the quality of oil pipe.
3rd, invention content
The present invention is based on problem above, and survival ability and the discrimination for providing a kind of coding are high, and recognition speed is fast, can be certainly Body identification mistake is simultaneously proofreaded, and reaches a kind of coding mode with check code of the requirement of the equipment digitalized management of underground work.
The present invention is achieved by the following technical solutions:
A kind of coding mode with check code, it is characterised in that the coding mode of numeric data code is divided into two kinds, respectively fixed Code length and change code length, calculate in numeric data code 1 number, and the binary number of the sum of 1 number is calculated, in numeric data code In 1 number binary number before mend 0, to total bit for until A, as the check code of this data bit, the verification Code is examined for end face code, axial code and radial direction code, knowledge code instrument reading code since the latter position of location hole to data knot During beam hole, the information of the numeric data code in verification data information is gone with check code, while check code is verified with the information of numeric data code, The two etc. terminate reading code.
A kind of coding mode with check code, it is characterized in that the code length coding mode of determining is:Fixed number According to the digit X of code, it is exactly 1 that every code, which is not 0, then the total quantity of code is 2 X powers.
A kind of coding mode with check code, it is characterized in that the time-varying code long codes mode is:Pipe number is from 1 Start to add up, code bit number is calculated according to the binary system of pipe number, it is 1 or 0 to determine each code bit.
A kind of coding mode with check code, it is characterized in that the whole sequence of the check code is placed on data field Forepart or rear portion are placed on by different algorithms on the different location of data field.
A kind of coding mode with check code, it is characterized in that the end face code is by the end face circumference of pipe fitting 360 ° are divided into location hole, check field, data field and end of data hole.
A kind of coding mode with check code, it is characterized in that first verification of the location hole and check field Central angle between the hole position of code is D, the hole position of the numeric data code of Kong Weiyu data fields first of the last one check code of check field Between central angle for E, the central angle between the hole position of each numeric data code in data field is E, the last one numeric data code of data field Central angle between hole position and end of data hole is C, the D ≠ E ≠ C.
A kind of coding mode with check code, it is characterized in that the axial face of pipe fitting is divided by the axial code Position bar code, check field, data field and end of data bar code.
A kind of coding mode with check code, it is characterized in that the positioning bar code and first school of check field The width tested between the strip slot position of code is L, the slot position of the strip of the last one check code of check field and data field first Width between the slot position of the strip of a numeric data code is M, and the width between the strip slot position of each numeric data code in data field is M, the width between the strip slot position of the last one numeric data code of data field and end of data bar code are N, the L ≠ M ≠ N;
A kind of coding mode with check code, it is characterized in that the radial direction code is carved along the outside diameter hoop of pipe fitting Road, circumferentially radial distribution.
Compared with prior art, the present invention on the basis of original quarter code, check code is increased, is equivalent to and gives identification data Add primary inspection, show that reading code is correct if examining, instrument is normally read, and otherwise instrument reports an error.The present invention solves yard area Partially due to corrosion or foreign matter by mechanical damage and chemically fills, identify error code, cause information errors, number According to library confusion, cause administrative staff information management mistake, it is chaotic the problem of, the present invention also has that recognition speed is fast, effect in addition The characteristics of rate is high.
4th, it illustrates
Fig. 1 is the structure diagram of end face code of the present invention with check code;
Fig. 2 is the structure diagram of radial direction code of the present invention with check code;
Fig. 3 is the structure diagram of axial code of the present invention with check code.
5th, specific embodiment
The present invention implements and uses in Shengli Oil Field triumph development of automation Co., Ltd.
The present invention is further explained with reference to the accompanying drawings of the specification,
First, numeric data code is encoded.There are " fixed length code " and " variable length code " two kinds of coding modes respectively:Determine code length coding Mode is:The digit X of fixed data code, it is exactly 1 that every code, which is not 0, then the total quantity of code is 2 X powers;Time-varying code long codes side Formula is:Pipe number adds up since 1, calculates data code bit number according to the binary system of pipe number, and determine that each code bit is 1 or 0.
Such as:Time-varying code long codes mode:
No. 1 pipe --- 1 binary number is 1, then the code number of the pipe is 1;
No. 2 pipes --- 2 binary number is 10, then the code number of the pipe is 10;
No. 10 pipes --- 10 binary number is 1010, then the code number of the pipe is 1010;
No. 100000 pipes --- 100000 binary number is 11000011010100000;Then the code number of the pipe is 11000011010100000。
Then, check code is encoded.Calculate in numeric data code 1 number, and by the binary number of the sum of 1 number It calculates, 0 is mended before the binary number of 1 number in numeric data code, until total bit is A, as this numeric data code Check code.
Such as:The digit for now determining code is up to 32 (i.e. X=32), and under the coding mode of " determining code length ", numeric data code is 00001011001100110010000101001010;Under the coding mode of " becoming code length ", numeric data code is 1011001100110010000101001010。
In above-mentioned two needles coding mode, the number of " 1 " is in numeric data code:12,12 binary number is 1100, less than 5 Position, before mend 10, then check code be:01100.As X=32, cataloged procedure is with the coding mode for determining code length, and digit is most 31 a height of (i.e. from total data 32 be all that of 1 removes), and 31 binary number is 11111, is 5 Number.Then when in pipe numeric data code 1 digit is not higher than 31,5 bit check codes use (i.e. A=5) enough.
If coding mode of the numeric data code with " determining code length ", 32 powers that codified sum is 2 subtract 1 and obtain 4294967295 It is a;
If coding mode of the numeric data code with " become code length ", 32 powers that codified sum is 2 subtract 1 and subtract 1 again 4294967294;
So far, the digit for determining code is up to that 32 (i.e. X=32) quantity are used enough, then is needed if adding up, then school Testing code also accordingly increases digit.
After determining numeric data code and check code, quarter code is carried out to pipe fitting.
End face code as shown in Figure 1, is divided into location hole, check field, data field by 360 ° of the end face circumference of the tubing such as oil pipe With end of data hole;Imprinting alignment code, check code, data on location hole, check field, data field and the hole in end of data hole position Code and data end code are the quarter holes of " 1 ", are that " 0 " is skipped and do not carved.
Central angle between the hole position of first check code of location hole and check field is D;
Central angle between the hole position of the numeric data code of Kong Weiyu data fields first of the last one check code of check field is E;
Central angle between the hole position of each numeric data code in data field is E;
Central angle between the hole position of the last one numeric data code of data field and end of data hole is C, the D ≠ E ≠ C;
Such as:D=5 °, E=7.2 °, C=6 °.
Radial direction code as described in Figure 2 carves road, circumferentially radial distribution along the outside diameter hoop of pipe fitting.End face outside diameter hoop point For location hole, check field, data field and end of data hole;On location hole, check field, data field and the hole in end of data hole position Imprinting alignment code, check code, numeric data code and data end code are the quarter holes of " 1 ", are that " 0 " is skipped and do not carved.
Central angle between the hole position of first check code of location hole and check field is D;
Central angle between the hole position of the numeric data code of Kong Weiyu data fields first of the last one check code of check field is E;
Central angle between the hole position of each numeric data code in data field is E;
Central angle between the hole position of the last one numeric data code of data field and end of data hole is C, the D ≠ E ≠ C;
Such as:D=4 °, E=3 °, C=5 °.
Axial code as shown in Figure 3:The axial plane of structure of pipe is set as positioning bar code, check field, data field, data knot Beam bar code.
The groove of imprinting strip in positioning bar code, check field, data field, end of data area is 1 quarter strip Groove is 0 not carve.
Width between the strip slot position of described first check code of positioning bar code and check field is L;
The slot position of the strip of the last one check code of check field and the slot position of the strip of first numeric data code in data field Between width be M;
Width between the strip slot position of each numeric data code in data field is M;
Width between the strip slot position of the last one numeric data code of data field and end of data hole is N, the L ≠ M ≠N;
Such as:L=3mm, M=0mm, N=3.5mm.
Identify checking procedure:The knowledge code instrument is from location hole or positions the latter position of bar code (i.e. check field first The position of check code) start reading code, when examining to end of data hole or end of data bar code, terminate reading code.By knowing code instrument Device itself Inspection code and numeric data code if being unsatisfactory for pre-defined algorithm, know code instrument and report an error, know code failure.

Claims (9)

1. a kind of coding mode with check code, it is characterised in that the coding mode of numeric data code is divided into two kinds, respectively determines code Long and change code length, calculates in numeric data code 1 number, and the binary number of the sum of 1 number is calculated, in numeric data code 0 is mended before the binary number of 1 number, until total bit is A, as the check code of this data bit, the check code For end face code, axial code and radial direction code, the knowledge code instrument reading code, inspection since location hole or the latter position of positioning bar code When testing end of data hole or end of data bar code, the information of the numeric data code in verification data information is gone with check code, simultaneously Check code is verified with the information of numeric data code, and the two etc. terminates reading code.
2. a kind of coding mode with check code according to claim 1, it is characterized in that described determines code length coding staff Formula is:The digit X of fixed data code, it is exactly 1 that every code, which is not 0, then the total quantity of code is 2 X powers.
3. a kind of coding mode with check code according to claim 1, it is characterized in that the time-varying code long codes side Formula is:Pipe number adds up since 1, calculates code bit number according to the binary system of pipe number, it is 1 or 0 to determine each code bit.
4. a kind of coding mode with check code according to claim 1, it is characterized in that the whole sequence of the check code It is placed on the forepart of data field or rear portion or is placed on the different location of data field by different algorithms.
5. a kind of coding mode with check code according to claim 1, it is characterized in that the end face code is by pipe 360 ° of the end face circumference of part is divided into location hole, check field, data field and end of data hole.
6. a kind of coding mode with check code according to claim 1 and 5, it is characterized in that the location hole and school The central angle between the hole position of first, area check code is tested as D, the Kong Weiyu data fields first of the last one check code of check field Central angle between the hole position of a numeric data code is E, and the central angle between the hole position of each numeric data code in data field is E, and data field is most Central angle between the hole position of the latter numeric data code and end of data hole is C, the D ≠ E ≠ C.
7. a kind of coding mode with check code according to claim 1, it is characterized in that the axial code is by pipe fitting Axial face be divided into positioning bar code, check field, data field and end of data bar code.
8. a kind of coding mode with check code according to claim 1 and 7, it is characterized in that the positioning bar code with Width between the strip slot position of first check code of check field is L, the slot of the strip of the last one check code of check field Width between the slot position of the strip of position and first numeric data code in data field is M, the strip slot of each numeric data code in data field Width between position is M, and the width between the strip slot position of the last one numeric data code of data field and end of data bar code is N, L ≠ the M ≠ N.
9. a kind of coding mode with check code according to claim 1, it is characterized in that the radial direction code is along pipe fitting Outside diameter hoop carve road, circumferentially radial distribution.
CN201810120078.5A 2018-02-07 2018-02-07 Coding method with check code Active CN108197688B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810120078.5A CN108197688B (en) 2018-02-07 2018-02-07 Coding method with check code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810120078.5A CN108197688B (en) 2018-02-07 2018-02-07 Coding method with check code

Publications (2)

Publication Number Publication Date
CN108197688A true CN108197688A (en) 2018-06-22
CN108197688B CN108197688B (en) 2021-05-18

Family

ID=62593088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810120078.5A Active CN108197688B (en) 2018-02-07 2018-02-07 Coding method with check code

Country Status (1)

Country Link
CN (1) CN108197688B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472035A (en) * 2023-12-27 2024-01-30 东方电气风电股份有限公司 Verification method for software and hardware of main control system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746774A (en) * 2014-01-03 2014-04-23 中国人民解放军国防科学技术大学 Error resilient coding method for high-efficiency data reading
CN105005511A (en) * 2015-06-30 2015-10-28 宁波东海仪表水道有限公司 Serial communication data checking method
CN106100794A (en) * 2016-06-17 2016-11-09 哈尔滨工业大学深圳研究生院 A kind of polarization code coding cooperative based on punching
CN106326956A (en) * 2016-08-31 2017-01-11 江苏鼎昌科技股份有限公司 Two-dimensional code formed 72-bit matrix code error-correctable coding and decoding method
CN107358285A (en) * 2017-08-17 2017-11-17 中国汽车工业工程有限公司 A kind of hard medium bar code of binary coding tape verifying rule

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746774A (en) * 2014-01-03 2014-04-23 中国人民解放军国防科学技术大学 Error resilient coding method for high-efficiency data reading
CN105005511A (en) * 2015-06-30 2015-10-28 宁波东海仪表水道有限公司 Serial communication data checking method
CN106100794A (en) * 2016-06-17 2016-11-09 哈尔滨工业大学深圳研究生院 A kind of polarization code coding cooperative based on punching
CN106326956A (en) * 2016-08-31 2017-01-11 江苏鼎昌科技股份有限公司 Two-dimensional code formed 72-bit matrix code error-correctable coding and decoding method
CN107358285A (en) * 2017-08-17 2017-11-17 中国汽车工业工程有限公司 A kind of hard medium bar code of binary coding tape verifying rule

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472035A (en) * 2023-12-27 2024-01-30 东方电气风电股份有限公司 Verification method for software and hardware of main control system
CN117472035B (en) * 2023-12-27 2024-03-08 东方电气风电股份有限公司 Verification method for software and hardware of main control system

Also Published As

Publication number Publication date
CN108197688B (en) 2021-05-18

Similar Documents

Publication Publication Date Title
US10387236B2 (en) Processing data errors for a data processing system
CN106796585A (en) Condition verification rule
US11200377B2 (en) Cluster model to predict build failure
CN105335310A (en) Interface defining method, and data transmission method and apparatus
CN110018954B (en) Code quality detection method, device and equipment, and code detection quality evaluation method, device and equipment
CN113259216B (en) CAN bus signal analysis method and system
CN108197688A (en) A kind of coding mode with check code
CN111665342B (en) Pipeline internal detection data analysis system
CN115599437B (en) Software version processing method and device, electronic equipment and storage medium
Li Towards providing automated supports to developers on writing logging statements
CN112396652A (en) Construction site safety monitoring method and device, electronic equipment and storage medium
Chowdhury et al. Method-Level Bug Prediction: Problems and Promises
Geraldi et al. Checklist-based Inspection of SMarty Variability Models
KR101419334B1 (en) Apparatus for extracting object from 3D data and method of the same
CN109829025B (en) Line correction method and device, electronic device and storage medium
KR20160104946A (en) Appratus and Method for Evaluating Outlierenss
CN114926154B (en) Protection switching method and system for multi-scene data identification
CN116501531B (en) Software plug-in configuration method and system for monitoring software operation data security
CN104065537B (en) Using exterior measuring method, exterior trajectory measurement equipment management server and using outer examining system
CN108052405A (en) Method and device for checking spatial data
BR102021022728A2 (en) TOOL INTEGRITY DETECTION METHOD AND SYSTEM
CN113159971A (en) Information extraction method and device, electronic equipment and readable storage medium
CN107689846B (en) Method and system for detecting data errors
CN114116439A (en) Debugging information output method and device, software debugging equipment and storage medium
Gu et al. Probabilistic based corrosion assessment for pipeline integrity

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20180622

Assignee: SHENGLI OILFIELD VICTORY AUTOMATION DEVELOPMENT Co.,Ltd.

Assignor: Li Xining|Shi Yue

Contract record no.: X2021980004119

Denomination of invention: A coding method with check code

Granted publication date: 20210518

License type: Exclusive License

Record date: 20210528

EE01 Entry into force of recordation of patent licensing contract