CN105556903A - Method and device for assigning ordered numbers to mounted nodes on bus - Google Patents

Method and device for assigning ordered numbers to mounted nodes on bus Download PDF

Info

Publication number
CN105556903A
CN105556903A CN201480051299.1A CN201480051299A CN105556903A CN 105556903 A CN105556903 A CN 105556903A CN 201480051299 A CN201480051299 A CN 201480051299A CN 105556903 A CN105556903 A CN 105556903A
Authority
CN
China
Prior art keywords
node
carry
mark
order
carry node
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
CN201480051299.1A
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.)
Singularity Xinyuan International Technology Development Beijing Co ltd
Original Assignee
Singularity Xinyuan International Technology Development Beijing 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 Singularity Xinyuan International Technology Development Beijing Co ltd filed Critical Singularity Xinyuan International Technology Development Beijing Co ltd
Publication of CN105556903A publication Critical patent/CN105556903A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method and device for assigning ordered numbers to mounted nodes on a bus, applicable in a bus system. The method comprises: a control node acquires a first identity of each mounted node; the control node measures the distance between each mounted node and the control node on the basis of the first identity of each mounted node to acquire distance characteristic information of each mounted node; the control node assigns an ordered serial number to each mounted node on the basis of the distance characteristic information of each mounted node; and, the control node transmits the ordered serial number to a corresponding mounted node. The method and deice allows the control node to learn the order in which the mounted nodes are arranged on the bus, thus implementing individual communication between the control node and each mounted node.

Description

