CN102572968B - A kind of method and device of multichannel switching - Google Patents

A kind of method and device of multichannel switching Download PDF

Info

Publication number
CN102572968B
CN102572968B CN201010610141.7A CN201010610141A CN102572968B CN 102572968 B CN102572968 B CN 102572968B CN 201010610141 A CN201010610141 A CN 201010610141A CN 102572968 B CN102572968 B CN 102572968B
Authority
CN
China
Prior art keywords
transmission
channel grade
data
module
channel
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.)
Expired - Fee Related
Application number
CN201010610141.7A
Other languages
Chinese (zh)
Other versions
CN102572968A (en
Inventor
于兴晗
侯煜
盖优普
安波
郭易
陆玉忠
胡宇峰
李琳
徐海卿
马岚
李长江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING IWHR TECHNOLOGY Co Ltd
China Three Gorges Corp
China Institute of Water Resources and Hydropower Research
Original Assignee
BEIJING IWHR TECHNOLOGY Co Ltd
China Three Gorges Corp
China Institute of Water Resources and Hydropower Research
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 BEIJING IWHR TECHNOLOGY Co Ltd, China Three Gorges Corp, China Institute of Water Resources and Hydropower Research filed Critical BEIJING IWHR TECHNOLOGY Co Ltd
Priority to CN201010610141.7A priority Critical patent/CN102572968B/en
Publication of CN102572968A publication Critical patent/CN102572968A/en
Application granted granted Critical
Publication of CN102572968B publication Critical patent/CN102572968B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses the method and device of a kind of multichannel switching.Described method includes: corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, determines the channel grade corresponding with the port device of carrying data transmission task;When the described channel grade determined meets and sends channel grade condition, start described port device and carry out the transmission of data.The present invention can realize channel switching easily, can overcome again many defects of prior art simultaneously.

Description

A kind of method and device of multichannel switching
Technical field
The present invention relates to communication technique field, particularly relate to the method and device of a kind of multichannel switching.
Background technology
At present, traditional unmanned detection equipment is generally of two channels, i.e. main channel and alternate channel.In the case of main channel sends data failure, start alternate channel and send data to ensure the unimpeded rate of data.
Generally, existing structure disclosure satisfy that general data acquisition request.But, along with communication apparatus continuous renewal regenerate, and mechanics of communication make rapid progress, the drawback of existing structure is more and more obvious.Specifically,
One, software architecture is single.The software design major part of traditional unmanned detection equipment all uses the design of one way sequence multipaths, the collection of data, storage, data encoding, communication and all realizations in a program with user interaction flow.When changing workflow, communication apparatus or communications protocol, need from the beginning to develop.
Its two, equipment is difficult to update.When changing hardware device, all programs are required for again developing.
Its three, logical judgment is complicated, and code utilization rate is low.Owing to device therefor workflow will use code to be implemented separately, therefore logical judgment code is required for again writing.
Its four, system is difficult to integrated.The system integration every time, developer must grasp the workflow of whole system software completely, is familiar with development language and the development environment used.
Therefore, from the foregoing, prior art exists many drawbacks, industry is badly in need of a kind of novel multichannel handoff technique flexibly of exploitation, to overcome the deficiencies in the prior art.
Summary of the invention
The technical problem to be solved in the present invention is the method and device providing a kind of novel multichannel to switch, it is possible to realizes channel switching easily, can overcome again many defects of above-mentioned prior art simultaneously.
For solving above-mentioned technical problem, the invention provides techniques below scheme:
A kind of method of multichannel switching, including:
Corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, determines the channel grade corresponding with the port device of carrying data transmission task;
When the described channel grade determined meets and sends channel grade condition, start described port device and carry out the transmission of data.
Preferably, the described corresponding relation that channel grade and actual communication apparatus order of transmission are set particularly as follows:
Channel grade variable is increased when data store to store the channel grade of corresponding ports by the port of practical communication equipment is arranged.
Preferably, described channel grade includes with the corresponding relation of actual communication apparatus order of transmission:
Channel grade is the highest, and corresponding actual communication apparatus order of transmission is the lowest.
Preferably, described corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, also include before determining the step of the channel grade corresponding with the port device of carrying data transmission task:
When each run starts, gather and store the corresponding relation pre-set;
Judge whether data meet the condition uploaded, and when described condition meets, start data and send task.
Preferably, described method also includes:
When data send successfully, exit transmission process;When data send unsuccessfully, send process automatically into the next one.
Meanwhile, the present invention also provides for the device of a kind of multichannel switching, including:
Module is set, for arranging the corresponding relation of channel grade and actual communication apparatus order of transmission;
Determine module, for arranging, based on described, the corresponding relation that module pre-sets, determine the channel grade corresponding with the port device of carrying data transmission task;
Start module, for when the described channel grade determining that module determines meets and sends channel grade condition, starting described port device and carry out the transmission of data.
Preferably, the described module that arranges increases channel grade variable to store the channel grade of corresponding ports particular by arranging the port of practical communication equipment when data store.
Preferably, in the corresponding relation of the described channel grade arranging module setting and actual communication apparatus order of transmission: channel grade is the highest, corresponding actual communication apparatus order of transmission is the lowest.
Preferably, described device also includes:
Acquisition module, when described device each run starts, gathers and stores and described arrange the corresponding relation that module pre-sets;
Judge module, for judging whether data meet the condition uploaded, and when described condition meets, triggers the described transmission determining that module and startup module realize data.
Preferably, described startup module is additionally operable to, when data send successfully, exit transmission process;When data send unsuccessfully, send process automatically into the next one.
Compared with prior art, the method and device of the novel multichannel switching that the present invention provides, it is possible to realize channel switching easily, many defects of above-mentioned prior art can be overcome again simultaneously.Specifically,
One, uses two process multithreading, module laminate structure.According to the workflow of system, the operation principle of equipment, and the logic realization of channel switching, whole system is divided into the module laminate structure of two process multithreading.
Its two, equipment is easily updated.What the hardware device that the present invention uses was taked is module laminate structure, more has only to during exchange device update corresponding dynamic link library.
Its three, logical judgment is simple.Logical judgment code is single, uses through abstract logical judgment process encoding, and the addition of other hardware actions is realized by dynamic link library.
Its four, system is easily integrated.During the system integration, it is only necessary to developer is familiar with the instruction of relevant device.
Its five, versatility.The technical scheme that having certain versatility, the i.e. present invention in embedded software developing provides can use in other embedded software developings.
Below in conjunction with the drawings and specific embodiments, technical scheme is described in detail, so that the characteristic of the present invention and advantage become apparent from.
Accompanying drawing explanation
Fig. 1 show the schematic flow sheet of the multichannel changing method provided according to embodiments of the present invention;
Fig. 2 show the workflow schematic diagram of the multichannel switching provided according to embodiments of the present invention;
Fig. 3 show the structural representation of the multichannel switching device provided according to embodiments of the present invention;
Fig. 4 show another structural representation of the multichannel switching device provided according to embodiments of the present invention;
Fig. 5 show the three-decker schematic diagram that the multichannel handoff technique provided according to embodiments of the present invention is used;
What Fig. 6 showed Fig. 5 starts user setup interface schematic diagram corresponding to layer;
Fig. 7 show the User Interface schematic diagram that the intermediate layer of Fig. 5 is corresponding.
Detailed description of the invention
Hereinafter embodiments of the invention will be provided detailed description.Although the present invention will be illustrated in conjunction with some detailed description of the invention and illustrate, but it should be noted that the present invention is not merely confined to these embodiments.On the contrary, the amendment carrying out the present invention or equivalent, all should contain in the middle of scope of the presently claimed invention.
It addition, in order to better illustrate the present invention, detailed description of the invention below gives numerous details.It will be understood by those skilled in the art that do not have these details, the present invention equally implements.
It is described in detail by multiple embodiments the present invention being implemented below.
Fig. 1 show the schematic flow sheet of the multichannel changing method that the embodiment of the present invention provides.Described multichannel changing method, may include steps of:
In a step 101, corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, determine the channel grade corresponding with the port device of carrying data transmission task;
In a step 102, when the described channel grade determined meets and sends channel grade condition, start described port device and carry out the transmission of data.
In one embodiment, the corresponding relation of channel grade and actual communication apparatus order of transmission is set described in step 101 particularly as follows: increase channel grade variable when data store to store the channel grade of corresponding ports by arranging the port of practical communication equipment.In another embodiment, described channel grade can be to be configured according to following principle with the corresponding relation of actual communication apparatus order of transmission, it may be assumed that channel grade is the highest, and corresponding actual communication apparatus order of transmission is the lowest.Such as, 1 grade of channel first sends data, restarts 2 grades of channels after it sends unsuccessfully, and 0 grade of channel does not sends.Additionally, in actual applications, after being stored in structural array by port data, it is also possible to port data structure be ranked up according to channel grade, to ensure in array of data structures, there is the front end of array in the data structure that channel grade is low.
Additionally, before above-mentioned steps 101, i.e. described corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, can also comprise the following steps before determining the step of the channel grade corresponding with the port device of carrying data transmission task, that is:, when each run starts, gather and store the corresponding relation pre-set;Judge whether data meet the condition uploaded, and when the condition is fulfilled, start data and send task, i.e. perform step 101.
Additionally, after above-mentioned steps 102, i.e. when the described channel grade determined meets and sends channel grade condition, after starting the step of the transmission that described port device carries out data, described method can also include: when data send successfully, exits transmission process;When data send unsuccessfully, send process automatically into the next one.Owing to the embodiment of the present invention can be achieved by two processes, therefore the exchange of data can be realized between these two processes with configuration file.
The workflow schematic diagram of the Fig. 2 multichannel switching for providing according to the embodiment of the present invention.After system brings into operation, first have to gather and store the corresponding relation pre-set, and judge whether data meet the condition uploaded.When data meet the condition uploaded, system will start the task that data send automatically, i.e. according to the corresponding relation of the channel grade pre-set collected with actual communication apparatus order of transmission, determine the channel grade corresponding with the port device of carrying data transmission task;Judge whether the channel grade determined meets and send channel grade condition, when the described channel grade determined meets and sends channel grade condition, start described port device and carry out the transmission of data.When data send successfully, system can exit transmission process;When data send unsuccessfully, system can send process automatically into the next one.
It is illustrated in figure 3 the structural representation of the multichannel switching device that the embodiment of the present invention provides.Described multichannel switching device may include that arrange module 310, determine module 320 and start module 330.Wherein, described module 310 is set for arranging the corresponding relation of channel grade and actual communication apparatus order of transmission.The described block of cover half really 320, for arranging, based on described, the corresponding relation that module pre-sets, determines the channel grade corresponding with the port device of carrying data transmission task.Described startup module 330 is for when the described channel grade determining that module determines meets and sends channel grade condition, starting described port device and carry out the transmission of data.
In one embodiment, described arrange module 310 can be specifically by the port of practical communication equipment is arranged when data store increase channel grade variable with store corresponding ports channel grade.Wherein, the described module 310 that arranges can be the highest according to channel grade, and the principle that corresponding actual communication apparatus order of transmission is the lowest arranges the corresponding relation of channel grade and actual communication apparatus order of transmission.
In another embodiment, described startup module 330 is additionally operable to, when data send successfully, exit transmission process;When data send unsuccessfully, send process automatically into the next one.
It is illustrated in figure 4 another structural representation of the multichannel switching device that the embodiment of the present invention provides.Described multichannel switching device can include except arranging module 310, determine module 320 and start in addition to module 330 shown in Fig. 3, it is also possible to including: acquisition module 311 and judge module 312.Wherein, described acquisition module 311, when described device each run starts, gathers and stores the described corresponding relation arranging channel grade that module 310 pre-sets and actual communication apparatus order of transmission.Described judge module 312 is for judging whether data meet the condition uploaded, and when the condition is fulfilled, triggers the described transmission determining that module 320 and startup module 330 realize data.
Fig. 5 show the three-decker schematic diagram that the multichannel handoff technique provided according to embodiments of the present invention is used.From figure 5 it can be seen that the three-decker that multichannel handoff technique is used is respectively: start layer, intermediate layer and send layer.Specifically, after startup layer is DSR, starts data and send task;Intermediate layer is to determine that actual bearer data send the port device of task according to port configuration information;And transmission layer is based on the corresponding relation pre-set, determines when the channel grade corresponding with the port device of carrying data transmission task meets transmission channel grade condition, start described port device and carry out the transmission of data.Advantageously, the embodiment of the present invention realizes by whole channel switching techniques is divided into three-decker, has both simplified the technical difficulty of realization, has added again the motility of system customization.
What Fig. 6 showed Fig. 5 starts user setup interface schematic diagram corresponding to layer.The setting option relevant to channel grade is the control of check box in Fig. 6 and arranges, and its corresponding data action has: safety report, timing report, threshold values report etc. can use channel highest ranking.Concrete behavior is relevant with data action.
Fig. 7 show the User Interface schematic diagram that the intermediate layer of Fig. 5 is corresponding.This interface is triggered by the host process that present system is mutual with user, double-channel can be switched by this interface required for critical data be stored in the data structure of port by arranging value, for double-channel switching preparation data.
Additionally, supplementary notes, the description of each embodiment of the method aforementioned is applied equally to each device embodiment.
In sum, it can be seen that the novel multichannel that the present invention provides is switched to method and device from each embodiment above-mentioned, it is possible to realize channel switching easily, many defects of above-mentioned prior art can be overcome again simultaneously.Specifically, one, use two process multithreading, module laminate structure.According to the workflow of system, the operation principle of equipment, the logic realization of channel switching, whole system is divided into the module laminate structure of two process multithreading.Its two, equipment is easily updated.What the hardware device that the present invention uses was taked is module laminate structure, more has only to during exchange device update corresponding dynamic link library.Its three, logical judgment is simple.Logical judgment code is single, uses through taking out first logical judgment process encoding, and the addition of other hardware actions is realized by dynamic link library.Its four, system is easily integrated.During the system integration, it is only necessary to developer is familiar with the instruction of relevant device.Its five, versatility.The technical scheme that having certain versatility, the i.e. present invention in embedded software developing provides can use in other embedded software developings.
Embodiment and accompanying drawing are only the conventional embodiment of the present invention specifically above.Obviously, can there is various supplement on the premise of the present invention spirit defined without departing from claims and invention scope, revise and replace.It should be appreciated by those skilled in the art that the present invention can be varied from form, structure, layout, ratio, material, element, assembly and other side on the premise of without departing substantially from invention criterion according to concrete environment and job requirement in actual applications.Therefore, embodiment disclosed here is merely to illustrate and unrestricted, and the scope of the present invention is defined by claims and legal equivalents thereof, and is not limited to description before this.

Claims (2)

1. the method for a multichannel switching, it is characterised in that including:
Corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, determines the channel grade corresponding with the port device of carrying data transmission task;
The described corresponding relation that channel grade and actual communication apparatus order of transmission are set particularly as follows:
Channel grade variable is increased when data store to store the channel grade of corresponding ports by the port of practical communication equipment is arranged;
When the described channel grade determined meets and sends channel grade condition, start described port device and carry out the transmission of data;
When data send successfully, exit transmission process;When data send unsuccessfully, send process automatically into the next one;
Described channel grade includes with the corresponding relation of actual communication apparatus order of transmission:
Channel grade is the highest, and corresponding actual communication apparatus order of transmission is the lowest;
Described corresponding relation based on the channel grade pre-set Yu actual communication apparatus order of transmission, also includes before determining the step of the channel grade corresponding with the port device of carrying data transmission task:
When each run starts, gather and store the corresponding relation pre-set;
Judge whether data meet the condition uploaded, and when described condition meets, start data and send task.
2. the device of a multichannel switching, it is characterised in that including:
Module is set, for arranging the corresponding relation of channel grade and actual communication apparatus order of transmission;
The described module that arranges increases channel grade variable to store the channel grade of corresponding ports particular by arranging the port of practical communication equipment when data store;
Determine module, for arranging, based on described, the corresponding relation that module pre-sets, determine the channel grade corresponding with the port device of carrying data transmission task;
Start module, for when the described channel grade determining that module determines meets and sends channel grade condition, starting described port device and carry out the transmission of data;
Described startup module is additionally operable to, when data send successfully, exit transmission process;When data send unsuccessfully, send process automatically into the next one;
In the corresponding relation of the described channel grade that module setting is set and actual communication apparatus order of transmission:
Channel grade is the highest, and corresponding actual communication apparatus order of transmission is the lowest;
Acquisition module, when described device each run starts, gathers and stores and described arrange the corresponding relation that module pre-sets;
Judge module, for judging whether data meet the condition uploaded, and when described condition meets, triggers the described transmission determining that module and startup module realize data.
CN201010610141.7A 2010-12-17 2010-12-17 A kind of method and device of multichannel switching Expired - Fee Related CN102572968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010610141.7A CN102572968B (en) 2010-12-17 2010-12-17 A kind of method and device of multichannel switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010610141.7A CN102572968B (en) 2010-12-17 2010-12-17 A kind of method and device of multichannel switching

Publications (2)

Publication Number Publication Date
CN102572968A CN102572968A (en) 2012-07-11
CN102572968B true CN102572968B (en) 2016-08-03

Family

ID=46417152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010610141.7A Expired - Fee Related CN102572968B (en) 2010-12-17 2010-12-17 A kind of method and device of multichannel switching

Country Status (1)

Country Link
CN (1) CN102572968B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009637A (en) * 2006-01-26 2007-08-01 华为技术有限公司 Service quality control method and system
CN101030184A (en) * 2007-03-27 2007-09-05 中兴通讯股份有限公司 Method for changing DMA peripheral apparatus data transmission applied priority level dynamically
CN101621373A (en) * 2009-06-22 2010-01-06 许继集团有限公司 Network communication method of centralized control station system, preferable shift method and dynamic routing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009637A (en) * 2006-01-26 2007-08-01 华为技术有限公司 Service quality control method and system
CN101030184A (en) * 2007-03-27 2007-09-05 中兴通讯股份有限公司 Method for changing DMA peripheral apparatus data transmission applied priority level dynamically
CN101621373A (en) * 2009-06-22 2010-01-06 许继集团有限公司 Network communication method of centralized control station system, preferable shift method and dynamic routing method

Also Published As

Publication number Publication date
CN102572968A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
CN107391317A (en) A kind of method, apparatus of data recovery, equipment and computer-readable recording medium
CN101150463B (en) Testing method and system
CN104468521B (en) Online moving method, device and system
CN102629240B (en) Method and device for serial communication
CN103186671B (en) For searching method, the search system and mobile terminal of mobile terminal
CN106527971B (en) A method of promoting SSD reading performance during garbage reclamation
CN110309088A (en) ZYNQ fpga chip and its data processing method, storage medium
CN103841564A (en) Frequency-spectrum sharing method and network center control entity
CN102981756A (en) Touch screen mobile terminal fast application switch method
CN102104936A (en) Method for switching system states and portable terminal
CN106888271B (en) BLE5.0 protocol system
WO2023168855A1 (en) Memory allocation method, deployment method, and related device
CN105159759B (en) Application example dispositions method and device
CN111124927A (en) Test method of multi-partition airborne software
WO2008123123A1 (en) Operation control program, operation control method, image formation device, and memory resource allocation method
CN102572968B (en) A kind of method and device of multichannel switching
CN104035766A (en) Android system trimming method based on coverage rate test
CN106656580A (en) Business state migration method and device
CN107506245A (en) Method and device for remotely controlling multiple systems, storage medium and terminal equipment
CN101262375A (en) A dynamic configuration recovery method and system for network devices
CN103645935A (en) Device and method for adjusting JVM (java virtual machine) parameters in domestic environment
CN206991177U (en) Integrated machine
CN106843890A (en) Sensor network, node and its operation method based on intelligent decision
CN104657326A (en) Double-CPU communication method and system and system-on-chip chip
CN1583478A (en) Wireless monitoring and fault diagnostic system and method for vehicle

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160803

Termination date: 20161217