[go: up one dir, main page]

CN110808846B - Communication method and device with complementary advantages of multi-master communication technology - Google Patents

Communication method and device with complementary advantages of multi-master communication technology Download PDF

Info

Publication number
CN110808846B
CN110808846B CN201910883369.4A CN201910883369A CN110808846B CN 110808846 B CN110808846 B CN 110808846B CN 201910883369 A CN201910883369 A CN 201910883369A CN 110808846 B CN110808846 B CN 110808846B
Authority
CN
China
Prior art keywords
data
communication means
communication
response
host computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910883369.4A
Other languages
Chinese (zh)
Other versions
CN110808846A (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.)
Guangzhou Aerospace Recreation Cultural Tourism Development Co., Ltd.
Original Assignee
Guangzhou Kongtian Communication Technology Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kongtian Communication Technology Service Co ltd filed Critical Guangzhou Kongtian Communication Technology Service Co ltd
Priority to CN201910883369.4A priority Critical patent/CN110808846B/en
Publication of CN110808846A publication Critical patent/CN110808846A/en
Application granted granted Critical
Publication of CN110808846B publication Critical patent/CN110808846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Landscapes

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

Abstract

本发明公开一种多主通信技术优势互补的通信方法及装置,涉及物联网通信传输领域,包括以下步骤:对发送先后顺序和间隔列表、最近接收列表进行初始化;对通信手段分级,动态优化发送先后顺序和间隔列表;当有待发送数据产生时,封装成数据报;根据发送先后顺序和间隔的列表,依次将已封装好的数据报从多种通信手段发出去,等待上位机应答;如有应答,则将应答数据报与最近接收列表的信息进行比较,如果有同样的数据记录,则不执行动作,只原路返回对应应答;如果没有同样的数据记录,则执行动作。实现了多种通信手段同时工作、同时收发数据之间可能出现的冲突,让多种通信手段各自独立工作,互不影响;本通信方法速度快、效率高、费用低。

Figure 201910883369

The invention discloses a communication method and device with complementary advantages of multi-master communication technology, which relates to the field of Internet of Things communication and transmission. Sequence and interval list; when the data to be sent is generated, it is encapsulated into a datagram; according to the list of sending sequence and interval, the encapsulated datagram is sent out from various communication means in turn, waiting for the host computer to respond; if there is If there is a response, the response datagram is compared with the information in the most recent reception list. If there is the same data record, no action is performed, and only the corresponding response is returned in the same way; if there is no same data record, the action is performed. It realizes the possible conflicts between multiple communication means working at the same time and sending and receiving data at the same time, so that multiple communication means work independently without affecting each other; the communication method has high speed, high efficiency and low cost.

Figure 201910883369

Description