Method and device for assigning ordered numbers to mounted nodes on bus
The method and device that a kind of carry node distribution in bus is numbered in order
The present invention relates to the communications field, more particularly to the method and device that a kind of carry node distribution in bus is numbered in order for technical field.Background technology is in 485 bus systems, including control node and carry the carry node in bus, is communicated between control node and carry node by 485 buses.
In 485 bus systems, control node generally requires to understand carry node putting in order in bus, to understand the relative position between relative position and control node between carry node and carry node, so as to be preferably controlled to the carry node in bus;Moreover, in order to which each carry node with carry in bus is individually communicated, it is necessary to which control node obtains No. Sn of each carry node in bus first(That is sequence number), so as to control node be bus on each carry node distribution one in 485 bus systems unique identity recognition number(ID) so that whether the order that each carry node is issued using the identity recognition number identification control node of itself by bus belongs to itself, realizes the independent communication between control node.
At present, typically all artificially by No. Sn input control node of each carry node in 485 bus systems, but, do not know comprising how many carry nodes for one, do not know 485 bus systems of No. Sn of each carry node, control node can not know the information such as No. Sn of each carry node in bus, and then can not also know carry node putting in order in bus, it is impossible to individually communicated with each carry node.The content of the invention embodiment of the present invention provides the method and device that a kind of carry node distribution in bus is numbered in order, enables to control node to know carry node putting in order in bus, realizes that control node individually communicates with each carry node.
First aspect, a kind of method that carry node distribution in bus is numbered in order is provided, applied to bus system, the bus system includes control node and at least one carry node, and bus communication is passed through between the control node and the carry node;This method includes:
Control node obtains the first mark of each carry node;
Control node measures each carry node and control node respectively according to the first of each carry node the mark The distance between, obtain the distance feature information of each carry node;
Control node is each orderly sequence number of carry node distribution according to the distance feature information of each carry node;The orderly sequence number is sent to corresponding carry node by control node.
Alternatively, control node obtains the first mark of each carry node, including:
Control node sends and reports order, it is described to report order to be used to indicate that each carry node reports the first mark, it is described to report order to include reporting time delay generating algorithm mark, the reporting time delay generating algorithm identifies the reporting time delay generating algorithm used during for indicating that each carry node reports the first mark, so that each carry node determines itself to send the delay time of the first mark;
Control node receives the first mark of each carry node transmission;
Control node transmission confirms order, described to confirm that order includes reporting receive after order first to identify described in control node transmission, so that each carry node confirms whether control node receives the first mark of itself.
Alternatively, control node transmission is confirmed after ordering, in addition to:
Control node sends next round and reports order;The reporting time delay generating algorithm mark that adjacent two-wheeled reports order to include is different;
Control node receives the first mark for confirming that the carry node that not controlled node confirms is sent;Control node, which is sent, confirms order, described to confirm that what order included that control node sends the next round reports the first mark received after order.
Alternatively, control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node, including:
Control node identifies for each carry node distribution ranging, sends the corresponding relation between the first mark and ranging mark, is identified so that each carry node obtains the ranging of itself according to the itself first mark;
Control node obtains the distance feature information of each carry node using the distance between the measurement of ranging mark and each carry node.
Alternatively, control node obtains the distance feature information of each carry node using the distance between the measurement of ranging mark and each carry node, including:
For each carry node, control node sends ranging order, and the ranging order includes the ranging mark of the carry node;
Control node is determined from the time span for sending ranging order to the commands in return for receiving the carry node;Control node determines the distance feature information of the carry node according to the time span.
Alternatively, control node is obtained using the distance between the measurement of ranging mark and each carry node The distance feature information of each carry node, in addition to:
The step of control node repeats the N-1 transmission ranging order of execution, determines time span, obtains the corresponding N number of time span of each carry node;N is greater than the integer equal to 2;
Control node determines that the distance feature information of the carry node includes according to the time span:The control node carries out filtration treatment to obtained N number of time span;
The control node carries out statistical value calculating according to filter result, obtains the statistical value of time span, the statistical value of the time span is defined as to the distance feature information of the carry node.
Alternatively, the control node carries out filtration treatment to obtained N number of time span, including:For N number of time span, the control node removes the time span of time span and numerical value less than or equal to the second setting thresholding that wherein numerical value is more than or equal to the first setting thresholding, and the first setting thresholding is more than the second setting thresholding.
Alternatively, control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node, including:
Control node obtains the distance feature information of each carry node using the distance between the described first mark measurement and each carry node.
Alternatively, control node is each orderly sequence number of carry node distribution according to the distance feature information of each carry node, including:
Control node is ranked up according to preset order to the distance feature information of each carry node;Control node is followed successively by each orderly sequence number of carry node distribution according to the ranking results of the distance feature information of carry node.
Alternatively, the orderly sequence number is sent to corresponding carry node by control node, including:Control node sends sequence number transmitting order to lower levels, and the sequence number transmitting order to lower levels includes:First mark of each carry node and the in order corresponding relation of sequence number, so that each carry node obtains the corresponding orderly sequence number of the first mark according to the itself first mark.
Second aspect, applied to the control node in bus system, bus communication is passed through between the carry node in the control node and bus system there is provided the device that a kind of carry node distribution in bus is numbered in order;The device includes:
Acquiring unit, the first mark for obtaining each carry node;
Measuring unit, for measuring the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node;
Allocation unit, for being that each carry node distribution is orderly according to the distance feature information of each carry node Sequence number;
Transmitting element, for the orderly sequence number to be sent into corresponding carry node.
Alternatively, the acquiring unit specifically for:
Transmission reports order, it is described to report order to be used to indicate that each carry node reports the first mark, it is described to report order to include reporting time delay generating algorithm mark, the reporting time delay generating algorithm identifies the reporting time delay generating algorithm used during for indicating that each carry node reports the first mark, so that each carry node determines itself to send the delay time of the first mark;
Receive the first mark of each carry node transmission;
Transmission confirms order, described to confirm that order includes reporting receive after order first to identify described in control node transmission, so that each carry node confirms whether control node receives the first mark of itself.
Alternatively, the acquiring unit is additionally operable to:
Send after confirming to order, send next round reports order;The reporting time delay generating algorithm mark that adjacent two-wheeled reports order to include is different;Receive the first mark for confirming that the carry node that not controlled node confirms is sent;Send and confirm order, it is described to confirm that what order included that control node sends the next round reports the first mark received after order.
Alternatively, the measuring unit includes:
Subelement is distributed, for being identified for each carry node distribution ranging;
Transmission sub-unit, for sending the corresponding relation between the first mark and ranging mark, is identified so that each carry node obtains the ranging of itself according to the itself first mark;
Subelement is measured, for using the distance between the measurement of ranging mark and each carry node, obtaining the distance feature information of each carry node.
Alternatively, it is described measurement subelement specifically for:For each carry node, ranging order is sent, the ranging order includes the ranging mark of the carry node;It is determined that from transmission ranging order to the time span for the commands in return for receiving the carry node;The distance feature information of the carry node is determined according to the time span.
Alternatively, it is described measurement subelement also particularly useful for:The step of repeating the N-1 transmission ranging order of execution, determine time span, obtains the corresponding N number of time span of each carry node;N is greater than the integer equal to 2;Filtration treatment is carried out to obtained N number of time span;Statistical value calculating is carried out according to filter result, the statistical value of time span is obtained, the statistical value of the time span is defined as to the distance feature information of the carry node.
Alternatively, it is described measurement subelement also particularly useful for:For N number of time span, remove wherein The time span and numerical value that numerical value is more than or equal to the first setting thresholding are less than or equal to the second time span for setting thresholding, and the first setting thresholding is more than the second setting thresholding.
Alternatively, the measuring unit specifically for:
Using the distance between the described first mark measurement and each carry node, the distance feature information of each carry node is obtained.
Alternatively, the allocation unit specifically for:The distance feature information of each carry node is ranked up according to preset order;Ranking results according to the distance feature information of carry node are followed successively by each orderly sequence number of carry node distribution.
Alternatively, the transmitting element specifically for:Send sequence number transmitting order to lower levels, and the sequence number transmitting order to lower levels includes:First mark of each carry node and the in order corresponding relation of sequence number, so that each carry node obtains the corresponding orderly sequence number of the first mark according to the itself first mark.
In the embodiment of the present invention, control node obtains the first mark of each carry node;Control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node;Control node is each orderly sequence number of carry node distribution according to the distance feature information of each carry node;The orderly sequence number is sent to corresponding carry node by control node.So as to, control node obtains the first mark of each carry node, each carry node in bus system can be known, and then the distance between each carry node and control node are measured according to the first of each carry node the mark respectively, obtain the distance feature information of each carry node, it is each orderly sequence number of carry node distribution according to the distance feature information of each carry node, the orderly sequence number is sent to corresponding carry node, so as to which control node can know carry node putting in order in bus according to the orderly numbering of carry node, realize that control node individually communicates with each carry node.Brief description of the drawings is in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, the required accompanying drawing used in embodiment or description of the prior art will be briefly described below, apparently, drawings in the following description are only some embodiments of the present invention, for those of ordinary skill in the art, without having to pay creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is Application Scenarios-Example figure of the embodiment of the present invention;
Fig. 2 is that the embodiment of the present invention is the method first embodiment schematic diagram that the carry node distribution in bus is numbered in order;
Fig. 3 is that the embodiment of the present invention is the method second embodiment that the carry node distribution in bus is numbered in order Schematic diagram;
Fig. 4 is the implementation method example schematic of step 301 of the embodiment of the present invention;
Fig. 5 is the implementation example schematic of step 305 of the embodiment of the present invention;
Fig. 6 is that the embodiment of the present invention is the schematic device that the carry node distribution in bus is numbered in order.Embodiment will be illustrated to exemplary embodiment in detail here, and its example is illustrated in the accompanying drawings.In the following description when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the present invention.On the contrary, they are only the examples with consistent apparatus and method in terms of some be described in detail in such as appended claims, the present invention.
It is that the embodiment of the present invention is the method and device institute Application Scenarios-Example figure that the carry node distribution in bus is numbered in order referring to Fig. 1.It is can apply to as shown in figure 1, the embodiment of the present invention is the method and device that the carry node distribution in bus is numbered in order in bus system, bus system includes control node 110, at least one carry node 120 and bus 130;Wherein, communicated between control node 110 and each carry node 120 by bus 130, each equal carry of carry node 120 is in bus 130.
The bus system can be 485 bus systems.
It is that the method that the carry node distribution in bus is numbered in order is described in more detail to the embodiment of the present invention on the basis of above Sample Scenario.
Wherein, it is that the orderly numbering of carry node distribution refers to the numbering of put in order for each carry node distribution, unique mark each carry node of the control node according to carry node in bus in the embodiment of the present invention.The order of the orderly numbering of carry node puts in order corresponding with carry node in bus, can characterize between carry node and the relative position relation between control node and carry node;And the mailing address that the orderly numbering can be communicated as carry node with control node so that can individually it be communicated between control node and carry node.
It is that the embodiment of the present invention is the method first embodiment schematic diagram that the carry node distribution in bus is numbered in order, this method includes referring to Fig. 2:
Step 201:Control node obtains the first mark of each carry node;
Step 202:Control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node;
Step 203:Control node is each carry node distribution according to the distance feature information of each carry node Orderly sequence number;
Step 204:The orderly sequence number is sent to corresponding carry node by control node.
In the present embodiment, control node obtains the first mark of each carry node, so as to know each carry node in bus system, and then the distance between each carry node and control node are measured according to the first of each carry node the mark respectively, obtain the distance feature information of each carry node, it is each orderly sequence number of carry node distribution according to the distance feature information of each carry node, the orderly sequence number is sent to corresponding carry node, so as to which control node can know carry node putting in order in bus according to the orderly numbering of carry node, realize that control node individually communicates with each carry node.It is that the embodiment of the present invention is the method first embodiment schematic diagram that the carry node distribution in bus is numbered in order, this method includes referring to Fig. 3:
Step 301:Control node obtains the first mark of each carry node;
Wherein, implementing for this step will be described in detail in the method flow shown in Fig. 4, not repeat here.Wherein, the first mark of carry node can typically refer to carry node and dispatch from the factory or by user before use, being the information of the unique mark of the carry node distribution carry node, such as can be No. Sn of carry node.Described No. Sn can be typically 32 codings, the Sn differences of different carry nodes.In a kind of possible implementation, first mark such as No. Sn of each carry node can be pre-set in the Flash of the carry node, when carry node needs the first mark for obtaining itself, the first mark of body can be read from from the Flash of itself.
Pass through the execution of this step, can be in one not be known comprising how many carry nodes, does not know the bus system of any identification information such as No. Sn of each carry node, so that control node therein gets the information of all carry nodes in bus system, so as to provide basic data to the control of carry node in bus system for subsequent control node.
Step 302:Control node identifies for each carry node distribution ranging, obtains the corresponding relation between the first mark of carry node and ranging mark.
Wherein, control node for the ranging of each carry node distribution identify in bus system can the corresponding carry node of unique mark, coordinate to dispatch carry node and control node in ranging process and carry out ranging.This step is optional step, in actual applications, and control node can not also be carry node distribution ranging mark, and directly carry node is scheduled using the first mark in ranging process.
General, the first mark such as Sn general datas position of carry node is more, in ranging process directly using the bus resource shared by the corresponding carry node of the first mark scheduling, information transfer time relatively It is long, larger is influenceed on ranging efficiency.For this, in the embodiment of the present invention after the first mark of each carry node is got, can be accordingly the shorter ranging mark of each carry node distribution data bit, bus resource shared in ranging process, shortening information transfer time are reduced so as to relative, ranging efficiency is improved.
In a kind of possible implementation, the digit of ranging mark can be determined according to the quantity for the carry node for getting the first mark.
Step 303:Control node sends relation transmitting order to lower levels, and the relation transmitting order to lower levels includes:Corresponding relation between first mark and ranging mark;
Wherein, when step 301 is realized by the method shown in Fig. 4, step 302 can be performed before step 407, and the corresponding relation in this step between the first mark and ranging mark can be carried to be sent to each carry node in order is confirmed.
Step 304:Carry node receives the relation transmitting order to lower levels, and the ranging of itself is found from the corresponding relation according to the itself first mark identifies;
Assuming that the corresponding relation in relation transmitting order to lower levels is as shown in table 1 below:
Table 1
Shellfish 1 ", if the first of carry node is designated AAABBBCC2, the ranging that carry node can be obtained from the corresponding relation of table 1 is designated 12.
Step 305:Control node obtains the distance feature information of each carry node using the distance between the measurement of ranging mark and each carry node.
The distance feature information of carry node is used for the distance between characterization control node and the carry node, and the distance feature information can characterize the parameter of range information for distance value, information transfer time, ratio value etc..
Wherein, what the information transfer time can measure for control node sends information to the time span that the first carry node receives the information since control node, such as 4s, what can also be measured for control node sends information to the time span for receiving the first carry node feeding back information, such as 8s from control node to the first carry node;
Distance value can be the physical distance between control node and the first carry node, such as 50m;
The ratio value of the time span and the time span of the carry node farthest from control node of the current first carry node that ratio value can measure for control node, such as 5%, ratio value can also measure for control node Current first carry node time span and the time span of the carry node nearest from control node ratio value, such as 3, the embodiment of the present invention is not construed as limiting to this.
In the implementation method shown in Fig. 5, using the time span that information is transmitted between control node and carry node as distance feature information, Fig. 5 is referred to, is repeated no more here.
Step 306:Control node is ranked up according to preset order to the distance feature information of each carry node;Wherein, the preset order can be ascending order or descending etc., not limit here.
For example, in the embodiment shown in fig. 5, the distance feature information for obtaining each carry node as shown in table 2, then can carry out ascending sort to it and obtain ranking results shown in table 3.
Table 2
Step 307:Control node is followed successively by each orderly sequence number of carry node distribution according to the ranking results of the distance feature information of carry node.
The order of the orderly sequence number of carry node typically should be identical with the order of the distance feature information of carry node.Specifically, for the ranking results shown in table 3, it is assumed that natural number of the orderly serial number of distribution since 1, then the orderly sequence number result of distribution can be as shown in table 4:
Table 4
First mark distance feature orderly information sequence number of carry node
AAABBBCC1 500ms 1
AAABBBCC5 600ms 2 AAABBBCC3 701ms 3
AAABBBCC4 803ms 4
AAABBBCC2 906ms 5
In actual applications, control node is likely to occur to fail to get the situation of the distance feature information of carry node, for example assume the first carry node for being designated AAABBBCC3, control node fails to get the distance feature information of the carry node, its distance feature information in table 2 and table 3 is 0, so the embodiment of the present invention can ignore the carry node in sequence number orderly for carry node distribution.
But, if it is known that carry node is equidistantly distributed, in some cases, it can be by the distance feature information of known carry node to be inferred to the distance feature information for the carry node that control node is not got.Still by control node fail to get first be designated the distance feature information of AAABBBCC3 carry node exemplified by, if it is known that carry node is equidistantly distributed, so known distance feature information is respectively 500ms, 600ms, 803ms and 906ms, it is evident that being designated AAABBBCC5 carry node and first first is designated the carry node that there is failure between AAABBBCC4 carry node, then the first carry node for being designated AAABBBCC3 is obviously designated AAABBBCC5 carry node and first positioned at first and is designated between AAABBBCC4 carry node;In actual applications, this deduction can be taking human as completion, or the characteristic information that can also automatically be adjusted the distance by control node carries out condition judgment completion, implements step and repeats no more here.At this moment, the distance feature information for the carry node that AAABBBCC3 can be designated by first is according to the distance feature information supplement of deduction into corresponding relation, in sequence number orderly for carry node distribution, the carry node, which can be ignored, can not also ignore the carry node, and the present invention is not limited.
Step 308:Control node sends sequence number transmitting order to lower levels, and the sequence number transmitting order to lower levels includes:The first mark and the corresponding relation of orderly sequence number of each carry node.
Step 309:Carry node receives the sequence number transmitting order to lower levels, and the orderly sequence number of itself is obtained from the corresponding relation according to the itself first mark.
In the embodiment of the present invention shown in Fig. 3, control node is after the first mark of each carry node is got, for the relatively short ranging mark of each carry node distribution data bit, bus resource shared in ranging process, shortening information transfer time are reduced so as to relative, ranging efficiency is improved.Hereinafter, how the realization illustration that carry node first is identified is obtained for control node in step 301 by Fig. 4.Referring to Fig. 4, this method includes:
Step 401:Control node sends and reports order, described to report order to include:Reporting time delay generating algorithm is identified.Wherein, the reporting time delay generating algorithm is identified for indicating used in each carry node in bus Give the correct time and prolong generating algorithm.The reason for using reporting time delay generating algorithm is:When the digit of the first mark is more, if being directly used as delay time using the first mark, for example when the first of a certain carry node is designated the 10011000101111011001101010001011 of 32, if as delay time, it is then 2562562699ms, about more than 700 hour, it is clearly intolerable that this speed collects the first mark, therefore reporting time delay generating algorithm is used to such case embodiment of the present invention, the transforming numerical that digit is less than the first mark is changed out according to the first mark, to shorten the delay time of each carry node.For example, when the transforming numerical obtained after the first mark of a certain carry node is converted is 10010010, if delay time is 1 times of the transforming numerical, the delay time that the carry node sends the first mark will shorten to 146ms, belong to normal range (NR).
It is less for the first mark digit(Such as 8)Situation, value that also can be directly using the first mark, specifically can be depending on the digit situation according to the first mark as delay time.
Reporting time delay generating algorithm in the embodiment of the present invention can avoid reporting the algorithm of conflict for hash algorithm, setting digit Pseudo-Random Number, random back algorithm etc..
In a kind of possible implementation, so that reporting time delay generating algorithm is hash algorithm as an example, the mark of at least one hash algorithm and every kind of hash algorithm can be configured in control node and each carry node in advance, then control node directly just can indicate specific hash algorithm by reporting the hash algorithm in order to identify to each carry node in this step.Wherein, the hash algorithm mark can be made up of numeral, character etc., not limited here.For example, can be configured in control node and each carry node:Hash algorithm 1 is designated " 1 ", hash algorithms 2 are designated " 2 ", hash algorithm 3 is designated " 3 " etc., if then the hash algorithm for reporting order and including of this step is designated " 3 ", then it represents that control node indicates that each carry node in bus uses hash algorithm 3.
Wherein, reporting the hash algorithm indicated in order to identify can be determined by control node, specific determination method is not intended to limit, it for example can at random be determined by control node, or report the order identified during order according to hash algorithm to determine this hash algorithm mark for reporting order to include etc. for each send of certain order of hash algorithm flag.For example, it is assumed that the order of hash algorithm mark is:1st, 3,2, when control node first time transmission reports order, hash algorithm mark 1 can be included by reporting in order, control node second is sent when reporting order, and hash algorithm mark 3 can be included by reporting in order, and control node third time is sent when reporting order, hash algorithm mark 2 can be included by reporting in order, when the 4th transmission of control node reports order, hash algorithm mark 1 can be included by reporting in order, by that analogy.
It can be any carry node of the carry in bus to illustrate the carry node in the process step of each carry node side, step 402 step 405 below by way of step 402 step 405:
Step 402:Carry node reports order described in receiving, and reporting time delay generating algorithm mark is obtained from order is reported Know.
Step 403:Carry node obtains the first mark of itself, and identify indicated reporting time delay generating algorithm using the reporting time delay generating algorithm changes to the first mark, obtains transforming numerical;The digit of transforming numerical is less than the digit of the first mark;
Wherein, how carry node is specifically changed to the first mark using reporting time delay generating algorithm and is repeated no more here.
Wherein, if the first mark of carry node is pre-stored within the Flash of carry node, carry node can obtain the first mark of itself from the Flash of itself.
In a kind of possible implementation, first mark can be No. Sn of 32, and the transforming numerical can be the numerical value of 8.
Step 404:Carry node determines that carry node sends the delay time of the first mark according to the transforming numerical.In a kind of possible implementation, the preset multiple of the transforming numerical can be defined as the delay time by carry node.The preset multiple can be any number more than 0, can independently set in actual applications.
When preset multiple is 1, then the transforming numerical is directly defined as the delay time by carry node.Step 405:The first mark of itself is sent to the control node by carry node when timing to the delay time reporting order described in receiving.
Step 406:Control node receives the first mark of each carry node transmission.
Because each carry node carries out the conversion of the first mark using identical reporting time delay generating algorithm in the method shown in step 401 step 406, therefore the transforming numerical that it is converted to for the first different marks is it could also be possible that identical, at this moment transforming numerical identical two will send first to control node by bus simultaneously even more than carry node and identify, still there may be order collision, so that control node can not receive the first mark of these carry nodes transmission, therefore, the embodiment of the present invention can also further be sent by way of M (M^2) wheels report order the first mark and control node for confirming to receive in control node and solve the problem.Now, the embodiment of the present invention can also include:
Step 407:Control node is sent by bus confirms order, first mark for confirming to order each carry node for including receiving.
Step 408:Carry node receive it is described confirm order, judge it is described confirm whether include the first mark of itself in order, including when, if receive that the control node sends again reports order, itself first is not retransmited and is identified;When not including, if receiving the order that reports of the control node transmission again, the first mark of itself is sent to the control node by the carry node by bus.
The step 408 of above step 401 is that control node sends when reporting order of a wheel, and control node is hung with each Carry the process step between node.
Control node can also send the order that reports of the second wheel, now, and the process step between control node and each carry node may be referred to step 402 step 408, differ only in:1st, the reporting time delay generating algorithm mark for reporting order to include for the second wheel that control node is sent is best different from the reporting time delay generating algorithm for reporting order the to include mark of the first round;2nd, when reporting order of the second wheel is sent, the carry node interacted with control node is only to judge in the first round to confirm not include the carry node of the first mark of itself in order, judges to confirm that order includes the carry node that itself first identify and do not retransmit the first mark.
When reporting order of each wheel after the second wheel that control node is sent, the process step between control node and each carry node is repeated no more by that analogy.
In actual applications, M specific value can independently be set, and the present invention is not intended to limit.Preferably, the reporting time delay generating algorithm mark that the adjacent two-wheeled that the control node is sent reports order to include is different.
Handled more than, control node is that can get the first mark of each carry node.Hereinafter, the distance between measurement and each carry node are identified using ranging for control node in step 305 by Fig. 5, obtains the realization illustration of the distance feature information of each carry node.Referring to Fig. 5, show the ranging process between control node and some carry node, in actual applications, control node performs the ranging process shown in Fig. 5 with each carry node successively by ranging mark, that is, obtains the distance feature information of each carry node.As shown in figure 5, this method includes:
Step 501:Control node sends ranging order to carry node, and the ranging order includes the ranging mark of the carry node;
Step 502:Carry node is received after the ranging order, sends commands in return to control node immediately;Step 503:Control node receives the commands in return, it is determined that from ranging order is sent to the time span for receiving the commands in return.
Wherein, it when control node determines the time span in this step, can be realized, or can also be realized by way of metrical pulse quantity by way of timing.
Specifically, when being realized by way of timing, timer can be set in control node, the timing since the ranging order that control node is sent receives commands in return to control node and terminates timing.
When being realized by way of metrical pulse quantity, the pulse of a certain predeterminated frequency can be preset, the ranging order sent from control node is started counting up, receiving commands in return to control node terminates counting.
, can be by adjusting the frequency of pulse come the precision of correspondence adjustment time length under the mode of metrical pulse quantity, and then adjust the precision of distance feature information.Specifically, the frequency of pulse is higher, the precision of time span is higher, The precision of distance feature information is higher.
Step 504:Control node determines the distance feature information of the carry node according to the time span.
Wherein, the time span can directly be defined as the distance feature information of carry node by control node.In another implementation, control node can repeat n times step 501 step 503, obtain N number of time span of carry node.N is greater than the integer equal to 2.Wherein, the specific value of the N can independently be set in actual applications, be not intended to limit here.
Now, step 504 can include:
Control node carries out filtration treatment to obtained N number of time span;
Control node carries out statistics calculating according to filter result, obtains the statistical value of time span, the statistical value of the time span is defined as to the distance feature information of the carry node.
Alternatively, for N number of time span, control node can remove the time span of time span and numerical value less than or equal to the second setting thresholding that wherein numerical value is more than or equal to the first setting thresholding, so as to realize the filtration treatment, the first setting thresholding is more than the second setting thresholding.Wherein, the first setting thresholding is more than the second specific value for setting thresholding and can independently set in actual applications, does not limit here.
For example, it is assumed that N=5,5 time spans that control node is obtained are respectively: 508ms, 501ms, 498ms,
492ms and 501ms, first sets thresholding sets thresholding as 492ms as 508ms, second, shellfish lj, removes the time span that numerical value is less than or equal to 492ms more than or equal to 508ms and numerical value, completes filtration treatment, obtaining filter result is:501ms, 498ms standing grain mouthful 501ms.
Control node carries out statistics calculating according to filter result, obtains the statistical value of time span;
Statistics herein, which is calculated, can be that arithmetic mean is calculated, geometric average is calculated, calculation is calculated etc. according to weight coefficient.
Still by taking step 504 as an example, filter result is 501ms, 498ms and 501ms, if using arithmetic mean calculating herein, the average value for calculating time span is:(501+498+501 ) /3=500ms.
Handled more than, control node is that can obtain the distance feature information of each carry node.Referring to Fig. 6, it is the apparatus structure schematic diagram that the carry node distribution in bus is numbered in order for the embodiment of the present invention, pass through bus communication between carry node in the control node that the device can apply in bus system, the control node and bus system;The device 600 includes:
Acquiring unit 610, the first mark for obtaining each carry node;
Measuring unit 620, for measuring the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node; Allocation unit 630, for being each orderly sequence number of carry node distribution according to the distance feature information of each carry node;
Transmitting element 640, for the orderly sequence number to be sent into corresponding carry node.
Alternatively, the acquiring unit 610 specifically can be used for:
Transmission reports order, it is described to report order to be used to indicate that each carry node reports the first mark, it is described to report order to include reporting time delay generating algorithm mark, the reporting time delay generating algorithm identifies the reporting time delay generating algorithm used during for indicating that each carry node reports the first mark, so that each carry node determines itself to send the delay time of the first mark;
Receive the first mark of each carry node transmission;
Transmission confirms order, described to confirm that order includes reporting receive after order first to identify described in control node transmission, so that each carry node confirms whether control node receives the first mark of itself.
Alternatively, the acquiring unit 610 can also be specifically for:
Send after confirming to order, send next round reports order;The reporting time delay generating algorithm mark that adjacent two-wheeled reports order to include is different;Receive the first mark for confirming that the carry node that not controlled node confirms is sent;Send and confirm order, it is described to confirm that what order included that control node sends the next round reports the first mark received after order.
Alternatively, the measuring unit 620 can include:
Subelement is distributed, for being identified for each carry node distribution ranging;
Transmission sub-unit, for sending the corresponding relation between the first mark and ranging mark, is identified so that each carry node obtains the ranging of itself according to the itself first mark;
Subelement is measured, for using the distance between the measurement of ranging mark and each carry node, obtaining the distance feature information of each carry node.
Alternatively, the measurement subelement specifically can be used for:For each carry node, ranging order is sent, the ranging order includes the ranging mark of the carry node;It is determined that from transmission ranging order to the time span for the commands in return for receiving the carry node;The distance feature information of the carry node is determined according to the time span.
Alternatively, the measurement subelement can also be specifically for:The step of repeating the N-1 transmission ranging order of execution, determine time span, obtains the corresponding N number of time span of each carry node;N is greater than the integer equal to 2;Filtration treatment is carried out to obtained N number of time span;Statistical value calculating is carried out according to filter result, the statistical value of time span is obtained, the statistical value of the time span is defined as to the distance feature information of the carry node.
Alternatively, the measurement subelement can also be specifically for:For N number of time span, wherein the first maximum quantity time span of numerical value and the second minimum quantity time span of numerical value, first quantity are removed It is less than with the summation of the second quantity.
The measuring unit 620 specifically can be used for:Using the distance between the described first mark measurement and each carry node, the distance feature information of each carry node is obtained.
Alternatively, the allocation unit 630 specifically can be used for:The distance feature information of each carry node is ranked up according to preset order;Ranking results according to the distance feature information of carry node are followed successively by each orderly sequence number of carry node distribution.
Alternatively, the transmitting element specifically can be used for:Send sequence number transmitting order to lower levels, and the sequence number transmitting order to lower levels includes:First mark of each carry node and the in order corresponding relation of sequence number, so that each carry node obtains the corresponding orderly sequence number of the first mark according to the itself first mark.
In the present embodiment, the device obtains the first mark of each carry node, so as to know each carry node in bus system, and then the distance between each carry node and control node are measured according to the first of each carry node the mark respectively, obtain the distance feature information of each carry node, it is each orderly sequence number of carry node distribution according to the distance feature information of each carry node, the orderly sequence number is sent to corresponding carry node, so that control node can know carry node putting in order in bus according to the orderly numbering of carry node, realize the independent communication of control node and each carry node.Those skilled in the art can be understood that the technology in the embodiment of the present invention can add the mode of required general hardware platform to realize by software.Understood based on such, the part that technical scheme in the embodiment of the present invention substantially contributes to prior art in other words can be embodied in the form of software product, the computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to cause a computer equipment(Can be personal computer, server, or network equipment etc.)Perform the method described in some parts of each embodiment of the invention or embodiment.
Each embodiment in this specification is described by the way of progressive, and identical similar part is mutually referring to what each embodiment was stressed is the difference with other embodiment between each embodiment.For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The embodiments of the present invention described above are not intended to limit the scope of the present invention.Any modifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the scope of the protection.

