CN115129468A - Database synchronization method, device and medium between PDMS/E3D servers - Google Patents

Database synchronization method, device and medium between PDMS/E3D servers Download PDF

Info

Publication number
CN115129468A
CN115129468A CN202210661938.2A CN202210661938A CN115129468A CN 115129468 A CN115129468 A CN 115129468A CN 202210661938 A CN202210661938 A CN 202210661938A CN 115129468 A CN115129468 A CN 115129468A
Authority
CN
China
Prior art keywords
pdms
service
server
synchronization
servers
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
CN202210661938.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.)
China Nuclear Power Engineering Co Ltd
Original Assignee
China Nuclear Power Engineering 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 China Nuclear Power Engineering Co Ltd filed Critical China Nuclear Power Engineering Co Ltd
Priority to CN202210661938.2A priority Critical patent/CN115129468A/en
Publication of CN115129468A publication Critical patent/CN115129468A/en
Pending legal-status Critical Current

Links

Images

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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention provides a database synchronization method, a device and a medium among PDMS/E3D servers, wherein the method comprises the following steps: acquiring a current synchronization plan; judging whether a PDMS/E3D server which does not start the Global service exists in at least two PDMS/E3D servers according to the server identification, if so, starting the Global service in the PDMS/E3D server which does not start the Global service through a node service which is set up in advance; when the at least two PDMS/E3D servers start the Global service, sending a start synchronization instruction to the node service of each PDMS/E3D server in the at least two PDMS/E3D servers; and judging whether the current synchronization plan is finished, if so, stopping the corresponding Global service through the node service on each PDMS/E3D server. The method, the device and the medium can solve the problems that the existing database synchronization method between PDMS/E3D servers needs to run the Global service all the time and wastes Global resources on one hand, and needs to start and stop the Global service manually and wastes a large amount of human resources on the other hand.

Description

