CN106469226A - Data communication method based on data base's middle table - Google Patents
Data communication method based on data base's middle table Download PDFInfo
- Publication number
- CN106469226A CN106469226A CN201610873167.8A CN201610873167A CN106469226A CN 106469226 A CN106469226 A CN 106469226A CN 201610873167 A CN201610873167 A CN 201610873167A CN 106469226 A CN106469226 A CN 106469226A
- Authority
- CN
- China
- Prior art keywords
- middle table
- record
- data base
- method based
- communication method
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
Abstract
Present invention is disclosed a kind of data communication method based on data base's middle table:Sender system Database sends middle table, and receiver system Database receives middle table;When described sender system sends a message, sender system is sending one record of middle table insertion;It is the firm record generating that transmission state is found out in sender system periodically scanning;The record found out is inserted the reception middle table of receiver system;The transmission state being successively inserted into the record of receiver system is rewritten and is received.The database linkage information of source of the present invention and destination end, table name all can be edited in configuration file.Program possesses high vigorousness, and when any one data base is from fault recovery, Automatic Program recovers communication, and such system can effectively reduce R&D costs and maintenance cost.
Description
Technical field
The present invention relates to computer communication field.
Background technology
In large-scale production management system, there is substantial amounts of information between each subsystem and exchange.Practices well at present
It is that communication two party arranges each communication program based on Transmission Control Protocol for the exploitation by prior.Not only program development workload is big, maintenance
Also big, as long as Content of communciation has adjustment, both sides' program will be changed.For a large scale system, development cost with safeguard into
This is huge.
Content of the invention
The technical problem to be solved is to realize a kind of means of communication of the standard based on data base's middle table, and
And development cost and the maintenance cost of system can be reduced.
To achieve these goals, the technical solution used in the present invention is:Data communication side based on data base's middle table
Method:
Sender system Database sends middle table, and receiver system Database receives middle table;
When described sender system sends a message, sender system is sending one record of middle table insertion;
It is the firm record generating that transmission state is found out in sender system periodically scanning;
The record found out is inserted the reception middle table of receiver system;
The transmission state being successively inserted into the record of receiver system is rewritten and is received.
Described transmission middle table includes:Sequence number, generation time, transmission state, reception time, heading, message body, wherein
Transmission state is firm generation or has been received;Described reception middle table includes sequence number, receives time, heading, message body.
The character string being made up of Content of communciation that described message body is arranged for communication two party.
Described sender system is inserted a record in transmission middle table and is comprised:Sequence number, generates the time, sends state, report
Civilian head, the state that wherein sends is firm generation.
The transmission state rewriting record is to arrange the reception time while reception.
If any one system data base connects and disconnects in sender system and receiver system, program will set up another thread, week
The trial of phase property recovers the connection with turn-off data storehouse, once connecting normal, continues communication function.
The database linkage information of source of the present invention and destination end, table name all can be edited in configuration file.Program possesses
High vigorousness, when any one data base is from fault recovery, Automatic Program recovers communication, and such system can be effective
Reduction R&D costs and maintenance cost.
Specific embodiment
The means of communication of the present invention, to arbitrary one group communication (system A → system B), only need to be disposed this communication program, and join
Put data base connect and table name, no any develop and maintenance workload.
It is assumed that system A needs to send information to system B, system A creates transmission middle table Send_ in its database
Table, this table comprises following field:Sequence number (keyword), generates the time, sends state (0=just generates, and 1=is received),
The reception time, heading, message body totally 6 fields.So-called message body, refers to being made up of Content of communciation of communication two party agreement
Character string.
System B creates reception middle table Recive_Table in its database, and this table comprises following field:Sequence number (is closed
Key word), receive time, heading, message body totally 4 fields.
Program reads configuration file when starting first, to obtain the connection string that application program connects two data bases,
And the table name sending middle table and receiving middle table.
It is assumed that system A sends a message to system B, system A inserts a record toward Send_Table, wherein must wrap
Containing sequence number, generate the time (current time), send state (0), heading, message body totally 5 fields.
Send the record of state=0 in this communication routines periodically ground scanning Send_Table, and be inserted into system B
Receive middle table Recive_Table.The transmission state rewriting this record in Send_Table after being successively inserted into is 1, sets simultaneously
Put the reception time.
Both avoided message to repeat to send, and also allowed sender know that this message is received simultaneously.If communication program is same appointed
One system database connects disconnection, and program will set up another thread, periodicallys attempt to recover the connection with turn-off data storehouse, once even
Connect normal, continue communication function.
Claims (6)
1. the data communication method based on data base's middle table it is characterised in that:
Sender system Database sends middle table, and receiver system Database receives middle table;
When described sender system sends a message, sender system is sending one record of middle table insertion;
It is the firm record generating that transmission state is found out in sender system periodically scanning;
The record found out is inserted the reception middle table of receiver system;
The transmission state being successively inserted into the record of receiver system is rewritten and is received.
2. the data communication method based on data base's middle table according to claim 1 it is characterised in that:In described transmission
Between table include:Sequence number, generate the time, send state, receive time, heading, message body, the state that wherein sends be firm generate or
Received;Described reception middle table includes sequence number, receives time, heading, message body.
3. the data communication method based on data base's middle table according to claim 2 it is characterised in that:Described message body
The character string being made up of Content of communciation for communication two party agreement.
4. the data communication method based on data base's middle table according to claim 1,2 or 3 it is characterised in that:Described
Sender system is inserted a record in transmission middle table and is comprised:Sequence number, generates the time, sends state, heading, wherein sends
State is firm generation.
5. the data communication method based on data base's middle table according to claim 1 it is characterised in that:Rewrite record
Transmission state is to arrange the reception time while reception.
6. the data communication method based on data base's middle table according to claim 1 it is characterised in that:If sender
In system and receiver system, any one system data base connects and disconnects, and program will set up another thread, periodically attempts recovering with disconnected
Opening the connection of data base, once connecting normal, continuing communication function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610873167.8A CN106469226A (en) | 2016-09-30 | 2016-09-30 | Data communication method based on data base's middle table |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610873167.8A CN106469226A (en) | 2016-09-30 | 2016-09-30 | Data communication method based on data base's middle table |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106469226A true CN106469226A (en) | 2017-03-01 |
Family
ID=58230800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610873167.8A Pending CN106469226A (en) | 2016-09-30 | 2016-09-30 | Data communication method based on data base's middle table |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106469226A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108877188A (en) * | 2018-05-17 | 2018-11-23 | 济南诚博信息科技有限公司 | A kind of environment protection digital concurrently acquires and Multi net voting dissemination method and device |
CN110347743A (en) * | 2018-03-19 | 2019-10-18 | 上海旷极信息科技有限公司 | A kind of database communication method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101232540A (en) * | 2008-02-21 | 2008-07-30 | 中兴通讯股份有限公司 | Method and system for interacting information among systems |
CN102929899A (en) * | 2011-12-31 | 2013-02-13 | 网神信息技术(北京)股份有限公司 | Distributed reporting system based on intermediate table |
CN103455557A (en) * | 2013-08-08 | 2013-12-18 | 上海新炬网络技术有限公司 | Log based structured data synchronization method |
CN105095384A (en) * | 2015-07-01 | 2015-11-25 | 北京京东尚科信息技术有限公司 | Method and device for data carrying-over |
-
2016
- 2016-09-30 CN CN201610873167.8A patent/CN106469226A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101232540A (en) * | 2008-02-21 | 2008-07-30 | 中兴通讯股份有限公司 | Method and system for interacting information among systems |
CN102929899A (en) * | 2011-12-31 | 2013-02-13 | 网神信息技术(北京)股份有限公司 | Distributed reporting system based on intermediate table |
CN103455557A (en) * | 2013-08-08 | 2013-12-18 | 上海新炬网络技术有限公司 | Log based structured data synchronization method |
CN105095384A (en) * | 2015-07-01 | 2015-11-25 | 北京京东尚科信息技术有限公司 | Method and device for data carrying-over |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347743A (en) * | 2018-03-19 | 2019-10-18 | 上海旷极信息科技有限公司 | A kind of database communication method |
CN108877188A (en) * | 2018-05-17 | 2018-11-23 | 济南诚博信息科技有限公司 | A kind of environment protection digital concurrently acquires and Multi net voting dissemination method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107947357B (en) | Power distribution automation data acquisition device and method based on safety access area | |
CN101729543B (en) | Method for improving performance of mobile SSL VPN by utilizing remote Socks5 technology | |
RU2009131314A (en) | SYSTEMS AND METHODS FOR CONNECTING THE SECOND GROUP OF NODES TO THE FIRST GROUP OF NODES USING THE GENERAL KEY OF THE GROUP | |
CN105305615B (en) | A kind of monitoring method of wireless test and data transmission system | |
CN113114759A (en) | Chain-crossing method and system for realizing multi-chain intercommunication | |
CN103841118A (en) | Two-way reliable covert channel based on TCP effective loads | |
CN106535090B (en) | Bluetooth device and intelligent device pairing method and Bluetooth device | |
CN106648928A (en) | Method and device for inter-process communication | |
CN110300120A (en) | The hierarchical synchronization method and system of reverse data under the conditions of a kind of physical isolation | |
CN106469226A (en) | Data communication method based on data base's middle table | |
CN104092673A (en) | System and method for achieving safe one-way data transmission between networks | |
CN105959355B (en) | Secret information transmission method under P2P network based on BitTorrent agreement | |
CN110336788A (en) | A kind of data safety exchange method of internet of things equipment and mobile terminal | |
CN102916958A (en) | Method and system for realizing access encryption of mobile terminal browser | |
CN105281432B (en) | A kind of supervising device of wireless test and data transmission system | |
CN103997533B (en) | A kind of dynamic terminal long-distance maintenance method based on wireless network | |
CN110244649A (en) | PLC internal data acquisition method and system | |
CN109286615A (en) | A kind of efficiently across LAN data synchronous method | |
CN108495291A (en) | A kind of Bluetooth connecting method and device | |
CN108366050A (en) | A kind of common communication protocol processing method | |
CN102957559A (en) | Method and system for updating connection during link fault | |
CN103442029A (en) | Method and system for heterogeneous real-time historical database synchronization | |
CN105933140B (en) | A kind of intelligence across a network O&M monitoring method | |
CN102006516B (en) | Digital household content service transmission method based on cable television two-way access | |
CN105471718B (en) | A kind of implementation method of full duplex message queue |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 243003 Hunan west end of Hunan, Ma'anshan, Anhui Applicant after: Anhui Ma Gang automated information Technology Co., Ltd. Address before: 243003 Hunan West Road, Anhui, Ma'anshan Applicant before: Anhui Ma Gang automated information Technology Co., Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170301 |