Claims (19)

  1. ^ ^
    1st, a kind of method that carry node distribution in bus is numbered in order, it is characterized in that, applied to bus system, the bus system includes control node and at least one carry node, and bus communication is passed through between the control node and the carry node;This method includes:
    Control node obtains the first mark of each carry node;
    Control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node;
    Control node is each orderly sequence number of carry node distribution according to the distance feature information of each carry node;The orderly sequence number is sent to corresponding carry node by control node.
    2nd, according to the method described in claim 1, it is characterised in that control node obtain each carry node first mark, including:
    Control node sends and reports order, it is described to report order to be used to indicate that each carry node reports the first mark, it is described to report order to include reporting time delay generating algorithm mark, the reporting time delay generating algorithm identifies the reporting time delay generating algorithm used during for indicating that each carry node reports the first mark, so that each carry node determines itself to send the delay time of the first mark;
    Control node receives the first mark of each carry node transmission;
    Control node transmission confirms order, described to confirm that order includes reporting receive after order first to identify described in control node transmission, so that each carry node confirms whether control node receives the first mark of itself.
    3rd, method according to claim 2, it is characterised in that control node is sent after confirmation order, in addition to:
    Control node sends next round and reports order;The reporting time delay generating algorithm mark that adjacent two-wheeled reports order to include is different;
    Control node receives the first mark for confirming that the carry node that not controlled node confirms is sent;Control node, which is sent, confirms order, described to confirm that what order included that control node sends the next round reports the first mark received after order.
    4th, the method according to any one of claims 1 to 3, it is characterized in that, control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node, including:
    Control node identifies for each carry node distribution ranging, sends the corresponding relation between the first mark and ranging mark, is identified so that each carry node obtains the ranging of itself according to the itself first mark; Control node obtains the distance feature information of each carry node using the distance between the measurement of ranging mark and each carry node.
    5th, method according to claim 4, it is characterised in that control node obtains the distance feature information of each carry node using the distance between the measurement of ranging mark and each carry node, including:For each carry node, control node sends ranging order, and the ranging order includes the ranging mark of the carry node;
    Control node is determined from the time span for sending ranging order to the commands in return for receiving the carry node;
    Control node determines the distance feature information of the carry node according to the time span.
    6th, method according to claim 5, it is characterised in that control node obtains the distance feature information of each carry node using the distance between the measurement of ranging mark and each carry node, in addition to:The step of control node repeats the N-1 transmission ranging order of execution, determines time span, obtains the corresponding N number of time span of each carry node;N is greater than the integer equal to 2;
    Control node determines that the distance feature information of the carry node includes according to the time span:The control node carries out filtration treatment to obtained N number of time span;
    The control node carries out statistical value calculating according to filter result, obtains the statistical value of time span, the statistical value of the time span is defined as to the distance feature information of the carry node.
    7th, method according to claim 6, it is characterised in that the control node carries out filtration treatment to obtained N number of time span, including:
    For N number of time span, the control node removes the time span of time span and numerical value less than or equal to the second setting thresholding that wherein numerical value is more than or equal to the first setting thresholding, and the first setting thresholding is more than the second setting thresholding.
    8th, the method according to any one of claims 1 to 3, it is characterized in that, control node measures the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node, including:
    Control node obtains the distance feature information of each carry node using the distance between the described first mark measurement and each carry node.
    9th, the method according to any one of claim 1 to 8, it is characterised in that control node is each orderly sequence number of carry node distribution according to the distance feature information of each carry node, including:
    Control node is ranked up according to preset order to the distance feature information of each carry node;Control node is followed successively by each orderly sequence number of carry node distribution according to the ranking results of the distance feature information of carry node. 10th, the method according to any one of claim 1 to 9, it is characterised in that the orderly sequence number is sent to corresponding carry node by control node, including:
    Control node sends sequence number transmitting order to lower levels, and the sequence number transmitting order to lower levels includes:First mark of each carry node and the in order corresponding relation of sequence number, so that each carry node obtains the corresponding orderly sequence number of the first mark according to the itself first mark.
    11st, the device that a kind of carry node distribution in bus is numbered in order, it is characterised in that applied to the control node in bus system, bus communication is passed through between the carry node in the control node and bus system;The device includes:
    Acquiring unit, the first mark for obtaining each carry node;
    Measuring unit, for measuring the distance between each carry node and control node respectively according to the first of each carry node the mark, obtains the distance feature information of each carry node;
    Allocation unit, for being each orderly sequence number of carry node distribution according to the distance feature information of each carry node;
    Transmitting element, for the orderly sequence number to be sent into corresponding carry node.
    12nd, device according to claim 11, it is characterised in that the acquiring unit specifically for:Transmission reports order, it is described to report order to be used to indicate that each carry node reports the first mark, it is described to report order to include reporting time delay generating algorithm mark, the reporting time delay generating algorithm identifies the reporting time delay generating algorithm used during for indicating that each carry node reports the first mark, so that each carry node determines itself to send the delay time of the first mark;
    Receive the first mark of each carry node transmission;
    Transmission confirms order, described to confirm that order includes reporting receive after order first to identify described in control node transmission, so that each carry node confirms whether control node receives the first mark of itself.
    13rd, device according to claim 12, it is characterised in that the acquiring unit is additionally operable to:Send after confirming to order, send next round reports order;The reporting time delay generating algorithm mark that adjacent two-wheeled reports order to include is different;Receive the first mark for confirming that the carry node that not controlled node confirms is sent;Send and confirm order, it is described to confirm that what order included that control node sends the next round reports the first mark received after order.
    14th, the device according to any one of claim 11 to 13, it is characterised in that the measuring unit includes:
    Subelement is distributed, for being identified for each carry node distribution ranging;
    Transmission sub-unit, for sending the corresponding relation between the first mark and ranging mark, so as to each carry Node obtains the ranging of itself according to the itself first mark and identified;
    Subelement is measured, for using the distance between the measurement of ranging mark and each carry node, obtaining the distance feature information of each carry node.
    15th, device according to claim 14, it is characterised in that the measurement subelement specifically for:For each carry node, ranging order is sent, the ranging order includes the ranging mark of the carry node;It is determined that from transmission ranging order to the time span for the commands in return for receiving the carry node;The distance feature information of the carry node is determined according to the time span.
    16th, device according to claim 15, it is characterised in that the measurement subelement also particularly useful for:The step of repeating the N-1 transmission ranging order of execution, determine time span, obtains the corresponding N number of time span of each carry node;N is greater than the integer equal to 2;Filtration treatment is carried out to obtained N number of time span;Statistical value calculating is carried out according to filter result, the statistical value of time span is obtained, the statistical value of the time span is defined as to the distance feature information of the carry node.
    17th, device according to claim 16, it is characterised in that the measurement subelement also particularly useful for:For N number of time span, the time span of time span and numerical value less than or equal to the second setting thresholding that wherein numerical value is more than or equal to the first setting thresholding is removed, the first setting thresholding is more than the second setting thresholding.
    18th, the device according to any one of claim 11 to 13, it is characterised in that the measuring unit specifically for:
    Using the distance between the described first mark measurement and each carry node, the distance feature information of each carry node is obtained.
    19th, the device according to any one of claim 11 to 18, it is characterised in that the allocation unit specifically for:The distance feature information of each carry node is ranked up according to preset order;Ranking results according to the distance feature information of carry node are followed successively by each orderly sequence number of carry node distribution.
    20th, the device according to any one of claim 11 to 19, it is characterised in that the transmitting element specifically for:Send sequence number transmitting order to lower levels, and the sequence number transmitting order to lower levels includes:First mark of each carry node and the in order corresponding relation of sequence number, so that each carry node obtains the corresponding orderly sequence number of the first mark according to the itself first mark.
