WO2016090914A1 - 一种发送联动数据更新指令的方法及装置 - Google Patents

一种发送联动数据更新指令的方法及装置 Download PDF

Info

Publication number
WO2016090914A1
WO2016090914A1 PCT/CN2015/084001 CN2015084001W WO2016090914A1 WO 2016090914 A1 WO2016090914 A1 WO 2016090914A1 CN 2015084001 W CN2015084001 W CN 2015084001W WO 2016090914 A1 WO2016090914 A1 WO 2016090914A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
data
linkage
updated
update
Prior art date
Application number
PCT/CN2015/084001
Other languages
English (en)
French (fr)
Inventor
梅明丽
刘帅东
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016090914A1 publication Critical patent/WO2016090914A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and apparatus for transmitting a linked data update command.
  • the dual-system includes the primary server and the standby server.
  • the primary server usually runs the service, and the standby server backs up the data of the primary server, thereby improving the reliability of the service operation.
  • the data needs to be updated when the associated two services are connected in the telecom cloud.
  • how to update the data in the server of the dual-system directly affects the efficiency of the linkage and contraction between the services. It is an urgent problem to be solved.
  • the present invention provides a method and apparatus for transmitting a linked data update command.
  • the technical solution is as follows:
  • a first aspect a method for sending a linked data update instruction, the method comprising:
  • the first server receives the linked data update command sent by the platform, that is, the service Paas platform, and the linked update command is used to request a server in the dual-system to update the stored data corresponding to the data identifier to be updated to the data to be updated.
  • Said first server is any one of said two-machine system;
  • the first server acquires identification information of the second server that constitutes the dual-system with the first server;
  • the first server sends the linkage data update instruction to the second server according to the identifier information of the second server, so that the second server updates the stored data corresponding to the to-be-updated data identifier to The data to be updated.
  • the server that the linkage update instruction is used for the request is a primary server of the dual-system
  • Determining whether the first server is the server for the linkage update instruction for requesting includes:
  • the acquiring the running process in the first server includes:
  • the running process in the first server is obtained by running the business script.
  • the determining, according to the obtained process, whether the first server is a primary device in a dual-system Server including:
  • the business process is included, it is determined that the first server is the primary server in the dual-system.
  • the determining, by the server, whether the first server is the linked update command is used by the server, including:
  • the first identity information is the same as the second identity information, determining that the first server is the server for the linkage update instruction for the request.
  • the method further includes:
  • the data corresponding to the data identifier to be updated stored in the first server is updated with the data to be updated.
  • the data identifier to be updated stored in the first server is corresponding to The data updates the data to be updated, including:
  • the data to be updated is updated by the data corresponding to the data identifier to be updated stored in the first server by running the data update script.
  • the second aspect is an apparatus for sending a linkage data update instruction, where the apparatus is a first server, the first server is any one of a dual-system, and the first server includes:
  • a receiving module configured to receive a linkage data update command sent by the platform, that is, the service Paas platform, where the linkage update command is used to request a server in the dual-system to update the stored data corresponding to the data identifier to be updated to be updated.
  • the data ;
  • a determining module configured to determine whether the first server is the server for the linkage update instruction for requesting
  • an obtaining module configured to acquire, if the server is not the linkage update instruction, the identifier information of the second server that forms the dual-system with the first server;
  • a sending module configured to send the linkage data update instruction to the second server according to the identifier information of the second server, so that the second server updates the stored data corresponding to the to-be-updated data identifier to The data to be updated.
  • the server that the linkage update instruction is used for the request is a primary server of the dual-system
  • the determining module includes:
  • a first acquiring unit configured to acquire a running process in the first server
  • a second determining unit configured to determine, according to the acquired process, whether the first server is a primary server in the dual-system.
  • the first acquiring unit includes:
  • Obtaining a subunit configured to acquire a running process in the first server by running the service script.
  • the second determining unit includes:
  • a first determining subunit configured to determine whether a service process is included in the acquired process
  • a second determining subunit configured to determine that the first server is a primary server in the dual-system if the service process is included.
  • the determining module includes:
  • a second acquiring unit configured to acquire, from the linked data update instruction, the first identity information of the server for requesting the linkage update instruction
  • a third obtaining unit configured to acquire second identity information of the first server
  • a second determining unit configured to: if the first identity information is the same as the second identity information, determine that the first server is the server for the linkage update instruction for the request.
  • the method further includes:
  • an update module configured to update the data to be updated by the data corresponding to the data identifier to be updated stored in the first server, if the first server is the server for the linkage update instruction .
  • the updating module includes:
  • a calling unit configured to invoke a data update script in the first server
  • an update unit configured to update the data to be updated by the data corresponding to the data identifier to be updated stored in the first server by running the data update script.
  • the third aspect is a first server, where the first server is any one of the dual-systems, and the first server includes:
  • a receiver configured to receive a linkage data update instruction sent by the platform, that is, the service Paas platform, where the linkage update instruction is used to request a server in the dual-system to update the stored data corresponding to the data identifier to be updated to be updated.
  • the data ;
  • a processor configured to determine whether the first server is the server for the linkage update instruction for the request; if the linkage update instruction is not for the requested server, acquiring the dual-machine with the first server Identification information of the second server of the system;
  • a sender configured to send the linkage data update instruction to the second server according to the identifier information of the second server, so that the second server updates the stored data corresponding to the to-be-updated data identifier to The data to be updated.
  • the first server receives a request for requesting a server in the dual-system After performing the linkage data update instruction of the data update, it is determined whether it is the server for the linkage data update request for the request, and if so, the data update is performed according to the linkage data update instruction, and if not, the second system of the dual-system is formed
  • the server sends the linkage data update instruction to the second server, and the second server performs data update according to the linkage data update instruction.
  • the update data is implemented in the dual-system, and when the first server is not the primary server, the first server directly forwards the linkage data update request to the primary server.
  • the data is updated by the primary server to improve the efficiency of data update.
  • 1-1 is a schematic diagram of a network architecture according to an embodiment of the present invention.
  • 1-2 is a flowchart of a method for sending a linkage data update command according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for transmitting a linkage data update instruction according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a method for sending a linkage data update instruction according to Embodiment 3 of the present invention
  • FIG. 4 is a structural diagram of an apparatus for transmitting a linkage data update command according to Embodiment 4 of the present invention.
  • FIG. 5 is a structural diagram of a first server according to Embodiment 5 of the present invention.
  • the service can be deployed in the cloud.
  • the cloud can provide a running server for the business, and the server can be a virtual machine or the like.
  • the cloud currently uses a dual-system to run services in the cloud.
  • the dual-system includes the primary server and the standby server.
  • the primary server usually runs the service, and the standby server backs up the primary server. Thereby improving the reliability of the business.
  • the dual-system can be viewed as a service network element from a logical level to provide a service to the outside world.
  • the dual-system running the service is formed by the Paas (Platform-as-a-service) platform
  • the Paas platform is a cloud platform in the cloud, which is responsible for managing the servers in the cloud.
  • the Paas platform can obtain two servers having a reverse affinity relationship, wherein in the embodiment of the present invention, the server can be a virtual machine deployed on the host machine, and the anti-affinity relationship is two.
  • the servers are two virtual machines deployed on different hosts.
  • the two servers are then assigned to the service, which combines the two servers into a dual-system and the service is run by the dual-system.
  • the server in the cloud dual-system system may perform service interaction with other service network elements, that is, the service running in the dual-system system is linked and contracted with the service running by the service network element.
  • the service network element may generate new data corresponding to a certain data identifier, and the server in the dual-system may also store data corresponding to the data identifier, but the server stores the data in the server.
  • the data corresponding to the data identifier is the old data.
  • the service network element needs to update the data corresponding to the data identifier stored in the server to the new data.
  • the data identifier is referred to as a data identifier to be updated, and the new data is referred to as data to be updated.
  • the service network element sends a linkage data update request to the Paas platform, and the linkage data update request carries at least the service identifier of the service running by the dual-system, the data to be updated, and the to-be-updated
  • the data is identified to trigger the Paas platform and the dual system to perform data update by the method provided in any of the following embodiments.
  • an embodiment of the present invention provides a method for sending a linkage data update instruction, including:
  • Step 101 The first server receives a linkage data update command sent by the Paas platform, where the linkage update command is used to request a server in the dual-system to update the data corresponding to the stored data identifier to be updated to the data to be updated.
  • the server is any of the two-machine systems.
  • Step 102 The first server determines whether the first server is the server for the linkage update instruction for the request.
  • Step 103 If the linkage update instruction is not for the requested server, the first server acquires the identification information of the second server that forms the dual-system with the first server.
  • the identifier information of the second server may be an IP address, a MAC address, or a domain name of the second server.
  • Step 104 The first server sends the linkage data update instruction to the second server according to the identifier information of the second server, so that the second server updates the stored data corresponding to the data identifier to be updated to the data to be updated.
  • the first server after receiving the linkage data update instruction for requesting data update by a server in the dual-system, the first server determines whether it is the server for the linkage data update request for the request, and if so, according to The linkage data update command performs data update. If not, the second server that sets up the dual-system system sends the linkage data update instruction to the second server, and the second server updates the data according to the linkage data update instruction. In this way, when the two services are linked and stretched, the update data is implemented in the dual-system, and when the first server is not the primary server, the first server directly forwards the linkage data update request to the primary server. The data is updated by the primary server to improve the efficiency of data update.
  • Embodiments of the present invention provide a method for transmitting a linkage data update instruction.
  • the primary server in the dual-system is used to run the service, and the standby server is used to back up the primary server, and the service network element only requests the primary server in the dual-system to update the data.
  • the method includes:
  • Step 201 The Paas platform receives the linkage data update request sent by the service network element, where the linkage data update request carries the service identifier, the data identifier to be updated, and the data to be updated.
  • the service network element when the service network element interacts with the primary server in the dual-system, the data to be updated is generated, and then the Paas platform is requested to forward the linkage data update request to the server in the dual-system to request the network element.
  • the server performs data updates.
  • Step 202 The Paas platform acquires a dual-system that runs the service corresponding to the service identifier, and sends a linkage data update instruction to a server in the dual-system, where the linkage data update instruction carries the data identifier to be updated and the data to be updated.
  • the service identifier of the service and the addresses of the two servers in the dual-system formed are stored in the correspondence between the service identifier and the dual-system, that is, each storage is pre-stored in the Paas platform.
  • This step can be: the Paas platform according to the service identifier, from the service identifier and the dual-system Correspondingly, obtaining the addresses of the two servers included in the corresponding dual-system, selecting an address of the server from the addresses of the two servers, and establishing a transmission channel with the selected server according to the address of the selected server, The transmission channel sends a linkage data update instruction to the selected server, where the linkage data update instruction carries the data identifier to be updated and the data to be updated.
  • the Paas platform since the Paas platform does not know which server in the dual-system is the primary server and which server is the standby server, the Paas platform can randomly select one server.
  • the server selected by the Paas platform is referred to as a first server, and the first server may be a primary server of a dual-system or a standby server of a dual-system.
  • Step 203 The first server receives the linkage data update instruction, where the linkage data update instruction carries the data identifier to be updated and the data to be updated, and acquires a process that is running by itself.
  • the first server receives the linkage data update instruction, and the linkage data update instruction carries the data identifier to be updated and the data to be updated, invokes the service script stored by itself, and obtains the running process by running the service script.
  • the business script is an implementation code for obtaining a running process in the server, so the first server can obtain the running process by running the business script.
  • Step 204 The first server determines, according to the obtained process, whether it is the primary server in the dual-system, and if yes, performs step 205. If not, step 206 is performed.
  • the first server determines whether the acquired process includes a service process, and if the service process is included, determines that it is a primary server in the dual-system, and if the service process is not included, determines that it is not in the dual-system.
  • the primary server determines whether the acquired process includes a service process, and if the service process is included, determines that it is a primary server in the dual-system, and if the service process is not included, determines that it is not in the dual-system.
  • the primary server determines whether the acquired process includes a service process, and if the service process is included, determines that it is a primary server in the dual-system, and if the service process is not included, determines that it is not in the dual-system.
  • the dual-system system runs the service by the primary server, and the standby server backs up the primary server. Therefore, the primary server includes a service process for running the service, and the standby server includes only the monitoring process. The process is used to monitor the primary server. When monitoring the data change in the primary server, the standby server and the primary server are synchronized. Therefore, in this step, if the first server includes a service process, the first server is the primary server in the dual-system. If the first server does not include the service process, the first server is not the master in the dual-system. Use the server, but the alternate server in the dual-system.
  • Step 205 The first server updates the stored data corresponding to the data identifier to be updated to the data to be updated, sends the update result to the Paas, and ends the operation.
  • the first server calls the data update script in itself; by running the data,
  • the new script updates the data to be updated by the data corresponding to the data identifier to be updated stored by itself, and sends an update result to the Paas, and the update result is that the update is successful.
  • the data update script is an implementation code for updating the data. Therefore, by running the data update script, the first server can update the data corresponding to the data identifier to be updated stored by itself to update the data to be updated.
  • the Paas platform After receiving the update result, the Paas platform forwards the update result to the service network element.
  • Step 206 The first server acquires identification information of the second server that is a self-contained dual-system.
  • the first server obtains the identifier information of the server that establishes a trust relationship with the first server, and determines the identifier information of the server as the identifier information of the second server that constitutes the dual-system.
  • the identification information of the second server may be an IP address, a MAC address, or a domain name of the second server.
  • Step 207 The first server sends a linkage data update instruction to the second server according to the identifier information of the second server.
  • the first server may encrypt the linkage data update instruction with its own private key to obtain a ciphertext, and send the ciphertext to the second server according to the identifier information of the second server.
  • Step 208 The second server receives the linkage data update instruction, and the linkage data update instruction carries the data identifier to be updated and the data to be updated, and updates the data corresponding to the data identifier to be updated stored in the data to the data to be updated.
  • the first server returns the update result.
  • the second server receives the ciphertext sent by the first server, and decrypts the ciphertext by using the public key of the first server to obtain the linkage data update instruction, where the linkage data update instruction carries the data identifier to be updated and is to be updated.
  • the data is updated with the data corresponding to the data identifier to be updated stored in the data to be updated, and the update result is returned to the first server, and the update result is that the update is successful.
  • the first server forwards the update result to the Paas platform.
  • the Paas platform forwards the update result to the service network element.
  • the first server receives the data for requesting the primary server to perform data. After the new linkage data update command, it is determined whether it is the master server, and if so, the data update is performed according to the linkage data update command. If not, the second server that sets up the dual-system is the master server. The second server sends the linkage data update instruction, and the second server performs data update according to the linkage data update instruction. In this way, when the two services are linked and stretched, the update data is implemented in the dual-system, and when the first server is not the primary server, the first server directly forwards the linkage data update request to the primary server. The data is updated by the primary server to improve the efficiency of data update.
  • Embodiments of the present invention provide a method for transmitting a linkage data update instruction.
  • the primary server in the dual-system is used to run the service
  • the backup server is used to back up the primary server
  • the service server can also be used to run the service
  • the service network element can request the primary server in the dual-system.
  • the method includes:
  • Step 301 The Paas platform receives the linkage data update request sent by the service network element, where the linkage data update request carries the first identity information, the service identifier, the data identifier to be updated, and the data to be updated of a server in the dual-system.
  • the service network element when the service network element interacts with a server in the dual-system, the data to be updated is generated, and the server may be a primary server in the dual-system, or may be a backup in the dual-system. server. Then, the service network element requests the Paas platform to forward the linkage data update request to the server in the dual-system to perform data update.
  • the first identity information of the server is the primary server. If the server is the standby server in the dual-system, the first identity information of the server is the standby server.
  • Step 302 The Paas platform acquires a dual-system that runs the service corresponding to the service identifier, and sends a linkage data update instruction to a server in the dual-system, where the linkage data update instruction carries the first identity information, the data identifier to be updated, and The data to be updated.
  • the service identifier of the service and the addresses of the two servers in the dual-system formed are stored in the correspondence between the service identifier and the dual-system, that is, each storage is pre-stored in the Paas platform.
  • the Paas platform obtains, according to the service identifier, the addresses of the two servers included in the corresponding dual-system from the correspondence between the service identifier and the dual-system, and selects the address of the server from the addresses of the two servers. And establishing, according to the address of the selected server, a transmission channel between the server and the selected server, and sending, by the transmission channel, a linkage data update instruction to the selected server, where the linkage data update instruction carries the first identity information, the data identifier to be updated, and The data to be updated.
  • the Paas platform since the Paas platform does not know the identity of each server in the dual-system, the Paas platform can randomly select a server.
  • the server selected by the Paas platform is referred to as a first server, and the first server may be a server corresponding to the first identity information, or may not be a server corresponding to the first identity information.
  • Step 303 The first server receives the linkage data update instruction, where the linkage data update instruction carries the first identity information, the data identifier to be updated, and the data to be updated, and obtains the second identity information of the second identity information.
  • the first server receives the linkage data update instruction, where the linkage data update instruction carries the first identity information, the data identifier to be updated, and the data to be updated, and obtains the first identity information from the linkage data update instruction, and logs in itself.
  • the database and obtain its own second identity information from the database.
  • Step 304 If the first identity information is the same as the second identity information, the first server determines that the linkage update command is used by the server for the request, and performs step 305.
  • Step 305 The first server updates the stored data corresponding to the data identifier to be updated to the data to be updated, sends the update result to the Paas, and ends the operation.
  • the first server invokes a data update script in itself; by running the data update script, the data corresponding to the data identifier to be updated stored by itself is updated with the data to be updated, and the update result is sent to the Paas, and the update result is an update. success.
  • the data update script is an implementation code for updating the data. Therefore, by running the data update script, the first server can update the data corresponding to the data identifier to be updated stored by itself to update the data to be updated.
  • the Paas platform After receiving the update result, the Paas platform forwards the update result to the service network element.
  • Step 306 If the first identity information is different from the second identity information, the first server acquires the identity information of the second server that constitutes the dual-system, and determines that the second server is the server for the linkage update command. Go to step 307.
  • the two-machine system includes two servers, a first server and a second server. If the second identity information of the first server is different from the first identity information, it may be determined that the first server is not the linkage update command for the requested server. And another server in the dual-system, that is, the second server is the server for the linkage update instruction for the request.
  • the first server obtains the identifier information of the server that establishes a trust relationship with the first server, and determines the identifier information of the server as the identifier information of the second server that constitutes the dual-system.
  • the identification information of the second server may be an IP address, a MAC address, or a domain name of the second server.
  • Step 307 The first server sends a linkage data update instruction to the second server according to the identifier information of the second server.
  • the first server may encrypt the linkage data update instruction with its own private key to obtain a ciphertext, and send the ciphertext to the second server according to the identifier information of the second server.
  • Step 308 The second server receives the linkage data update instruction, and the linkage data update instruction carries the data identifier to be updated and the data to be updated, and updates the data corresponding to the data identifier to be updated stored in the data to the data to be updated.
  • the first server returns the update result.
  • the second server receives the ciphertext sent by the first server, and decrypts the ciphertext by using the public key of the first server to obtain the linkage data update instruction, where the linkage data update instruction carries the data identifier to be updated and is to be updated.
  • the data is updated with the data corresponding to the data identifier to be updated stored in the data to be updated, and the update result is returned to the first server, and the update result is that the update is successful.
  • the first server forwards the update result to the Paas platform.
  • the Paas platform forwards the update result to the service network element.
  • the first server after receiving the linkage data update instruction for requesting data update by a server in the dual-system, the first server determines whether it is the server for requesting the linkage data update instruction, and if so, according to The linkage data update command performs data update. If not, the second server that sets up the dual-system system sends the linkage data update instruction to the second server, and the second server updates the data according to the linkage data update instruction.
  • the update data is implemented in the dual-system, and when the first server is not the linked data update command for the requested server, the first server directly updates the linkage data.
  • the request is forwarded to the second server, and the second server performs data update to improve the efficiency of data update.
  • the embodiment of the present invention provides an apparatus for sending a linkage data update instruction, where the apparatus may be a first server, and the first server is any one of the dual-systems.
  • the first server includes:
  • the receiving module 401 is configured to receive a linkage data update command sent by the aas platform, where the linkage update command is used to request a server in the dual-system to update the stored data corresponding to the data identifier to be updated to the data to be updated;
  • a determining module 402 configured to determine whether the first server is the server for the linkage update instruction for the request
  • the obtaining module 403 is configured to acquire, if the server is not the linkage update instruction, the identifier information of the second server that forms the dual-system with the first server;
  • the sending module 404 is configured to send the linkage data update instruction to the second server according to the identifier information of the second server, so that the second server updates the stored data corresponding to the data identifier to be updated to the data to be updated.
  • the linkage update instruction is used to request the server as the primary server of the dual-system
  • the determining module 402 includes:
  • a first obtaining unit configured to acquire a running process in the first server
  • a second determining unit configured to determine, according to the obtained process, whether the first server is a primary server in the dual-system.
  • the first obtaining unit includes:
  • the second determining unit includes:
  • a first determining subunit configured to determine whether a process is included in the acquired process
  • a second determining subunit configured to determine that the first server is dual if the service process is included The primary server in the machine system.
  • the determining module 402 includes:
  • a second acquiring unit configured to acquire, from the linkage data update instruction, the first identity information of the server for requesting the linkage update instruction
  • a third acquiring unit configured to acquire second identity information of the first server
  • a second determining unit configured to determine, if the first identity information is the same as the second identity information, determining, by the first server, the server that the linkage update instruction is used for the request.
  • the first server further includes:
  • an update module configured to: if the first server is the server for the linkage update instruction, use the data corresponding to the data identifier to be updated stored in the first server to update the data to be updated.
  • the update module includes:
  • a calling unit configured to invoke a data update script in the first server
  • an update unit configured to update the data to be updated by the data corresponding to the data identifier to be updated stored in the first server by running the data update script.
  • the first server after receiving the linkage data update instruction for requesting data update by a server in the dual-system, the first server determines whether it is the server for the linkage data update request for the request, and if so, according to The linkage data update command performs data update. If not, the second server that sets up the dual-system system sends the linkage data update instruction to the second server, and the second server updates the data according to the linkage data update instruction. In this way, when the two services are linked and stretched, the update data is implemented in the dual-system, and when the first server is not the primary server, the first server directly forwards the linkage data update request to the primary server. The data is updated by the primary server to improve the efficiency of data update.
  • the implementation of the present invention provides a first server, where the first server is any one of the dual-systems.
  • the first server includes:
  • the receiver 501 is configured to receive a linkage data update command sent by the Paas platform, where the linkage update command is used to request a server in the dual-system to update the stored data corresponding to the data identifier to be updated to the data to be updated;
  • the processor 502 is configured to determine whether the first server is the server for the linkage update instruction for the request; if the linkage update instruction is not for the requested server, acquire the identifier of the second server that forms the dual-system with the first server. information;
  • the sender 503 is configured to send the linkage data update instruction to the second server according to the identifier information of the second server, so that the second server updates the stored data corresponding to the data identifier to be updated to the data to be updated.
  • the linkage update instruction is used to request the server as the primary server of the dual-system
  • the processor 502 performs an operation of determining whether the first server is the linked update instruction for the requested server, and may be:
  • the processor 502 is configured to acquire a running process in the first server, and determine, according to the obtained process, whether the first server is a primary server in the dual-system.
  • the processor 502 performs an operation of acquiring a running process in the first server, which may be:
  • the processor 502 is configured to invoke a service script in the first server; and obtain a running process in the first server by running the service script.
  • the processor 502 performs an operation of determining, according to the acquired process, whether the first server is a primary server in the dual-system, and may be:
  • the processor 502 is configured to determine whether the acquired process includes a service process; if the service process is included, determine that the first server is a primary server in the dual-system.
  • the processor 502 performs an operation of determining whether the first server is the linkage update instruction for the requested server, and may be:
  • the processor 502 is configured to obtain, from the linkage data update instruction, the first identity information of the server for requesting the linkage update instruction, and acquire the second identity information of the first server; if the first identity information is the same as the second identity information, Then determining that the first server is the server for the linkage update instruction for the request.
  • the processor 502 further updates the data to be updated by the data corresponding to the data identifier to be updated stored in the first server, if the first server is used by the server for the linkage update instruction.
  • the processor 502 performs an operation of updating data corresponding to the data identifier to be updated stored in the first server to update the data to be updated, and may be:
  • the processor 502 is configured to invoke a data update script in the first server.
  • the data corresponding to the data identifier to be updated stored in the first server is updated by the data update script to update the data to be updated.
  • the first server after receiving the linkage data update instruction for requesting data update by a server in the dual-system, the first server determines whether it is the server for the linkage data update request for the request, and if so, according to The linkage data update command performs data update. If not, the second server that sets up the dual-system system sends the linkage data update instruction to the second server, and the second server updates the data according to the linkage data update instruction. In this way, when the two services are linked and stretched, the update data is implemented in the dual-system, and when the first server is not the primary server, the first server directly forwards the linkage data update request to the primary server. The data is updated by the primary server to improve the efficiency of data update.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种发送联动数据更新指令的方法及装置,属于通信领域。所述方法包括:第一服务器接收Paas平台发送的联动数据更新指令,所述联动更新指令用于请求双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据,第一服务器为双机系统中的任一服务器;确定第一服务器是否为所述联动更新指令用于请求的服务器;如果不是所述联动更新指令用于请求的服务器,则获取与第一服务器组成所述双机系统的第二服务器的标识信息;根据第二服务器的标识信息向第二服务器发送所述联动数据更新指令,以使所述第二服务器将存储的所述待更新的数据标识对应的数据更新为所述待更新的数据。本发明能够实现在双机系统中进行更新数据。

