CN109120731B - Universal communication method, system and device - Google Patents

Universal communication method, system and device Download PDF

Info

Publication number
CN109120731B
CN109120731B CN201810786360.7A CN201810786360A CN109120731B CN 109120731 B CN109120731 B CN 109120731B CN 201810786360 A CN201810786360 A CN 201810786360A CN 109120731 B CN109120731 B CN 109120731B
Authority
CN
China
Prior art keywords
upper computer
communication
communication address
data
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
CN201810786360.7A
Other languages
Chinese (zh)
Other versions
CN109120731A (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.)
Guangdong PHNIX Eco Energy Solution Ltd
Original Assignee
Guangdong PHNIX Eco Energy Solution 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 Guangdong PHNIX Eco Energy Solution Ltd filed Critical Guangdong PHNIX Eco Energy Solution Ltd
Priority to CN201810786360.7A priority Critical patent/CN109120731B/en
Publication of CN109120731A publication Critical patent/CN109120731A/en
Application granted granted Critical
Publication of CN109120731B publication Critical patent/CN109120731B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a universal communication method, a system and a device, wherein the method comprises the steps of configuring the communication address of an upper computer, wherein the communication address of the upper computer comprises the communication addresses of all lower computers needing to communicate; and the upper computer performs data interaction with the lower computer needing to communicate through the configured communication address. The invention realizes the free configuration of the communication address interface by configuring the communication address of the upper computer, so that the upper computer can be matched with a plurality of lower computers, realizes the universal control of the lower computers with the same control logic of the required functions, effectively improves the flexibility of communication, can maximally utilize the resources of the upper computer, and provides possibility for the upper computer to automatically identify and match the communication lower computers. The invention can be widely applied to the communication field.

Description

