CN105550047A - Communication method and system based on database - Google Patents

Communication method and system based on database Download PDF

Info

Publication number
CN105550047A
CN105550047A CN201510923387.2A CN201510923387A CN105550047A CN 105550047 A CN105550047 A CN 105550047A CN 201510923387 A CN201510923387 A CN 201510923387A CN 105550047 A CN105550047 A CN 105550047A
Authority
CN
China
Prior art keywords
data
database
data receiver
receiver
communication
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
Application number
CN201510923387.2A
Other languages
Chinese (zh)
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.)
Shenzhen Jiachuang Video Technology Co ltd
Original Assignee
Shenzhen Jiachuang Video Technology 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 Shenzhen Jiachuang Video Technology Co ltd filed Critical Shenzhen Jiachuang Video Technology Co ltd
Priority to CN201510923387.2A priority Critical patent/CN105550047A/en
Publication of CN105550047A publication Critical patent/CN105550047A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a communication method and a system based on a database. The method comprises the following steps: a data sending end stores data which needs to be sent to a database; the database stores the data, which needs to be sent, of the data sending end; and a data receiving end obtains data which needs to be received from the database. The data which needs to be called are stored in the database, and the data only need to be stored once even if a plurality of modules are called. When the called modules need to be added or the function of the called module changes in a procedure, a calling way is not affected so as to lower the coupling degree of codes and lower the development capacity; and the data are stored in the database to avoid the problem of data loss since the called module is terminated due to exception when the called module operates.

Description