CN201480051299.1A 2014-06-20 2014-06-20 Method and device for assigning ordered numbers to mounted nodes on bus Pending CN105556903A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080411 WO2015192376A1 (en) 2014-06-20 2014-06-20 Method and device for assigning ordered numbers to mounted nodes on bus

Publications (1)

Publication Number Publication Date
CN105556903A true CN105556903A (en) 2016-05-04

Family

ID=54934728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201480051299.1A Pending CN105556903A (en) 2014-06-20 2014-06-20 Method and device for assigning ordered numbers to mounted nodes on bus

Country Status (2)

Country Link
CN (1) CN105556903A (en)
WO (1) WO2015192376A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1266574A (en) * 1997-08-05 2000-09-13 西门子公司 Method and bus system for automatic address allocation and communication station adaptable to the same
CN101631147A (en) * 2009-08-07 2010-01-20 华为技术有限公司 Method for distributing serial bus slave node address, electronic device and electronic system
US20120271924A1 (en) * 2011-04-19 2012-10-25 Spitaels James S System and method for automatically addressing devices in a multi-drop network
CN202583451U (en) * 2012-05-03 2012-12-05 中国矿业大学(北京) Downhole electromagnetic wave ultrasound union positioning system
CN102868751A (en) * 2012-09-24 2013-01-09 中国矿业大学(北京) Underground target positioning system and method based on distance restriction
CN103826252A (en) * 2014-01-16 2014-05-28 京信通信系统(中国)有限公司 Method of acquiring and sending sequence numbers among main and slave devices and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202870292U (en) * 2012-07-09 2013-04-10 中国矿业大学(北京) Distance-constraint-based electromagnetic and ultrasound wave combined positioning system for down holes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1266574A (en) * 1997-08-05 2000-09-13 西门子公司 Method and bus system for automatic address allocation and communication station adaptable to the same
CN101631147A (en) * 2009-08-07 2010-01-20 华为技术有限公司 Method for distributing serial bus slave node address, electronic device and electronic system
US20120271924A1 (en) * 2011-04-19 2012-10-25 Spitaels James S System and method for automatically addressing devices in a multi-drop network
CN202583451U (en) * 2012-05-03 2012-12-05 中国矿业大学(北京) Downhole electromagnetic wave ultrasound union positioning system
CN102868751A (en) * 2012-09-24 2013-01-09 中国矿业大学(北京) Underground target positioning system and method based on distance restriction
CN103826252A (en) * 2014-01-16 2014-05-28 京信通信系统(中国)有限公司 Method of acquiring and sending sequence numbers among main and slave devices and system