Universal communication method, system and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, a system, and a device for universal communications.
Background
When the upper computer and the lower computer are in interactive control, a communication protocol is required to be set according to communication rules for data exchange, a specific communication protocol is stable in control, but a universal upper computer needs to be matched with a plurality of lower computers, a single communication protocol cannot be suitable for different lower computers, and the universality of a plurality of sets of communication protocols is limited.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method, a system and a device for universal communication, which can improve the versatility.
The technical scheme adopted by the invention is as follows:
a universal communication method, comprising the steps of:
configuring the communication address of an upper computer, wherein the communication address of the upper computer comprises the communication addresses of all lower computers needing to communicate;
and the upper computer performs data interaction with the lower computer needing to communicate through the configured communication address.
As a further improvement of the general communication method, the data interaction between the upper computer and the lower computer needing to communicate is performed through the configured communication address, and the step specifically includes:
after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable corresponding to the upper computer is obtained through the character index corresponding to the data;
detecting the actual communication address of the intermediate variable at the upper computer, and enabling the actual communication address to be consistent with the communication address of the lower computer needing to communicate;
the upper computer takes out the data of the communication address of the lower computer needing to be communicated for data processing, and then the lower computer with the same control logic of the needed function is subjected to universal control.
As a further improvement of the general communication method, after the upper computer extracts data from the communication address of the lower computer requiring communication, the intermediate variable corresponding to the data in the upper computer is obtained through the character index corresponding to the data, and the step is specifically:
and after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable of the character with the same name in the upper computer is obtained through the character index corresponding to the data.
The other technical scheme adopted by the invention is as follows:
a universal communication system, comprising the steps of:
the configuration unit is used for configuring the communication address of the upper computer, and the communication address of the upper computer comprises the communication addresses of all lower computers needing to communicate;
and the data interaction unit is used for the upper computer to perform data interaction with the lower computer needing to communicate through the configured communication address.
As a further improvement of the general communication system, the data interaction unit specifically includes:
the data extraction unit is used for extracting data from the communication address of the lower computer needing communication by the upper computer and obtaining a corresponding intermediate variable in the upper computer through a character index corresponding to the data;
the address detection unit is used for detecting the actual communication address of the intermediate variable at the upper computer and enabling the actual communication address to be consistent with the communication address of the lower computer needing to be communicated;
and the data processing unit is used for the upper computer to take out the data of the communication address of the lower computer needing to be communicated and process the data, and further to carry out universal control on the lower computer with the same control logic of the required function.
As a further improvement of the general communication system, the data extraction unit specifically includes:
and after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable of the character with the same name in the upper computer is obtained through the character index corresponding to the data.
The invention adopts another technical scheme that:
a universal communication device comprising:
a memory for storing a program;
a processor for executing the program, the program causing the processor to execute the general communication method.
The invention adopts another technical scheme that:
a terminal device, comprising: a processor, a memory for storing instructions, and a transceiver for the terminal device to communicate with other devices, the processor being configured to execute the instructions stored in the memory to cause the terminal device to perform the operations of any of the methods.
The invention adopts another technical scheme that:
a computer-readable storage medium having instructions stored thereon that, when executed, cause a terminal device to perform the operations of any of the methods.
The invention has the beneficial effects that:
the universal communication method, the system and the device realize free configuration of the communication address interface by configuring the communication address of the upper computer, so that the upper computer can be matched with a plurality of lower computers, universal control on the lower computers with the same control logic of required functions is realized, the flexibility of communication is effectively improved, the resource of the upper computer can be utilized to the maximum extent, and the possibility of automatically identifying and matching the communication lower computers by the upper computer is provided.
Drawings
FIG. 1 is a flow chart illustrating the steps of a universal communication method according to the present invention;
fig. 2 is a block diagram of a generic communication system according to the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the accompanying drawings:
referring to fig. 1, the present invention provides a universal communication method, including the following steps:
configuring the communication address of an upper computer, wherein the communication address of the upper computer comprises the communication addresses of all lower computers needing to communicate;
and the upper computer performs data interaction with the lower computer needing to communicate through the configured communication address.
In the embodiment of the invention, when the communication address is configured, the address of the lower computer to be matched is within the range of 1-5000, and the upper computer configures the communication of the address 1-5000 according to the ModBus communication protocol, so that the communication address of the lower computer A is assumed to be 200-. Before developing a universal communication interface system, the communication address range of a lower computer needing to be matched is counted, reservation planning is made on the basis of the address, and communication protocols are formulated in the range by the lower computer developed later.
Further as a preferred embodiment, the data interaction between the upper computer and the lower computer needing to communicate is performed through the configured communication address, and the step specifically includes:
after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable corresponding to the upper computer is obtained through the character index corresponding to the data;
detecting the actual communication address of the intermediate variable at the upper computer, and enabling the actual communication address to be consistent with the communication address of the lower computer needing to communicate;
the upper computer takes out the data of the communication address of the lower computer needing to be communicated for data processing, and then the lower computer with the same control logic of the needed function is subjected to universal control.
Further as a preferred embodiment, after the upper computer extracts data from the communication address of the lower computer needing communication, and obtains the intermediate variable corresponding to the data in the upper computer through the character index corresponding to the data, the step is specifically:
and after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable of the character with the same name in the upper computer is obtained through the character index corresponding to the data.
In the embodiment of the invention, the communication address of the upper computer is configured to be 1-5000, and the communication address of a certain lower computer is 3000 + 3008. And data exchange is carried out between the upper computer and the lower computer through the ModBus communication protocol at the communication address 3000-3008. For example, the configuration name of the configuration address 3000 is the water inlet temperature, the upper computer and the lower computer exchange water inlet temperature data through the address 3000, and the upper computer extracts data of a corresponding communication address register through a middle variable of a character with the same name as the character index of the water inlet temperature for data processing of the water inlet temperature of the upper computer. If the corresponding data of the other lower computer communication address 3000 is room temperature, the upper computer can process the room temperature by only changing the configuration name of 3000 to be the room temperature. And other addresses can realize the configuration of the universal communication interface according to the principle.
Referring to fig. 2, the present invention provides a universal communication system, which includes the following steps:
the configuration unit is used for configuring the communication address of the upper computer, and the communication address of the upper computer comprises the communication addresses of all lower computers needing to communicate;
and the data interaction unit is used for the upper computer to perform data interaction with the lower computer needing to communicate through the configured communication address.
Further as a preferred embodiment, the data interaction unit specifically includes:
the data extraction unit is used for extracting data from the communication address of the lower computer needing communication by the upper computer and obtaining a corresponding intermediate variable in the upper computer through a character index corresponding to the data;
the address detection unit is used for detecting the actual communication address of the intermediate variable at the upper computer and enabling the actual communication address to be consistent with the communication address of the lower computer needing to be communicated;
and the data processing unit is used for the upper computer to take out the data of the communication address of the lower computer needing to be communicated and process the data, and further to carry out universal control on the lower computer with the same control logic of the required function.
Further as a preferred embodiment, the data extraction unit specifically is:
and after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable of the character with the same name in the upper computer is obtained through the character index corresponding to the data.
The invention relates to a universal communication device, comprising:
a memory for storing a program;
a processor for executing the program, the program causing the processor to execute the general communication method.
The invention relates to a terminal device, comprising: a processor, a memory for storing instructions, and a transceiver for the terminal device to communicate with other devices, the processor being configured to execute the instructions stored in the memory to cause the terminal device to perform the operations of the method.
The present invention is a computer-readable storage medium having stored thereon instructions that, when executed, cause a terminal device to perform the operations of any of the methods.
According to the invention, the communication address is configured for the upper computer, so that the free configuration of the communication address interface is realized, the upper computer can be matched with a plurality of lower computers, the universal control of the lower computers with the same control logic of the required functions is realized, the flexibility of communication is effectively improved, the resource of the upper computer can be utilized to the maximum extent, and the possibility of automatically identifying and matching the communication lower computers by the upper computer is provided.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (7)