Based on the method and system of database communication
Technical field
The present invention relates to a kind of method and system based on database communication.
Background technology
In the software systems of routine, intermodule method of calling is the interface directly calling the exposure of other module, if need to call multiple module in a business, then needs repeatedly to ask to call; If in a larger operation flow, a module process data goes wrong, and just likely causes whole service data loss.In the software systems of routine, if there is intersubsystem communication, generally use WebService or Socket to realize, and realize the code of writing that communication service end and client need employ many resources, and in reality operation, run into the situation of a large amount of transmission information in the short time, information receiving end likely can be delayed because of inadequate resource machine; If need to communicate between multiple system, then need repeatedly to send.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of method and system based on database communication, and being intended to solve in prior art needs to carry out communication by calling interface and cause that exploitation amount is higher, easily delay machine, reliability is lower.
Embodiments provide a kind of method based on database communication, described method comprises the steps:
The data of required transmission are stored in database by data sending terminal;
The data of the required transmission of data database storing transmitting terminal;
Data receiver obtains the required data received from described database.
The embodiment of the present invention further provides a kind of system based on database communication, and described system comprises:
Data sending terminal, for being stored in database by the data of required transmission;
Database, for storing the data sent needed for data sending terminal;
Data receiver, for obtaining the required data received from described database.
The data needing to call are preserved in a database, even if when calling multiple module, are also only needed preservation one secondary data by the method and system based on database communication that the embodiment of the present invention provides.And when needing in flow process to increase called module or have called functions of modules to change, method of calling is had no effect, thus decrease the degree of coupling of code, reduce exploitation amount; Store data in database and avoid called module operationally stops caused loss of data problem because of abnormal.
Accompanying drawing explanation
A kind of process flow diagram of the method based on database communication that Fig. 1 provides for the embodiment of the present invention;
The another kind of process flow diagram of the method based on database communication that Fig. 2 provides for the embodiment of the present invention;
Another process flow diagram of the method based on database communication that Fig. 3 provides for the embodiment of the present invention;
A kind of structural representation of the system based on database communication that Fig. 4 provides for the embodiment of the present invention;
The another kind of structural representation of the system based on database communication that Fig. 5 provides for the embodiment of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Fig. 1 shows a kind of process flow diagram of the method based on database communication that the embodiment of the present invention provides, for convenience of description, illustrate only the part relevant to the embodiment of the present invention, the method based on database communication that the embodiment of the present invention provides, described method comprises the steps:
Step S11, the data of required transmission are stored in database by data sending terminal.
In the present embodiment, data sending terminal is based on the existing data Layer of software systems, and the data of required transmission, when wanting transmission of information or sending instruction, are saved in database by data sending terminal, after this just can not need completely to manage follow-up work.
Step S12, the data of the required transmission of data database storing transmitting terminal.
In the present embodiment, the data sent needed for data sending terminal are preserved in a database, even if when therefore the data of required transmission being sent multiple data receiver, also preservation one secondary data is only needed, even if when increasing in the middle of whole flow process or reduce data receiver, to data sending terminal also without any variation.
Step S13, data receiver obtains the required data received from described database.
In the present embodiment, when existing intermodule communication, data receiver is as invoked module, therefore needs to expose interface and data model, and intermodule communication is the Data Persistence Layer based on system share in the embodiment of the present invention, therefore data receiver does not need exposed interface; Data receiver can obtain the required data received from database, when increasing or reduce the quantity of data receiver, for data receiver without any impact.
Fig. 2 shows the another kind of process flow diagram of the method based on database communication that the embodiment of the present invention provides, for convenience of description, illustrate only the part relevant to the embodiment of the present invention, the method based on database communication that the embodiment of the present invention provides, described method comprises the steps:
Step S21, the data of required transmission are stored in database by data sending terminal.
Step S22, the data of the required transmission of data database storing transmitting terminal.
Step S23, data receiver obtains the required data received from described database.
Step S24, data receiver reads the required data received, and performs corresponding operating and records execution result.
In the present embodiment, data receiver takes out the data sending to self from database, described data comprise information or instruction, and data receiver according to the information and executing business recorded in database or the associative operation completed in instruction, and records execution result at data receiver.
Fig. 3 shows another process flow diagram of the method based on database communication that the embodiment of the present invention provides, for convenience of description, illustrate only the part relevant to the embodiment of the present invention, the method based on database communication that the embodiment of the present invention provides, described method comprises the steps:
Step S31, the data of required transmission, according to the data receiver preset, are formed the data corresponding with described data receiver by data sending terminal respectively, the data corresponding with described data receiver are stored in database.
In the present embodiment, a data sending terminal is needed to carry out in the business communicated with multiple data receiver, data sending terminal needs the data data of required transmission being formed corresponding different data receivers, is convenient to communicate to multiple different data receiver.For data sending terminal, when only needing at needs transmission of information or send instruction, according to the data receiver preset, the data of required transmission are formed the data corresponding with described data receiver respectively, and store in a database.
Step S32, the data that database purchase is corresponding with described data receiver.
Step S33, described data receiver obtains the data corresponding with it from described database.
In the present embodiment, from described database, obtain the data corresponding with it by data receiver, decrease the impact of abnormal conditions on business, and can follow the tracks of operation flow.When existing intermodule is communicated by calling module, if data receiver operationally stops because of abnormal as invoked module, so whole business will stop, and data may be lost.And in embodiments of the present invention, the data storing that intermodule transmits in a database, if data receiver occurs abnormal as called resume module, system also can not lose business datum, also can judge the implementation status of related service simultaneously according to the data in database, be equivalent to the flow process controlling whole business on the database.In addition, decrease system resources consumption, improve intersubsystem communication efficiency, in existing intersubsystem communication, need extra exploitation communication service end and client, carry out the communication between subsystem with this, in embodiments of the present invention, do not need exploitation communication service end and client, only need to use common data Layer just can realize intersubsystem communication, decrease code development quantity.
When communicating between existing subsystem, if run into the situation that a large amount of data centralizations sends, data receiver (communication service end) accepts too much data simultaneously, easy appearance is the phenomenon of machine of delaying because system resource is not enough, and larger by the workload improved optimize communicate service end performance.In the present embodiment, usage data storehouse is preserved and is transmitted data, have the ability of well carrying out high load capacity at short notice based on existing Database Systems, data receiver can read data from database and process one by one or distribute multithreading like a cork and process, there will not be and occur mass data and the situation of machine of delaying because concentrate in the short time, because simplify data between subsystem to send, accept function, data sending terminal for once data structure is preserved, take over party for once reads, thus can reduce network traffics.
Further, data receiver obtains the required data received from database, is specially: in setting cycle, described data receiver initiatively accesses described database, obtains the required data received.
In the present embodiment, data receiver, based on existing Data Persistence Layer, makes to conduct interviews to database within cycle length, realizes timing scan function; Or the business operation according to reality triggers, such as, user initiatively triggers.
Fig. 4 shows a kind of structural representation of the system based on database communication provided for the embodiment of the present invention, for convenience of description, illustrate only the part relevant to the embodiment of the present invention, the system based on database communication that the embodiment of the present invention provides, described system comprises: data sending terminal 41, database 42 and data receiver 43.
Described data sending terminal 41, for being stored in database by the data of required transmission; Described database 42, for storing the data sent needed for data sending terminal; Described data receiver 43, for obtaining the required data received from described database.Described data receiver 43 also for: read the required data received, perform corresponding operating and also record execution result.
Fig. 5 shows the another kind of structural representation of the system based on database communication provided for the embodiment of the present invention, for convenience of description, illustrate only the part relevant to the embodiment of the present invention, the system based on database communication that the embodiment of the present invention provides, described system comprises: data sending terminal 41, database 42, and data receiver 43, data receiver 43', data receiver 43'', data receiver 43''', wherein, described data sending terminal 41 comprises data examination & verification unit 411 and corresponding data forming unit 412, described data examination & verification unit 411 is for auditing according to preset rules required transmission data, the data receiver that described corresponding data forming unit 412 presets for basis, the data of required transmission are formed the data corresponding with described data receiver respectively, the data corresponding with described data receiver are stored in database 42 by described data sending terminal 41.
In the present embodiment, for the communication in a common business between subsystem, as: as described in data sending terminal 41 be content disposal subsystem, described data receiver 43 is gateway subsystem, described data receiver 43' is authentication subsystem, described data receiver 43'' is portal sub-system, and described data receiver 43''' is service sub-system; For described data sending terminal 41, according to four different data receivers, it needs to be formed the data that corresponding four different data receivers form four kinds of dissimilar required transmissions, and dissimilar by these four kinds needed for the data that send be stored in database 42; Data receiver 43, data receiver 43', data receiver 43'' and data receiver 43''' obtain the data corresponding with it respectively from described database; To described data receiver 43, data receiver 43', data receiver 43'' and data receiver 43''', timer can also be set respectively, make it in setting cycle, initiatively access described database 42, obtain its required data received.Subsystem as data receiver realizes a timing scan function based on existing Data Persistence Layer, even if need there being a large amount of data to send simultaneously, database also has perfect pressure treatment mechanism can ensure that the data integrity sent is preserved, and as data receiver subsystem process send to the data of oneself in a large number time, optionally can select to process one by one or multiple thread process, in operation, there will not be the situation of system resource deficiency.
Above content is in conjunction with concrete preferred implementation further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention; make some equivalent alternative or obvious modification without departing from the inventive concept of the premise; and performance or purposes identical, all should be considered as belonging to the scope of patent protection that the present invention is determined by submitted to claims.