Description

一种发送联动数据更新指令的方法及装置 技术领域
本发明涉及通信领域,特别涉及一种发送联动数据更新指令的方法及装置。
背景技术
随着电信云的发展,可以将电信业务部署在电信云上,电信业务对可靠性要求很高,所以在电信云中使用双机系统来运行电信业务。双机系统包括主用服务器和备用服务器,通常由主用服务器来运行业务,由备用服务器来对主用服务器的数据进行备份,从而提高业务运行的可靠性。
在电信云上相关联两业务之间在进行联动伸展收缩时需要更新数据,在引入双机系统后,如何在双机系统的服务器中对数据进行更新直接影响业务间的联动伸展收缩的效率,是目前急需解决的问题。
发明内容
为了在两业务之间进行联动伸展收缩时实现在双机系统中进行更新数据,本发明提供了一种发送联动数据更新指令的方法及装置。所述技术方案如下:
第一方面、一种发送联动数据更新指令的方法,所述方法包括:
第一服务器接收平台即服务Paas平台发送的联动数据更新指令,所述联动更新指令用于请求双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据,所述第一服务器为所述双机系统中的任一服务器;
所述第一服务器确定所述第一服务器是否为所述联动更新指令用于请求的服务器;
如果不是所述联动更新指令用于请求的服务器,则所述第一服务器获取与所述第一服务器组成所述双机系统的第二服务器的标识信息;
所述第一服务器根据所述第二服务器的标识信息向所述第二服务器发送所述联动数据更新指令,以使所述第二服务器将存储的所述待更新的数据标识对应的数据更新为所述待更新的数据。
结合第一方面,在第一方面的第一种可能的实现方式中,所述联动更新指令用于请求的服务器为所述双机系统的主用服务器;
所述确定所述第一服务器是否为所述联动更新指令用于请求的服务器,包括:
获取所述第一服务器中的正在运行的进程;
根据所述获取的进程确定所述第一服务器是否为所述双机系统中的主用服务器。
结合第一方面的第一可能的实现方式,在第一方面的第二种可能的实现方式中,所述获取所述第一服务器中的正在运行的进程,包括:
调用所述第一服务器中的业务脚本;
通过运行所述业务脚本,获取所述第一服务器中正在运行的进程。
结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述根据所述获取的进程确定所述第一服务器是否为双机系统中的主用服务器,包括:
确定所述获取的进程中是否包括业务进程;
如果包括业务进程,则确定出所述第一服务器为所述双机系统中的主用服务器。
结合第一方面,在第一方面的第四种可能的实现方式中,所述确定所述第一服务器是否为所述联动更新指令用于请求的服务器,包括:
从所述联动数据更新指令中获取所述联动更新指令用于请求的服务器的第一身份信息;
获取所述第一服务器的第二身份信息;
如果所述第一身份信息与所述第二身份信息相同,则确定所述第一服务器为所述联动更新指令用于请求的服务器。
结合第一方面,在第一方面的第五种可能的实现方式中,所述方法还包括:
如果所述第一服务器为所述联动更新指令用于请求的服务器,则将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
结合第一方面的第五种可能的实现方式,在第一方面的第六种可能的实现方式中,所述将所述第一服务器中存储的所述待更新的数据标识对应 的数据更新所述待更新的数据,包括:
调用所述第一服务器中的数据更新脚本;
通过运行所述数据更新脚本,将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
第二方面、一种发送联动数据更新指令的装置,所述装置为第一服务器,所述第一服务器为双机系统中的任一服务器,所述第一服务器包括:
接收模块,用于接收平台即服务Paas平台发送的联动数据更新指令,所述联动更新指令用于请求所述双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据;
确定模块,用于确定所述第一服务器是否为所述联动更新指令用于请求的服务器;
获取模块,用于如果不是所述联动更新指令用于请求的服务器,则获取与所述第一服务器组成所述双机系统的第二服务器的标识信息;
发送模块,用于根据所述第二服务器的标识信息向所述第二服务器发送所述联动数据更新指令,以使所述第二服务器将存储的所述待更新的数据标识对应的数据更新为所述待更新的数据。
结合第二方面,在第二方面的第一种可能的实现方式中,所述联动更新指令用于请求的服务器为所述双机系统的主用服务器;
所述确定模块包括:
第一获取单元,用于获取所述第一服务器中的正在运行的进程;
第二确定单元,用于根据所述获取的进程确定所述第一服务器是否为所述双机系统中的主用服务器。
结合第二方面的第一可能的实现方式,在第二方面的第二种可能的实现方式中,所述第一获取单元包括:
调用子单元,用于调用所述第一服务器中的业务脚本;
获取子单元,用于通过运行所述业务脚本,获取所述第一服务器中正在运行的进程。
结合第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述第二确定单元包括:
第一确定子单元,用于确定所述获取的进程中是否包括业务进程;
第二确定子单元,用于如果包括业务进程,则确定出所述第一服务器为所述双机系统中的主用服务器。
结合第二方面,在第二方面的第四种可能的实现方式中,所述确定模块包括:
第二获取单元,用于从所述联动数据更新指令中获取所述联动更新指令用于请求的服务器的第一身份信息;
第三获取单元,用于获取所述第一服务器的第二身份信息;
第二确定单元,用于如果所述第一身份信息与所述第二身份信息相同,则确定所述第一服务器为所述联动更新指令用于请求的服务器。
结合第二方面,在第二方面的第五种可能的实现方式中,还包括:
更新模块,用于如果所述第一服务器为所述联动更新指令用于请求的服务器,则将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
结合第二方面的第五种可能的实现方式,在第二方面的第六种可能的实现方式中,所述更新模块包括:
调用单元,用于调用所述第一服务器中的数据更新脚本;
更新单元,用于通过运行所述数据更新脚本,将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
第三方面、一种第一服务器,所述第一服务器为双机系统中的任一服务器,所述第一服务器包括:
接收器,用于接收平台即服务Paas平台发送的联动数据更新指令,所述联动更新指令用于请求所述双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据;
处理器,用于确定所述第一服务器是否为所述联动更新指令用于请求的服务器;如果不是所述联动更新指令用于请求的服务器,则获取与所述第一服务器组成所述双机系统的第二服务器的标识信息;
发送器,用于根据所述第二服务器的标识信息向所述第二服务器发送所述联动数据更新指令,以使所述第二服务器将存储的所述待更新的数据标识对应的数据更新为所述待更新的数据。
在本发明实施例中,第一服务器接收用于请求双机系统中的一服务器 进行数据更新的联动数据更新指令后,确定自身是否为该联动数据更新请求用于请求的服务器,如果是,根据该联动数据更新指令进行数据更新,如果不是,则与其组建双机系统的第二服务器,向第二服务器发送该联动数据更新指令,由第二服务器根据该联动数据更新指令进行数据更新。如此,在两业务之间进行联动伸展收缩时实现了双机系统中进行更新数据,另外,当第一服务器不是主用服务器时,第一服务器直接将该联动数据更新请求转发给主用服务器,由主用服务器进行数据更新,提高数据更新的效率。
附图说明
图1-1是本发明实施例提供的一种网络架构示意图;
图1-2是本发明实施例1提供的一种发送联动数据更新指令的方法流程图;
图2是本发明实施例2提供的一种发送联动数据更新指令的方法流程图;
图3是本发明实施例3提供的一种发送联动数据更新指令的方法流程图;
图4是本发明实施例4提供的一种发送联动数据更新指令的装置结构图;
图5是本发明实施例5提供的一种第一服务器结构图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
为了降低业务的运营成本,目前可以将业务部署在云端。云端可以为业务提供运行的服务器,该服务器可以为虚拟机等。在云端为了提高业务运行的可靠性,目前在云端采用双机系统来运行业务,双机系统包括主用服务器和备用服务器,通常由主用服务器来运行业务,备用服务器对主用服务器进行备份,从而提高业务的可靠性。在云端,双机系统从逻辑层面可以看作为一个业务网元,对外提供一种业务。
其中,运行业务的双机系统是由Paas(Platform-as-a-service,平台即服务)平台组建的,Paas平台为云端的一个云平台,负责对云端的服务器进行管理。对于可靠性要求较高的业务,Paas平台可以获取具有反亲和关系的两个服务器,其中,在在本发明实施例中服务器可以为部署在宿主机上的虚拟机,反亲和关系的两个服务器为部署在不同宿主机上的两个虚拟机。然后将该两个服务器分配给该业务,该业务将该两个服务器组成双机系统,并由该双机系统运行该业务。
在云端双机系统中的服务器可能会与其他的业务网元进行业务交互,即该双机系统中运行的业务与该业务网元运行的业务进行联动伸展收缩。在业务交互的过程中,业务网元可能会产生某个数据标识对应的新数据,而在双机系统中的该服务器可能也存储有该数据标识对应的数据,不过在该服务器中存储的该数据标识对应的数据为旧数据,此时业务网元需要将该服务器中存储的该数据标识对应的数据更新为该新数据。为了便于说明,将该数据标识称为待更新的数据标识,将该新数据称为待更新的数据。
参见图1-1所示的网络架构图,业务网元发送联动数据更新请求给Paas平台,该联动数据更新请求至少携带该双机系统运行的业务的业务标识,待更新的数据和待更新的数据标识,以触发Paas平台和该双机系统通过如下任一实施例提供的方法进行数据更新。
实施例2
参见图1-2,本发明实施例提供了一种发送联动数据更新指令的方法,包括:
步骤101:第一服务器接收Paas平台发送的联动数据更新指令,该联动更新指令用于请求双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据,第一服务器为双机系统中的任一服务器。
步骤102:第一服务器确定第一服务器是否为该联动更新指令用于请求的服务器。
步骤103:如果不是该联动更新指令用于请求的服务器,则第一服务器获取与第一服务器组成双机系统的第二服务器的标识信息。
其中,第二服务器的标识信息可以为第二服务器的IP地址、MAC地址或域名等。
步骤104:第一服务器根据第二服务器的标识信息向第二服务器发送该联动数据更新指令,以使第二服务器将存储的待更新的数据标识对应的数据更新为待更新的数据。
在本发明实施例中,第一服务器接收用于请求双机系统中的一服务器进行数据更新的联动数据更新指令后,确定自身是否为该联动数据更新请求用于请求的服务器,如果是,根据该联动数据更新指令进行数据更新,如果不是,则与其组建双机系统的第二服务器,向第二服务器发送该联动数据更新指令,由第二服务器根据该联动数据更新指令进行数据更新。如此,在两业务之间进行联动伸展收缩时实现了双机系统中进行更新数据,另外,当第一服务器不是主用服务器时,第一服务器直接将该联动数据更新请求转发给主用服务器,由主用服务器进行数据更新,提高数据更新的效率。
实施例2
本发明实施例提供了一种发送联动数据更新指令的方法。在本发明实施例中,双机系统中的主用服务器用于运行业务,而备用服务器用于对主用服务器进行备份,业务网元只请求双机系统中的主用服务器进行数据更新,参见图2,该方法包括:
步骤201:Paas平台接收业务网元发送的联动数据更新请求,该联动数据更新请求携带业务标识、待更新的数据标识和待更新的数据。
其中,在本实施例中,业务网元与双机系统中的主用服务器进行交互时产生待更新的数据,然后请求Paas平台转发该联动数据更新请求给双机系统中的服务器,以请求该服务器进行数据更新。
步骤202:Paas平台获取运行该业务标识对应的业务的双机系统,向该双机系统中的一服务器发送联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据。
Paas平台在为业务组建双机系统时,将该业务的业务标识和组建的双机系统中的两个服务器的地址存储在业务标识与双机系统的对应关系,即在Paas平台中事先存储每个业务的业务标识和每个业务对应的双机系统中包括的每个服务器的地址。
本步骤可以为:Paas平台根据该业务标识,从业务标识与双机系统的 对应关系中获取对应的双机系统包括的两个服务器的地址,从该两个服务器的地址中选择一个服务器的地址,根据选择的服务器的地址,建立与选择的服务器之间的传输通道,通过该传输通道向选择的服务器发送联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据。
其中,需要说明的是:由于Paas平台并不知道双机系统中的哪个服务器为主用服务器,以及哪个服务器是备用服务器,所以Paas平台可以随机选择一个服务器。为了便于说明,将Paas平台选择的服务器称为第一服务器,第一服务器可能为双机系统的主用服务器,也可能为双机系统的备用服务器。
步骤203:第一服务器接收该联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据,获取自身正在运行的进程。
具体地,第一服务器接收该联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据,调用自身存储的业务脚本,通过运行该业务脚本,获取自身正在运行的进程。
该业务脚本为用于获取服务器中正在运行的进程的实现代码,所以第一服务器通过运行该业务脚本,便可以获取到自身正在运行的进程。
步骤204:第一服务器根据获取的进程确定自身是否为该双机系统中的主用服务器,如果是,执行步骤205,如果不是,执行步骤206。
具体地,第一服务器确定获取的进程中是否包括业务进程,如果包括业务进程,则确定出自身为双机系统中的主用服务器,如果不包括业务进程,则确定出自身不是双机系统中的主用服务器。
其中,在双机系统中由主用服务器来运行业务,由备用服务器来对主用服务器进行备份,所以主用服务器中包括用于运行业务的业务进程,而备用服务器只包括监控进程,该监控进程用于对主用服务器进行监控,当监控出主用服务器中存在数据变化时,同步备用服务器与主用服务器。所以在本步骤中,如果第一服务器中包括业务进程,则第一服务器为双机系统中的主用服务器,如果第一服务器中不包括业务进程,则第一服务器不是双机系统中的主用服务器,而是该双机系统中的备用服务器。
步骤205:第一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据,向Paas发送更新结果,结束操作。
具体地,第一服务器调用自身中的数据更新脚本;通过运行该数据更 新脚本,将自身存储的待更新的数据标识对应的数据更新待更新的数据,向Paas发送更新结果,该更新结果为更新成功。
其中,该数据更新脚本为用于更新数据的实现代码,所以第一服务器通过运行该数据更新脚本,便可以将自身存储的待更新的数据标识对应的数据更新待更新的数据。
其中,Paas平台接收该更新结果后,将该更新结果转发给业务网元。
步骤206:第一服务器获取与自身组成双机系统的第二服务器的标识信息。
其中,在组建双机系统时,双机系统中的两个服务器之间会建立相互间的信任关系。建立过程为两个服务器各自分别产生一对公私密钥对,并分别将各自的公钥发送给对方,从而两个服务器实现建立相互间的信任关系。
本步骤可以为:第一服务器获取与自身之间建立信任关系的服务器的标识信息,将该服务器的标识信息确定为与自身组成双机系统的第二服务器的标识信息。第二服务器的标识信息可以为第二服务器的IP地址、MAC地址或域名等。
步骤207:第一服务器根据第二服务器的标识信息向第二服务器发送联动数据更新指令。
具体地,第一服务器可以用自身的私钥对该联动数据更新指令进行加密得到密文,根据第二服务器的标识信息向第二服务器发送该密文。
步骤208:第二服务器接收该联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据,将自身存储的待更新的数据标识对应的数据更新为待更新的数据,向第一服务器返回更新结果。
具体地,第二服务器接收第一服务器发送的密文,通过第一服务器的公钥对该密文进行解密,得到该联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据,将自身存储的待更新的数据标识对应的数据更新为待更新的数据,向第一服务器返回更新结果,该更新结果为更新成功。
其中,第一服务器接收该更新结果后,将该更新结果转发给Paas平台。Paas平台接收该更新结果后,将该更新结果转发给业务网元。
在本发明实施例中,第一服务器接收用于请求主用服务器进行数据更 新的联动数据更新指令后,确定自身是否为主用服务器,如果是,根据该联动数据更新指令进行数据更新,如果不是,则与其组建双机系统的第二服务器即为主用服务器,向第二服务器发送该联动数据更新指令,由第二服务器根据该联动数据更新指令进行数据更新。如此,在两业务之间进行联动伸展收缩时实现了双机系统中进行更新数据,另外,当第一服务器不是主用服务器时,第一服务器直接将该联动数据更新请求转发给主用服务器,由主用服务器进行数据更新,提高数据更新的效率。
实施例3
本发明实施例提供了一种发送联动数据更新指令的方法。在本发明实施例中,双机系统中的主用服务器用于运行业务,备用服务器用于对主用服务器进行备份,也可用于运行业务,业务网元可以请求双机系统中的主用服务器进行数据更新或请求双机系统中的备用服务器进行数据更新,参见图3,该方法包括:
步骤301:Paas平台接收业务网元发送的联动数据更新请求,该联动数据更新请求携带双机系统中的一个服务器的第一身份信息、业务标识、待更新的数据标识和待更新的数据。
其中,在本实施例中,业务网元与双机系统中的一服务器进行交互时产生待更新的数据,该服务器可能为双机系统中的主用服务器,也可能为双机系统中的备用服务器。然后业务网元请求Paas平台转发该联动数据更新请求给双机系统中的服务器进行数据更新。
如果该服务器为双机系统中的主用服务器,则该服务器的第一身份信息为主用服务器,如果该服务器为双机系统中的备用服务器,则该服务器的第一身份信息为备用服务器。
步骤302:Paas平台获取运行该业务标识对应的业务的双机系统,向该双机系统中的一服务器发送联动数据更新指令,该联动数据更新指令携带第一身份信息、待更新的数据标识和待更新的数据。
Paas平台在为业务组建双机系统时,将该业务的业务标识和组建的双机系统中的两个服务器的地址存储在业务标识与双机系统的对应关系,即在Paas平台中事先存储每个业务的业务标识和每个业务对应的双机系统中包括的每个服务器的地址。
本步骤可以为:Paas平台根据该业务标识,从业务标识与双机系统的对应关系中获取对应的双机系统包括的两个服务器的地址,从该两个服务器的地址中选择一个服务器的地址,根据选择的服务器的地址,建立与选择的服务器之间的传输通道,通过该传输通道向选择的服务器发送联动数据更新指令,该联动数据更新指令携带第一身份信息、待更新的数据标识和待更新的数据。
其中,需要说明的是:由于Paas平台并不知道双机系统中的每个服务器的身份,所以Paas平台可以随机选择一个服务器。为了便于说明,将Paas平台选择的服务器称为第一服务器,第一服务器可能是第一身份信息对应的服务器,也可能不是第一身份信息对应的服务器。
步骤303:第一服务器接收该联动数据更新指令,该联动数据更新指令携带第一身份信息、待更新的数据标识和待更新的数据,获取自身的第二身份信息。
具体地,第一服务器接收该联动数据更新指令,该联动数据更新指令携带第一身份信息,待更新的数据标识和待更新的数据,从该联动数据更新指令中获取第一身份信息,登录自身的数据库并从数据库中获取自身的第二身份信息。
步骤304:如果第一身份信息与第二身份信息相同,则第一服务器确定自身为该联动更新指令用于请求的服务器,执行步骤305。
步骤305:第一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据,向Paas发送更新结果,结束操作。
具体地,第一服务器调用自身中的数据更新脚本;通过运行该数据更新脚本,将自身存储的待更新的数据标识对应的数据更新待更新的数据,向Paas发送更新结果,该更新结果为更新成功。
其中,该数据更新脚本为用于更新数据的实现代码,所以第一服务器通过运行该数据更新脚本,便可以将自身存储的待更新的数据标识对应的数据更新待更新的数据。
其中,Paas平台接收该更新结果后,将该更新结果转发给业务网元。
步骤306:如果第一身份信息与第二身份信息不同,则第一服务器获取与自身组成双机系统的第二服务器的标识信息,并确定第二服务器为该联动更新指令用于请求的服务器,执行步骤307。
其中,双机系统中包括第一服务器和第二服务器两个服务器,如果第一服务器的第二身份信息与第一身份信息不同,则可以确定第一服务器不是该联动更新指令用于请求的服务器,而双机系统中的另一个服务器,即第二服务器为该联动更新指令用于请求的服务器。
其中,在组建双机系统时,双机系统中的两个服务器之间会建立相互间的信任关系。建立过程为两个服务器各自分别产生一对公私密钥对,并分别将各自的公钥发送给对方,从而两个服务器实现建立相互间的信任关系。
本步骤可以为:第一服务器获取与自身之间建立信任关系的服务器的标识信息,将该服务器的标识信息确定为与自身组成双机系统的第二服务器的标识信息。第二服务器的标识信息可以为第二服务器的IP地址、MAC地址或域名。
步骤307:第一服务器根据第二服务器的标识信息向第二服务器发送联动数据更新指令。
具体地,第一服务器可以用自身的私钥对该联动数据更新指令进行加密得到密文,根据第二服务器的标识信息向第二服务器发送该密文。
步骤308:第二服务器接收该联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据,将自身存储的待更新的数据标识对应的数据更新为待更新的数据,向第一服务器返回更新结果。
具体地,第二服务器接收第一服务器发送的密文,通过第一服务器的公钥对该密文进行解密,得到该联动数据更新指令,该联动数据更新指令携带待更新的数据标识和待更新的数据,将自身存储的待更新的数据标识对应的数据更新为待更新的数据,向第一服务器返回更新结果,该更新结果为更新成功。
其中,第一服务器接收该更新结果后,将该更新结果转发给Paas平台。Paas平台接收该更新结果后,将该更新结果转发给业务网元。
在本发明实施例中,第一服务器接收用于请求双机系统中的一服务器进行数据更新的联动数据更新指令后,确定自身是否为该联动数据更新指令用于请求的服务器,如果是,根据该联动数据更新指令进行数据更新,如果不是,则与其组建双机系统的第二服务器,向第二服务器发送该联动数据更新指令,由第二服务器根据该联动数据更新指令进行数据更新。如 此,在两业务之间进行联动伸展收缩时实现了双机系统中进行更新数据,另外,当第一服务器不是该联动数据更新指令用于请求的服务器时,第一服务器直接将该联动数据更新请求转发给第二服务器,由第二服务器进行数据更新,提高数据更新的效率。
实施例4
本发明实施例提供了一种发送联动数据更新指令的装置,该装置可以为第一服务器,第一服务器为双机系统中的任一服务器,参见图4,第一服务器包括:
接收模块401,用于接收aas平台发送的联动数据更新指令,该联动更新指令用于请求双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据;
确定模块402,用于确定第一服务器是否为该联动更新指令用于请求的服务器;
获取模块403,用于如果不是该联动更新指令用于请求的服务器,则获取与第一服务器组成双机系统的第二服务器的标识信息;
发送模块404,用于根据第二服务器的标识信息向第二服务器发送该联动数据更新指令,以使第二服务器将存储的待更新的数据标识对应的数据更新为待更新的数据。
可选的,该联动更新指令用于请求的服务器为双机系统的主用服务器;
确定模块402包括:
第一获取单元,用于获取第一服务器中的正在运行的进程;
第二确定单元,用于根据获取的进程确定第一服务器是否为双机系统中的主用服务器。
可选的,第一获取单元包括:
调用子单元,用于调用第一服务器中的业务脚本;
获取子单元,用于通过运行该业务脚本,获取第一服务器中正在运行的进程。
可选的,第二确定单元包括:
第一确定子单元,用于确定获取的进程中是否包括业务进程;
第二确定子单元,用于如果包括业务进程,则确定出第一服务器为双 机系统中的主用服务器。
可选的,确定模块402包括:
第二获取单元,用于从该联动数据更新指令中获取该联动更新指令用于请求的服务器的第一身份信息;
第三获取单元,用于获取第一服务器的第二身份信息;
第二确定单元,用于如果第一身份信息与第二身份信息相同,则确定第一服务器为该联动更新指令用于请求的服务器。
进一步地,第一服务器还包括:
更新模块,用于如果第一服务器为该联动更新指令用于请求的服务器,则将第一服务器中存储的待更新的数据标识对应的数据更新待更新的数据。
可选的,更新模块包括:
调用单元,用于调用第一服务器中的数据更新脚本;
更新单元,用于通过运行该数据更新脚本,将第一服务器中存储的待更新的数据标识对应的数据更新待更新的数据。
在本发明实施例中,第一服务器接收用于请求双机系统中的一服务器进行数据更新的联动数据更新指令后,确定自身是否为该联动数据更新请求用于请求的服务器,如果是,根据该联动数据更新指令进行数据更新,如果不是,则与其组建双机系统的第二服务器,向第二服务器发送该联动数据更新指令,由第二服务器根据该联动数据更新指令进行数据更新。如此,在两业务之间进行联动伸展收缩时实现了双机系统中进行更新数据,另外,当第一服务器不是主用服务器时,第一服务器直接将该联动数据更新请求转发给主用服务器,由主用服务器进行数据更新,提高数据更新的效率。
实施例5
本发明实施提供了一种第一服务器,第一服务器为双机系统中的任一服务器,参见图5,第一服务器包括:
接收器501,用于接收Paas平台发送的联动数据更新指令,该联动更新指令用于请求双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据;
处理器502,用于确定第一服务器是否为该联动更新指令用于请求的服务器;如果不是该联动更新指令用于请求的服务器,则获取与第一服务器组成双机系统的第二服务器的标识信息;
发送器503,用于根据第二服务器的标识信息向第二服务器发送该联动数据更新指令,以使第二服务器将存储的待更新的数据标识对应的数据更新为待更新的数据。
可选的,该联动更新指令用于请求的服务器为双机系统的主用服务器;
处理器502执行确定第一服务器是否为该联动更新指令用于请求的服务器的操作,可以为:
处理器502用于获取第一服务器中的正在运行的进程;根据获取的进程确定第一服务器是否为双机系统中的主用服务器。
可选的,处理器502执行获取第一服务器中的正在运行的进程的操作,可以为:
处理器502用于调用第一服务器中的业务脚本;通过运行该业务脚本,获取第一服务器中正在运行的进程。
处理器502执行根据获取的进程确定第一服务器是否为双机系统中的主用服务器的操作,可以为:
处理器502用于确定获取的进程中是否包括业务进程;如果包括业务进程,则确定出第一服务器为双机系统中的主用服务器。
可选的,处理器502执行确定第一服务器是否为该联动更新指令用于请求的服务器的操作,可以为:
处理器502用于从该联动数据更新指令中获取该联动更新指令用于请求的服务器的第一身份信息;获取第一服务器的第二身份信息;如果第一身份信息与第二身份信息相同,则确定第一服务器为该联动更新指令用于请求的服务器。
进一步地,处理器502,还如果第一服务器为该联动更新指令用于请求的服务器,则将第一服务器中存储的待更新的数据标识对应的数据更新待更新的数据。
可选的,处理器502执行将第一服务器中存储的待更新的数据标识对应的数据更新待更新的数据的操作,可以为:
处理器502用于调用第一服务器中的数据更新脚本;通过运行该数据更新脚本,将第一服务器中存储的待更新的数据标识对应的数据更新待更新的数据。
在本发明实施例中,第一服务器接收用于请求双机系统中的一服务器进行数据更新的联动数据更新指令后,确定自身是否为该联动数据更新请求用于请求的服务器,如果是,根据该联动数据更新指令进行数据更新,如果不是,则与其组建双机系统的第二服务器,向第二服务器发送该联动数据更新指令,由第二服务器根据该联动数据更新指令进行数据更新。如此,在两业务之间进行联动伸展收缩时实现了双机系统中进行更新数据,另外,当第一服务器不是主用服务器时,第一服务器直接将该联动数据更新请求转发给主用服务器,由主用服务器进行数据更新,提高数据更新的效率。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种发送联动数据更新指令的方法,其特征在于,所述方法包括:
    第一服务器接收平台即服务Paas平台发送的联动数据更新指令,所述联动更新指令用于请求双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据,所述第一服务器为所述双机系统中的任一服务器;
    所述第一服务器确定所述第一服务器是否为所述联动更新指令用于请求的服务器;
    如果不是所述联动更新指令用于请求的服务器,则所述第一服务器获取与所述第一服务器组成所述双机系统的第二服务器的标识信息;
    所述第一服务器根据所述第二服务器的标识信息向所述第二服务器发送所述联动数据更新指令,以使所述第二服务器将存储的所述待更新的数据标识对应的数据更新为所述待更新的数据。
  2. 如权要求1所述的方法,其特征在于,所述联动更新指令用于请求的服务器为所述双机系统的主用服务器;
    所述确定所述第一服务器是否为所述联动更新指令用于请求的服务器,包括:
    获取所述第一服务器中的正在运行的进程;
    根据所述获取的进程确定所述第一服务器是否为所述双机系统中的主用服务器。
  3. 如权要求1所述的方法,其特征在于,所述确定所述第一服务器是否为所述联动更新指令用于请求的服务器,包括:
    从所述联动数据更新指令中获取所述联动更新指令用于请求的服务器的第一身份信息;
    获取所述第一服务器的第二身份信息;
    如果所述第一身份信息与所述第二身份信息相同,则确定所述第一服务器为所述联动更新指令用于请求的服务器。
  4. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    如果所述第一服务器为所述联动更新指令用于请求的服务器,则将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
  5. 如权利要求4所述的方法,其特征在于,所述将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据,包括:
    调用所述第一服务器中的数据更新脚本;
    通过运行所述数据更新脚本,将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
  6. 一种发送联动数据更新指令的装置,所述装置为第一服务器,所述第一服务器为双机系统中的任一服务器,其特征在于,所述第一服务器包括:
    接收模块,用于接收平台即服务Paas平台发送的联动数据更新指令,所述联动更新指令用于请求所述双机系统中的一服务器将存储的待更新的数据标识对应的数据更新为待更新的数据;
    确定模块,用于确定所述第一服务器是否为所述联动更新指令用于请求的服务器;
    获取模块,用于如果不是所述联动更新指令用于请求的服务器,则获取与所述第一服务器组成所述双机系统的第二服务器的标识信息;
    发送模块,用于根据所述第二服务器的标识信息向所述第二服务器发送所述联动数据更新指令,以使所述第二服务器将存储的所述待更新的数据标识对应的数据更新为所述待更新的数据。
  7. 如权要求6所述的第一服务器,其特征在于,所述联动更新指令用于请求的服务器为所述双机系统的主用服务器;
    所述确定模块包括:
    第一获取单元,用于获取所述第一服务器中的正在运行的进程;
    第二确定单元,用于根据所述获取的进程确定所述第一服务器是否为所述双机系统中的主用服务器。
  8. 如权要求6所述的第一服务器,其特征在于,所述确定模块包括:
    第二获取单元,用于从所述联动数据更新指令中获取所述联动更新指令用于请求的服务器的第一身份信息;
    第三获取单元,用于获取所述第一服务器的第二身份信息;
    第二确定单元,用于如果所述第一身份信息与所述第二身份信息相同,则确定所述第一服务器为所述联动更新指令用于请求的服务器。
  9. 如权利要求6所述的第一服务器,其特征在于,还包括:
    更新模块,用于如果所述第一服务器为所述联动更新指令用于请求的服务器,则将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
  10. 如权利要求9所述的第一服务器,其特征在于,所述更新模块包括:
    调用单元,用于调用所述第一服务器中的数据更新脚本;
    更新单元,用于通过运行所述数据更新脚本,将所述第一服务器中存储的所述待更新的数据标识对应的数据更新所述待更新的数据。