1. A universal communication method, comprising the steps of:
configuring a communication address set of an upper computer and configuring a communication address set of a plurality of lower computers, wherein the communication address set of each lower computer is a subset of the communication address set of the upper computer;
after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable corresponding to the upper computer is obtained through the character index corresponding to the data;
detecting the actual communication address of the intermediate variable at the upper computer, and enabling the actual communication address to be consistent with the communication address of the lower computer needing to communicate;
the upper computer takes out the data of the communication address of the lower computer needing to be communicated for data processing, and then the lower computer with the same control logic of the needed function is subjected to universal control.
2. A universal communication method as claimed in claim 1, wherein: after the upper computer extracts data from the communication address of the lower computer needing communication, the intermediate variable corresponding to the upper computer in the upper computer is obtained through the character index corresponding to the data, and the step is specifically as follows:
and after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable of the character with the same name in the upper computer is obtained through the character index corresponding to the data.
3. A universal communication system, comprising the steps of:
the system comprises a configuration unit, a communication unit and a communication unit, wherein the configuration unit is used for configuring a communication address set of an upper computer and configuring a plurality of communication address sets of lower computers, and the communication address set of each lower computer is a subset of the communication address set of the upper computer;
the data extraction unit is used for extracting data from the communication address of the lower computer needing communication by the upper computer and obtaining a corresponding intermediate variable in the upper computer through a character index corresponding to the data;
the address detection unit is used for detecting the actual communication address of the intermediate variable at the upper computer and enabling the actual communication address to be consistent with the communication address of the lower computer needing to be communicated;
and the data processing unit is used for the upper computer to take out the data of the communication address of the lower computer needing to be communicated and process the data, and further to carry out universal control on the lower computer with the same control logic of the required function.
4. A universal communication system according to claim 3, wherein: the data extraction unit is specifically as follows:
and after the upper computer extracts data from the communication address of the lower computer needing to communicate, the intermediate variable of the character with the same name in the upper computer is obtained through the character index corresponding to the data.
5. A universal communication device, comprising:
a memory for storing a program;
a processor for executing the program, the program causing the processor to execute the general communication method according to any one of claims 1 to 2.
6. A terminal device, comprising: a processor, a memory for storing instructions and a transceiver for the terminal device to communicate with other devices, the processor being configured to execute the instructions stored in the memory to cause the terminal device to perform the operations of the method of any of claims 1-2.
7. A computer-readable storage medium having stored thereon instructions that, when executed, cause a terminal device to perform the operations of the method of any of claims 1-2.
CN201810786360.7A 2018-07-17 2018-07-17 Universal communication method, system and device Active CN109120731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810786360.7A CN109120731B (en) 2018-07-17 2018-07-17 Universal communication method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810786360.7A CN109120731B (en) 2018-07-17 2018-07-17 Universal communication method, system and device