Claims (10)

1. based on the method for database communication, it is characterized in that, described method comprises the steps:
The data of required transmission are stored in database by data sending terminal;
The data of the required transmission of data database storing transmitting terminal; And
Data receiver obtains the required data received from described database.
2. as claimed in claim 1 based on the method for database communication, it is characterized in that, described method also comprises:
Data receiver reads the required data received, and performs corresponding operating and records execution result.
3. as claimed in claim 1 based on the method for database communication, it is characterized in that, the data of required transmission are stored to the step in database by described data sending terminal, are specially:
The data of required transmission, according to the data receiver preset, are formed the data corresponding with described data receiver by data sending terminal respectively;
The data corresponding with described data receiver are stored in database.
4. as described in claim 1 or 3 based on the method for database communication, it is characterized in that, described data receiver obtains the step of the required data received from described database, is specially:
Described data receiver obtains the data corresponding with it from described database.
5. as claimed in claim 1 based on the method for database communication, it is characterized in that, described data receiver obtains the step of the required data received from described database, is specially:
In setting cycle, described data receiver initiatively accesses described database, obtains the required data received.
6. based on the system of database communication, it is characterized in that, described system comprises:
Data sending terminal, for being stored in database by the data of required transmission;
Database, for storing the data sent needed for data sending terminal; And
Data receiver, for obtaining the required data received from described database.
7., as claimed in claim 6 based on the system of database communication, it is characterized in that, described data receiver also for: read the required data received, perform corresponding operating and also record execution result.
8., as claimed in claim 6 based on the system of database communication, it is characterized in that, described data sending terminal specifically for:
According to the data receiver preset, the data of required transmission are formed the data corresponding with described data receiver respectively; And
The data corresponding with described data receiver are stored in database.
9., as claimed in claim 6 based on the system of database communication, it is characterized in that, described data receiver specifically for: from described database, obtain data corresponding with it.
10., as claimed in claim 6 based on the system of database communication, it is characterized in that, described data receiver also for: in setting cycle, described data receiver initiatively accesses described database, obtains the required data received.
CN201510923387.2A 2015-12-11 2015-12-11 Communication method and system based on database Pending CN105550047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510923387.2A CN105550047A (en) 2015-12-11 2015-12-11 Communication method and system based on database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510923387.2A CN105550047A (en) 2015-12-11 2015-12-11 Communication method and system based on database

Publications (1)

Publication Number Publication Date
CN105550047A true CN105550047A (en) 2016-05-04

Family

ID=55829244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510923387.2A Pending CN105550047A (en) 2015-12-11 2015-12-11 Communication method and system based on database

Country Status (1)

Country Link
CN (1) CN105550047A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385294A (en) * 2020-03-04 2020-07-07 腾讯科技(深圳)有限公司 Data processing method, system, computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041001A1 (en) * 2001-03-23 2003-02-27 Restaurant Services Inc. ("RSI") System, method and computer program product for an auction function in a supply chain management framework
CN101176068A (en) * 2005-06-10 2008-05-07 国际商业机器公司 Apparatus, system, and method for facilitating communication between an enterprise information system and a client
CN101458637A (en) * 2007-12-13 2009-06-17 华为技术有限公司 Method, apparatus and system for implementing progress communication
EP2154615A1 (en) * 2008-08-12 2010-02-17 Software AG Method and interprocess communication driver for managing reqests of a database client to a database server
CN102609310A (en) * 2012-02-14 2012-07-25 浪潮(北京)电子信息产业有限公司 Computer operating system and inter-process communication method therefor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041001A1 (en) * 2001-03-23 2003-02-27 Restaurant Services Inc. ("RSI") System, method and computer program product for an auction function in a supply chain management framework
CN101176068A (en) * 2005-06-10 2008-05-07 国际商业机器公司 Apparatus, system, and method for facilitating communication between an enterprise information system and a client
CN101458637A (en) * 2007-12-13 2009-06-17 华为技术有限公司 Method, apparatus and system for implementing progress communication
EP2154615A1 (en) * 2008-08-12 2010-02-17 Software AG Method and interprocess communication driver for managing reqests of a database client to a database server
CN102609310A (en) * 2012-02-14 2012-07-25 浪潮(北京)电子信息产业有限公司 Computer operating system and inter-process communication method therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385294A (en) * 2020-03-04 2020-07-07 腾讯科技(深圳)有限公司 Data processing method, system, computer device and storage medium
CN111385294B (en) * 2020-03-04 2021-04-20 腾讯科技(深圳)有限公司 Data processing method, system, computer device and storage medium

Similar Documents

Publication Publication Date Title
CN109639521B (en) Block chain performance testing method, device, equipment and storage medium
CN107087033B (en) Message pushing method and device, storage medium and computer equipment
CN104092717B (en) Message treatment method and system, message destination equipment
CN103166933B (en) A kind of data security switching system and method
US20080049617A1 (en) System for fine grained flow-control concurrency to prevent excessive packet loss
US9798680B2 (en) Policy control method and apparatus for terminal peripheral
CN105338061A (en) Lightweight message oriented middleware realization method and system
CN104135741A (en) Method of Bluetooth low energy communication, Bluetooth devices and system
CN110808948B (en) Remote procedure calling method, device and system
CN102790776A (en) Heartbeat connection normalizing processing method, terminal, server and communication system
CN109510878B (en) Long connection session keeping method and device
CN106155812A (en) Method, device, system and the electronic equipment of a kind of resource management to fictitious host computer
CN102916854A (en) Traffic statistical method and device and proxy server
CN103795762A (en) Reverse agent test system and method
CN110138867A (en) File transmission and method of reseptance, computer equipment and storage medium
CN103166871A (en) System and method of large-scale internet server network to achieve load balancing
CN108965112A (en) The method and device of file transmission is carried out using instant message applications
CN103581317A (en) Method for sharing network resources
CN103797751B (en) Method and device for querying for user online state
CN105550047A (en) Communication method and system based on database
CN106790354B (en) Communication method and device for preventing data congestion
CN106412834B (en) Television white spectrum broadband communication system based on WiFi chip and communication method thereof
CN102629345A (en) Chain type communication cooperation method, apparatus and system thereof
CN108234595B (en) Log transmission method and system
CN104052778A (en) Distributed phone bill statistical method, device thereof and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160504

RJ01 Rejection of invention patent application after publication