CN106790760A - Automatic coding system and method - Google Patents

Automatic coding system and method Download PDF

Info

Publication number
CN106790760A
CN106790760A CN201611263755.6A CN201611263755A CN106790760A CN 106790760 A CN106790760 A CN 106790760A CN 201611263755 A CN201611263755 A CN 201611263755A CN 106790760 A CN106790760 A CN 106790760A
Authority
CN
China
Prior art keywords
main frame
coding
code
terminating
terminating machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611263755.6A
Other languages
Chinese (zh)
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.)
Guangzhou Baolun Electronics Co Ltd
Original Assignee
Guangzhou Baolun Electronics 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 Guangzhou Baolun Electronics Co Ltd filed Critical Guangzhou Baolun Electronics Co Ltd
Priority to CN201611263755.6A priority Critical patent/CN106790760A/en
Publication of CN106790760A publication Critical patent/CN106790760A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses automatic coding system phase method, system includes main frame and terminal unit, and the terminal unit includes several terminating machines, all terminating machines with main frame connection communication;The main frame is used to obtain a series of code clerks according to coding sum and start code number, and sends a code clerk to all terminating machines in order;The terminating machine receiving and predictive encoding signal to main frame sent when reach after code clerk Preset Time, the corresponding terminating machine of first predictive encoding signal that main frame will be received is bound with the code clerk.The present invention realizes issuing code clerk, and the automatic number of robbing of terminating machine in order automatically by main frame, and without manual intervention, it is not easy to malfunction, code efficiency is high.

Description

Automatic coding system and method
Technical field
The present invention relates to coding techniques field, more particularly to automatic coding system and method.
Background technology
In a system for multiple terminals, particularly conference system, during main frame and terminal communication, main frame needs The communication code of each terminal is known, to distinguish different terminals.In this system, the coding of each terminal must be unique , can otherwise cause main frame and terminal communication chaotic.Because machine is batch production, software code used is also the same , so the default code that software inhouse coding when dispatching from the factory is just as, this is accomplished by once being compiled when system is built Code.
Existing coding method is hand-coding, and initiation command is issued by main frame, and issues current coding, acquiescence be from 1 starts, and main frame issues coding 1 to all terminals, and engineering staff presses a wherein station terminal machine and decides on a verdict really part, will this end The coding settings at end are 1, and it is automatic on issue a command to main frame, represent that current coding has been used, main frame is sent out in order automatically Next coding.When terminal quantity reaches hundreds of even thousands of, coding needs to spend a hour, or even more generation Easily malfunctioned in boundary, and cataloged procedure, cause to be frequently necessary to encode repeatedly.
The content of the invention
In order to overcome the deficiencies in the prior art, an object of the present invention is to provide automatic coding system, and it can replace H coding operates, and realizes autocoding.
The second object of the present invention is to provide automatic coding, and it can replace h coding to operate, and realizes automatic volume Code.
An object of the present invention is realized using following technical scheme:
Automatic coding system, including main frame and terminal unit, the terminal unit include several terminating machines, all terminals Machine with main frame connection communication;The main frame is used to obtain a series of code clerks according to coding sum and start code number, and presses Order sends a code clerk to all terminating machines;The terminating machine being received to be sent when reach Preset Time after code clerk and delimited the organizational structure in advance Code signal makes the corresponding terminating machine of first predictive encoding signal that main frame will be received be bound with the code clerk to main frame.
Preferably, automatic coding system, it is characterised in that including main frame and terminal unit, if the terminal unit includes A dry terminating machine, all terminating machines with main frame connection communication;The main frame is used to be obtained according to coding sum and start code number A series of code clerks are taken, and sends a code clerk to all terminating machines in order;The terminating machine reaches after receiving code clerk Predictive encoding signal is sent during Preset Time to main frame, makes the corresponding terminal of first predictive encoding signal that main frame will be received Machine is bound with the code clerk.
Preferably, the code clerk is No. ID.
The second object of the present invention is realized using following technical scheme:
Automatic coding, is applied to the described automatic coding system of one of the object of the invention, comprises the following steps:
S1:Main frame receives the coding sum and start code number of user input, and according to coding sum and start code Number a series of code clerks are obtained automatically;
S2:Main frame sends coded command to each terminating machine, terminating machine is entered state to be encoded;
S3:Main frame sends a code clerk to all terminating machines since start code, in order, and it is to work as to define the code clerk Preceding code clerk;
S4:Terminating machine receives present encoding number and sends predictive encoding signal to main frame after reaching Preset Time;It is described Predictive encoding signal includes the corresponding unique identifiers of MCU in the terminating machine;
S5:When main frame receives first predictive encoding signal, by present encoding number with send the predictive encoding signal Terminating machine is bound, and sends the predetermined pass signal of coding to all terminating machines, and the predetermined pass signal of coding includes and tied up The corresponding unique identifiers of MCU in fixed terminating machine.
Preferably, performed after S5, also comprised the following steps:
S6:After terminating machine receives the predetermined pass signal of coding, the unique identifier in the predetermined pass signal of coding is judged Whether unique identifier corresponding with the MCU of itself is identical, if so, the current code clerk is then set to the machine code clerk, and Into coding success status, otherwise, state to be encoded is reentered.
Preferably, in S6, after present encoding number is set into the machine code clerk, terminating machine also sends robs yard pass signal extremely Main frame.
Preferably, performed after S6, also comprised the following steps:
S7:Main frame according to receive the number of times of robbing yard pass signal judge the successful terminating machine quantity of coding whether with coding Sum is identical, if so, terminating coding, otherwise, returns to S3, and the code clerk that will be arranged in the latter position of present encoding number is worked as new Preceding code clerk is sent to all terminating machines.
Preferably, " terminating machine receives present encoding number and sends predictive encoding signal extremely after reaching Preset Time in S4 Main frame " is specially:After terminating machine receives present encoding number, automatically generate a random number, and with the random number be default Time starts timing, and predictive encoding signal to main frame is sent after reaching Preset Time.
Preferably, the code clerk is No. ID.
Compared to existing technology, the beneficial effects of the present invention are:
The present invention realizes issuing code clerk, and the automatic number of robbing of terminating machine in order automatically by main frame, without manual intervention, Do not allow error-prone, code efficiency is high.
Brief description of the drawings
Fig. 1 is the structure chart of automatic coding system of the invention;
Fig. 2 is the flow chart of automatic coding of the invention.
Specific embodiment
Below, with reference to accompanying drawing and specific embodiment, the present invention is described further:
Referring to Fig. 1, the present invention provides automatic coding system, and it includes main frame and terminal unit, and the terminal unit includes Several terminating machines, terminating machine with main frame connection communication.The other present invention can also include interchanger, and terminating machine is by handing over Change planes and interconnected with main frame.Interchanger can be for one group or multigroup, if interchanger is two groups, can also divide all terminating machines It it is two groups, one group of terminating machine is connected by one group of interchanger with main frame, and another group of terminating machine is by another group of interchanger and main frame Connection.
In the present invention, the effect of main frame is to obtain a series of code clerks according to coding sum and start code number, and is pressed Order sends a code clerk to all terminating machines;And terminating machine receiving send predictive encoding when reach Preset Time after code clerk Signal makes the corresponding terminating machine of first predictive encoding signal that main frame will be received be bound with the code clerk to main frame.Terminal The Preset Time of machine is to automatically generate a random number after basis receives coding, and random number here is according in terminating machine The existing C language for prestoring is produced from tape function, the RAND functions that the present invention is used, and can randomly generate the number in the range of 1 to N Value, N is self-defined numeral.Each terminating machine produce random number it is different, according to this random number as it is default when Between.There is the function of starting autocoding in main frame, coding sum and start code number have staff to be input into, Zhi Houqi Dynamic autocoding function, whole process main frame and terminating machine are constantly communicated and are completed coding together.
Code clerk of the present invention is preferably No. ID, using No. ID in the form of as each terminating machine unique mark.
Still further aspect, the present invention also provides the automatic coding based on automatic coding system, referring to Fig. 2, including such as Lower step:
S1:Main frame receives the coding sum and start code number of user input, and according to coding sum and start code Number a series of code clerks are obtained automatically;
Coding sum and start code number are artificial settings and are input into that it is 100 for example to encode sum, and start code number sets It is 1, then the coding configuration processor in main frame obtains code clerk 1,2,3 ... 100 automatically;
S2:Main frame sends coded command to each terminating machine, terminating machine is entered state to be encoded;
Main frame finishes the number of finishing afterwards, then start to perform encoding act, and coded command is issued first, notifies that each terminating machine enters Enter state;
S3:Main frame sends a code clerk to all terminating machines since start code, in order, and it is to work as to define the code clerk Preceding code clerk;
In S3, main frame issues code clerk to terminating machine after starting coding, is issued one by one in order since start code, A code clerk is often issued, then performs follow-up step, after the coding for being issued is bound with terminating machine, just issued next Code clerk.For example, issuing code clerk 1 first, after code clerk 1 is obtained by some terminating machine, just may proceed to issue code clerk 2, rather than disposably all code clerks are sent together;
S4:Terminating machine receives present encoding number and sends predictive encoding signal to main frame after reaching Preset Time;It is described Predictive encoding signal includes the corresponding unique identifiers of MCU in the terminating machine;
In this step, Preset Time is produced by terminating machine, automatic raw after specifically terminating machine receives present encoding number Into a random number, and start timing by Preset Time of the random number, predictive encoding signal is sent after reaching Preset Time To main frame.Random number produced by each terminating machine is different, so that the Preset Time of each terminating machine is different, if Random number produced by terminating machine A is 1, and the random number that terminating machine B is produced is 2, that is, show terminating machine A it is default when Between it is shorter, faster send predictive encoding signal to main frame;Random number can be automatically generated by existing function, and terminating machine can not Itself is to producing that what random number is controlled;
S5:When main frame receives first predictive encoding signal, by present encoding number with send the predictive encoding signal Terminating machine is bound, and sends the predetermined pass signal of coding to all terminating machines, and the predetermined pass signal of coding includes and tied up The corresponding unique identifiers of MCU in fixed terminating machine;
When having performed S5, actually there is terminating machine to get present encoding number, completed the binding of coding, performed one The process of secondary coding.
S6:After terminating machine receives the predetermined pass signal of coding, the unique identifier in the predetermined pass signal of coding is judged Whether unique identifier corresponding with the MCU of itself is identical, if so, the current code clerk is then set to the machine code clerk, and Into coding success status, otherwise, state to be encoded is reentered;
S6 is further Optimized Coding Based process on the basis of being encoded based on completion.By S6, coding error can be reduced Rate, improves accuracy rate.All include MCU and memory in terminating machine itself, the present encoding number storage that terminating machine will be bound exists In memory.For example, terminating machine A and present encoding binding success, present encoding number is assumed to be 1, and the MCU of terminating machine A is only One identification code is a, and terminating machine A judges whether the unique identifier in the predetermined pass signal of coding from main frame is a, if so, Present encoding number is then set to the machine code clerk, is preserved in memory, if it is not, just resume waiting for entering compile next time Code.
In S6, after present encoding number is set into the machine code clerk, S7 is performed:Terminating machine sends and robs yard pass signal extremely Main frame, to inform main frame result, facilitates the statistics that main frame is follow-up.Get the terminating machine of coding will be no longer participate in it is follow-up encoded Journey.
S8:Main frame according to receive the number of times of robbing yard pass signal judge the successful terminating machine quantity of coding whether with coding Sum is identical, if so, terminating coding, otherwise, returns to S3, and the code clerk that will be arranged in the latter position of present encoding number is worked as new Preceding code clerk is sent to all terminating machines.
For example, rob a yard pass signal receiving only 10 times, illustrate that only 10 terminating machines are and coding binding success, vacation It is 100 such as to encode sum, illustrates to also need to re-encoding 90 times, and execution receives 100 times and robs a yard pass signal, illustrates 100 terminals Machine has all been encoded successfully.
It will be apparent to those skilled in the art that technical scheme that can be as described above and design, make other various It is corresponding to change and deformation, and all these change and deformation should all belong to the protection domain of the claims in the present invention Within.

Claims (9)

1. automatic coding system, it is characterised in that including main frame and terminal unit, the terminal unit includes several terminals Machine, all terminating machines with main frame connection communication;The main frame is used to obtain a series of according to coding sum and start code number Code clerk, and a code clerk to all terminating machines is sent in order;The terminating machine reaches Preset Time after receiving code clerk When send predictive encoding signal to main frame, make the corresponding terminating machine of first predictive encoding signal that main frame will be received with the volume Code number binding.
2. automatic coding system as claimed in claim 1, it is characterised in that also including interchanger, all terminating machines pass through Interchanger and main frame connection communication.
3. automatic coding system as claimed in claim 1, it is characterised in that the code clerk is No. ID.
4. automatic coding, it is characterised in that be applied to the automatic coding system described in claim 1, comprise the following steps:
S1:The coding sum and start code number of main frame reception user input, and according to coding sum and start code number certainly It is dynamic to obtain a series of code clerks;
S2:Main frame sends coded command to each terminating machine, terminating machine is entered state to be encoded;
S3:Main frame sends a code clerk to all terminating machines since start code, in order, and it is current volume to define the code clerk Code number;
S4:Terminating machine receives present encoding number and sends predictive encoding signal to main frame after reaching Preset Time;It is described predetermined Encoded signal includes the corresponding unique identifiers of MCU in the terminating machine;
S5:When main frame receives first predictive encoding signal, by present encoding number and the terminal for sending the predictive encoding signal Machine is bound, and sends the predetermined pass signal of coding to all terminating machines, the predetermined pass signal of coding include with it is bound The corresponding unique identifiers of MCU in terminating machine.
5. automatic coding as claimed in claim 4, it is characterised in that performed after S5, also comprised the following steps:
S6:After terminating machine receives the predetermined pass signal of coding, whether judge to encode unique identifier in predetermined pass signal Unique identifier corresponding with the MCU of itself is identical, if so, the current code clerk then is set into the machine code clerk, and enters Coding success status, otherwise, reenter state to be encoded.
6. automatic coding as claimed in claim 5, it is characterised in that in S6, is set to present encoding number the machine and compiles After code number, terminating machine also sends robs yard pass signal to main frame.
7. automatic coding as claimed in claim 6, it is characterised in that performed after S6, also comprised the following steps:
S7:Main frame according to receive the number of times of robbing yard pass signal judge the successful terminating machine quantity of coding whether with coding sum It is identical, if so, terminating coding, otherwise, S3 is returned to, the code clerk of the latter position of present encoding number as new current volume will be arranged in Code number is sent to all terminating machines.
8. automatic coding as claimed in claim 4, it is characterised in that " terminating machine receives present encoding number simultaneously in S4 Predictive encoding signal to main frame is sent after reaching Preset Time " it is specially:After terminating machine receives present encoding number, automatically generate One random number, and start timing by Preset Time of the random number, send predictive encoding signal extremely after reaching Preset Time Main frame.
9. automatic coding as claimed in claim 4, it is characterised in that the code clerk is No. ID.
CN201611263755.6A 2016-12-30 2016-12-30 Automatic coding system and method Pending CN106790760A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611263755.6A CN106790760A (en) 2016-12-30 2016-12-30 Automatic coding system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611263755.6A CN106790760A (en) 2016-12-30 2016-12-30 Automatic coding system and method

