Background technology
DMS system, in 4 S auto shop field:Its meaning is that Dealer Management System car dealer manages
Reason system, is mainly useful for the huge sales network of motor corporation and is managed.4 S auto shop be collection sale of automobile, maintenance,
The store that accessory and service are integrated.
4S shop is a kind of automobile management mode of special permission with " quaternity " as core, including car load sale (Sale), zero
(Survey) such as accessory (Sparepart), after-sale service (Service), feedback of the information.DMS system not only covers for 4S
The car load sale in shop, spare and accessory parts warehouse, after-sales maintenance service (containing workshop management), customer service etc., and in main engine plants and warp
The information bridge of an interaction can successfully be built between pin business, meet comprehensively dealer to " sale of automobile, maintenance service,
The information system management of the business such as fittings supply, feedback of the information, customer relationship ".DMS system more can allow dealer grasp market in time
Change, improve information interchange ageing, compression in the middle of operation cost, reduce the wasting of resources, ensure to greatest extent limited
Under input, realize the business goal of user.
At present, the architecture of DMS is as shown in figure 1, it can realize each 4S shop site and main engine plants' ERP system
(Enterprise Resource Planning:Enterprise Resources Plan), MES system (manufacturing execution
system:Manufacturing execution system) etc. main engine plants' Third party system connection.Being most importantly it will in real time and each 4S shop net
Point is communicated.
It is usually with being similar to other third party exploitation programs API such as the message queue instrument of MQ or webservices at present
Realize the data transfer of wide area network between system and system or internal network, but there is the promptness that can not meet data transfer
Defect, and exist led to loss of data phenomenon by network environment anomalous effects.And use the OGG data duplication instrument of ORACLE
Although synchronous duplication between the source and destination of data can be realized, the server hardware configuration requirement of source and destination is very
Height, so leads to hardware configuration and use cost very high, particularly each 4S shop be required for arranging such one high performance
Server will make the use cost of DMS system increase.
Content of the invention
The present invention realizes, for current DMS, the difficulty that data-interface is faced, and provides a kind of OGG number by ORACLE
Realize DMS system data interface method and system according to Replication Tools.
The present invention be employed technical scheme comprise that by realizing its purpose:A kind of DMS system data interface method, in ORACLE
Realize data communication on the basis of OGG instrument it is characterised in that:Son in DMS system data central server and 4S shop site
Between server, be additionally provided with a group interface server, the child servers of DMS system data central server and 4S shop site it
Between bidirectional data communication by interface server transfer distribution, the child servers of one 4S shop of any of which site can only be by it
One interface server of ownership is transferred with DMS system data central server;Comprise the following steps:
Server as source obtains data variation log recording and carries out being packed into queue, at least adds source during packing
Unit-ID code with destination end server;
Queue is sent to interface service end by the server as source, judges whether to belong to transfer destination, purpose by it
The server at end obtains queue;
The server of destination judges whether to be destined to the queue of oneself, if it is, queue is write data, otherwise abandons
Queue;
The server of the server of described source and destination refers respectively to DMS system data central server and 4S shop site
Child servers between, the server of data sending terminal data receiving terminal.
In the method, by three layers of broadcast data circulation way it is achieved that data between 1 source and N number of destination end
Synchronous, greatly alleviate the performance pressures of the child servers of DMS system data central server and 4S shop site.
Further, in above-mentioned DMS system data interface method:Described unit-ID code is by DMS database sequence
The unique ID generating for the child servers of DMS system data central server and 4S shop site.
Further, in above-mentioned DMS system data interface method:The server of destination judges whether to be destined to certainly
It is exactly to see the ID whether having book server in queue during oneself queue.
Further, in above-mentioned DMS system data interface method:What the server of destination received is that the overall situation is general
Data is considered as issuing oneself.
Further, in above-mentioned DMS system data interface method:In source, initial data of packing is formed by server
The copy of queue preserves.In destination end, the copy after the queue of acquisition is filtered and changed by server preserves.
The present invention also provides a kind of DMS system data interface system, including DMS data center server, 4S shop site
Child servers, also include interface server, and described interface server is arranged on DMS data center server and 4S shop site
Child servers realize the transparent switching of bi-directional data between DMS data center server and the child servers of 4S shop site, realize DMS
Two-way communication between the child servers of data center server and interface server, interface server and 4S shop site, in communication
During, in the configurating filtered parameter of destination end, all initial data retain in source, after destination end retains a filtration conversion
Data.
With reference to specific embodiment, the present invention is described in more detail.
Embodiment 1, the present embodiment is DMS system data interface system, and this system adopts ORACLE OGG data duplication work
Tool realizes data center server and each 4S shop server data real-time Communication for Power, on the basis of original DMS, is provided with DMS
Data-interface as shown in Fig. 2 or.Carried out using interface server between data center server and each 4S shop server
Switching, realizes data center server as shown in Figure 3 with each 4S shop server data real-time Communication for Power.
DMS system data interface system in the present embodiment, including DMS data center server, interface server, 4S shop
The child servers three-layer transmission network of site, interface server is arranged on the son clothes of DMS data center server and 4S shop site
The transparent switching of bi-directional data between DMS data center server and the child servers of 4S shop site realized by business device, realizes DMS data
Two-way communication between the child servers of central server and interface server, interface server and 4S shop site, in communication process
In, in the configurating filtered parameter of destination end, all initial data retain in source, and destination end retains original after a filtration is changed
Data.
In the present embodiment, DMS data center server is one, and the child servers of 4S shop site are to be distributed in the 4S of various places
In shop, up to hundreds of thousands of, accordingly, it would be desirable to setting interface server is some, every interface server completes DMS data to quantity
The data switch between the child servers of tens of 4S shops site for the central server, so, just has DMS data center to take
Two-way communication between business device and interface server, the two-way communication between the child servers of interface server and 4S shop site,
For any a-road-through letter, what the communication between source server and destination server was adopted is all that a kind of identical communicates step
Suddenly, in this communication means, no matter who is source server (DMS data center server, interface server, 4S shop site
Child servers), who is purpose server, in source server, is all stored to sent queue, to preserve copy, source
End, by all data is activations to all of destination end, carries out filtration data by destination end and operates, only issue oneself and just record,
Remaining abandons, as shown in Figure 4.Comprise the following steps:
Server as source obtains data log record and carries out being packed into queue, at least adds destination end to take during packing
The unit-ID code of business device;
Queue is sent to destination by the server as source, and the server of destination obtains queue;
The server of destination judges whether to be destined to the queue of oneself, if it is, queue is write data, otherwise abandons
Queue.
In the present embodiment, increase field unit identification number, length 4 in tables of data.Unique ID is generated by database sequence.
Configure the parameter script being filtered according to unit identification number in destination end.
Obtain, in source, the operation log recording that tables of data changes, be saved in local and form queue.(Carrying out newly
Additions and deletions can produce corresponding operation and data variation daily record when removing the database manipulations such as renewal).
In source, queue is copied to interface server and carry out transfer distribution.
Destination end obtains the operation log recording that tables of data changes, and is saved in home server.
Destination end carries out order by queue and executes parsing and write package operation(Filter data operation):
a)Whether overall conventional data, be:Operated accordingly;No:Abort operation.
b)Whether our unit's data, be:Operated accordingly;No:Abort operation.
If cannot transmit in Network Abnormal, queue is in wait transmission state, and network once communicating normal, is then pressed automatically
Order is transmitted and parses operation processing.
The present embodiment has following features:
By three layers of broadcast data circulation way it is achieved that data syn-chronization between 1 source and N number of destination end, greatly alleviate
The performance pressures of source and destination end server.
In the configurating filtered parameter of destination end, all initial data can retain in source, and destination end retains a filtration and turns
The initial data changed, once chance failure in certain destination end leads to shop end data bag disappearance, can issue mesh from source again
The data lost before mark end, the data integrity strengthening destination end is it is ensured that the affiliated data of destination end will not be lost.
DMS data center is synchronized the data of all 4S point sites child servers, and when 4S shop, application and trouble leads to all going through
When history data cannot be recovered, a complete all historical data information in 4S shop site can be obtained from DMS data center, this
Sample, even if dot data backup in 4S shop is abnormal, data still completely can be recovered from DMS data center.
DMS system data primary interface function declaration in the present embodiment:Refer here to finger DMS internal system data to connect
Mouthful.
Management and setting identification code, in the child servers of DMS data center server and 4S shop site, either as
Source server or destination server, are required to manage and arrange identification code, therefore, are provided with management and setting identification
The device of code or module:These modules include newly-increased identification code module, modification identification code module, delete identification code module.
Management and setting filtration parameter, in the child servers of DMS data center server and 4S shop site, whether make
For source server or destination server, it is required for managing and filtration parameter is set, therefore, in DMS data center services
In the child servers of device and 4S shop site, there is the module managing and arranging filtration parameter such as:Newly-increased interface and unit identification number
The module of module, modification interface and unit identification number, delete the module of interface and unit identification number.
Obtain DMS interface data process as follows:(Source, whom who sends is exactly source, DMS data center and sub-network DMS
System can be all source, is also destination end, send every time a queue can only one be source, another is destination end).
1st, source generates DMS interface data queue, and backs up.
2nd, source sends DMS interface data.
3rd, DMS data-interface transfer DMS interface data.
4th, destination end receives DMS interface data.
5th, destination end filters DMS interface data.
6th, destination end generates DMS interface data, storage backup.
Destination end writes DMS interface data.