PCT/CN2015/084001 2014-12-08 2015-07-14 一种发送联动数据更新指令的方法及装置 WO2016090914A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410745175.5A CN105743936B (zh) 2014-12-08 2014-12-08 一种发送联动数据更新指令的方法及装置
CN201410745175.5 2014-12-08

Publications (1)

Publication Number Publication Date
WO2016090914A1 true WO2016090914A1 (zh) 2016-06-16

Family

ID=56106589

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/084001 WO2016090914A1 (zh) 2014-12-08 2015-07-14 一种发送联动数据更新指令的方法及装置

Country Status (2)

Country Link
CN (1) CN105743936B (zh)
WO (1) WO2016090914A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716945A (zh) * 2019-09-20 2020-01-21 腾讯音乐娱乐科技(深圳)有限公司 一种数据更新方法、数据更新系统、服务器及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281329A (zh) * 2011-08-02 2011-12-14 北京邮电大学 一种PaaS云平台的资源调度方法和系统
US20120144041A1 (en) * 2010-12-02 2012-06-07 Electronics Telecommunications And Research Institute Resource management apparatus and method for supporting cloud-based communication between ubiquitous objects
CN102984214A (zh) * 2012-11-08 2013-03-20 华为技术有限公司 一种实现电信云中业务迁移的方法及装置
CN103780636A (zh) * 2012-10-17 2014-05-07 阿里巴巴集团控股有限公司 一种缓存数据处理方法和系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751421B (zh) * 2008-12-08 2013-03-27 北京中星微电子有限公司 视频监控系统中数据库不对称同步方法、系统及装置
CN102546796B (zh) * 2011-12-31 2014-08-06 重庆新媒农信科技有限公司 业务服务器数据更新处理系统及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120144041A1 (en) * 2010-12-02 2012-06-07 Electronics Telecommunications And Research Institute Resource management apparatus and method for supporting cloud-based communication between ubiquitous objects
CN102281329A (zh) * 2011-08-02 2011-12-14 北京邮电大学 一种PaaS云平台的资源调度方法和系统
CN103780636A (zh) * 2012-10-17 2014-05-07 阿里巴巴集团控股有限公司 一种缓存数据处理方法和系统
CN102984214A (zh) * 2012-11-08 2013-03-20 华为技术有限公司 一种实现电信云中业务迁移的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716945A (zh) * 2019-09-20 2020-01-21 腾讯音乐娱乐科技(深圳)有限公司 一种数据更新方法、数据更新系统、服务器及存储介质