Publications (2)

Publication Number Publication Date
CN109120731A CN109120731A (en) 2019-01-01
CN109120731B true CN109120731B (en) 2021-10-26

Family

ID=64862878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810786360.7A Active CN109120731B (en) 2018-07-17 2018-07-17 Universal communication method, system and device

Country Status (1)

Country Link
CN (1) CN109120731B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113130261A (en) * 2020-01-16 2021-07-16 上海正泰智能科技有限公司 Circuit breaker, and circuit breaker communication address configuration method and system
CN114500267B (en) * 2022-01-14 2024-05-28 深圳市汇川技术股份有限公司 Mapping relation configuration method, device, system, equipment and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831714A (en) * 2012-07-31 2012-12-19 华立仪表集团股份有限公司 Multi-protocol type power collection system, data exchange method of multi-protocol type power collection system and off-line power selling system
CN106713142B (en) * 2015-11-17 2019-12-24 陕西重型汽车有限公司 Method for transmitting IP message on CAN bus and IP local area network constructed by CAN bus network
CN105610876B (en) * 2016-04-01 2018-10-12 江苏科技大学 Industrial control automation network communication protocol converter and communication protocol conversion method
CN107966984A (en) * 2017-10-16 2018-04-27 太仓爱森思电子电器有限公司 A kind of sweeping robot control system and communications protocol

Also Published As

Publication number Publication date
CN109120731A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
CN106708748B (en) Method and system for improving mounting performance of OpenStack block storage volume
CN108255602A (en) Task combined method and terminal device
CN109120731B (en) Universal communication method, system and device
CN105354020A (en) Json format data analytic method and data receiving end
CN108038135A (en) Electronic device, the method for multilist correlation inquiry and storage medium
CN106844275A (en) Data transmission method and device
CN104317764A (en) Real-time control method for asynchronous messages of 1553B bus
CN105786736A (en) Method, chip and device for multi-chip cascading
CN104965676A (en) Random access memory access method and apparatus and control chip
CN107992516A (en) Electronic device, the method for data query and storage medium
CN107968848B (en) A kind of method, terminal device and storage medium obtaining IP address
CN104836636B (en) The method, apparatus and system communicated based on novel CAN frame
CN109788034B (en) Configuration method for gateway access equipment, electronic equipment and storage medium
CN112422485B (en) Communication method and device of transmission control protocol
CN113660134B (en) Port detection method, device, electronic device and storage medium
CN107885674B (en) Bluetooth device simulator, working method thereof and Bluetooth device operating system
CN111315026A (en) Channel selection method, device, gateway and computer readable storage medium
CN103973581A (en) Method, device and system for processing message data
CN109189705A (en) A kind of usb expansion method, apparatus, equipment, storage medium and system
CN104951417A (en) Method for achieving USB combined device suitable for high-capacity USIM
CN103905391B (en) Botnet order and the acquisition methods and device of control protocol
CN106452838A (en) USB (Universal Serial Bus) equipment simulation device and method
CN107454021B (en) Communication method and device
CN105703975A (en) Network card and server communication method and system
CN116360708B (en) Data writing method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant