A kind of real-time synchronization method and device in the database resource pond of intelligence manufacture
Technical field
The present invention relates to database resource pond management domains, and in particular to a kind of reality in the database resource pond of intelligence manufacture
When synchronous method and device.
Background technique
VM (Visual Manufacturing and workshop management Visual Manufacturing&Shop Floor Management) is claimed
For " nervous system " at Workshop scene, it is provided by more intuitive three-dimensional scenic mode to enterprise customer policymaker true
Task, personnel and device status information, be the management method for being effectively improved enterprise manufacturing process.
By the collection and feedback of creation data in manufacturing process and information, processing tasks can be created, be distributed, with
Track and report completion management.Plan and actual construction time, plan and actual production for task, it is qualified with the essential informations such as scrap
Unified maintenance and management is carried out, it in systems can Real-time Feedback Task Progress.
By software data acquisition interface channel, the data of acquisition are directly stored into type database, realization and third
Square information system is simple and direct rapidly to be integrated, and enterprise is helped to get rid of the management mode of information-based isolated island early.
And resulting information system structure is huge, with information-based development, data volume is also increased sharply therewith, scale
It is continuously increased with complexity, the concurrent data of magnanimity needs processing in real time, and is reliably stored, this deployment and peace to database
Full stabilization proposes new challenge.
For the purpose of calamity standby (Disaster Recovery), 2 (or multiple) data centers generally can be all built, one
A is that primary data center is used to undertake the business of user, one be Backup Data center be used to back up primary data center data,
Configuration, business etc.;Dual-active backup can be used as a kind of means that mass data reliably stores that solve, and dual-active is felt in preliminary data
The heart, which only backups, to be wasted very much, so allow active and standby Liang Ge data center all while undertaking the business of user, at this point, active and standby two number
It is mutually backups, and backs up in realtime according to center;In general, the load of primary data center may be more, for example divide
The business of load 60~70%, standby data center only share 40%~30% business.
Database resource pond based on Oracle12, which can be used as, solves a kind of deployment that the concurrent data of magnanimity is handled in real time
Means, wherein CDB and PDB is the new features that Oracle12C is introduced, in more rent user environments that ORACLE12C database introduces
In (Multitenant Environment), a database container (CDB) is allowed to carry multiple pluggable databases (PDB).
CDB full name is Container Database, and translator of Chinese is database container, and PDB full name is Pluggable Database,
I.e. pluggable database.Before ORACLE12C, example and database are one-to-one or many-to-one relationship (RAC): i.e. a reality
Example can only be associated with a database, and database can be loaded by multiple examples.And example and database are unlikely to be one
To more relationships.After entering ORACLE12C, example and database can be one-to-many relationship.
And how on the basis of guaranteeing the storage of intelligence manufacture data safety, more efficiently become using data-base cluster
One is worth solving the problems, such as.
Summary of the invention
The present invention provides the real-time synchronization method and device in a kind of database resource pond of intelligence manufacture, can guarantee intelligence
On the basis of manufaturing data safe storage, data-base cluster is more efficiently utilized.
A kind of real-time synchronization method in the database resource pond of intelligence manufacture provided by the invention, which comprises
Step S1, the data for acquiring all products on every production line, as input data, the data are produced for recording
Product creation data in the fabrication process and information;
Step S2, input data is formed into queue, traversal searches the array in queue, retains and repeats first number in array
Group rejects remaining and repeats array, forms input rank;
Step S3, traversal searches each input rank, and an input rank is selected in the input rank for having duplicate message,
Generate input rank table;
Step S4, by input rank table, successively by input rank deposit, wherein a set of database resource pond, formation are pluggable
Database, by the pluggable database real-time synchronization to another set of database resource pond;
Step S5, when a set of database resource pond is broken down, the database resource pond of real-time synchronization is automatically switched to,
Realize the operation system dual-active in database resource pond.
Further, the method also includes:
Judge the more data-base cluster of idling-resource, returned data query result.
Further, described in step S3 in the input rank for having duplicate message select an input rank specifically include as
Lower step:
Step S301, whether judgement has the input rank of duplicate message completely the same, if so, first input team of selection
Column, if it is not, executing following steps;
Step S302, in the input rank for having duplicate message, selection is attached with the defeated of all information of other input ranks
Enqueue;
Step S303, in the input rank for having part duplicate message between each other, first input rank is selected, is rejected
Part duplicate message in remaining input rank.
Further, the step S4 includes:
Input rank is successively stored in wherein a set of database resource pond by input rank table, forms pluggable database,
Realize that the data between more sets of data base resources pond are synchronous by real time data synchronization, by the pluggable database real-time synchronization
To another set of database resource pond.
Further, the step S5 includes:
When a set of database resource pond is broken down, another set of database is automatically switched to by real time data synchronization and is provided
Source pond, the another set of database resource pond are stored with the pluggable data synchronized the database resource pond early period of failure
Library, to realize the operation system dual-active in database resource pond.
A kind of real-time synchronization device in the database resource pond of intelligence manufacture provided by the invention, described device include:
Acquisition device, the data for acquiring all products on every production line, as input data, the data are used for
Record product creation data in the fabrication process and information;
Input rank forms device, for input data to be formed queue, and traversal searches the array in queue, retains and repeats
First array in array rejects remaining and repeats array, form input rank;
Input rank table creating device searches each input rank for traversing, in the input rank for having duplicate message
An input rank is selected, input rank table is generated;
Synchronizing device, by input rank table, successively by input rank deposit, wherein a set of database resource pond, formation can be inserted
Database is pulled out, by the pluggable database real-time synchronization to another set of database resource pond;
Switching device, when a set of database resource pond break down when, automatically switched to by real time data synchronization another
The operation system dual-active in database resource pond is realized in sets of data base resource pond.
Further, described device further include:
Inquiry unit, for judging the more data-base cluster of idling-resource, returned data query result.
Further, described that an input is selected in the input rank for having duplicate message in input rank table creating device
Queue is realized by following device:
First choice device, for judging the completely the same input rank of duplicate message, select first input rank;
Second selection device, in the input rank for having duplicate message, it is all that selection is attached with other input ranks
The input rank of information;
Third selection device, in the input rank for having part duplicate message between each other, select first input
The part duplicate message in remaining input rank is rejected in queue.
Further, the synchronizing device is specifically used for, and input rank is successively stored in a wherein tricks by input rank table
According to base resource pond, pluggable database is formed, realizes that the data between more sets of data base resources pond are same by real time data synchronization
Step, by the pluggable database real-time synchronization to another set of database resource pond.
Further, the switching device is specifically used for, real-time by data when a set of database resource pond is broken down
It synchronizes and automatically switches to another set of database resource pond, the another set of database resource pond is stored with the database of failure
The pluggable database that resource pool early period synchronizes, to realize the operation system dual-active in database resource pond.
The beneficial effects of the present invention are: the present invention discloses a kind of real-time synchronization method in the database resource pond of intelligence manufacture
And device, the data of manufacture state are recorded by all products on every production line of acquisition, reject repeated data, form input team
Column, traversal search each input rank, and an input rank is selected in the input rank for having duplicate message, generate input rank
Table, by input rank table successively by the more data-base cluster of input rank deposit idling-resource, when two groups of data-base clusters all
When available free resource, data interaction is carried out, the present invention can guarantee intelligence manufacture data by integrating each database resource pond
On the basis of safe storage, data-base cluster is more efficiently utilized.
Detailed description of the invention
The invention will be further described with example with reference to the accompanying drawing.
Fig. 1 is a kind of flow chart of the real-time synchronization method in the database resource pond of intelligence manufacture of the embodiment of the present invention;
Fig. 2 is the process of the real-time synchronization method step S3 in the database resource pond of intelligence manufacture of the embodiment of the present invention a kind of
Figure;
Fig. 3 is a kind of structure chart of the real-time synchronization device in the database resource pond of intelligence manufacture of the embodiment of the present invention;
Fig. 4 is selection device in a kind of real-time synchronization device in the database resource pond of intelligence manufacture of the embodiment of the present invention
Structure chart.
Specific embodiment
With reference to Fig. 1, a kind of real-time synchronization method in the database resource pond of intelligence manufacture provided in an embodiment of the present invention, institute
The method of stating includes:
Step S1, the data for acquiring all products on every production line, as input data, the data are produced for recording
Whether product creation data in the fabrication process and information, such as the production type of product, number, machine examination are qualified;
Step S2, input data is formed into queue, traversal searches the array in queue, retains and repeats first number in array
Group rejects remaining and repeats array, forms input rank;
Step S3, test of joining the team is carried out, traversal is searched each input rank, selected in the input rank for having duplicate message
One input rank generates input rank table;
Step S4, by input rank table, successively by input rank deposit, wherein a set of database resource pond, formation are pluggable
Database, by the pluggable database real-time synchronization to another set of database resource pond;
Step S5, when a set of database resource pond is broken down, the database resource pond of real-time synchronization is automatically switched to,
Realize the operation system dual-active in database resource pond.
Further, the method also includes:
Judge the more data-base cluster of idling-resource, returned data query result.
Further, as shown in Fig. 2, selecting an input rank described in step S3 in the input rank for having duplicate message
Specifically comprise the following steps:
Step S301, whether judgement has the input rank of duplicate message completely the same, if so, first input team of selection
Column, if it is not, executing following steps;
Step S302, in the input rank for having duplicate message, selection is attached with the defeated of all information of other input ranks
Enqueue;
Step S303, in the input rank for having part duplicate message between each other, first input rank is selected, is rejected
Part duplicate message in remaining input rank.
Further, the step S4 includes:
Input rank is successively stored in wherein a set of database resource pond by input rank table, forms pluggable database,
Realize that the data between more sets of data base resources pond are synchronous by real time data synchronization software adg, by the pluggable database
Real-time synchronization is to another set of database resource pond.
Further, the step S5 includes:
When a set of database resource pond is broken down, automatically switched to by real time data synchronization software adg another set of
Database resource pond, what the database resource pond early period that the another set of database resource pond is stored with failure synchronized inserts
Database is pulled out, to realize the operation system dual-active in database resource pond.
It is illustrated in figure 3 a kind of the real-time same of the database resource pond of intelligence manufacture shown in exemplary embodiment of the present
The structure chart of device is walked, described device includes:
Acquisition device 1, the data for acquiring all products on every production line, as input data, the data are used
In record product creation data in the fabrication process and information;
Input rank forms device 2, for recording input data, forms queue, traversal searches the array in queue, retains
First array in array is repeated, remaining is rejected and repeats array, form input rank;
Input rank table creating device 3 searches each input rank for traversing, in the input rank for having duplicate message
An input rank is selected, input rank table is generated;
Synchronizing device 4, by input rank table, successively by input rank deposit, wherein a set of database resource pond, formation can be inserted
Database is pulled out, by the pluggable database real-time synchronization to another set of database resource pond;
Switching device 5, when a set of database resource pond break down when, automatically switched to by real time data synchronization software
The operation system dual-active in database resource pond is realized in another set of database resource pond.
Further, described device further include:
Inquiry unit, for judging the more data-base cluster of idling-resource, returned data query result.
Further, described to be selected in the input rank for having duplicate message as shown in figure 4, in input rank table creating device 3
An input rank is selected to be realized by following device:
First choice device 301, for judging the completely the same input rank of duplicate message, select first input team
Column;
Second selection device 302, in the input rank for having duplicate message, selection is attached with other input rank institutes
There is the input rank of information;
Third selection device 303, in the input rank for having part duplicate message between each other, select first it is defeated
Enqueue rejects the part duplicate message in remaining input rank.
Further, the synchronizing device 4 is specifically used for, and input rank is successively stored in a wherein tricks by input rank table
According to base resource pond, pluggable database is formed, is realized between more sets of data base resources pond by real time data synchronization software adg
Data are synchronous, by the pluggable database real-time synchronization to another set of database resource pond.
Further, the switching device 5 is specifically used for, and when a set of database resource pond is broken down, passes through data reality
When synchronizing software adg automatically switch to another set of database resource pond, the another set of database resource pond storage occurs therefore
The pluggable database that the database resource pond early period of barrier synchronizes, to realize the operation system dual-active in database resource pond.
The above, only presently preferred embodiments of the present invention, the invention is not limited to above embodiment, as long as
It reaches technical effect of the invention with identical means, all should belong to protection scope of the present invention.