Also Published As

Publication number Publication date
CN105743936A (zh) 2016-07-06
CN105743936B (zh) 2018-10-19

Similar Documents

Publication Publication Date Title
US10887284B1 (en) Peered virtual private network endpoint nodes
US11088903B2 (en) Hybrid cloud network configuration management
US11025483B1 (en) Fault tolerant virtual private network endpoint node
US10798218B2 (en) Environment isolation method and device
JP2017513151A (ja) プライベートクラウド接続装置クラスタアーキテクチャ
CN107204873B (zh) 一种切换目标域名解析服务器的方法及相关设备
JP2017507379A (ja) クラウド接続された装置の管理及び提供
US10250677B1 (en) Decentralized network address control
WO2020253634A1 (zh) 一种数据处理方法、系统及装置
WO2015127889A1 (zh) 一种Profile关联管理的方法及装置
US10924533B2 (en) System, apparatus and method for load balancing
CN111064569A (zh) 可信计算集群的集群密钥获取方法及装置
US20190166042A1 (en) Method for data transmitting, centralized controller, forwarding plane device and communication apparatus
US9716768B2 (en) Cache system and method for providing caching service
CN111108736B (zh) 用于计算设备的自动地址故障切换的方法和系统
CN105407105A (zh) 一种在samba服务上进行设备鉴权的方法及系统
CN111770123B (zh) 通信方法、设备及存储介质
US10397048B2 (en) Network system for retrieval of configuration related data
US11153173B1 (en) Dynamically updating compute node location information in a distributed computing environment
CN106571968B (zh) 一种业务切换方法和系统
JP2008113384A (ja) 通信システム
CN113377784B (zh) 一种基于中间件的数据处理方法、系统和存储介质
CN107342972B (zh) 一种实现远程访问的方法及装置
US10063382B1 (en) Apparatus and method for providing multiple security credentials
WO2016090914A1 (zh) 一种发送联动数据更新指令的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15867623

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15867623

Country of ref document: EP

Kind code of ref document: A1