Database synchronization method, device and medium between PDMS/E3D servers
Technical Field
The invention relates to a database synchronization method, a database synchronization device and a database synchronization medium between PDMS/E3D servers.
Background
AVEVA PDMS (Plant Design Management system) is a software system introduced by AVEVA of UK for layout Design and Management of 3D digital models of Plant Design items. The AVEVA E3D (Evaporation 3D) is a PDMS upgrade version derived from the AVEVA after the PDMS12.1 version, and the PDMS/E3D becomes a preferred software system for large-scale and complex factory design projects by the characteristics of WYSIWYG (what you see is what you get), network real-time cooperation, automatic real-time three-dimensional collision inspection, independent data structures, open and extensible development environments and the like.
PDMS/E3D supports the erection of servers in different areas to speed up the access speed of project databases, so that workers in different areas must synchronize project databases in different areas to cooperate. At present, database synchronization among PDMS/E3D servers in different areas is based on a Global module carried by PDMS/E3D and managed by an Admin module, and the database synchronization method is closed, so that on one hand, a Global service is required to be always operated, and Global resources are wasted; on the other hand, the Global service needs to be started and stopped manually, which wastes a great deal of human resources.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus and a medium for synchronizing databases between PDMS/E3D servers, which can maximally utilize Global authorization resources and save a large amount of Global software authorization cost, in order to overcome the above-mentioned disadvantages of the prior art.
In a first aspect, the present invention provides a method for synchronizing databases between PDMS/E3D servers, where the method includes:
acquiring a current synchronization plan, wherein the current synchronization plan comprises server identifications of at least two PDMS/E3D servers which need to perform database synchronization and corresponding project information;
judging whether a PDMS/E3D server which does not start the Global service exists in the at least two PDMS/E3D servers according to the server identification, if so, starting the Global service in the PDMS/E3D server which does not start the Global service through a node service which is set up in advance;
when the at least two PDMS/E3D servers have started the Global service, sending a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, so that the node service synchronizes a database corresponding to the project information between the at least two PDMS/E3D servers based on the start synchronization instruction;
and judging whether the current synchronization plan is finished, if so, stopping the corresponding Global service through the node service on each PDMS/E3D server.
Further, the acquiring the current synchronization plan specifically includes:
acquiring a synchronization plan list pre-stored in a database through a pre-established scheduling service;
and acquiring the current synchronization plan from the synchronization plan list through the scheduling service.
Further, before the synchronization plan list stored in the database in advance is obtained through the pre-built scheduling service, the method further includes:
receiving server identifications of a plurality of PDMS/E3D servers and corresponding project information which are input by a user through a pre-established Web site;
receiving, by the Web site, the synchronization plan list formulated by the user based on the server identifications of the plurality of PDMS/E3D servers and the corresponding project information, and storing the synchronization plan list in the database.
Further, the starting of the Global service in the PDMS/E3D server which does not start the Global service through the pre-built node service specifically includes:
acquiring a script of the started Global service in the PDMS/E3D server of the un-started Global service through the node service in the PDMS/E3D server of the un-started Global service;
and starting the Global service in the PDMS/E3D server of the un-started Global service according to the script for starting the Global service.
Further, the stopping the corresponding Global service through the node service on each PDMS/E3D server specifically includes:
sequentially judging whether each PDMS/E3D server needs to stop Global service;
if yes, acquiring a script for stopping the Global service in the PDMS/E3D server needing to stop the Global service through the node service;
and stopping the Global service in the PDMS/E3D server needing to stop the Global service according to the script for stopping the Global service.
Further, after the Global service in the PDMS/E3D server which does not start the Global service is started by the pre-built node service, the method further includes:
judging whether the PDMS/E3D server which does not start the Global service successfully starts the Global service;
if not, generating and storing a corresponding log record.
Further, the method further comprises:
monitoring the execution process of the current synchronization plan in the execution process of the current synchronization plan;
and when the execution of the current synchronization plan is monitored to be overtime or fail, generating and storing corresponding error diagnosis information.
Further, the method further comprises:
and if the current synchronization plan is finished, generating and storing a synchronization record corresponding to the current synchronization plan.
In a second aspect, the present invention provides an apparatus for synchronizing databases between PDMS/E3D servers, including:
the system comprises a synchronization plan acquisition module, a synchronization plan acquisition module and a synchronization plan acquisition module, wherein the synchronization plan acquisition module is used for acquiring a current synchronization plan which comprises server identifications of at least two PDMS/E3D servers needing database synchronization and corresponding project information;
the service starting module is connected with the synchronization plan acquisition module and used for judging whether a PDMS/E3D server which does not start the Global service exists in the at least two PDMS/E3D servers according to the server identification, if so, starting the Global service in the PDMS/E3D server which does not start the Global service through a node service which is pre-established by the service starting module;
a synchronous execution module, connected to the service starting module, configured to send a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, when the at least two PDMS/E3D servers have started the Global service, so that the node service synchronizes a database corresponding to the item information between the at least two PDMS/E3D servers based on the start synchronization instruction;
and the service stopping module is connected with the synchronous execution module and used for judging whether the current synchronous plan is finished or not, and if so, stopping the corresponding Global service through the node service on each PDMS/E3D server.
In a third aspect, the present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the method for synchronizing the database between the PDMS/E3D servers according to the first aspect.
The method, the device and the medium for synchronizing the databases among the PDMS/E3D servers provided by the invention comprise the steps of firstly obtaining a current synchronization plan, wherein the current synchronization plan comprises server identifications of at least two PDMS/E3D servers needing database synchronization and corresponding project information, then judging whether a PDMS/E3D server which does not start Global services exists in the at least two PDMS/E3D servers according to the server identifications, and if so, starting the Global services in the PDMS/E3D server which does not start the Global services through a node service which is built in advance; and when the Global service has been started by the at least two PDMS/E3D servers, sending a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, so that the node service synchronizes the database corresponding to the project information between the at least two PDMS/E3D servers based on the start synchronization instruction, and finally determining whether the current synchronization plan is completed, if so, stopping the corresponding Global service by the node service on each PDMS/E3D server, the invention can automatically perform database synchronization between PDMS/E3D servers of different areas according to the current synchronization plan formulated in advance, and intelligently start and stop the Global service in the synchronization execution process, thereby maximally utilizing Global authorized resources and saving a large amount of Global software authorization cost, because the whole synchronization process does not need human participation, a large amount of human resources can be saved, and the problems that the Global service is required to be operated all the time and the Global resources are wasted, and the Global service is required to be started and stopped manually and a large amount of human resources are wasted in the conventional database synchronization method between PDMS/E3D servers are solved.
Drawings
FIG. 1 is a flowchart of a database synchronization method between PDMS/E3D servers according to embodiment 1 of the present invention;
FIG. 2 is a flowchart of another database synchronization method between PDMS/E3D servers according to embodiment 1 of the present invention;
fig. 3 is a schematic structural diagram of a database synchronization device between PDMS/E3D servers according to embodiment 2 of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the following detailed description will be made with reference to the accompanying drawings.
It is to be understood that the specific embodiments and figures described herein are merely illustrative of the invention and are not to be considered as limiting.
It is to be understood that the embodiments and features of the embodiments can be combined with each other without conflict.
It is to be understood that, for the convenience of description, only parts related to the present invention are shown in the drawings of the present invention, and parts not related to the present invention are not shown in the drawings.
It should be understood that each unit and module related in the embodiments of the present invention may correspond to only one physical structure, and may also be composed of multiple physical structures, or multiple units and modules may also be integrated into one physical structure.
It will be understood that, without conflict, the functions, steps, etc. noted in the flowchart and block diagrams of the present invention may occur in an order different from that noted in the figures.
It is to be understood that the flowchart and block diagrams of the present invention illustrate the architecture, functionality, and operation of possible implementations of systems, apparatus, devices and methods according to various embodiments of the present invention. Each block in the flowchart or block diagrams may represent a unit, module, segment, code, which comprises executable instructions for implementing the specified function(s). Furthermore, each block or combination of blocks in the block diagrams and flowchart illustrations can be implemented by a hardware-based system that performs the specified functions or by a combination of hardware and computer instructions.
It is to be understood that the units and modules involved in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware, for example, the units and modules may be located in a processor.
Example 1:
the present embodiment provides a method for synchronizing databases between PDMS/E3D servers, as shown in fig. 1, the method includes:
step S101: and acquiring a current synchronization plan, wherein the current synchronization plan comprises server identifications of at least two PDMS/E3D servers needing database synchronization and corresponding project information.
In this embodiment, the current synchronization plan is a synchronization plan that needs to be executed currently, the server identifier is used to uniquely identify one PDMS/E3D server, and the corresponding project information may include a project ID and a name, etc.
Optionally, the acquiring the current synchronization plan specifically includes:
acquiring a synchronization plan list pre-stored in a database through a pre-established scheduling service;
and acquiring the current synchronization plan from the synchronization plan list through the scheduling service.
In this embodiment, a scheduling service may be built on any PDMS/E3D server or other servers, the scheduling service may be interconnected with all other PDMS/E3D servers through a network, the synchronization plan list may include one or more synchronization plans, and each synchronization plan may include a server identifier, project information, execution time, and the like of the PDMS/E3D server that needs to perform database synchronization. The synchronization plan in the synchronization plan list may be executed immediately or when the corresponding execution time arrives, and the scheduling service may read the already-made synchronization plan and execute the synchronization plan.
Optionally, before the synchronization plan list stored in the database in advance is obtained through the pre-built scheduling service, the method further includes:
receiving server identifications of a plurality of PDMS/E3D servers and corresponding project information which are input by a user through a pre-established Web site;
receiving, by the Web site, the synchronization plan list formulated by the user based on the server identifications of the plurality of PDMS/E3D servers and the corresponding project information, and storing the synchronization plan list in the database.
In this embodiment, a Web site may be set up on any PDMS/E3D server or other servers, and a user may log in the Web site through a browser and enter relevant information of the PDMS/E3D server through the Web site, such as a server identifier, a server IP, a port, and the like of the PDMS/E3D server. Meanwhile, a user can make a synchronization plan through a Web site, and the Web site stores the synchronization plan input by the user into a database so as to schedule service acquisition.
It should be noted that the configuration of the existing synchronization plan is generally distributed on each PDMS/E3D server, and the existing synchronization plan needs to be registered in each PDMS/E3D server for configuration, and cannot be managed in a centralized manner.
Step S102: and judging whether a PDMS/E3D server which does not start the Global service exists in the at least two PDMS/E3D servers according to the server identifier, if so, starting the Global service in the PDMS/E3D server which does not start the Global service through a node service which is built in advance.
In this embodiment, each PDMS/E3D server is built with a node service, and the node service can communicate with the Web site and the scheduling service through a TCP protocol to allow the node service to control the PDMS/E3D server and the PDMS/E3D project.
Optionally, the starting of the Global service in the PDMS/E3D server of the non-started Global service by the pre-established node service specifically includes:
acquiring a script of the started Global service in the PDMS/E3D server of the un-started Global service through the node service in the PDMS/E3D server of the un-started Global service;
and starting the Global service in the PDMS/E3D server of the un-started Global service according to the script for starting the Global service.
In this embodiment, each PDMS/E3D server is configured with a script for starting and stopping a Global service, and if there is a PDMS/E3D server that does not start a Global service, the scheduling service communicates with the node service on the corresponding PDMS/E3D server through a TCP protocol to obtain the corresponding script for starting the Global service, and starts the Global service according to the script. Meanwhile, the scheduling service further judges whether the PDMS/E3D server which does not start the Global service starts the Global service successfully; if not, generating a corresponding log record and storing the log record in a database.
Step S103: when the at least two PDMS/E3D servers have started the Global service, sending a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, so that the node service synchronizes a database corresponding to the project information between the at least two PDMS/E3D servers based on the start synchronization instruction.
In this embodiment, if a project has 1 main site and 2 sub sites, there are two synchronization methods, one is sub synchronization: firstly, a master station (No. 1) is synchronized with a substation (No. 2), and then the master station (No. 1) is synchronized with a substation (No. 3); the other is synchronous, namely the master station (No. 1) and the substation (No. 2) are synchronous, and the master station (No. 1) and the substation (No. 3) are synchronous, which is equivalent to synchronous of three parties.
Step S104: and judging whether the current synchronization plan is finished, if so, stopping the corresponding Global service through the node service on each PDMS/E3D server.
It should be noted that the authorization of the PDMS/E3D software is purchased according to modules (Design three-dimensional modeling module, Iso Draft mapping module, Draft plane mapping module, Global project remote data synchronization module, etc.), wherein the modeling and mapping module authorization is shared, for example, 100 authorizations are purchased, and can be used for logging in the modeling module and also logging in the mapping module, and the number of concurrent logins is less than or equal to 100, the Global synchronization module is a single authorization, and is expensive, and the number of purchases is small, if 5 authorizations are purchased, at most only 5 concurrent logins can be performed, the existing database synchronization method needs the Global service to run all the time, and wastes Global authorization resources, therefore, the invention starts the Global service only when needed, stops the Global service after use, releases License resources for use by other projects or servers, and thus can maximally utilize Global authorization resources, and a large amount of software authorization cost is saved.
Optionally, the stopping the corresponding Global service by the node service on each PDMS/E3D server specifically includes:
sequentially judging whether each PDMS/E3D server needs to stop Global service or not;
if yes, acquiring a script for stopping the Global service in the PDMS/E3D server needing to stop the Global service through the node service;
and stopping the Global service in the PDMS/E3D server needing to stop the Global service according to the script for stopping the Global service.
In this embodiment, after the synchronization is finished, the scheduling service sequentially determines whether each PDMS/E3D server needs to stop the Global service, and if the Global service is not used (there may be other plans that are synchronizing and using the service), the scheduling service intelligently stops the Global service.
Optionally, the method further comprises:
monitoring the execution process of the current synchronization plan in the execution process of the current synchronization plan;
and when the execution of the current synchronization plan is monitored to be overtime or fail, generating and storing corresponding error diagnosis information.
In this embodiment, the scheduling service diagnoses the synchronization plan by monitoring the execution of the synchronization plan, and analyzes whether the execution of the synchronization plan is overtime, whether synchronization is completed, whether synchronization is successful, and the like, and if synchronization is overtime or fails (for example, due to network delay, stuck, abnormal, insufficient authorization, model data conflict, and the like), the scheduling service adds an error diagnosis message to the database, and a notification message for notifying a user of synchronization failure, and the user can view the error diagnosis message or the notification message through the Web site.
Optionally, the method further comprises:
and if the current synchronization plan is finished, generating and storing a synchronization record corresponding to the current synchronization plan.
In this embodiment, after each synchronization plan is completed, the scheduling service generates and stores a synchronization record corresponding to the synchronization plan, and a user logs in to a Web site through a browser to view the synchronization record.
In a specific embodiment, as shown in fig. 2, the method for synchronizing the database between the PDMS/E3D servers may include the following steps:
(1) building node service in PDMS/E3D server
Specifically, a node service is respectively built in each PDMS/E3D server, for example, as shown in fig. 2, there are two servers in a server cluster, and a node service is respectively built in server a and server B, and the node service encapsulates some interfaces for server management and PDMS/E3D operation, which are open to the outside through a TCP protocol, and the interfaces include obtaining PDMS/E3D server information, starting and stopping a Global service, executing a synchronization plan, obtaining a synchronization result, and the like. The node service may provide an interface to the scheduling service and the Web site for retrieving project information and executing related synchronization commands.
(2) Configuring items on PDMS/E3D server
Specifically, project information on the current server can be configured on each PDMS/E3D server by using a matched configuration tool, the project information includes a project database directory, a project ID and name, a server IP, a port, a server site code, a project start script, a project start-stop script, a project open user name and a password, and in order to avoid information leakage, the project information is stored locally in the server, where the password is encrypted to increase security.
(3) The PDMS/E3D server is entered at the Web site.
Specifically, a Web site can be built on any PDMS/E3D server or other server, and a user can log in the Web site through a browser and enter relevant information of the PDMS/E3D server through the Web site, such as a server identifier, a server IP, a port, and the like of the PDMS/E3D server.
(4) The entries on the PDMS/E3D server are entered at the Web site.
Specifically, a user can log in a Web site through a browser, and enter all project information on each PDMS/E3D server through the Web site, which may include project IDs, names, and the like, and after receiving the relevant information of the PDMS/E3D server entered by the user and all the project information on each PDMS/E3D server, the Web site stores the information in a database.
(5) A synchronization plan for the already entered project is made at the Web site.
Specifically, synchronization planning may be performed by the Web site and stored in a list form, and the synchronization plan list may include one or more synchronization plans, each of which may include a server identification of the PDMS/E3D server that needs to perform database synchronization, project information, execution time, and the like. The synchronization plans in the synchronization plan list may execute immediately or upon arrival of the corresponding execution time.
(6) A scheduling service is deployed on the server for executing the synchronization plan.
Specifically, a scheduling service may be built on any PDMS/E3D server or other server, and the scheduling service may read the already-established synchronization plan and execute the synchronization plan.
(7) Intelligent start-up Global service of scheduling service
Specifically, when executing a synchronization plan, the scheduling service first determines whether a Global service on PDMS/E3D servers of two or more synchronization parties is started, if the Global service is not started, the Global service on the target server is started first, and it is ensured that the service is started successfully, if the Global service cannot be started successfully, a corresponding log record is generated, and the log record can be checked on a Web site, and a retry operation is supported. It should be noted that the Web site may be deployed on the same server as the scheduling service.
Assuming that the project has 1 main site and 2 sub sites, there are two synchronization modes, one is sub synchronization: firstly, a master station (No. 1) is synchronized with a substation (No. 2), and then the master station (No. 1) is synchronized with a substation (No. 3); the other is synchronous, namely the master station (No. 1) is synchronous with the substation (No. 2), and the master station (No. 1) is synchronous with the substation (No. 3), which is equivalent to synchronous of three parties.
(8) And after the Global service on the two or more synchronous PDMS/E3D servers is successfully started, sending a synchronization starting command to the corresponding node service.
(9) The scheduling service diagnoses the synchronization plan by monitoring the execution of the synchronization plan, thereby facilitating analysis of whether the execution of the synchronization plan is overtime, whether synchronization is completed, whether synchronization is successful, and the like.
(10) And after the synchronization is finished, the scheduling service analyzes the synchronization result.
(11) If synchronization fails (e.g., due to network delay, jamming, anomalies, insufficient authorization, model data conflicts, etc.), the scheduling service may add an error diagnosis message to the database, as well as a notification message for notifying the user of the synchronization failure.
(12) The notification message can be viewed by logging onto the Web site with the browser.
(13) And if the synchronization is successful, storing the synchronization result in the database.
(14) After the synchronization is finished, whether the Global service needs to be closed is judged, and if the Global service is not used (other plans can exist to be synchronized and use the service), the scheduling service intelligently stops the Global service.
(15) And if the synchronization is successful, generating and storing a synchronization record corresponding to the synchronization plan, and logging in a Web site by using a browser to view the synchronization record.
It should be noted that the programming language of the invention is preferably C # language, the node service, the Web site and the scheduling service are built through the C # language, the invention can automatically synchronize according to the established synchronization plan, intelligently manage the start and stop of the Global service, start the Global service only when needed, finish the Global service after use, release the License resource for other projects or servers, thereby maximally utilizing the Global authorization resource and saving a large amount of software authorization cost. And the whole synchronization process does not need human participation, so that a large amount of human resources can be saved.
The database synchronization method between PDMS/E3D servers provided by the embodiment of the invention comprises the steps of firstly obtaining a current synchronization plan, wherein the current synchronization plan comprises server identifications of at least two PDMS/E3D servers which need to perform database synchronization and corresponding project information, then judging whether a PDMS/E3D server which does not start Global service exists in the at least two PDMS/E3D servers according to the server identifications, and if so, starting the Global service in the PDMS/E3D server which does not start Global service through a node service which is constructed in advance; and when the Global service has been started by the at least two PDMS/E3D servers, sending a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, so that the node service synchronizes the database corresponding to the project information between the at least two PDMS/E3D servers based on the start synchronization instruction, and finally determining whether the current synchronization plan is completed, if so, stopping the corresponding Global service by the node service on each PDMS/E3D server, the invention can automatically perform database synchronization between PDMS/E3D servers of different areas according to the current synchronization plan formulated in advance, and intelligently start and stop the Global service in the synchronization execution process, thereby maximally utilizing Global authorized resources and saving a large amount of Global software authorization cost, because the whole synchronization process does not need human participation, a large amount of human resources can be saved, and the problems that the Global service is required to be operated all the time and the Global resources are wasted, and the Global service is required to be started and stopped manually and a large amount of human resources are wasted in the conventional database synchronization method between PDMS/E3D servers are solved.
Example 2:
as shown in fig. 3, the present embodiment provides an apparatus for synchronizing a database between PDMS/E3D servers, which is used to perform the method for synchronizing a database between PDMS/E3D servers, and includes:
a synchronization plan obtaining module 11, configured to obtain a current synchronization plan, where the current synchronization plan includes server identifiers of at least two PDMS/E3D servers that need to perform database synchronization and corresponding project information;
a service starting module 12, connected to the synchronization plan obtaining module 11, configured to determine, according to the server identifier, whether a PDMS/E3D server that does not start Global service exists in the at least two PDMS/E3D servers, and if yes, start the Global service in the PDMS/E3D server that does not start Global service through a node service that is pre-established by the service starting module;
a synchronization executing module 13, connected to the service starting module 12, configured to send a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, when the at least two PDMS/E3D servers have started the Global service, so that the node service synchronizes a database corresponding to the item information between the at least two PDMS/E3D servers based on the start synchronization instruction;
a service stopping module 14, connected to the synchronization executing module 13, configured to determine whether the current synchronization plan is completed, and if yes, stop the corresponding Global service through the node service on each PDMS/E3D server.
Optionally, the synchronization plan obtaining module 11 specifically includes:
the system comprises a list acquisition unit, a synchronization planning unit and a synchronization planning unit, wherein the list acquisition unit is used for acquiring a synchronization planning list stored in a database in advance through a scheduling service set up in advance;
a plan obtaining unit, configured to obtain the current synchronization plan from the synchronization plan list through the scheduling service.
Optionally, the apparatus further comprises:
the first receiving module is used for receiving server identifications of a plurality of PDMS/E3D servers and corresponding project information, which are input by a user, through a preset Web site;
a second receiving module, configured to receive, through the Web site, the synchronization plan list formulated by the user based on the server identifications of the PDMS/E3D servers and the corresponding item information, and store the synchronization plan list in the database.
Optionally, the service initiation module 12 is specifically configured to:
judging whether a PDMS/E3D server which does not start the Global service exists in the at least two PDMS/E3D servers according to the server identification, if so, acquiring a script which starts the Global service in the PDMS/E3D server which does not start the Global service through the node service in the PDMS/E3D server which does not start the Global service, and starting the Global service in the PDMS/E3D server which does not start the Global service according to the script which starts the Global service.
Optionally, the service stopping module 14 specifically includes:
a stop judging unit, configured to judge whether the current synchronization plan is completed, and if yes, sequentially judge whether each PDMS/E3D server needs to stop Global service;
a stop script obtaining unit, configured to obtain, by the node service, a script for stopping the Global service in the PDMS/E3D server that needs to stop the Global service when the determination result of the stop determining unit is yes;
and the stop script execution unit is used for stopping the Global service in the PDMS/E3D server needing to stop the Global service according to the script for stopping the Global service.
Optionally, the apparatus further comprises:
the starting judgment module is used for judging whether the PDMS/E3D server which does not start the Global service starts the Global service successfully;
and the log recording module is used for generating and storing corresponding log records if the log records are not the same.
Optionally, the apparatus further comprises:
the monitoring module is used for monitoring the execution process of the current synchronization plan in the execution process of the current synchronization plan;
and the diagnosis module is used for generating and storing corresponding error diagnosis information when monitoring that the execution of the current synchronization plan is overtime or fails.
Optionally, the apparatus further comprises:
and the synchronous recording module is used for generating and storing the synchronous record corresponding to the current synchronous plan if the current synchronous plan is finished.
Example 3:
the present embodiment provides a computer-readable storage medium, which stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the database synchronization method between the PDMS/E3D servers in embodiment 1.
The computer-readable storage media include volatile or nonvolatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The database synchronization device and the storage medium between the PDMS/E3D servers provided in embodiments 2 to 3, first obtain a current synchronization plan, where the current synchronization plan includes server identifiers of at least two PDMS/E3D servers that need to perform database synchronization and corresponding project information, and then determine whether a PDMS/E3D server that does not start Global service exists in the at least two PDMS/E3D servers according to the server identifiers, if so, start the Global service in the PDMS/E3D server that does not start Global service through a node service built in advance; and when the Global service has been started by the at least two PDMS/E3D servers, sending a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, so that the node service synchronizes the database corresponding to the project information between the at least two PDMS/E3D servers based on the start synchronization instruction, and finally determining whether the current synchronization plan is completed, if so, stopping the corresponding Global service by the node service on each PDMS/E3D server, the invention can automatically perform database synchronization between PDMS/E3D servers of different areas according to the current synchronization plan formulated in advance, and intelligently start and stop the Global service in the synchronization execution process, thereby maximally utilizing Global authorized resources and saving a large amount of Global software authorization cost, because the whole synchronization process does not need human participation, a large amount of human resources can be saved, and the problems that the Global service is required to be operated all the time and the Global resources are wasted, and the Global service is required to be started and stopped manually and a large amount of human resources are wasted in the conventional database synchronization method between PDMS/E3D servers are solved.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A method for synchronizing databases between PDMS/E3D servers, the method comprising:
acquiring a current synchronization plan, wherein the current synchronization plan comprises server identifications of at least two PDMS/E3D servers which need to perform database synchronization and corresponding project information;
judging whether a PDMS/E3D server which does not start the Global service exists in the at least two PDMS/E3D servers according to the server identification, if so, starting the Global service in the PDMS/E3D server which does not start the Global service through a node service which is set up in advance;
when the at least two PDMS/E3D servers have started the Global service, sending a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, so that the node service synchronizes a database corresponding to the project information between the at least two PDMS/E3D servers based on the start synchronization instruction;
and judging whether the current synchronization plan is finished, if so, stopping the corresponding Global service through the node service on each PDMS/E3D server.
2. The method of database synchronization between PDMS/E3D servers of claim 1, wherein the obtaining the current synchronization plan specifically comprises:
acquiring a synchronization plan list pre-stored in a database through a pre-established scheduling service;
and acquiring the current synchronization plan from the synchronization plan list through the scheduling service.
3. The PDMS/E3D server-to-server database synchronization method according to claim 2, wherein before the synchronization plan list pre-stored in the database is obtained through the pre-built scheduling service, the method further comprises:
receiving server identifications of a plurality of PDMS/E3D servers and corresponding project information which are input by a user through a pre-established Web site;
receiving the synchronization plan list formulated by the user based on the server identifications of the plurality of PDMS/E3D servers and the corresponding project information through the Web site, and storing the synchronization plan list in the database.
4. The method for synchronizing databases among PDMS/E3D servers of claim 1, wherein the starting of Global service in the PDMS/E3D server that does not start Global service through its pre-built node service specifically comprises:
acquiring a script of the started Global service in the PDMS/E3D server of the un-started Global service through the node service in the PDMS/E3D server of the un-started Global service;
and starting the Global service in the PDMS/E3D server of the un-started Global service according to the script for starting the Global service.
5. The method of database synchronization between PDMS/E3D servers of claim 1, wherein the stopping of the corresponding Global service by the node service on each PDMS/E3D server specifically comprises:
sequentially judging whether each PDMS/E3D server needs to stop Global service;
if yes, acquiring a script for stopping the Global service in the PDMS/E3D server needing to stop the Global service through the node service;
and stopping the Global service in the PDMS/E3D server needing to stop the Global service according to the script for stopping the Global service.
6. The method for synchronizing databases among PDMS/E3D servers according to claim 1, wherein after the Global service in the PDMS/E3D server which does not start Global service is started by the pre-built node service, the method further comprises:
judging whether the PDMS/E3D server which does not start the Global service starts the Global service successfully;
if not, generating and storing a corresponding log record.
7. The method for database synchronization between PDMS/E3D servers according to claim 1, further comprising:
monitoring the execution process of the current synchronization plan in the execution process of the current synchronization plan;
and when the execution of the current synchronization plan is monitored to be overtime or fail, generating and storing corresponding error diagnosis information.
8. The method for database synchronization between PDMS/E3D servers according to claim 1, further comprising:
and if the current synchronization plan is finished, generating and storing a synchronization record corresponding to the current synchronization plan.
9. A device for synchronizing databases between PDMS/E3D servers, comprising:
a synchronization plan acquisition module, configured to acquire a current synchronization plan, where the current synchronization plan includes server identifiers of at least two PDMS/E3D servers that need to perform database synchronization and corresponding project information;
the service starting module is connected with the synchronization plan acquisition module and used for judging whether a PDMS/E3D server which does not start the Global service exists in the at least two PDMS/E3D servers according to the server identification, if so, starting the Global service in the PDMS/E3D server which does not start the Global service through a node service which is pre-established by the service starting module;
a synchronous execution module, connected to the service starting module, configured to send a start synchronization instruction to the node service of each PDMS/E3D server of the at least two PDMS/E3D servers, when the at least two PDMS/E3D servers have started the Global service, so that the node service synchronizes a database corresponding to the item information between the at least two PDMS/E3D servers based on the start synchronization instruction;
and the service stopping module is connected with the synchronous execution module and used for judging whether the current synchronous plan is finished or not, and if so, stopping the corresponding Global service through the node service on each PDMS/E3D server.
10. A computer readable storage medium, wherein a computer program is stored thereon, which when executed by a processor, implements the method for database synchronization between PDMS/E3D servers according to any one of claims 1-8.
CN202210661938.2A 2022-06-13 2022-06-13 Database synchronization method, device and medium between PDMS/E3D servers Pending CN115129468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210661938.2A CN115129468A (en) 2022-06-13 2022-06-13 Database synchronization method, device and medium between PDMS/E3D servers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210661938.2A CN115129468A (en) 2022-06-13 2022-06-13 Database synchronization method, device and medium between PDMS/E3D servers