Communication method and device with complementary advantages of multi-master communication technology
Technical Field
The invention relates to the technical field of communication transmission of the Internet of things, in particular to a communication method and a communication device with complementary advantages of multiple main communication technologies.
Background
In practical application of the internet of things equipment, because the network quality of a mobile communication operator or a telecommunication operator has a great relationship with the number of people using the internet of things equipment, in the occasions such as an unmanned area, an urban and rural intersection area, an underground tunnel, a basement, an underground parking lot and the like, the coverage of a single communication means often cannot meet the actual use requirement, or the communication cost is too high, or the layout cost is high, or the reliability and the stability are poor, so that the actual requirement of the internet of things is difficult to meet; therefore, a communication method in which a plurality of (three or more) communication means are integrated is a necessary trend.
At present, the traditional communication equipment carrying various communication means is designed in a master-slave mode, because the master-slave mode is simpler, only one communication link communicates with an upper computer at any time, the equipment, a base station and the upper computer are one-to-one, data redundancy does not need to be considered, only whether a current channel is effective is concerned, and the usage is as follows: one communication means is used as a main communication means, and other means are used as standby communication means; when the primary communication means is abnormal, the backup communication means is enabled for communication, fail → switch → handshake → communication … … fails again → re-switch → re-handshake → re-communication … …, and the process is repeated.
For more intuitive description, as shown in fig. 9, the active/standby communication systems using 3 communication modes such as LAN, WiFi, GPRS, etc. are generally sorted in order of LAN, WiFi, GPRS, etc., and a communication means is initially selected according to communication cost. When the LAN and the WiFi are intermittent (for example, in the case where the edge is covered by the traditional operator such as an underground garage and an underground tunnel), the scheme of the main-standby communication means includes that the base station device generates a datagram and then transmits the datagram to the upper computer, the response time is obviously seen, the switching of the main-standby communication means increases the response time for switching the communication means one by one, and if the device for sending data needs to pass through one base station, the time difference is expanded to 2 times. If the equipment passes through a plurality of equipment and then passes through the base station, the time difference is doubled after each equipment or base station passes through, and finally the time reaching the upper computer becomes unacceptable.
If the reliability of communication needs to be improved, most of the active and standby communication systems preferentially select general charging GPRS as a main communication means, and if the data volume is large, the generated communication cost is very high, and the intermittent WiFi and LAN free communication means are not sufficiently utilized.
If the communication means of WiFi and LAN can be tested at regular time, when the communication means is effective, the WiFi and LAN are switched to, GPRS is closed, the switching times are more, the switching time is long, and the timeliness is difficult to guarantee.
In summary, the conventional scheme of the active/standby communication method has several disadvantages:
the judgment of failure and network disconnection of a certain communication means needs a long time.
The judgment basis of a certain communication means failure and network disconnection is not clear, which may cause misjudgment, even under the condition that the communication means is not smooth.
In the process of network outage judgment and other communication means restarting, the transmission of emergency information may have a relatively long delay, and data loss may also be caused.
Under the influence of reliability requirements, the communication cost of the main communication means is generally higher, the advantages of the free communication means are not fully utilized, and the overall operation and maintenance cost is high.
The selection of the communication scheme can be adjusted according to the actual use scene, and requires professional technicians and instruments and meters and higher overhaul and maintenance cost; maintenance can result in communication interruptions.
Disclosure of Invention
In order to solve the technical problems, the invention provides a communication method and a device with complementary advantages of multi-master communication technology, which have the advantages of high information reliability, quick transmission, low time delay and low operation and maintenance cost, aiming at the field of communication transmission of the internet of things, and the invention organically integrates various communication means, does not need to be divided into a master communication means and a slave communication means, is on-line and started simultaneously, and is effective simultaneously according to a set rule: according to the method and the device for carrying out communication with an upper computer for multiple times by preferentially selecting a timely and free communication means according to the conditions that the communication cost is from low to high, the communication response time is from short to long, and the communication transmission is from fast to slow.
The technical scheme of the invention is as follows:
a communication method with complementary advantages of multi-master communication technology is characterized in that: the communication method comprises the following steps:
initializing a sending sequence and interval list and a latest receiving list, presetting the sending sequence and interval list and the latest receiving list, storing a default sending sequence and sending interval, and emptying the latest receiving list;
when data to be transmitted is generated, the data to be transmitted is encapsulated into a datagram, which includes but is not limited to: the data generation time, the data generation sequence number, the data generation equipment number and the data content;
recording the encapsulated datagram;
according to the sending sequence and the interval list, sending out the packaged datagram from various communication means in sequence, and waiting for the upper computer to respond;
the upper computer needs to respond to all the received datagrams, and returns corresponding responses in the original way; to confirm that the communication means is valid and to confirm that the specific data content has been sent to the upper computer;
continuously sending for multiple times, and quitting sending if no response exists;
if so, comparing the response datagram with the information of the latest receiving list, and if the same data record exists, not executing action (referring to executing corresponding operation of the content, such as functions of switch control, data acquisition, working parameter modification and the like) according to the content of the datagram; meanwhile, the upper computer analyzes and processes the data sent by the upper computer, and only returns the response and record processing of the communication means to the repeated information in the original way, but does not execute the action;
if there is no identical data record, performing an action;
recording response data and reporting to a latest receiving list;
finding a communication means sending record corresponding to the response according to the data generation time, the data generation sequence number and the data generation equipment number, and subtracting the sending time of the communication means according to the response time of the response data to obtain the response time of the corresponding communication means;
the communication means are classified, and then the sending sequence and interval list are dynamically optimized: dividing various communication means into three levels of free communication means, general charging communication means and high charging communication means, according to the response time of the communication means responded at this time, promoting the sending sequence of the communication means responded at this time at the respective corresponding level, dynamically generating a preferential sequence for the next datagram to be sent, and updating the sending sequence and the interval list for standby;
the dynamic optimization technical means aims at properly controlling the amount of redundant data, reducing the amount of the redundant data among equipment, a base station, an upper computer and the equipment, the base station and the upper computer on the premise of not influencing the use, and controlling the consumption of bandwidth and the load of the upper computer; the transmission time of the general fee and high fee communication means is shifted backward by the transmission interval, and if the free communication means has completed the information transmission, the general fee and high fee communication means is not needed to be used, and the frequency of use is reduced.
Counting the number of the three levels of communication means without response;
judging whether the next data to be sent is generated;
if the next data to be sent is generated, returning that when the data to be sent is generated, encapsulating the data to be sent into a datagram, wherein the datagram includes but is not limited to: generating data, generating sequence number of the data, generating equipment number of the data and data content;
if the next data to be sent is not generated, judging whether other communication means answer the packaged datagram;
if other communication means have responses, if the responses exist, the response datagram is compared with the information of the latest receiving list, and if the same data record exists, the action step is not executed;
if the other communication means do not answer, returning to judge whether the next data to be sent is generated.
Further:
the free communication means include, but are not limited to: RS232, RS485, CAN, data transmission radio station, special line, power carrier, special wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M and other wireless radio frequency technology communication means;
the general charging communication means includes but is not limited to: GPRS, traditional short message, NB-IoT, 2G, 3G, 4G and 5G communication means;
the high-rate communication means includes but is not limited to: beidou short message and satellite telephone communication means;
the sequence communication means for sending the sequence and the interval list are a free communication means, a general charging communication means and a high charging communication means;
the transmission sequence and interval list transmission sequence communication means is specifically as follows: RS232, RS485, CAN, a data transmission radio station, a special line, a power carrier wave, a special wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M, other wireless radio frequency technologies, GPRS, traditional short messages, NB-IoT, 2G, 3G, 4G, 5G, Beidou short messages and satellite phones; the corresponding transmission interval of the communication means is a relatively fixed value, and is solidified when being shipped according to the use scene:
the time interval of two data sending of each communication means is set to be 0.1-70 seconds, and the time interval of two data sending of each data content is set to be 0.1-70 seconds.
For the same datagram, the time interval of every two free communication means: 0-10 seconds; time interval of every two general charging communication means: 5-25 seconds; time interval of every two high-charging communication means: 8-70 seconds.
Preferably:
after the step of counting the number of times of the three levels of communication means with no response, further comprising the steps of:
judging whether the free communication means have no response;
if no response is made to the free communication means, the transmission interval of the general charging communication means is shortened in proportion, and the shortening value is as follows: 10% multiplied by the number of continuous non-response times of the free communication means, wherein the number of continuous non-response times of the free communication means is not more than 8;
if the free communication means has a response, the transmission interval of the general charging communication means is restored to 100%; meanwhile, the sending interval of the high-charge communication means is recovered to 100 percent;
dynamically updating the sending sequence and the interval list;
continuously judging whether the general charging communication means have no response;
if no response is made by the general charging communication means, the transmission interval of the high charging communication means is shortened proportionally, and the shortening value is as follows: 10% × the number of continuous non-response times of the general charging communication means, the number of continuous non-response times of the general charging communication means is not more than 8 times;
if the general charging communication means has response, the transmission interval of the high charging communication means is recovered to 100%;
and dynamically updating the sending sequence and the interval list.
Preferably:
the method comprises the following steps that according to a sending sequence and an interval list, encapsulated datagrams are sent out in sequence from a plurality of communication means, and after the step of waiting for the response of an upper computer, the method further comprises the following steps:
judging whether the upper computer supports a WIFI communication means for data communication;
if the upper computer does not support WIFI communication means data communication, automatically entering the next communication means LORA for data communication;
if the upper computer supports data communication of the WIFI communication means, sending data from the communication means, and checking whether data communication response of the WIFI communication means and the upper computer is correct or not;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the WIFI communication means and the upper computer is correct;
when the response is overtime, the failure of sending the data operation data by the communication means is proved, and the next communication means LORA is entered for data communication;
judging whether the upper computer supports an LORA communication means to carry out data communication;
if the upper computer does not support the LORA communication means data communication, the next communication means LAN is automatically entered for data communication;
if the upper computer supports the data communication of the LORA communication means, the data is sent out from the communication means, and whether the data communication response of the LORA communication means and the upper computer is correct or not is checked;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the LORA communication means and the upper computer is correct;
when the response is overtime, the failure of sending data operation data by the communication means is proved, and the next communication means LAN is entered for data communication;
judging whether the upper computer supports the LAN communication means for data communication;
if the upper computer does not support the data communication of the LAN communication means, the next communication means GPRS is automatically entered for data communication;
if the upper computer supports the data communication of the LAN communication means, the data is sent out from the communication means, and whether the data communication response between the LAN communication means and the upper computer is correct or not is checked;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the LAN communication means and the upper computer is correct;
and when the response is overtime, the data operation data transmission failure of the LAN communication means is proved, the data communication step of judging whether the upper computer supports the WIFI communication means or not is returned, and the response of the upper computer and the free communication means is repeatedly tried for many times so as to strive for the successful data transmission from the free communication means.
Further, the method comprises the following steps:
judging whether the upper computer supports GPRS communication means to carry out data communication;
if the upper computer does not support GPRS communication means data communication, the next communication means NB-IoT is automatically entered for data communication;
if the upper computer supports GPRS communication means data communication, sending data from the communication means, and checking whether the data communication response between the conventional communication means and the upper computer is correct;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the GPRS communication means and the upper computer is correct;
when the response is overtime, the failure of sending the data operation data by the communication means is proved, and the next communication means NB-IoT is entered for data communication;
judging whether the upper computer supports an NB-IoT communication means for data communication;
if the upper computer does not support NB-IoT communication means data communication, automatically entering the next communication means Beidou short message for data communication;
if the upper computer supports the NB-IoT communication means data communication, executing the data transmission from the communication means, and checking whether the NB-IoT communication means and the upper computer data communication response is correct;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the NB-IoT communication means and the upper computer is correct;
when the response is overtime, the failure of sending data operation data by the communication means is proved, and the Beidou short message of the next communication means is used for data communication;
judging whether the upper computer supports the Beidou short message communication means for data communication;
if the upper computer does not support the Beidou short message communication means data communication, waiting for the generation of the next data to be sent;
if the upper computer supports the data communication of the Beidou short message communication means, the data transmission from the communication means is executed, and whether the data communication response of the Beidou short message communication means and the upper computer is correct or not is checked;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and then the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the Beidou short message communication means and the upper computer is correct;
and when the response is overtime, the communication means fails to send the data operation data, and the next data to be sent is waited to be generated.
The invention also provides a communication device with complementary advantages of the multi-master communication technology, which is characterized in that: the communication device comprises a plurality of base stations which are communicated with an upper computer, and also comprises terminal equipment, wherein the terminal equipment can be communicated with the base stations, the base stations are provided with CPU modules and hardware ports, and the CPU modules are connected with the hardware ports and communicated with the upper computer;
the CPU module also comprises an application layer, a service layer and a data link layer which are connected and communicated with each other;
the hardware port also comprises an interface driving layer which is connected with each hardware port and combines with a data link layer to select a communication means so as to realize the function of receiving and transmitting data by the communication means;
the terminal equipment is used for receiving and transmitting data;
the base station is used for transmitting and receiving data;
the interface driver layer may be used to support applications including, but not limited to: RS232, RS485, CAN, data transmission radio, special line, power carrier, special wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M, other wireless radio frequency technology, GPRS, traditional short message, NB-IoT, 2G, 3G, 4G, 5G, Beidou short message, satellite phone and other communication means;
the application layer is used for connecting user terminal equipment to realize the requirements;
the service layer is used for the user to call the data link layer;
the data link layer is to: initializing a sending sequence and interval list and a latest receiving list, presetting the sending sequence and interval list and the latest receiving list, storing a default sending sequence and sending interval, and emptying the latest receiving list; encapsulating data to be transmitted into datagrams; recording the encapsulated datagram; sending out the encapsulated datagram from various communication means in sequence, and waiting for the upper computer to respond;
comparing the response datagram with the information of the latest receiving list, and if the same data record exists, not executing action;
if there is no identical data record, performing an action;
recording response data and reporting to a latest receiving list;
finding a communication means sending record corresponding to the response according to the data generation time, the data generation sequence number and the data generation equipment number, and subtracting the sending time of the communication means according to the response time of the response data to obtain the response time of the corresponding communication means;
the communication means are classified, and then the sending sequence and interval list are dynamically optimized: dividing various communication means into three levels of free communication means, general charging communication means and high charging communication means, according to the response time of the communication means responded at this time, promoting the sending sequence of the communication means responded at this time at the respective corresponding level, dynamically generating a preferential sequence for the next datagram to be sent, and updating the sending sequence and the interval list for standby;
counting the number of the three levels of communication means without response;
judging whether the next data to be sent is generated;
judging whether other communication means answer the packaged datagram;
the upper computer is used for:
all the received datagrams are responded, and corresponding responses are returned in the original way; to confirm that the communication means is valid and to confirm that the specific data content has been sent to the upper computer;
the data sent is analyzed and processed, and the communication means response and recording process is returned only for the repeated information, but no action is executed.
Further:
the data link layer is further configured to: judging whether the free communication means responds or not; the transmission interval of the general charging communication means is shortened in proportion; the transmission interval of the general charging communication means is restored to 100%; the transmission interval of the high-rate communication means is recovered to 100%; continuously judging whether the general charging communication means responds or not; the transmission interval of the high-charge communication means is shortened in proportion; the transmission interval of the high-rate communication means is recovered to 100%; and dynamically updating the sending sequence and the interval list.
Further, the method comprises the following steps:
the data link layer is further configured to: judging whether the upper computer supports a WIFI communication means for data communication; checking whether the data communication response of the WIFI communication means and the upper computer is correct or not; switching the next communication means LORA to carry out data communication; judging whether the upper computer supports an LORA communication means to carry out data communication; checking whether the data communication response of the LORA communication means and the upper computer is correct or not; switching the LAN to the next communication means for data communication; judging whether the upper computer supports the LAN communication means for data communication; checking whether the data communication response of the LAN communication means and the upper computer is correct; switching the data transmission radio station of the next communication means to carry out data communication; judging whether the upper computer supports GPRS communication means for data communication; checking whether the GPRS communication means and the upper computer data communication response are correct or not; switching the next communication means, namely, the Beidou short message for data communication; judging whether the upper computer supports the Beidou short message communication means for data communication; checking whether the Beidou short message communication means and the upper computer data communication response are correct or not; waiting for the next data to be sent to be generated.
By adopting the technical scheme, the invention has the beneficial effects that:
1. according to the sending sequence and the interval list, the packaged datagram is sent out from various communication means in sequence, the upper computer waits for response, the upper computer needs to respond to all the received datagram, and returns corresponding response in the original way to determine that the communication means is effective. The method has the advantages that various communication means are organically integrated, the main communication means and the standby communication means are not separated, the on-line communication and the starting are carried out simultaneously, and meanwhile, the effective technical effect is achieved.
2. Comparing the response datagram with the information of the latest receiving list, and if the same data record exists, not executing action; meanwhile, the upper computer analyzes and processes the data sent by the upper computer, and only returns the response and record processing of the communication means to the repeated information in the original way, but does not execute the action; if there is no identical data record, performing an action; the response data report is recorded to the most recently received list. When multiple communication means respond, only one communication means executes action, and for repeated information, the upper computer returns the response of the communication means as it is, but does not execute action, thereby solving the technical problems of repeated redundancy of data transmission and high reliability of information.
3. Finding a communication means sending record corresponding to the response according to the data generation time, the data generation sequence number and the data generation equipment number, and subtracting the sending time of the communication means according to the response time of the response data to obtain the response time of the corresponding communication means; dividing various communication means into three levels of free communication means, general charging communication means and high charging communication means, according to the response time of the communication means responded at this time, promoting the sending sequence of the communication means responded at this time at the respective corresponding level, dynamically generating a preferential sequence for the next datagram to be sent, and updating the sending sequence and the interval list for standby; according to the invention, according to a set rule, according to the communication cost from low to high, the communication response time from short to long and the communication transmission from fast to slow, an immediate and free communication means is preferentially adopted for carrying out data transmission with an upper computer.
4. Judging whether the free communication means have no response; if no response is made to the free communication means, the transmission interval of the general charging communication means is shortened in proportion, and the shortening value is as follows: 10% multiplied by the number of continuous non-response times of the free communication means, wherein the number of continuous non-response times of the free communication means is not more than 8; if the free communication means has a response, the transmission interval of the general charging communication means is restored to 100%; meanwhile, the sending interval of the high-charge communication means is recovered to 100 percent; dynamically updating the sending sequence and the interval list; continuously judging whether the general charging communication means have no response; if no response is made by the general charging communication means, the transmission interval of the high charging communication means is shortened proportionally, and the shortening value is as follows: 10% × the number of continuous non-response times of the general charging communication means, the number of continuous non-response times of the general charging communication means is not more than 8 times; if the general charging communication means has response, the transmission interval of the high charging communication means is recovered to 100%; and dynamically updating the sending sequence and the interval list. The sending time interval of the communication means is reduced by dynamically adjusting the sending time intervals of various communication means, the communication means with effective communication is preferably adopted to communicate with an upper computer by adopting timely and free communication means according to the conditions that the communication cost is from low to high, the communication response time is from short to long, and the communication transmission is from fast to slow, so that the transmission speed is improved, and the communication charge is reduced.
5. Whether the various communication means support communication and whether the response is correct are judged according to the priority sequence of the communication means which is timely, free, general and high in charge, and the proper communication means are selected for data priority transmission, so that the communication method of the invention can ensure that the transmission is timely and quick, the communication charge is low, and the various communication means are organically combined together. For free and quick communication means, single communication means is adopted for multiple sending, the sending success rate is improved, the use frequency of the charging communication means is reduced, and therefore the integral operation and maintenance cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a communication method for complementing the advantages of multiple master communication technologies according to the present invention;
FIG. 2 is a flow chart of the dynamic adjustment of data transmission time interval for three levels of communication means according to the present invention;
FIG. 3 is a block diagram of a communication device with complementary advantages of multiple master communication technologies;
FIG. 4 is a diagram of datagram composition content;
FIG. 5 is a flow chart of a method of communication by a free, general-charge, high-charge communication means in the embodiment;
FIG. 6 is a schematic diagram of a communication device with complementary advantages of multiple master communication technologies according to the present invention;
FIG. 7 is a logic diagram of a single device communicating with an upper computer through a plurality of base stations in the embodiment;
FIG. 8 is a functional hierarchy of a communication device with complementary advantages of multiple primary communication techniques according to the present invention;
fig. 9 is a comparison diagram of advantages and disadvantages of the conventional active/standby communication system and the communication method of the present invention in which advantages of multiple main communication techniques are complemented;
fig. 10 is a partially enlarged view of fig. 6.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention mainly solves the core problems of multilink, multiple sending and upper computer receiving: multi-link handover problems, data redundancy, data validity identification and handling, efficient interaction, and communication costs.
Host computer in this description: i.e. the data processing center, is a server, a monitoring terminal, etc.
LoRa: long Range Radio, a communication technology that uses a designated Radio band for free. The wireless power transmission system is obviously characterized in that the transmission distance is longer than that of other wireless modes under the same power consumption condition, and the low power consumption and the long distance are both realized; the distance is enlarged by 3-5 times compared with the traditional wireless radio frequency communication under the same power consumption.
LAN, Local Area Network, wired LAN.
Radio modem is also called radio transceiver or radio data module. Refers to a high-performance professional data transmission station realized by means of DSP (digital signal processing) technology and software radio technology.
CAN is a short name of Controller Area Network (CAN), developed by BOSCH company of germany, which is known to develop and produce automotive electronics, and finally becomes an international standard (ISO 11898), which is one of the most widely used field buses internationally.
Other radio frequency (rf) technologies are widely used in various fields, such as: television, radio, radar, ZigBee, automatic identification systems, etc.
The power line carrier is a communication method for performing voice or data transmission using a power line as an information transmission medium, and is a communication format specific to a power system.
A base station: is an interface device for a wireless communication device to access a wireless network and is also a form of radio station. A conventional mobile base station refers to a radio transceiver station for information transfer with a mobile phone terminal through a mobile communication switching center in a certain radio coverage area. The base station described herein is different from a conventional mobile communication base station in a certain degree, and refers to a device that has multiple wireless frequency band access modes, such as LoRa, ZigBee, bluetooth BLE, WiFi, data transfer radio, and the like, and also forwards data through communication modes such as GPRS, NB-IoT, and beidou short message.
Response time: that is, the time interval between the time when the device sends data in a certain communication mode (communication means) and the time when the device receives the host computer information responded by the communication mode.
And executing the action: the operation is to execute the corresponding operation of the content, such as switch control, data collection, and working parameter modification, according to the content of the datagram.
Multiple owners: the present invention is not provided with a standby communication technology, so the main communication modes are described in the present document, that is, the main communication modes coexist.
The BDS is a China Beidou satellite navigation system which is a global satellite navigation system developed by China and is the third mature satellite navigation system after GPS and GLONASS. The BDS has a remarkable characteristic that the BDS supports satellite positioning and also supports Beidou short message RDSS.
SDK, a "software development kit," is generally a collection of development tools provided to software engineers for creating application software for a particular software package, software framework, hardware platform, operating system, etc.; the tool kit is a tool kit which is provided for a third-party service provider and realizes a certain item and certain functions, and is a collection of a series of API libraries.
Example 1: fig. 1 and 4 show a communication method with complementary advantages of multiple master communication technologies, which includes the following steps:
initializing a sending sequence and interval list and a latest receiving list, presetting the sending sequence and interval list and the latest receiving list, storing a default sending sequence and sending interval, and emptying the latest receiving list;
when data to be transmitted is generated, the data to be transmitted is encapsulated into a datagram, which includes but is not limited to: the data generation time, the data generation sequence number, the data generation equipment number and the data content;
recording the encapsulated datagram;
according to the sending sequence and the interval list, sending out the packaged datagram from various communication means in sequence, and waiting for the upper computer to respond;
the upper computer needs to respond to all the received datagrams, and returns corresponding responses in the original way; to confirm that the communication means is valid and to confirm that the specific data content has been sent to the upper computer;
the technical problems that various communication means are organically integrated, main and standby are not separated, and meanwhile, the on-line and on-line communication is achieved, and meanwhile, the on-line communication is effective are solved.
Continuously sending for multiple times, and quitting sending if no response exists;
if so, comparing the response datagram with the information of the latest receiving list, and if the same data record exists, not executing the action; meanwhile, the upper computer analyzes and processes the data sent by the upper computer, and only returns the response and record processing of the communication means to the repeated information in the original way, but does not execute the action;
if there is no identical data record, performing an action;
recording response data and reporting to a latest receiving list;
when multiple communication means respond, only one communication means executes action, and for repeated information, the upper computer returns the response of the communication means as it is, but does not execute action, thereby solving the technical problems of repeated redundancy of data transmission and high reliability of information.
Finding a communication means sending record corresponding to the response according to the data generation time, the data generation sequence number and the data generation equipment number, and subtracting the sending time of the communication means according to the response time of the response data to obtain the response time of the corresponding communication means;
the communication means are classified, and then the sending sequence and interval list are dynamically optimized: dividing various communication means into three levels of free communication means, general charging communication means and high charging communication means, according to the response time of the communication means responded at this time, promoting the sending sequence of the communication means responded at this time at the respective corresponding level, dynamically generating a preferential sequence for the next datagram to be sent, and updating the sending sequence and the interval list for standby;
according to the invention, according to a set rule, according to the communication cost from low to high, the communication response time from short to long and the communication transmission from fast to slow, an immediate and free communication means is preferentially adopted for carrying out data transmission with an upper computer.
Counting the number of the three levels of communication means without response;
after the response of the currently processing communication means is processed, whether the other communication means has a response needs to be judged, if the other communication means has a response, the data processing step is returned, namely the processing step is the same as the above, the other communication means becomes the currently processing communication means, and if the other communication means has no response, the data processing step is returned to judge whether the next data to be sent is generated.
Specifically, the method comprises the following steps:
judging whether the next data to be sent is generated;
if the next data to be sent is generated, returning that when the data to be sent is generated, encapsulating the data to be sent into a datagram, wherein the datagram includes but is not limited to: generating data, generating sequence number of the data, generating equipment number of the data and data content;
if the next data to be sent is not generated, judging whether other communication means answer the packaged datagram;
if other communication means have responses, if the responses exist, the response datagram is compared with the information of the latest receiving list, and if the same data record exists, the action step is not executed;
if the other communication means do not answer, returning to judge whether the next data to be sent is generated.
The above is a processing mode of the communication means currently being processed, and because of a mode in which a plurality of communication means are simultaneously operating, when the current communication means is responding to data processing, other communication means may be receiving response data.
Further:
the free communication means include, but are not limited to: RS232, RS485, CAN, data transmission radio station, special line, power carrier, special wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M and other wireless radio frequency technology communication means;
the general charging communication means includes but is not limited to: GPRS, traditional short message, NB-IoT, 2G, 3G, 4G and 5G communication means;
the high-rate communication means includes but is not limited to: beidou short message and satellite telephone communication means;
the sequence communication means for sending the sequence and the interval list are a free communication means, a general charging communication means and a high charging communication means;
the transmission sequence and interval list transmission sequence communication means is specifically as follows: RS232, RS485, CAN, a data transmission radio station, a special line, a power carrier wave, a special wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M, other wireless radio frequency technologies, GPRS, traditional short messages, NB-IoT, 2G, 3G, 4G, 5G, Beidou short messages and satellite phones; the corresponding transmission interval of the communication means is a relatively fixed value, and is solidified when being shipped according to the use scene:
the time interval of two data sending of each communication means is set to be 0.1-70 seconds, and the time interval of two data sending of each data content is set to be 0.1-70 seconds.
For the same datagram, the time interval of every two free communication means: 0-10 seconds; time interval of every two general charging communication means: 5-25 seconds; time interval of every two high-charging communication means: 8-70 seconds.
As shown in fig. 4, "time of generation, sequence number of generation, and device number" are used as key information for identifying repeated and redundant data by the system (including the upper computer) to distinguish the repeated and redundant data and avoid performing multiple operations on the repeated data. The 'generation time' is a UNIX time stamp of the data generation time, and is correspondingly Greenwich mean time, namely, the time from 1 month, 1 day, 0 hour, 0 minute and 0 second in 1970 to the time of the data generation time is automatically synchronized to a time service system such as an upper computer, GPRS, BDS and the like, and the priority sequence is as follows in sequence: the upper computer, the GPRS and the BDS are automatically synchronized to the Greenwich mean time in real time; the 'generation sequence number' is the sequence number generated by the current data report, is used together with 'generation time' and 'equipment number' and is used for identifying repeated data and response data by equipment and an upper computer; the device number is used for distinguishing single communication system devices, each device adopting the communication method has a unique device number, and the device number is solidified before delivery.
The communication method with the complementary advantages of the multi-master communication technology is characterized in that according to the communication cost from low to high, the communication response time from short to long, the communication transmission from high to low and the response speed from high to low, a method of selecting timely and free communication means is preferentially adopted, the currently suitable communication means is dynamically, automatically, sequentially and preferentially selected, the sending time interval is properly set, the consideration and balance of time efficiency and communication cost are solved, and the high cost performance of the operation and maintenance cost of a communication system is realized.
The advantages and disadvantages of the existing main and standby communication systems and the communication method with complementary advantages of the multi-main communication technology are compared:
as shown in fig. 9, compared with the main/standby communication system using 3 communication modes such as LAN, WIFI, GPRS and the like and the communication method with complementary advantages of the multiple main communication technologies, we generally sort the main/standby communication systems in order of LAN, WIFI and GPRS, and perform a primary selection on the communication means according to the communication cost. In this example, when the LAN and the WIFI are intermittent (for example, when the traditional operator covers the edge, such as an underground garage and an underground tunnel), and the same communication means is selected (communication cost), the base station device transmits a datagram to the upper computer after generating a datagram, and receives a time comparison of the response:
obviously, the communication method with the complementary advantages of the multi-master communication technology optimizes the judgment process of the failure of the communication means and the switching of the communication means, and establishes connection with the upper computer through handshaking by a proper communication means, thereby saving a large amount of time.
If the device transmitting the data needs to pass through a base station, the time gap is extended by a factor of 2.
If the device passes through a plurality of devices and then passes through the base station, the time difference is doubled after passing through one device or base station, and if the primary and standby communication systems are adopted, the time of reaching the upper computer finally becomes unacceptable.
In the above example, if the main/standby communication system needs to improve the reliability of communication, a GPRS communication means is preferentially selected in most cases, and the communication cost is much higher than that of a multi-main communication means, so that the intermittent WIFI and LAN are not sufficiently utilized; if the communication means of the WIFI and the LAN are tested to be effective at fixed time, the WIFI and the LAN are switched to when the communication means is effective, the GPRS is closed, the switching times are many, the switching time is long, and the timeliness is difficult to guarantee.
Example 2: fig. 2 shows a three-level communication means data transmission time interval dynamic adjustment method:
after the step of counting the number of times of the three levels of communication means with no response, further comprising the steps of:
judging whether the free communication means have no response;
if no response is made to the free communication means, the transmission interval of the general charging communication means is shortened in proportion, and the shortening value is as follows: 10% multiplied by the number of continuous non-response times of the free communication means, wherein the number of continuous non-response times of the free communication means is not more than 8;
if the free communication means has a response, the transmission interval of the general charging communication means is restored to 100%; meanwhile, the sending interval of the high-charge communication means is recovered to 100 percent;
dynamically updating the sending sequence and the interval list;
continuously judging whether the general charging communication means have no response;
if no response is made by the general charging communication means, the transmission interval of the high charging communication means is shortened proportionally, and the shortening value is as follows: 10% × the number of continuous non-response times of the general charging communication means, the number of continuous non-response times of the general charging communication means is not more than 8 times;
if the general charging communication means has response, the transmission interval of the high charging communication means is recovered to 100%;
and dynamically updating the sending sequence and the interval list.
The time interval of two data sending of each communication means is set to be 0.1-70 seconds, and the time interval of two data sending of each data content is set to be 0.1-70 seconds.
The time interval of the two Beidou short message sending is set to be 8-70 seconds.
According to the condition of communication charge, the method is divided into three stages: free (a), general charge (B), high charge (C).
For the same datagram, the time interval of every two free communication means: 0-10 seconds; time interval of every two general charging communication means: 5-25 seconds; time interval of every two high-charging communication means: 8-70 seconds.
RS232, RS485, CAN, data radio stations, special lines, power carrier waves, special wireless communication networks, Bluetooth, WiFi, LoRa, ZigBee, 433M free frequency band communication means, other free radio frequency technologies and the like, and the data radio stations are classified into free levels;
GPRS, traditional short message (sms), NB-IoT, 2G, 3G, 4G, 5G, etc., classified for general charging;
big dipper short message, satellite phone, etc., classify to high charge.
Fig. 2 shows that "the response time of the communication means according to the response at this time is classified into three grades of" free, general charging and high charging ", the transmission sequence of the communication means according to the response at this time is promoted, a priority sequence is dynamically generated for the next datagram to be transmitted, the" list of transmission sequence and interval "is updated, and the control logic is processed once each time response data is received:
when a free communication means in a 'list of transmission sequence and interval' is found and no response is found in the previous communication, the transmission interval of a general charging communication means is shortened in proportion, and the value is as follows: 10% × number of consecutive non-responses by free communication means (8 times at most);
when a free communication means and a general charging communication means in a 'list of transmission sequence and interval' are found and no response is found in the previous communication, the transmission interval of the high charging communication means is shortened in proportion, and the value is as follows: 10% × value of number of consecutive non-responses (up to 8 times) by general charging communication means;
once the general charging communication means responds, the transmission interval of the high charging communication means is recovered to 100%;
when the free communication means responds, the transmission interval of the general fee communication means and the high fee communication means is restored to 100%.
The sending time interval of the communication means is reduced by dynamically adjusting the sending time intervals of various communication means, the communication means with effective communication is preferably adopted to communicate with an upper computer by adopting timely and free communication means according to the conditions that the communication cost is from low to high, the communication response time is from short to long, and the communication transmission is from fast to slow, so that the transmission speed is improved, and the communication charge is reduced.
Example 3: fig. 5 shows a method for communication by free, general-charge, high-charge communication means:
the method comprises the following steps that according to a sending sequence and an interval list, encapsulated datagrams are sent out in sequence from a plurality of communication means, and after the step of waiting for the response of an upper computer, the method further comprises the following steps:
judging whether the upper computer supports a WIFI communication means for data communication;
if the upper computer does not support WIFI communication means data communication, automatically entering the next communication means LORA for data communication;
if the upper computer supports data communication of the WIFI communication means, sending data from the communication means, and checking whether data communication response of the WIFI communication means and the upper computer is correct or not;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the WIFI communication means and the upper computer is correct;
when the response is overtime, the failure of sending the data operation data by the communication means is proved, and the next communication means LORA is entered for data communication;
judging whether the upper computer supports an LORA communication means to carry out data communication;
if the upper computer does not support the LORA communication means data communication, the next communication means LAN is automatically entered for data communication;
if the upper computer supports the data communication of the LORA communication means, the data is sent out from the communication means, and whether the data communication response of the LORA communication means and the upper computer is correct or not is checked;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the LORA communication means and the upper computer is correct;
when the response is overtime, the failure of sending data operation data by the communication means is proved, and the next communication means LAN is entered for data communication;
judging whether the upper computer supports the LAN communication means for data communication;
if the upper computer does not support the data communication of the LAN communication means, the next communication means GPRS is automatically entered for data communication;
if the upper computer supports the data communication of the LAN communication means, the data is sent out from the communication means, and whether the data communication response between the LAN communication means and the upper computer is correct or not is checked;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the LAN communication means and the upper computer is correct;
and when the response is overtime, the data operation data transmission failure of the LAN communication means is proved, the data communication step of judging whether the upper computer supports the WIFI communication means or not is returned, and the response of the upper computer and the free communication means is repeatedly tried for many times so as to strive for the successful data transmission from the free communication means.
Whether the various communication means support communication and whether the response is correct are judged according to the priority sequence of free, general-charge and high-charge communication means, and the proper communication means is selected for data transmission so as to ensure that the communication method of the invention has the advantages of timely and quick transmission, low communication charge and organically combined various communication means.
Judging whether the upper computer supports GPRS communication means to carry out data communication;
if the upper computer does not support GPRS communication means data communication, the next communication means NB-IoT is automatically entered for data communication;
if the upper computer supports GPRS communication means data communication, sending data from the communication means, and checking whether the data communication response between the conventional communication means and the upper computer is correct;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the GPRS communication means and the upper computer is correct;
when the response is overtime, the failure of sending the data operation data by the communication means is proved, and the next communication means NB-IoT is entered for data communication;
judging whether the upper computer supports an NB-IoT communication means for data communication;
if the upper computer does not support NB-IoT communication means data communication, automatically entering the next communication means Beidou short message for data communication;
if the upper computer supports the NB-IoT communication means data communication, executing the data transmission from the communication means, and checking whether the NB-IoT communication means and the upper computer data communication response is correct;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the NB-IoT communication means and the upper computer is correct;
when the response is overtime, the failure of sending data operation data by the communication means is proved, and the Beidou short message of the next communication means is used for data communication;
judging whether the upper computer supports the Beidou short message communication means for data communication;
if the upper computer does not support the Beidou short message communication means data communication, waiting for the generation of the next data to be sent;
if the upper computer supports the data communication of the Beidou short message communication means, the data transmission from the communication means is executed, and whether the data communication response of the Beidou short message communication means and the upper computer is correct or not is checked;
if the response is correct, the data is confirmed to be successfully transmitted by the communication means, and then the generation of the next data to be transmitted is waited;
if the response is incorrect, checking whether the response is overtime, and if the response is not overtime, returning to the step of checking whether the data communication response of the Beidou short message communication means and the upper computer is correct;
and when the response is overtime, the communication means fails to send the data operation data, and the next data to be sent is waited to be generated.
If the free communication means does not support communication, whether the communication means such as GPRS, NB-IoT and Beidou short message communication means support communication or not and whether response is correct or not are judged, and proper communication means are selected for data transmission, so that the communication method disclosed by the invention can be ensured to be timely and fast in transmission and low in communication charge, and various communication means are organically combined together.
As shown in fig. 5, for free and fast communication means, WiFi, LAN, etc. (generally, WiFi and LAN are common communication networks, and existing communication networks do not affect the cost of new communication systems or devices connected thereto, so they are considered as free approximately), in the control, as shown in fig. 5, a single communication means is adopted for multiple (for example, a single communication means is used for 2 times) transmission, so that the success rate of transmission is increased, and the frequency of use of charging communication means (2G/3G/4G/5G conventional communication means or beidou short message, etc.) is reduced, thereby reducing the overall operation and maintenance cost.
Example 4: fig. 1, fig. 2, fig. 4 and fig. 5 show that the communication means transmits, responds, receives, processes data, and updates the transmission order and interval list, the latest reception list.
As shown in fig. 1 and 4, each communication means transmits the same data, and each communication means works independently, and the receiver matches and identifies the "generation time", "generation sequence number" and "device number" to reject the repeated and redundant data; after the receiver finishes the processing, the receiver responds by the communication means corresponding to the data source and returns the response in the original way, and the following rules are provided: as shown in fig. 1, the upper computer processes an up-sent datagram, and all the datagrams are responded by using the communication means of the source; when the upper computer needs to actively send data to the equipment, communication means to be used are listed in a mode of being latest, fastest and low-cost, the sending sequence, the interval list and the latest receiving list are updated according to the time sequence for the target equipment of each data and the communication mode of the target equipment and the upper computer, dynamic management is carried out, and the data are sent in sequence dynamically as shown in the flows of the figure 1, the figure 2 and the figure 5 when each data is generated; the upper computer and the equipment need to respond no matter whether the received datagram sent to the upper computer is repeated or not; performing an action with respect to a datagram that is not repeated; and for repeated datagrams, the equipment and the upper computer only execute control actions once. That is, when the upper computer responds, the original path responds reversely, for example, data sent from WiFi, the upper computer sends corresponding IP and PORT through the WiFi, and the original path responds reversely; similarly, the upper computer returns the response data to the initiator through the corresponding communication means. When the upper computer actively transmits data to the communication system, the original path responds in the reverse direction, similarly to the control logic and the sequence transmission of fig. 1, fig. 2 and fig. 5.
Example 5: fig. 3, 5, 6, and 7 illustrate communication logic of the device, the base station, and the upper computer:
the method for carrying out multiple communication with the upper computer is realized in several forms: multiple transmissions by a single communication means, single transmissions by multiple communication means, multiple transmissions by multiple communication means, and combinations thereof; the method adopts a method of optimizing communication means by dynamic optimization, and the specific control logic is as follows: the device in fig. 6 needs to communicate with the upper computer/server through the peripheral base stations 1, 2, 3, and 4, and is effective at the same time, so as to avoid absolute dependence on a certain communication means and improve the reliability of the system, specifically, after obtaining data of the device, a certain base station in fig. 6 determines whether WiFi communication is supported or not, if so, sends out the data from the WiFi communication means and waits for a response of the upper computer, and if a correct response of the upper computer is received, waits for the next data to be generated;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the LoRa communication means and waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the LAN communication means, waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the WiFi communication means, waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the LoRa communication means and waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the LAN communication means, waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether response is overtime, if overtime, sending out the data from the GPRS communication means, waiting for the response of the upper computer, and if correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the NB-IoT communication means, waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending out the data from the Beidou short message communication means, waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if there is no response or a response error, it is determined whether "response time out", and if so, a time out process … … is performed.
And the other 3 base stations independently complete the data transmission by adopting the same method.
Generally, 6 communication means are continuously used to communicate with an upper computer, and the communication is not successful, or equipment or the upper computer fails, and a traditional calculation method comprises the following steps: assuming that the success rate of each communication means is 80%, the corresponding failure rate is 20%, and the probability of simultaneous failure of 6 communication means is: 0.2^6=0.000064, i.e. the power is: 1-0.000064= 99.9936%.
Similarly, the same method and control logic are also adopted for the communication mode between the device and the base station, the device communicates with the upper computer through 4 common modes such as LoRa, bluetooth BLE, ZigBee and data transmission radio station, and the like, through the base station, the situation is more complicated, the combination of fig. 3 and fig. 6, device ← → base station 1 ← → upper computer, 4 combinations are provided between the device and the base station 1, 7 combinations are provided between the base station 1 and the upper computer, and 4 x 7=28 combinations are combined; device ← → base station 2 ← → upper computer, there are 4 combinations between device and base station 2, 7 combinations between base station 2 and upper computer, combine and be 28 combinations too; … …, the more base stations around the equipment, the more the combination, the traditional round of patrol mode, the more complex the switching processing logic of the communication means, the less the controllable the communication time of the single datagram, for the clear description, neglecting the communication mode of the base station and the upper computer temporarily, the equipment communicates with the upper computer through the base station 1, no response is given for a certain time, then automatically communicates with the upper computer through the base station 2 … …, one base station fails to communicate, data is directly forwarded through another base station, the communication failure rate is obviously reduced, namely the system reliability is improved.
As shown in fig. 7, after the device generates data, it is first determined whether the communication of the base station 1 is supported, if so, the data is sent out from the communication means of the base station 1 and waits for the response of the upper computer, and if a correct response of the upper computer is received, the next data generation is waited;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the communication means of the base station 2 and waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the communication means of the base station 3 and waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if no response or response error exists, judging whether the response is overtime, if overtime, sending the data out from the communication means of the base station 4 and waiting for the response of the upper computer, and if the correct response of the upper computer is received, waiting for the next data generation;
if there is no response or a response error, it is determined whether to "time out" the response, … …, and so on.
In the example, there is a special case that the device directly communicates with the upper computer through WiFi, LAN, GPRS, NB-IoT, etc., and does not pass through the base station in the middle (the base station itself shown in fig. 3 has functions of communicating, acquiring, and controlling devices), which is the fastest implementation scheme of this example, and is the most effective one.
In particular, in the implementation, the same communication means may appear multiple times and work independently, for example, the WiFi communication means and the LAN communication means may be ports of multiple WiFi communication means and LAN communication means (i.e. multiple WiFi hardware interfaces, or multiple LAN hardware interfaces, or a combination thereof) to transmit data to be transmitted to the upper computer in different transmission methods and paths from different WiFi hotspots and routers, and receive control data of the upper computer at the same time. For example, a certain communication system uses 4 LAN interfaces, simultaneously connects with broadband networks of china telecommunications, china communications, china mobile, great wall broadband, and simultaneously communicates with an upper computer, and preferentially takes the data information and communication mode returned first, so as to realize optimization of communication means by using the index of response speed; meanwhile, the influence of the failure of a router on the whole communication system is reduced to the minimum when the network of a broadband network service provider is disconnected.
Embodiment 6, as shown in fig. 3, 4, 6, 8, and 10, illustrates a communication apparatus with complementary advantages of multiple master communication technologies according to the present invention:
the communication device comprises a plurality of base stations which are communicated with an upper computer, and also comprises terminal equipment, wherein the terminal equipment can be communicated with the base stations, the base stations are provided with CPU modules and hardware ports, and the CPU modules are connected with the hardware ports and communicated with the upper computer;
the CPU module also comprises an application layer, a service layer and a data link layer which are connected and communicated with each other;
the hardware port also comprises an interface driving layer which is connected with each hardware port and combines with a data link layer to select a communication means so as to realize the function of receiving and transmitting data by the communication means;
the terminal equipment is used for receiving and transmitting data;
the base station is used for transmitting and receiving data;
the interface driver layer may be used to support applications including, but not limited to: RS232, RS485, CAN, data transmission radio, special line, power carrier, special wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M, other wireless radio frequency technology, GPRS, traditional short message, NB-IoT, 2G, 3G, 4G, 5G, Beidou short message, satellite phone and other communication means;
the application layer is used for connecting user terminal equipment to realize the requirements;
the service layer is used for the user to call the data link layer;
the data link layer is to:
initializing a sending sequence and interval list and a latest receiving list, presetting the sending sequence and interval list and the latest receiving list, storing a default sending sequence and sending interval, and emptying the latest receiving list;
encapsulating data to be transmitted into datagrams; recording the encapsulated datagram;
sending out the encapsulated datagram from various communication means in sequence, and waiting for the upper computer to respond;
comparing the response datagram with the information of the latest receiving list, and if the same data record exists, not executing action;
if there is no identical data record, performing an action;
recording response data and reporting to a latest receiving list;
finding a communication means sending record corresponding to the response according to the data generation time, the data generation sequence number and the data generation equipment number, and subtracting the sending time of the communication means according to the response time of the response data to obtain the response time of the corresponding communication means;
the communication means are classified, and then the sending sequence and interval list are dynamically optimized: dividing various communication means into three levels of free communication means, general charging communication means and high charging communication means, according to the response time of the communication means responded at this time, promoting the sending sequence of the communication means responded at this time at the respective corresponding level, dynamically generating a preferential sequence for the next datagram to be sent, and updating the sending sequence and the interval list for standby;
counting the number of the three levels of communication means without response;
judging whether the next data to be sent is generated;
judging whether other communication means answer the packaged datagram;
the upper computer is used for: all the received datagrams are responded, and corresponding responses are returned in the original way; to confirm that the communication means is valid and to confirm that the specific data content has been sent to the upper computer; the data sent is analyzed and processed, and the communication means response and recording process is returned only for the repeated information, but no action is executed.
Further:
the data link layer is further configured to: judging whether the free communication means responds or not; the transmission interval of the general charging communication means is shortened in proportion;
the transmission interval of the general charging communication means is restored to 100%; the transmission interval of the high-rate communication means is recovered to 100%; continuously judging whether the general charging communication means responds or not; the transmission interval of the high-charge communication means is shortened in proportion; the transmission interval of the high-rate communication means is recovered to 100%; and dynamically updating the sending sequence and the interval list.
Further, the method comprises the following steps:
the data link layer is further configured to: judging whether the upper computer supports a WIFI communication means for data communication; checking whether the data communication response of the WIFI communication means and the upper computer is correct or not; switching the next communication means LORA to carry out data communication; judging whether the upper computer supports an LORA communication means to carry out data communication; checking whether the data communication response of the LORA communication means and the upper computer is correct or not; switching the LAN to the next communication means for data communication; judging whether the upper computer supports the LAN communication means for data communication; checking whether the data communication response of the LAN communication means and the upper computer is correct; switching the data transmission radio station of the next communication means to carry out data communication; judging whether the upper computer supports GPRS communication means for data communication; checking whether the GPRS communication means and the upper computer data communication response are correct or not; switching the next communication means, namely, the Beidou short message for data communication; judging whether the upper computer supports the Beidou short message communication means for data communication; checking whether the Beidou short message communication means and the upper computer data communication response are correct or not; waiting for the next data to be sent to be generated.
The expansion of the CPU module in fig. 3, as shown in fig. 8, is divided into: an application layer, a service layer, a data link layer and an interface driving layer; the application layer provides an interface for applications that communicate and the underlying network for message transport. The service layer mainly aims at the operation of specific problems and processes data service logic. A data link layer (SDK) for encapsulating data to be exchanged into frames, performing encryption processing, managing and optimizing various communication means to obtain a better transmission sequence; decapsulating the received data, and removing repeated data, redundant data, and expired data; identifying and recording different communication means, and when the response is needed, the original path responds reversely; control the transmission sequence and rhythm of various communication means, process the priority sequence of a certain communication means, process exception, restart the communication link, etc. The driving layer mainly aims at a CPU and a peripheral interface hardware circuit and drives corresponding communication means to work, namely a driving method layer of a plurality of communication means. The data link layer encapsulates the "communication means optimization method for data transmission" in fig. 5, and provides the encapsulated data to the service layer, the application layer, and the interface driver layer in an SDK manner.
In particular, the CPU processing portion in fig. 3 is expanded, and the data link layer is also responsible for solving the timing control of the interface driving layer, so as to ensure that no conflict occurs between hardware interfaces. As shown in fig. 3. The data link layer obtains the operating states of various communication means according to the content shown in fig. 3, provides basic information, and provides decision-making data for the method; the performance of the communication system is optimized, and the cost performance of the operation and maintenance of the communication system is improved.
By adopting the communication method and the device with complementary advantages of the multi-master communication technology, the possible conflict between simultaneous working and simultaneous data receiving and sending of various communication means is solved, and the various communication means work independently without mutual influence; the method has the beneficial effects of synergy, high efficiency, high reliability, rapidness and low cost for the whole communication system; the beneficial effects of lower cost are more obvious in equipment systems which travel to and fro in the traditional mobile communication coverage area, the traditional mobile communication blind area and the available WiFi coverage area for a long time. Meanwhile, the method does not need to distinguish the use scenes, and reduces the requirements on professional technical ability of system users and system implementers.
After the implementation of the invention, the following beneficial effects additionally appear: for maintenance and overhaul, whether a certain base station works or not does not need to be concerned, a new base station is directly arranged, and then an abnormal base station is dismounted, so that data exchange between equipment and an upper computer is not influenced, communication is not interrupted, maintenance is not needed, and professional technicians are not needed; for a system with high reliability requirement, a communication base station can be properly and directly added near equipment, so that the reliability of the system is directly improved, and the method is simple and efficient.
The embodiment is a special case for dynamically switching communication means and optimizing communication means by aiming at a plurality of commonly used communication means such as a WiFi communication module, a LoRa communication module, a LAN Ethernet communication module, a data transmission radio station module, other wireless radio frequency technology modules, a 2G/3G/4G/5G conventional communication system module, a Beidou short message communication module and the like.
The above description is only a preferred and exemplary embodiment of the present invention, and should not be taken as limiting the invention, and any modifications, equivalents, omissions, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1.一种多主通信技术优势互补的通信方法,其特征在于:所述通信方法包括以下步骤:1. A communication method with complementary advantages of multi-master communication technology is characterized in that: the communication method comprises the following steps: 对发送先后顺序和间隔列表、最近接收列表进行初始化,预先设置发送先后顺序和间隔列表、最近接收列表,保存默认的发送顺序和发送间隔,清空最近接收列表;Initialize the sending sequence, interval list, and recent receiving list, preset sending sequence, interval list, and recent receiving list, save the default sending sequence and sending interval, and clear the recent receiving list; 当有待发送数据产生时,将待发送数据封装成数据报,该数据报包括但不限于:数据产生的时刻、数据产生的顺序号、数据产生的设备编号以及数据内容;When the data to be sent is generated, the data to be sent is encapsulated into a datagram, the datagram includes but is not limited to: the time when the data is generated, the sequence number of the data generation, the device number of the data generation and the data content; 记录已封装好的数据报;record the encapsulated datagram; 根据发送先后顺序和间隔的列表,依次将已封装好的数据报从多种通信手段发出去,等待上位机应答;According to the list of sending sequence and interval, send the encapsulated datagrams from various communication means in turn, and wait for the response from the host computer; 上位机须要应答所有接收到的数据报,并原路返回对应的应答;以确定该通信手段是有效的,同时确定具体的数据报内容已经发送到上位机;The host computer needs to respond to all the received datagrams, and return the corresponding responses in the same way; to determine that the communication means is valid, and to determine that the specific datagram content has been sent to the host computer; 连续多次发送,均无应答,则退出发送;If there is no response after sending multiple times in a row, quit sending; 如有应答,则将应答数据报与最近接收列表的信息进行比较,如果有同样的数据记录,则不执行动作;同时上位机对上送的数据进行分析、处理,对于重复的信息只原路返回该通信手段应答和记录处理,但不执行动作;If there is a response, compare the response datagram with the information in the most recently received list. If there is the same data record, no action will be performed; at the same time, the upper computer will analyze and process the uploaded data, and only the original route will be used for the repeated information. Returns the communication means response and record processing, but does not perform the action; 如果没有同样的数据记录,则执行动作;If there is no identical data record, execute the action; 记录应答数据报到最近接收列表;Record the reply datagram to the most recent reception list; 根据数据产生的时刻,数据产生的顺序号、数据产生的设备编号找到应答对应的通信手段发送记录,并根据本应答数据的应答时刻减去该通信手段的发送时刻,得到对应通信手段的响应时间;According to the time of data generation, the sequence number of data generation, and the device number of data generation, find the sending record of the communication means corresponding to the response, and subtract the transmission time of the communication means from the response time of this response data to obtain the response time of the corresponding communication means ; 对通信手段分级,然后动态优化发送先后顺序和间隔列表:将多种通信手段分为免费通信手段、一般收费通信手段、高收费通信手段三个等级,根据本次应答的通信手段的响应时间,提升本次有应答的通信手段在各自对应等级的发送顺序,为下一个待发数据报动态生成一个优先的顺序,更新发送先后顺序和间隔列表备用;Classify the communication means, and then dynamically optimize the sending sequence and interval list: Divide various communication means into three levels: free communication means, general charging communication means, and high charging communication means. According to the response time of the communication means of this response, Improve the sending order of the responding communication means at their respective levels, dynamically generate a priority order for the next datagram to be sent, and update the sending order and interval list for backup; 如果其它通信手段有应答,则返回如有应答,则将应答数据报与最近接收列表的信息进行比较,如果有同样的数据记录,则不执行动作步骤;If there is a response from other means of communication, if there is a response, the response datagram will be compared with the information in the latest received list, and if there is the same data record, the action steps will not be executed; 统计无应答的所述三个等级的通信手段的次数;Counting the number of unanswered communication means of the three levels; 判断是否有下一个待发送数据产生;Determine whether there is the next data to be sent; 如果下一个待发送数据产生,返回所述当有待发送数据产生时,将待发送数据封装成数据报,该数据报包括但不限于:数据产生的时刻、数据产生的顺序号、数据产生的设备编号以及数据内容步骤;If the next data to be sent is generated, return the data to be sent when the data to be sent is generated, encapsulate the data to be sent into a datagram, the datagram includes but is not limited to: the time when the data is generated, the sequence number of the data generation, and the device that generates the data. Number and data content steps; 如果下一个待发送数据没有产生,判断是否有其它通信手段应答所述已封装好的数据报;If the next data to be sent is not generated, determine whether there are other communication means to respond to the encapsulated datagram; 如果其它通信手段有应答,则返回如有应答,则将应答数据报与最近接收列表的信息进行比较,如果有同样的数据记录,则不执行动作步骤;If there is a response from other means of communication, if there is a response, the response datagram will be compared with the information in the latest received list, and if there is the same data record, the action steps will not be executed; 如果其它通信手段没有应答,则返回判断是否有下一个待发送数据产生步骤。If there is no response from other communication means, return to the step of judging whether there is the next generation of data to be sent. 2.如权利要求1所述的多主通信技术优势互补的通信方法,其特征在于:2. The communication method with complementary advantages of multi-master communication technology as claimed in claim 1, is characterized in that: 所述免费通信手段包括但不限于:RS232、RS485、CAN、数传电台、专线、电力载波、专用无线通信网络、蓝牙、WiFi、LoRa、ZigBee、433M以及其它无线射频技术通信手段;The free communication means include but are not limited to: RS232, RS485, CAN, digital radio, dedicated line, power carrier, dedicated wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M and other wireless radio frequency communication means; 所述一般收费通信手段包括但不限于:GPRS、传统短信、NB-IoT、2G、3G、4G、5G通信手段;The general charging communication means include but are not limited to: GPRS, traditional SMS, NB-IoT, 2G, 3G, 4G, and 5G communication means; 所述高收费通信手段包括但不限于:北斗短报文、卫星电话通信手段;The high-charge communication means include but are not limited to: Beidou short message, satellite phone communication means; 所述发送先后顺序和间隔列表的先后顺序通信手段为免费通信手段、一般收费通信手段以及高收费通信手段;The communication means of the sending sequence and the sequence of the interval list are free communication means, general charging communication means and high charging communication means; 所述发送先后顺序和间隔列表的发送先后顺序通信手段具体是: RS232、RS485、CAN、数传电台、专线、电力载波、专用无线通信网络、蓝牙、WiFi、LoRa、ZigBee、433M、其它无线射频技术、GPRS、传统短信、NB-IoT、2G、3G、4G、5G、北斗短报文、卫星电话;对应的通信手段发送间隔是相对固定的值,根据使用场景,出厂时固化:The communication means of the sending sequence and the sending sequence of the interval list are: RS232, RS485, CAN, digital radio, dedicated line, power carrier, dedicated wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M, other radio frequency Technology, GPRS, traditional SMS, NB-IoT, 2G, 3G, 4G, 5G, Beidou short message, satellite phone; the corresponding communication means sending interval is a relatively fixed value, according to the usage scenario, it is fixed at the factory: 每种通信手段两次发送数据的时间间隔设置在0.1~70秒,每条数据内容两次发送的时间间隔设置在0.1~70秒;The time interval for sending data twice by each communication means is set at 0.1~70 seconds, and the time interval between two data transmissions for each data content is set at 0.1~70 seconds; 对于同一个数据报,每两种免费通信手段的时间间隔区间:0~10秒;每两种一般收费通信手段的时间间隔区间:5~25秒;每两种高收费通信手段的时间间隔区间:8~70秒。For the same datagram, the time interval interval of each two free communication methods: 0~10 seconds; the time interval interval of each two general charge communication methods: 5~25 seconds; the time interval interval of each two high charge communication methods : 8~70 seconds. 3.如权利要求2所述的多主通信技术优势互补的通信方法,其特征在于:在所述统计无应答的所述三个等级的通信手段的次数步骤之后,还包括以下步骤:3. The communication method with complementary advantages of multi-master communication technology as claimed in claim 2, characterized in that: after the step of counting the number of times of the three levels of communication means without a response, the method further comprises the following steps: 判断免费通信手段是否均无应答;Determine whether there is no response to the free communication means; 如果免费通信手段均无应答,一般收费通信手段的发送间隔按比例缩短,缩短值为:10%×免费通信手段连续无应答次数,所述免费通信手段连续无应答次数不大于8次;If there is no response to the free communication means, the sending interval of the general charging communication means is shortened proportionally, and the shortening value is: 10% × the number of consecutive non-response times for the free communication means, and the number of consecutive non-response times for the free communication means is not more than 8 times; 如果免费通信手段有应答,一般收费通信手段的发送间隔恢复到100%;同时,高收费通信手段发送间隔恢复到100%;If there is a response from the free communication means, the transmission interval of the general charging communication means is restored to 100%; at the same time, the transmission interval of the high charging communication means is restored to 100%; 动态更新发送先后顺序和间隔列表;Dynamically update the sending sequence and interval list; 继续判断一般收费通信手段是否均无应答;Continue to judge whether the general charging communication means are unresponsive; 如果一般收费通信手段均无应答,高收费通信手段的发送间隔按比例缩短,缩短值为:10%×一般收费通信手段连续无应答次数,所述一般收费通信手段连续无应答次数不大于8次;If there is no response from the general charging communication means, the sending interval of the high charging communication means is shortened proportionally, and the shortening value is: 10% × the number of consecutive non-response times for the general charging communication means, and the number of consecutive non-response times for the general charging communication means is not more than 8 times. ; 如果一般收费通信手段有应答,高收费通信手段发送间隔恢复到100%;If there is a response from the general charging communication means, the sending interval of the high charging communication means is restored to 100%; 动态更新发送先后顺序和间隔列表。Dynamically update the sending sequence and interval list. 4.如权利要求2所述的多主通信技术优势互补的通信方法,其特征在于:在所述根据发送先后顺序和间隔的列表,依次将已封装好的数据报从多种通信手段发出去,等待上位机应答步骤之后,还包括以下步骤:4. The communication method with complementary advantages of multi-master communication technology as claimed in claim 2, it is characterized in that: in the described list according to the sending sequence and interval, the encapsulated datagram is sent out from a variety of communication means in turn , after waiting for the response step of the host computer, it also includes the following steps: 判断上位机是否支持WIFI通信手段进行数据通信;Determine whether the host computer supports WIFI communication means for data communication; 如果上位机不支持WIFI通信手段数据通信,则自动进入下一种通信手段LORA进行数据通信;If the host computer does not support WIFI communication means data communication, it will automatically enter the next communication means LORA for data communication; 如果上位机支持WIFI通信手段数据通信,执行从本次通信手段发出数据,检查WIFI通信手段与上位机数据通信应答是否正确;If the host computer supports WIFI communication means data communication, execute the data sent from this communication means, check whether the WIFI communication means and the host computer data communication response are correct; 如果应答正确,就确认了该数据已由本次通信手段发送成功,等待下一个待发送数据产生;If the response is correct, it confirms that the data has been successfully sent by this communication means, and waits for the next data to be sent; 如果应答不正确,检查是否应答超时,如果应答没有超时,则返回检查WIFI通信手段与上位机数据通信应答是否正确步骤;If the response is incorrect, check whether the response timed out, if the response is not timed out, return to the steps of checking whether the WIFI communication means and the data communication response of the host computer are correct; 当出现应答超时,则证明本次通信手段发送数据操作数据失败,将进入下一种通信手段LORA进行数据通信;When the response time-out occurs, it proves that this communication method fails to send data operation data, and it will enter the next communication method LORA for data communication; 判断上位机是否支持LORA通信手段进行数据通信;Determine whether the host computer supports LORA communication means for data communication; 如果上位机不支持LORA通信手段数据通信,则自动进入下一种通信手段LAN进行数据通信;If the host computer does not support LORA communication means data communication, it will automatically enter the next communication means LAN for data communication; 如果上位机支持LORA通信手段数据通信,执行从本次通信手段发出数据,检查LORA通信手段与上位机数据通信应答是否正确;If the host computer supports LORA communication means data communication, execute the data sent from this communication means, and check whether the LORA communication means and the host computer data communication response are correct; 如果应答正确,就确认了该数据已由本次通信手段发送成功,等待下一个待发送数据产生;If the response is correct, it confirms that the data has been successfully sent by this communication means, and waits for the next data to be sent; 如果应答不正确,检查是否应答超时,如果应答没有超时,则返回检查LORA通信手段与上位机数据通信应答是否正确步骤;If the response is incorrect, check whether the response times out, if the response does not time out, return to the steps to check whether the LORA communication method and the host computer data communication response are correct; 当出现应答超时,则证明本次通信手段发送数据操作数据失败,将进入下一种通信手段LAN进行数据通信;When the response time-out occurs, it proves that this communication method fails to send data operation data, and it will enter the next communication method LAN for data communication; 判断上位机是否支持LAN通信手段进行数据通信;Determine whether the host computer supports LAN communication means for data communication; 如果上位机不支持LAN通信手段数据通信,则自动进入下一种通信手段GPRS进行数据通信;If the host computer does not support data communication by LAN communication means, it will automatically enter the next communication means GPRS for data communication; 如果上位机支持LAN通信手段数据通信,执行从本次通信手段发出数据,检查LAN通信手段与上位机数据通信应答是否正确;If the host computer supports the data communication of the LAN communication means, execute the data sent from the current communication means, and check whether the response of the LAN communication means and the data communication of the host computer is correct; 如果应答正确,就确认了该数据已由本次通信手段发送成功,等待下一个待发送数据产生;If the response is correct, it confirms that the data has been successfully sent by this communication means, and waits for the next data to be sent; 如果应答不正确,检查是否应答超时,如果应答没有超时,则返回检查LAN通信手段与上位机数据通信应答是否正确步骤;If the response is not correct, check whether the response timed out, if the response is not timed out, return to the steps of checking whether the LAN communication means and the host computer data communication response are correct; 当出现应答超时,则证明本次LAN通信手段发送数据操作数据失败,将返回判断上位机是否支持WIFI通信手段进行数据通信步骤,重复多次尝试与免费通信手段应答,以争取从免费通信手段发送数据成功。When the response time-out occurs, it proves that the transmission of data operation data by the LAN communication means failed, and it will return to the step of judging whether the host computer supports the WIFI communication means for data communication, and repeats several attempts to respond to the free communication means in order to try to send the data from the free communication means. Data succeeded. 5.如权利要求4所述的多主通信技术优势互补的通信方法,其特征在于:在所述当出现应答超时,则证明本次LAN通信手段发送数据操作数据失败步骤之后,还包括以下步骤:5. The communication method with complementary advantages of multi-master communication technology as claimed in claim 4, characterized in that: after the described time-out response occurs, it is proved that this LAN communication means sends data operation data after the failure step, further comprising the following steps : 判断上位机是否支持GPRS通信手段进行数据通信;Determine whether the host computer supports GPRS communication means for data communication; 如果上位机不支持GPRS通信手段数据通信,则自动进入下一种通信手段NB-IoT进行数据通信;If the host computer does not support GPRS communication means data communication, it will automatically enter the next communication means NB-IoT for data communication; 如果上位机支持GPRS通信手段数据通信,执行从本次通信手段发出数据,检查常规通信手段与上位机数据通信应答是否正确;If the host computer supports GPRS communication means data communication, execute the data sent from this communication means, and check whether the response of the conventional communication means and the host computer data communication is correct; 如果应答正确,就确认了该数据已由本次通信手段发送成功,等待下一个待发送数据产生;If the response is correct, it confirms that the data has been successfully sent by this communication means, and waits for the next data to be sent; 如果应答不正确,检查是否应答超时,如果应答没有超时,则返回检查GPRS通信手段与上位机数据通信应答是否正确步骤;If the response is incorrect, check whether the response timed out, if the response is not timed out, return to the steps of checking whether the GPRS communication means and the host computer data communication response are correct; 当出现应答超时,则证明本次通信手段发送数据操作数据失败,将进入下一种通信手段NB-IoT进行数据通信;When the response time-out occurs, it proves that this communication method failed to send data operation data, and it will enter the next communication method NB-IoT for data communication; 判断上位机是否支持NB-IoT通信手段进行数据通信;Determine whether the host computer supports NB-IoT communication means for data communication; 如果上位机不支持NB-IoT通信手段数据通信,则自动进入下一种通信手段北斗短报文进行数据通信;If the host computer does not support NB-IoT communication means data communication, it will automatically enter the next communication means Beidou short message for data communication; 如果上位机支持NB-IoT通信手段数据通信,执行从本次通信手段发出数据,检查NB-IoT通信手段与上位机数据通信应答是否正确;If the host computer supports NB-IoT communication means data communication, execute the data sent from this communication means, and check whether the NB-IoT communication means and the host computer data communication response are correct; 如果应答正确,就确认了该数据已由本次通信手段发送成功,等待下一个待发送数据产生;If the response is correct, it confirms that the data has been successfully sent by this communication means, and waits for the next data to be sent; 如果应答不正确,检查是否应答超时,如果应答没有超时,则返回检查NB-IoT通信手段与上位机数据通信应答是否正确步骤;If the response is incorrect, check whether the response times out. If the response does not time out, return to the steps to check whether the NB-IoT communication method and the host computer data communication response are correct; 当出现应答超时,则证明本次通信手段发送数据操作数据失败,将进入下一种通信手段北斗短报文进行数据通信;When the response time-out occurs, it proves that this communication method fails to send data operation data, and it will enter the next communication method, Beidou short message for data communication; 判断上位机是否支持北斗短报文通信手段进行数据通信;Determine whether the host computer supports the Beidou short message communication method for data communication; 如果上位机不支持北斗短报文通信手段数据通信,则等待下一个待发送数据产生;If the host computer does not support the Beidou short message communication method data communication, wait for the next data to be sent; 如果上位机支持北斗短报文通信手段数据通信,执行从本次通信手段发出数据,检查北斗短报文通信手段与上位机数据通信应答是否正确;If the host computer supports data communication by the Beidou short message communication method, execute data transmission from this communication method, and check whether the Beidou short message communication method and the data communication response of the host computer are correct; 如果应答正确,就确认了该数据已由本次通信手段发送成功,则等待下一个待发送数据产生;If the response is correct, it confirms that the data has been successfully sent by this communication means, and waits for the next data to be sent to be generated; 如果应答不正确,检查是否应答超时,如果应答没有超时,则返回检查北斗短报文通信手段与上位机数据通信应答是否正确步骤;If the response is incorrect, check whether the response times out. If the response does not time out, return to the steps to check whether the Beidou short message communication method and the data communication response from the host computer are correct; 当出现应答超时,则证明本次通信手段发送数据操作数据失败,等待下一个待发送数据产生。When a response timeout occurs, it proves that the data transmission operation data by the communication means failed, and the next data to be sent is waited for to be generated. 6.一种多主通信技术优势互补的通信装置,其特征在于:所述通信装置包括若干个与上位机通信的基站,所述通信装置还包括终端设备,所述终端设备可与所述基站进行通信,所述基站设有CPU模块和硬件端口,所述CPU模块连接硬件端口与上位机通信;6. A communication device with complementary advantages of multi-master communication technology, characterized in that: the communication device includes several base stations that communicate with a host computer, the communication device further includes a terminal device, and the terminal device can communicate with the base station. For communication, the base station is provided with a CPU module and a hardware port, and the CPU module connects the hardware port to communicate with the host computer; 所述CPU模块还包括相互连接通信的应用层、业务层以及数据链路层;The CPU module also includes an application layer, a business layer and a data link layer that communicate with each other; 所述硬件端口还包括接口驱动层,接口驱动层与各硬件端口连接,结合数据链路层,选择通信手段,实现该种通信手段收发数据的功能;The hardware port further includes an interface driver layer, the interface driver layer is connected with each hardware port, and in combination with the data link layer, a communication means is selected to realize the function of sending and receiving data by the communication means; 所述终端设备用于收发数据;The terminal device is used to send and receive data; 所述基站用于转收发数据;The base station is used for forwarding and receiving data; 所述接口驱动层可用于支持包括但不限于:RS232、RS485、CAN、数传电台、专线、电力载波、专用无线通信网络、蓝牙、WiFi、LoRa、ZigBee、433M、其它无线射频技术、GPRS、传统短信、NB-IoT、2G、3G、4G、5G、北斗短报文、卫星电话等通信手段的通信驱动;The interface driver layer can be used to support including but not limited to: RS232, RS485, CAN, digital radio, dedicated line, power carrier, dedicated wireless communication network, Bluetooth, WiFi, LoRa, ZigBee, 433M, other wireless radio frequency technologies, GPRS, Communication driver for traditional SMS, NB-IoT, 2G, 3G, 4G, 5G, Beidou short message, satellite phone and other communication means; 所述应用层用于连接使用者终端设备实现其需求;The application layer is used to connect the user terminal equipment to realize its requirements; 所述业务层用于使用者调用数据链路层;The business layer is used by the user to invoke the data link layer; 所述数据链路层用于:对发送先后顺序和间隔列表、最近接收列表进行初始化,预先设置发送先后顺序和间隔列表、最近接收列表,保存默认的发送顺序和发送间隔,清空最近接收列表;将待发送数据封装成数据报;记录已封装好的数据报;依次将已封装好的数据报从多种通信手段发出去,等待上位机应答;将应答数据报与最近接收列表的信息进行比较,如果有同样的数据记录,则不执行动作;如果没有同样的数据记录,则执行动作;记录应答数据报到最近接收列表;根据数据产生的时刻,数据产生的顺序号、数据产生的设备编号找到应答对应的通信手段发送记录,并根据本应答数据的应答时刻减去该通信手段的发送时刻,得到对应通信手段的响应时间;对通信手段分级,然后动态优化发送先后顺序和间隔列表:将多种通信手段分为免费通信手段、一般收费通信手段、高收费通信手段三个等级,根据本次应答的通信手段的响应时间,提升本次有应答的通信手段在各自对应等级的发送顺序,为下一个待发数据报动态生成一个优先的顺序,更新发送先后顺序和间隔列表备用;统计无应答的所述三个等级的通信手段的次数;判断是否有下一个待发送数据产生;判断是否有其它通信手段应答已封装好的数据报;The data link layer is used for: initializing the sending sequence, interval list, and recent receiving list, presetting the sending sequence, interval list, and recent receiving list, saving the default sending sequence and sending interval, and clearing the recent receiving list; Encapsulate the data to be sent into datagrams; record the encapsulated datagrams; send the encapsulated datagrams from a variety of communication means in turn, and wait for the host computer to respond; compare the response datagram with the information in the recently received list , if there is the same data record, do not perform the action; if there is no same data record, perform the action; record the response data report to the recent receiving list; according to the time when the data is generated, the sequence number of the data generation and the device number of the data generation are found. Reply the corresponding communication means sending record, and subtract the sending time of the communication means from the response time of this response data to obtain the response time of the corresponding communication means; classify the communication means, and then dynamically optimize the sending sequence and interval list: These communication means are divided into three levels: free communication means, general charging communication means, and high charging communication means. According to the response time of the communication means of this response, the sending order of the communication means that have responded this time in their respective levels is improved, as follows: The next to-be-sent datagram dynamically generates a priority order, and updates the sending sequence and interval list for backup; counts the number of communication means of the three levels without a response; judges whether the next data to be sent is generated; judges whether there is Other means of communication respond to the encapsulated datagram; 所述上位机用于:应答所有接收到的数据报,并原路返回对应的应答;以确定该通信手段是有效的,同时确定具体的数据内容已经发送到上位机;对上送的数据进行分析、处理,对于重复的信息只原路返回该通信手段应答和记录处理,但不执行动作。The upper computer is used to: respond to all received datagrams, and return the corresponding response in the same way; determine that the communication means is valid, and at the same time determine that the specific data content has been sent to the upper computer; Analysis and processing, for repeated information, only return to the communication means to respond and record processing, but do not perform actions. 7.如权利要求6所述的多主通信技术优势互补的通信装置,其特征在于:所述数据链路层还用于:7. The multi-master communication technology complementary communication device according to claim 6, wherein the data link layer is further used for: 判断免费通信手段是否应答;一般收费通信手段的发送间隔按比例缩短;一般收费通信手段的发送间隔恢复到100%;高收费通信手段发送间隔恢复到100%;继续判断一般收费通信手段是否应答;高收费通信手段的发送间隔按比例缩短;高收费通信手段发送间隔恢复到100%;动态更新发送先后顺序和间隔列表。Judging whether the free communication means responds; the sending interval of the general charging communication means is shortened proportionally; the sending interval of the general charging communication means is restored to 100%; the sending interval of the high charging communication means is restored to 100%; continue to judge whether the general charging communication means responds; The sending interval of high-charge communication means is shortened proportionally; the sending interval of high-charge communication means is restored to 100%; the sending sequence and interval list are dynamically updated. 8.如权利要求6所述的多主通信技术优势互补的通信装置,其特征在于:所述数据链路层还用于:8. The multi-master communication technology complementary communication device according to claim 6, wherein the data link layer is further used for: 判断上位机是否支持WIFI通信手段进行数据通信;检查WIFI通信手段与上位机数据通信应答是否正确;切换下一种通信手段LORA进行数据通信;判断上位机是否支持LORA通信手段进行数据通信;检查LORA通信手段与上位机数据通信应答是否正确;切换下一种通信手段LAN进行数据通信;判断上位机是否支持LAN通信手段进行数据通信;检查LAN通信手段与上位机数据通信应答是否正确;切换下一种通信手段数传电台进行数据通信;判断上位机是否支GPRS通信手段进行数据通信;检查GPRS通信手段与上位机数据通信应答是否正确;切换下一种通信手段北斗短报文进行数据通信;判断上位机是否支持北斗短报文通信手段进行数据通信;检查北斗短报文通信手段与上位机数据通信应答是否正确;等待下一个待发送数据产生。Determine whether the host computer supports WIFI communication means for data communication; check whether the WIFI communication means and the host computer data communication response are correct; switch the next communication means LORA for data communication; judge whether the host computer supports LORA communication means for data communication; check LORA Whether the data communication response between the communication means and the host computer is correct; switch the next communication means LAN for data communication; judge whether the host computer supports the LAN communication means for data communication; check whether the response of the LAN communication means and the host computer data communication is correct; switch to the next A communication means data transmission station for data communication; judge whether the host computer supports GPRS communication means for data communication; check whether the GPRS communication means and the data communication response of the host computer are correct; switch to the next communication means Beidou short message for data communication; judge Whether the host computer supports the Beidou short message communication method for data communication; check whether the Beidou short message communication method and the data communication response of the host computer are correct; wait for the next data to be sent.
CN201910883369.4A 2019-09-18 2019-09-18 Communication method and device with complementary advantages of multi-master communication technology Active CN110808846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910883369.4A CN110808846B (en) 2019-09-18 2019-09-18 Communication method and device with complementary advantages of multi-master communication technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910883369.4A CN110808846B (en) 2019-09-18 2019-09-18 Communication method and device with complementary advantages of multi-master communication technology