Publications (1)

Publication Number Publication Date
CN106790760A true CN106790760A (en) 2017-05-31

Family

ID=58951390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611263755.6A Pending CN106790760A (en) 2016-12-30 2016-12-30 Automatic coding system and method

Country Status (1)

Country Link
CN (1) CN106790760A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2237531A1 (en) * 2009-03-31 2010-10-06 Sony Corporation Network comprising a plurality of devices and root device and method for assigning a network address
CN101981901A (en) * 2008-04-04 2011-02-23 宗拓贝尔照明器材有限公司 Automatic bus address assignment using collision testing
CN104348922A (en) * 2013-07-26 2015-02-11 海尔集团公司 Address competition method of line control node and circuit thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101981901A (en) * 2008-04-04 2011-02-23 宗拓贝尔照明器材有限公司 Automatic bus address assignment using collision testing
EP2237531A1 (en) * 2009-03-31 2010-10-06 Sony Corporation Network comprising a plurality of devices and root device and method for assigning a network address
CN104348922A (en) * 2013-07-26 2015-02-11 海尔集团公司 Address competition method of line control node and circuit thereof

Similar Documents

Publication Publication Date Title
CN104950823A (en) Method for realizing scene control of a plurality of sets of wireless controlled equipment
CN105812504B (en) A kind of intelligent mailing address coding method
CN110912923B (en) Self-adaptation method, self-adaptation unit and system for communication protocol of power distribution internet of things
CN107770826A (en) A kind of network section system of selection and relevant device
CN114328256A (en) Test method, test device, computer-readable storage medium and electronic equipment
CN108462621B (en) Method for communication equipment address allocation and equipment quantity statistics
CN106155954B (en) System and method for module identification and automatic communication port allocation
CN109714757A (en) A kind of shared method and device for preparing eSIM card
CN106790760A (en) Automatic coding system and method
CN104954214A (en) Method and system for improving RS485 communication extensibility
CN109217901A (en) Electric line communication system and network-building method
CN110958139B (en) Network control method, orchestrator, controller, and computer-readable storage medium
WO2010145386A1 (en) File transfer protocol client and implementing method thereof
CN103810103A (en) Method and system for debugging electronic device
CN109040335B (en) Coding system and method for solar module
CN108881347A (en) Concurrent full-automatic wireless network-building method and system for multinode things system
CN109245934B (en) Fault processing method, device, system, control equipment and management equipment
CN106657264A (en) Distributed system and data synchronization method thereof
CN102279824A (en) Input interface expanding circuit and control device
CN105100966B (en) A kind of calling system ID distribution methods and device
CN107231347B (en) A kind of method and system of data streaming services
CN110639819A (en) Control method of linear sorting machine
EP0108244B1 (en) Ripple control receiver
CN103596291B (en) A kind of method using mobile terminal to carry out bluetooth group and device thereof
CN109521709A (en) A kind of optional control method of multiplexer (MUX

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531