Publications (1)

Publication Number Publication Date
CN115129468A true CN115129468A (en) 2022-09-30

Family

ID=83377797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210661938.2A Pending CN115129468A (en) 2022-06-13 2022-06-13 Database synchronization method, device and medium between PDMS/E3D servers

Country Status (1)

Country Link
CN (1) CN115129468A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024077802A1 (en) * 2022-10-10 2024-04-18 上海商米科技集团股份有限公司 Cross-region data synchronization method and system, and computer readable medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024077802A1 (en) * 2022-10-10 2024-04-18 上海商米科技集团股份有限公司 Cross-region data synchronization method and system, and computer readable medium

Similar Documents

Publication Publication Date Title
CN107566165B (en) Method and system for discovering and deploying available resources of power cloud data center
CN101196840B (en) System and method for configuring a data mirror
KR20150118975A (en) System and methods for multi-user cax editing conflict management
CN101471819A (en) Test system, test method, management domain and operation domain
CN110545207B (en) Synchronous automatic intelligent DNS system and configuration method
CN112579101B (en) Task script management and control method and device, electronic equipment and storage medium
CN110063042B (en) Database fault response method and terminal thereof
CN110046166B (en) Timing task scheduling method and device based on block chain
CN105468500A (en) Timing task monitoring method and device
CN115129468A (en) Database synchronization method, device and medium between PDMS/E3D servers
CN103516735A (en) Method and apparatus for upgrading network node
CN113783953A (en) Industrial Internet of things network management and control method and system based on cloud edge cooperation
Liu et al. Mv4ms: A spring cloud based framework for the co-deployment of multi-version microservices
CN114595288A (en) SQL command level-based multi-IDC distributed system data synchronization method
CN113687927A (en) Method, device, equipment and storage medium for scheduling and configuring flash tasks
CN110780981A (en) Task scheduling management system and method for hadoop big data platform
CN111782618A (en) Data synchronization system
US11693643B2 (en) Network-based solution module deployment platform
CN114095946A (en) 5GC service network element management system and management method thereof
CN116560721B (en) Vehicle diagnosis system, method and electronic equipment
CN115190022B (en) ONU configuration deployment method and device
CN116126359A (en) Distributed photovoltaic power station monitoring deployment system and deployment method
CN113656095B (en) Processing method and device for configuration data
CN117395323A (en) Data acquisition interaction method and device, electronic equipment and storage medium
CN117477779A (en) Multi-service configuration configurator and configuration method of transformer substation monitoring system

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