Publications (2)

Publication Number Publication Date
CN110808846A CN110808846A (en) 2020-02-18
CN110808846B true CN110808846B (en) 2022-02-08

Family

ID=69487662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910883369.4A Active CN110808846B (en) 2019-09-18 2019-09-18 Communication method and device with complementary advantages of multi-master communication technology

Country Status (1)

Country Link
CN (1) CN110808846B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432446A (en) * 2020-04-13 2020-07-17 丹东东方测控技术股份有限公司 Unmanned wireless communication blind area compensation equipment in pit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080028597A (en) * 2006-09-27 2008-04-01 종 해 김 e-learning learning authentication method and related system
CN101453697A (en) * 2002-09-20 2009-06-10 高通股份有限公司 A communication device for providing multimedia in a group communication network
CN102843390A (en) * 2011-06-21 2012-12-26 中国科学院沈阳自动化研究所 Ethernet deterministic data transmission method of data-oriented role
CN104901877A (en) * 2015-06-17 2015-09-09 燕山大学 Multi-interface self-adaptive wireless heterogeneous network protocol conversion method and communication device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070116051A1 (en) * 2005-11-23 2007-05-24 Chen An M Method and apparatus for transporting IP datagrams over FLO network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453697A (en) * 2002-09-20 2009-06-10 高通股份有限公司 A communication device for providing multimedia in a group communication network
KR20080028597A (en) * 2006-09-27 2008-04-01 종 해 김 e-learning learning authentication method and related system
CN102843390A (en) * 2011-06-21 2012-12-26 中国科学院沈阳自动化研究所 Ethernet deterministic data transmission method of data-oriented role
CN104901877A (en) * 2015-06-17 2015-09-09 燕山大学 Multi-interface self-adaptive wireless heterogeneous network protocol conversion method and communication device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Millimeter-Wave Wireless Local Area Network Over Multimode Fiber System demonstration;Jeanne james;Pengbo Shen;《IEEE Photo你吃啥Technololgy Letters》;20100222;全文 *
无线多模通信终端关键技术的设计与实现;谷丰;《中国优秀硕士学位论文数据库》;20141127;全文 *

