CN112866069A - Method for solving conflict and disorder of multi-party sending same port - Google Patents
Method for solving conflict and disorder of multi-party sending same port Download PDFInfo
- Publication number
- CN112866069A CN112866069A CN202110082080.XA CN202110082080A CN112866069A CN 112866069 A CN112866069 A CN 112866069A CN 202110082080 A CN202110082080 A CN 202110082080A CN 112866069 A CN112866069 A CN 112866069A
- Authority
- CN
- China
- Prior art keywords
- sending
- control instruction
- receiving unit
- equipment
- attribute
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention relates to a method for solving the problem of conflict and disorder of sending the same port by multiple parties, which establishes a sending and receiving unit and a window reading unit in a port module, wherein the window reading unit establishes a sending queue and adds a control instruction and sender information into the sending queue after acquiring the control instruction received by a communication module; and the sending and receiving unit establishes a sending thread, takes out the data in the sending queue, analyzes the information of the sending party and the control instruction, and sends the control instruction to the controlled equipment. When the controlled device returns data, the data can be returned to the corresponding main control device according to the analyzed sender information. The invention can make the port module know the information of the sender accurately and return data accurately by establishing the sending thread and the sending queue and adding the attribute of the sender in the sending queue, thereby effectively avoiding the control disorder.
Description
Technical Field
The invention relates to the field of equipment operation, in particular to a method for solving the problem that multiple parties send the same port conflict and disorder.
Background
In a motor home system, generally, a single-ended device directly operates electrical devices in the motor home system. However, with the development of scientific technology, the multi-party operation phenomenon of communication through WIFI, GPRS, BLE and RS485 appears in the control of the electrical equipment. When a plurality of devices send instructions to the electrical equipment at the other end through the same port, data returned by the port cannot identify which device is controlled, so that control is disordered.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a method for solving the problem that the conflict and disorder of sending the same port by multiple parties are disordered.
In order to achieve the purpose, the invention adopts the technical scheme that:
a method for solving conflict and disorder of sending the same port by multiple parties is realized based on a system, wherein the system comprises controlled equipment, a port module and a plurality of main control equipment; the master control equipment is in communication connection with the controlled equipment through the port module; the port module is internally provided with a transmitting and receiving unit, a window reading unit and a plurality of communication units, the transmitting and receiving unit is connected with controlled equipment through an RS485 bus, the transmitting and receiving unit is connected with the window reading unit, and the window reading unit is connected with the plurality of communication units through different channels and is in communication connection with main control equipment;
the solution is as follows:
the master control equipment establishes connection with a corresponding communication unit in the port module and sends a control instruction to the communication unit;
the window reading unit establishes a sending queue, the reading communication unit obtains a control instruction sent by the main control equipment, and the control instruction and the sender information are added into the sending queue as a data packet; the data packet comprises a first attribute and a second attribute, wherein the first attribute represents a sender, and the second attribute represents a control instruction sent by the sender;
the sending and receiving unit establishes a sending thread, takes out a data packet from the sending queue and analyzes the data packet; then sending the analyzed attribute II, namely the control instruction, to controlled equipment through an RS485 bus;
the controlled device receives and processes the control instruction and returns processing result data to the sending and receiving unit through the RS485 bus;
after receiving the processing result data, the sending and receiving unit identifies a sending party according to the analyzed attribute I, then sends the processing result data to the main control equipment through a corresponding channel and a communication module, and the sending thread is finished;
and the sending and receiving unit establishes a next sending thread and repeats the sending and receiving operation until all the data packets in the sending queue are completely transmitted.
After the scheme is adopted, the invention establishes the sending and receiving unit and the window reading unit in the port module, wherein the window reading unit establishes the sending queue and adds the control instruction and the information of the sender to the sending queue after acquiring the control instruction received by the communication module; and the sending and receiving unit establishes a sending thread, takes out the data in the sending queue, analyzes the information of the sending party and the control instruction, and sends the control instruction to the controlled equipment. When the controlled device returns data, the data can be returned to the corresponding main control device according to the analyzed sender information. The invention can make the port module know the information of the sender accurately and return data accurately by establishing the sending thread and the sending queue and adding the attribute of the sender in the sending queue, thereby effectively avoiding the control disorder.
Drawings
FIG. 1 is a functional block diagram of the present invention;
fig. 2 is a schematic block diagram of an embodiment of the present invention.
Detailed Description
As shown in fig. 1, the present invention discloses a method for resolving the conflict and confusion of multiple sending parties sending the same port, which is implemented based on a system that includes a controlled device, a port module and a plurality of master control devices; and the master control equipment is in communication connection with the controlled equipment through the port module. The port module is internally provided with a transmitting and receiving unit, a window reading unit and a plurality of communication units, the transmitting and receiving unit is connected with controlled equipment through an RS485 bus, the transmitting and receiving unit is connected with the window reading unit, and the window reading unit is connected with the plurality of communication units through different channels and is in communication connection with the main control equipment.
The solution is as follows:
the master control equipment establishes connection with a corresponding communication unit in the port module and sends a control instruction to the communication unit;
the window reading unit establishes a sending queue, the reading communication unit obtains a control instruction sent by the main control equipment, and the control instruction and the sender information are added into the sending queue as a data packet; the data packet comprises a first attribute and a second attribute, wherein the first attribute represents a sender, and the second attribute represents a control instruction sent by the sender;
the sending and receiving unit establishes a sending thread, takes out a data packet from the sending queue and analyzes the data packet; then sending the analyzed attribute II, namely the control instruction, to controlled equipment through an RS485 bus;
the controlled device receives and processes the control instruction and returns processing result data to the sending and receiving unit through the RS485 bus;
after receiving the processing result data, the sending and receiving unit identifies a sending party according to the analyzed attribute I, then sends the processing result data to the main control equipment through a corresponding channel and a communication module, and the sending thread is finished;
and the sending and receiving unit establishes a next sending thread and repeats the sending and receiving operation until all the data packets in the sending queue are completely transmitted.
As shown in fig. 2, a specific embodiment of the present invention is provided, in which three communication units, namely a BLE unit, a WIFI unit, and a 4G unit, are disposed in the port module. The master control equipment is Bluetooth equipment, WIFI equipment and 4G equipment. When a user issues a control instruction through the Bluetooth equipment, the Bluetooth equipment is connected with the BLE unit of the port module. After the BLE unit receives the control instruction, the window reading unit establishes a sending queue, acquires the control instruction from the BLE unit, and then adds the control instruction and sender information (Bluetooth equipment) into the sending queue. The sending and receiving unit establishes a sending thread, takes out data from a sending queue and analyzes a control instruction and sending party information (Bluetooth equipment). And the transmitting and receiving unit transmits the control instruction to the controlled equipment through the RS485 bus. The controlled device receives and processes the control instruction, and returns processing result data to the sending and receiving unit through the RS485 bus. And after the transmitting and receiving unit receives the processing result data, the processing result data is transmitted to the Bluetooth equipment through the corresponding channel and the BLE module.
In summary, the present invention establishes a sending and receiving unit and a window reading unit in a port module, wherein the window reading unit establishes a sending queue, and adds a control instruction and sender information to the sending queue after acquiring the control instruction received by the communication module; and the sending and receiving unit establishes a sending thread, takes out the data in the sending queue, analyzes the information of the sending party and the control instruction, and sends the control instruction to the controlled equipment. When the controlled device returns data, the data can be returned to the corresponding main control device according to the analyzed sender information. The invention can make the port module know the information of the sender accurately and return data accurately by establishing the sending thread and the sending queue and adding the attribute of the sender in the sending queue, thereby effectively avoiding the control disorder.
The above description is only exemplary of the present invention and is not intended to limit the technical scope of the present invention, so that any minor modifications, equivalent changes and modifications made to the above exemplary embodiments according to the technical spirit of the present invention are within the technical scope of the present invention.
Claims (1)
1. A method for solving the problem of conflict and disorder of multi-party transmission on the same port is characterized in that: the method is realized based on a system, and the system comprises controlled equipment, a port module and a plurality of main control equipment; the master control equipment is in communication connection with the controlled equipment through the port module; the port module is internally provided with a transmitting and receiving unit, a window reading unit and a plurality of communication units, the transmitting and receiving unit is connected with controlled equipment through an RS485 bus, the transmitting and receiving unit is connected with the window reading unit, and the window reading unit is connected with the plurality of communication units through different channels and is in communication connection with main control equipment;
the solution is as follows:
the master control equipment establishes connection with a corresponding communication unit in the port module and sends a control instruction to the communication unit;
the window reading unit establishes a sending queue, the reading communication unit obtains a control instruction sent by the main control equipment, and the control instruction and the sender information are added into the sending queue as a data packet; the data packet comprises a first attribute and a second attribute, wherein the first attribute represents a sender, and the second attribute represents a control instruction sent by the sender;
the sending and receiving unit establishes a sending thread, takes out a data packet from the sending queue and analyzes the data packet; then sending the analyzed attribute II, namely the control instruction, to controlled equipment through an RS485 bus;
the controlled device receives and processes the control instruction and returns processing result data to the sending and receiving unit through the RS485 bus;
after receiving the processing result data, the sending and receiving unit identifies a sending party according to the analyzed attribute I, then sends the processing result data to the main control equipment through a corresponding channel and a communication module, and the sending thread is finished;
and the sending and receiving unit establishes a next sending thread and repeats the sending and receiving operation until all the data packets in the sending queue are completely transmitted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110082080.XA CN112866069A (en) | 2021-01-21 | 2021-01-21 | Method for solving conflict and disorder of multi-party sending same port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110082080.XA CN112866069A (en) | 2021-01-21 | 2021-01-21 | Method for solving conflict and disorder of multi-party sending same port |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112866069A true CN112866069A (en) | 2021-05-28 |
Family
ID=76008823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110082080.XA Pending CN112866069A (en) | 2021-01-21 | 2021-01-21 | Method for solving conflict and disorder of multi-party sending same port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112866069A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160095015A1 (en) * | 2014-09-29 | 2016-03-31 | Qualcomm Incorporated | Control channel collision resolution |
CN106453472A (en) * | 2016-07-15 | 2017-02-22 | 孙宝石 | Multi-communication mode internet of things electronic product-based high-availability realization method and system |
CN106453473A (en) * | 2016-07-15 | 2017-02-22 | 孙宝石 | Method and system of solving internet of things multi-message channel control message conflict |
CN107248943A (en) * | 2017-07-06 | 2017-10-13 | 海信集团有限公司 | Apparatus control method and device |
-
2021
- 2021-01-21 CN CN202110082080.XA patent/CN112866069A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160095015A1 (en) * | 2014-09-29 | 2016-03-31 | Qualcomm Incorporated | Control channel collision resolution |
CN106453472A (en) * | 2016-07-15 | 2017-02-22 | 孙宝石 | Multi-communication mode internet of things electronic product-based high-availability realization method and system |
CN106453473A (en) * | 2016-07-15 | 2017-02-22 | 孙宝石 | Method and system of solving internet of things multi-message channel control message conflict |
CN107248943A (en) * | 2017-07-06 | 2017-10-13 | 海信集团有限公司 | Apparatus control method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104317765B (en) | A kind of one-to-many communication system and implementation method based on serial communication | |
CN106844251B (en) | Data transmission method and device | |
CN103716092B (en) | The communication means of the group network system of bidirectional optical fiber communication in a kind of bus-network | |
CN105187283A (en) | Industrial control network slave station communication method and device based on EtherCAT protocol | |
CN110635982B (en) | Double-host communication method and system on communication bus, industrial control gateway and storage medium | |
CN112260724A (en) | Medium-voltage power line carrier dynamic networking method | |
CN104993996B (en) | Scheduling communication method adopting local area network real-time data transmission | |
CN110798386B (en) | Configurable CAN bus protocol transceiving test method and system | |
CN207968522U (en) | A kind of RS485 bus driving circuits for realizing multi-host communication mode | |
CN112866069A (en) | Method for solving conflict and disorder of multi-party sending same port | |
CN111092952B (en) | Data interaction method and related product | |
CN107580042A (en) | A kind of transmission method and system of distribution network data | |
CN106338920A (en) | Plug-in driving system for intelligent home | |
CN210804414U (en) | Circuit with reusable communication interface | |
CN209860929U (en) | Communication bus structure | |
CN207601789U (en) | A kind of antitransmitter receiver and transmitting-receiving converting system based on RS485 | |
CN213213872U (en) | Gateway based on Bluetooth communication and 5G network communication | |
CN204576495U (en) | A kind of dual bus arbitration control device | |
CN116436970B (en) | Multi-client multi-serial communication method and system based on MQTT protocol | |
CN207976877U (en) | Data transmission system | |
CN103888376B (en) | Data frame transmission method, equipment and system | |
CN113595845B (en) | Method for realizing ring network communication | |
CN114520668B (en) | Signal transmission method, signal transmission system and computer storage medium | |
CN116266834A (en) | Multi-mode group communication system based on WEB | |
CN112260917A (en) | Automobile communication device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210528 |