Also Published As

Publication number Publication date
WO2015192376A1 (en) 2015-12-23

Similar Documents

Publication Publication Date Title
CN103369041B (en) Resource allocation methods and device based on cloud computing
CN1153413C (en) Determistic serial bus communication sytsem with 'controller area (CAN)' protocol
CN102017534B (en) Deterministic back-off-method and apparatus for peer-to-peer communications
JP2020519036A5 (en)
CN103188279B (en) By the method and apparatus that peer-to-peer network downloads file from multiple neighbor nodes
CN104486407B (en) The generation method and device of numbering
CN104516851B (en) A kind of system and method for RS485 slave units address distribution
CN104794079B (en) The method, apparatus and system of a kind of bus arbitration
CN106790332B (en) Resource scheduling method, system and main node
CN103646301A (en) Batch dispatching system and method for furnace tube device
CN100593312C (en) Scheduling using quantum and deficit values
CN116319683A (en) Method, system and device for distributing networking address and electronic equipment
CN109861791B (en) Periodic data message transmission method, system, device and storage medium
CN105721612A (en) Data transmission method and device
CN109373521B (en) Communication method and device of air conditioner, outdoor unit, indoor unit and air conditioner
CN104320382A (en) Distributive real-time stream processing device, method and unit
CN105556903A (en) Method and device for assigning ordered numbers to mounted nodes on bus
CN105045224B (en) The method and apparatus of data transfer
CN104158860A (en) Job scheduling method and job scheduling system
CN110968022B (en) Programmable logic controller, programmable logic controller system, and control method
CN114285541A (en) Time-triggered Ethernet schedule generation method based on time delay error
CN111614534A (en) Communication method and device and electronic equipment
CN108881514B (en) Address allocation method of bus system, communication equipment and bus system
CN114830609A (en) Scheduling transmissions over a telecommunications network
CN100530011C (en) Automatic connection system of multiple machine station and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160504

RJ01 Rejection of invention patent application after publication