Also Published As

Publication number Publication date
CN110808846A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
US9730146B2 (en) System and method for reliable communications over multiple packet RF networks
US7937096B2 (en) Method and associated apparatus for distributed dynamic paging area clustering under heterogeneous access networks
CN111371827B (en) Data transmission method, device and computer readable storage medium
US8818429B2 (en) System and method for enabling wireless data transfer
CN108712787B (en) Multichannel concurrent downlink Internet of things LoRa base station
CN111147566A (en) System and method for ubiquitous IoT dual-module network in Taiwan area based on open network protocol
CN107453849A (en) Mutual-backup linkage method and system for wired link and wireless link of power distribution communication network and air-ground mutual-backup integrated device
CN112040463A (en) Wireless communication network networking method and system based on LoRa equipment
CN105210409A (en) Method and apparatus for controlling a signal path of a radio communication
CN110808846B (en) Communication method and device with complementary advantages of multi-master communication technology
CN111132096B (en) Wireless edge cooperative communication method and device
CN112363207A (en) AODV protocol-based LoRa networking earthquake monitoring system and monitoring method
CN107409356A (en) Message processing device and information processing method
CN115242292A (en) Application framework and transmission control method of software defined edge gateway
CN112702748B (en) Data transmission method and device for hybrid networking
CN112954631B (en) 5G-based Internet of things system
CN102332948A (en) Method and system for controlling main micro-nano satellite communication
CN112770329B (en) Internet of things base station, data backhaul processing system and data backhaul processing method
US20080198817A1 (en) System and Method for Enabling Wireless Data Transfer
EP4036527A1 (en) Utility meter with short and long-range radios with intelligent switching therebetween
CN110691338A (en) Asset state monitoring equipment supporting LoRaWan protocol
CN109246836A (en) A kind of X2 interface establishes management method, device and base station
CN117999775A (en) Arrangement of network infrastructure and method for operating network infrastructure
CN113905363B (en) Locomotive emergency radio station portable display system based on wireless mode and implementation method
EP1534031A2 (en) Method and associated apparatus for distributed dynamic paging are clustering under heterogeneous access networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250519

Address after: 510000 Guangdong Province, Guangzhou City, Yuexiu District, No. 298 Yanjiang Middle Road, Building 32, Self-compiled 02B

Patentee after: Guangzhou Aerospace Recreation Cultural Tourism Development Co., Ltd.

Country or region after: China

Address before: 510000 Guangdong Province Guangzhou City Economic and Technological Development Zone Science City Cai Ping Road No. 11 A219B part

Patentee before: GUANGZHOU KONGTIAN COMMUNICATION TECHNOLOGY SERVICE Co.,Ltd.

Country or region before: China