CN108319679B - Method and device for generating primary key - Google Patents

Method and device for generating primary key Download PDF

Info

Publication number
CN108319679B
CN108319679B CN201810091339.5A CN201810091339A CN108319679B CN 108319679 B CN108319679 B CN 108319679B CN 201810091339 A CN201810091339 A CN 201810091339A CN 108319679 B CN108319679 B CN 108319679B
Authority
CN
China
Prior art keywords
configuration information
equipment
generated
opposite
dual
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.)
Active
Application number
CN201810091339.5A
Other languages
Chinese (zh)
Other versions
CN108319679A (en
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201810091339.5A priority Critical patent/CN108319679B/en
Publication of CN108319679A publication Critical patent/CN108319679A/en
Application granted granted Critical
Publication of CN108319679B publication Critical patent/CN108319679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures

Abstract

The application provides a method and a device for generating a primary key. A method for generating a primary key is applied to any equipment in a dual-machine hot-standby networking, and comprises the following steps: receiving configuration information, wherein the configuration information carries a pre-generated ID, and the ID is used for identifying the configuration information; judging whether the configuration information is from opposite-end equipment in the dual-computer hot-standby networking; if so, acquiring the equipment ID of the opposite-end equipment, and combining the equipment ID of the opposite-end equipment with the pre-generated ID to generate a primary key of the configuration information; and if not, acquiring the equipment ID of the local equipment, and combining the equipment ID of the local equipment with the pre-generated ID to generate the main key of the configuration information. The method and the device can ensure that the primary keys generated by the main device and the standby device in the dual-machine hot-standby networking are consistent for the same configuration information, thereby avoiding the phenomenon of subsequent service abnormity caused by configuration information modification.

Description

Method and device for generating primary key
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for generating a primary key.
Background
In a dual-computer hot-standby networking, mutual backup of configuration information is usually required between a main device and a standby device, so that when any one of the two devices fails, a service can be switched to the other device to operate normally, and the service is ensured not to be interrupted.
In general, in order to facilitate searching for configuration information stored in the primary/secondary device to modify or delete the configuration information, a corresponding primary key may be generated for each piece of configuration information, and each piece of configuration information stored in the database is uniquely identified by using the primary key.
Among them, the method of generating the primary key is generally: 1) when the main and standby equipment stores the received configuration information into the database, the database can automatically generate corresponding main keys for all the configuration information; 2) the network management equipment can generate a main key for the configuration information to be issued according to the preset main key generation strategy, and issues the configuration information carrying the main key to the equipment, and the equipment can store the configuration information and the main key corresponding to the configuration information to the database together.
In the above manner, under the condition that the main device and the standby device are normal, the consistency of the main keys of the same piece of configuration information stored on the main device and the standby device can be ensured. However, during the operation of the main/standby device, abnormal conditions such as disconnection of the main/standby device may occur, which may cause the main/standby device to be unable to backup the configuration information, and thus, the main keys of the same configuration information subsequently stored by the main/standby device may be inconsistent, for example, the main keys of the configuration information a in the main/standby device are 2 and 3, respectively; or the configuration information corresponding to the same main key in the main/standby equipment is inconsistent, for example, the configuration information of the main key 2 in the main equipment and the configuration information of the main key in the standby equipment are A and B respectively. If the configuration information with the primary key of 2 needs to be modified subsequently, the primary device will modify a, and the secondary device will modify B, so that the modified configuration information of the primary and secondary devices is inconsistent, and thus an exception may occur after the service switching.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for generating a primary key, so as to ensure that primary keys generated for the same configuration information by a primary device and a secondary device in a dual-device hot-standby networking are consistent, thereby avoiding a phenomenon of subsequent service abnormality due to configuration information modification.
Specifically, the method is realized through the following technical scheme:
a method for generating a primary key is applied to any device in a dual-computer hot-standby networking, and comprises the following steps:
receiving configuration information, wherein the configuration information carries a pre-generated ID, and the ID is used for identifying the configuration information;
judging whether the configuration information is from opposite-end equipment in the dual-computer hot-standby networking;
if so, acquiring the equipment ID of the opposite-end equipment, and combining the equipment ID of the opposite-end equipment with the pre-generated ID to generate a primary key of the configuration information;
and if not, acquiring the equipment ID of the local equipment, and combining the equipment ID of the local equipment with the pre-generated ID to generate the main key of the configuration information.
A device for generating a primary key, the device being applied to any device in a dual-computer hot-standby networking, the device comprising:
a receiving module, configured to receive configuration information, where the configuration information carries a pre-generated ID, and the ID is used to identify the configuration information;
a judging module, configured to judge whether the configuration information is from an opposite-end device in the dual-computer hot-standby networking;
a generating module, configured to, when it is determined that the configuration information is from an opposite-end device in the dual-computer hot-standby networking, obtain a device ID of the opposite-end device, and combine the device ID of the opposite-end device with the pre-generated ID to generate a primary key of the configuration information;
and when determining that the configuration information is not from the opposite-end equipment in the dual-machine hot-standby networking, acquiring the equipment ID of the local-end equipment, and combining the equipment ID of the local-end equipment with the pre-generated ID to generate a main key of the configuration information.
In the application, after receiving the configuration information, it may be determined whether to combine the device ID of the peer device with the pre-generated ID carried by the configuration information to generate the primary key of the configuration information, or to combine the device ID of the local device with the pre-generated ID carried by the configuration information to generate the primary key of the configuration information by determining whether the received configuration information is from the peer device in the dual-peer hot-standby networking.
Compared with the prior art, the main key generated for the configuration information comprises an equipment ID and an ID pre-generated by the network management equipment, the equipment ID required for generating the main key can be determined according to the source of the configuration information, and when the configuration information comes from the network management equipment, the equipment ID required for generating the main key selects the equipment ID of the equipment; and when the configuration information comes from the opposite terminal equipment, generating the equipment ID required by the main key and selecting the equipment ID of the opposite terminal equipment. Therefore, the master key generated by the master device and the slave device in the dual-machine hot-standby networking for the same configuration information can be ensured to be consistent, and the phenomenon of subsequent service abnormity caused by configuration information modification can be avoided.
Drawings
FIG. 1 is a flow chart illustrating a method for generating a primary key according to an exemplary embodiment of the present application;
FIG. 2 is a diagram illustrating a hardware configuration of a network device in accordance with an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a primary key generation apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In a dual-computer hot-standby networking, mutual backup of configuration information is usually required between a main device and a standby device, so that when any one of the two devices fails, a service can be switched to the other device to operate normally, and the service is ensured not to be interrupted.
In general, in order to facilitate searching for configuration information stored in the primary/secondary device to modify or delete the configuration information, a corresponding primary key may be generated for each piece of configuration information, and each piece of configuration information stored in the database is uniquely identified by using the primary key.
Among them, the method of generating the primary key is generally: 1) when the main and standby equipment stores the received configuration information into the database, the database can automatically generate corresponding main keys for all the configuration information; 2) the network management equipment can generate a main key for the configuration information to be issued according to the preset main key generation strategy, and issues the configuration information carrying the main key to the equipment, and the equipment can store the configuration information and the main key corresponding to the configuration information to the database together.
In the above manner, under the condition that the main device and the standby device are normal, the consistency of the main keys of the same piece of configuration information stored on the main device and the standby device can be ensured. However, during the operation of the main/standby device, abnormal conditions such as disconnection of the main/standby device may occur, which may cause the main/standby device to be unable to backup the configuration information, and thus, the main keys of the same configuration information subsequently stored by the main/standby device may be inconsistent, for example, the main keys of the configuration information a in the main/standby device are 2 and 3, respectively; or the configuration information corresponding to the same main key in the main/standby equipment is inconsistent, for example, the configuration information of the main key 2 in the main equipment and the configuration information of the main key in the standby equipment are A and B respectively. If the configuration information with the primary key of 2 needs to be modified subsequently, the primary device will modify a, and the secondary device will modify B, so that the modified configuration information of the primary and secondary devices is inconsistent, and thus an exception may occur after the service switching.
Therefore, in order to solve the above problem, the present application provides a method for generating a primary key, which can determine, after receiving configuration information, whether the received configuration information is from a peer device in a dual-device hot-standby networking, to generate the primary key of the configuration information by combining a device ID of the peer device with a pre-generated ID carried by the configuration information, or to generate the primary key of the configuration information by combining a device ID of a home device with a pre-generated ID carried by the configuration information.
Compared with the prior art, the main key generated for the configuration information comprises an equipment ID and an ID pre-generated by the network management equipment, the equipment ID required for generating the main key can be determined according to the source of the configuration information, and when the configuration information comes from the network management equipment, the equipment ID required for generating the main key selects the equipment ID of the equipment; when the configuration information comes from the opposite-end device, the device ID required for generating the primary key selects the device ID of the opposite-end device, so that the primary keys generated by the main device and the standby device for the same configuration information in the dual-machine hot-standby networking can be ensured to be consistent, and the phenomenon of subsequent service abnormity caused by configuration information modification can be avoided.
The following describes an implementation process of the present application with reference to specific embodiments.
Referring to fig. 1, fig. 1 shows a method for generating a primary key according to an embodiment of the present application, where the method is applicable to any device in a dual-server hot-standby networking, and the device may be a network device such as a firewall.
It can be assumed that the devices in the dual-device hot-standby networking in the embodiment of the present application are device a and device B. After the device a and the device B start dual-computer hot standby, the devices may negotiate with each other to determine the device ID of each device, or a user configures the device ID for each device. Assume that the device ID of device a is 0 and the device ID of device B is 1.
The following describes a method for generating a primary key in the present application by taking this networking as an example.
The method for generating the primary key comprises the following basic steps:
s101, receiving configuration information.
S102, judging whether the configuration information is from opposite terminal equipment in the dual-computer hot-standby networking.
In a dual-computer hot-standby networking environment, configuration information can be generally issued to a certain device in the networking through network management equipment, and after the device receives and stores the configuration information, the configuration information can be further backed up to an opposite terminal device of the dual-computer hot-standby networking.
In this embodiment, before the network management device issues the configuration information, an ID may be pre-generated for the configuration information to be currently issued according to the configuration information list of the configuration page, and is used to identify the configuration information. And then, the configuration information carrying the ID can be issued to the equipment. The configuration information list is used for recording configuration information which is issued to the equipment.
In general, the ID pre-generated for the current configuration information to be issued may be determined according to the maximum ID currently recorded in the configuration information list of the configuration page, for example, three configuration information, i.e. 1, 2, and 3, are recorded in the configuration information list on the network management device, and when issuing the new configuration information, according to the current configuration information list, the ID pre-generated for the new configuration information by the network management device is known to be 4.
It should be noted that, in addition to using the above method to pre-generate an ID for configuration information, the network management device may also refer to other methods in the prior art to pre-generate an ID for configuration information, which is not limited in this application.
In addition, in the embodiment of the present application, the configuration information may further carry an equipment ID field, where the field may be used to identify a source of the configuration information, that is, to identify whether the configuration information is directly issued by the network management equipment or is backed up from the peer equipment in the networking to the home equipment. If the configuration information is directly issued by the network management equipment, the value of the equipment ID field in the configuration information can be null; if the configuration information is backed up from the opposite terminal device to the local terminal device in the networking, the value of the device ID field in the configuration information is the device ID of the opposite terminal device.
Therefore, when a certain device in the networking receives the configuration information, the source of the configuration information can be judged according to whether the value of the device ID field in the received configuration information is empty or not. If the device ID field in the received configuration information is null, it may be determined that the configuration information is from the network management device, and is the configuration information that the network management device directly issues to the device, and step S103 may be continuously performed, and then the device may write the device ID of the local device into the device ID field in the configuration information, and further back up the configuration information to the opposite device; if the value of the device ID field in the received configuration information is not null, it may be determined that the configuration information is derived from the peer device and is configuration information that is backed up to the local device by the peer device, and step S104 may be continuously performed.
S103, acquiring the equipment ID of the local equipment, and combining the equipment ID of the local equipment with the pre-generated ID to generate the main key of the configuration information.
When the device determines that the received configuration information is from the network management device, the device can obtain the ID pre-generated by the network management device from the configuration information, obtain the device ID of the local device from the local device ID list, and combine the two obtained IDs to generate the primary key of the configuration information.
The combination mode may be to place the device ID at the highest position of the ID pre-generated by the network management device, or to insert the device ID into the ID pre-generated by the network management device, which is not limited herein.
The following may take the example of placing the device ID at the highest position of the ID pre-generated by the network management device, and describe the primary key for generating the configuration information. Here, it may be assumed that the device a receives the configuration information X sent by the network management device, the ID pre-generated by the network management device for the configuration information X is 4 (decimal), and if the ID is int type, the corresponding binary number is 00000000000000000000000000000100. Device a places this device ID 0 in the highest order of the pre-generated ID, resulting in a binary number of 00000000000000000000000000000100 with a corresponding decimal number of 4. I.e. the primary key generated by device a for configuration information X is 4.
The subsequent device a may back up the configuration information X to the device B, where the configuration information X carries the device ID of the device a. For the device B, the received piece of configuration information X is backed up by the device a, and the primary key generated by the device B for the piece of configuration information X can be implemented according to the step S104.
S104, acquiring the equipment ID of the opposite terminal equipment, and combining the equipment ID of the opposite terminal equipment with the pre-generated ID to generate the primary key of the configuration information.
For the device B, after receiving the configuration information backed up by the device a, the device ID of the device a and the ID 00000000000000000000000000000100 pre-generated by the network management device for the configuration information may be obtained from the configuration information, and the device ID of the device a, that is, 0, may be placed at the highest position of the pre-generated ID, the obtained binary number is 00000000000000000000000000000100, and the corresponding decimal number is still 4, that is, the primary key generated by the device B for the configuration information X is also 4.
Therefore, by adopting the primary key generation method, on one hand, the primary keys generated by the equipment A and the equipment B for the same configuration information can be ensured to be consistent. If a certain piece of configuration information in the device a and the device B needs to be modified or deleted later, for example, when the configuration information with the primary key of 4 is modified, it can be ensured that the configuration information X is modified regardless of the device a or the device B. On the other hand, the method and the device can ensure that the primary key generated by the device A or the device B does not cause primary key conflict, and the configuration information can be normally stored.
In this application, after receiving the configuration information, the device may determine, by determining whether the received configuration information is from an opposite-end device in the dual-machine hot-standby networking, whether to combine the device ID of the opposite-end device with a pre-generated ID carried by the configuration information to generate a primary key of the configuration information, or to combine the device ID of the local-end device with the pre-generated ID carried by the configuration information to generate a primary key of the configuration information.
Compared with the prior art, the main key generated for the configuration information comprises an equipment ID and an ID pre-generated by the network management equipment, the equipment ID required for generating the main key can be determined according to the source of the configuration information, and when the configuration information comes from the network management equipment, the equipment ID required for generating the main key selects the equipment ID of the equipment; when the configuration information comes from the opposite-end equipment, the equipment ID required by the generation of the primary key selects the equipment ID of the opposite-end equipment, so that the primary keys of the same configuration information stored on the main and standby equipment in the dual-machine hot-standby networking can be ensured to be consistent, the primary key generated on the same equipment can not cause primary key collision, and the phenomenon of subsequent service abnormity caused by configuration information modification can be avoided.
Corresponding to the embodiment of the method for generating the primary key, the application also provides an embodiment of a device for generating the primary key.
The embodiment of the generation device of the primary key can be applied to network equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the network device where the software implementation is located as a logical means. In terms of hardware, as shown in fig. 2, a hardware structure diagram of a network device in which a device for generating a primary key is located according to the present application is shown, except for the processor, the memory, the network output interface, and the nonvolatile memory shown in fig. 2, the network device in which the device is located in the embodiment may also include other hardware according to the actual function of the network device, which is not described again.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a device for generating a primary key according to an embodiment of the present application, where the device may be used for any device in a dual-device hot-standby networking.
Wherein, the device can include: a receiving module 310, a judging module 320 and a generating module 330.
A receiving module 310, configured to receive configuration information, where the configuration information carries a pre-generated ID, and the ID is used to identify the configuration information;
a determining module 320, configured to determine whether the configuration information is from an opposite-end device in the dual-computer hot-standby networking;
a generating module 330, configured to, when it is determined that the configuration information is from an opposite-end device in the dual-computer hot-standby networking, obtain a device ID of the opposite-end device, and combine the device ID of the opposite-end device with the pre-generated ID to generate a primary key of the configuration information;
and when determining that the configuration information is not from the opposite-end equipment in the dual-machine hot-standby networking, acquiring the equipment ID of the local-end equipment, and combining the equipment ID of the local-end equipment with the pre-generated ID to generate a main key of the configuration information.
In the embodiment of the present application, the configuration information further carries an equipment ID field identifying a source of the configuration information;
the determining module 320 is specifically configured to:
judging whether the value of the equipment ID field in the configuration information is null or not;
if yes, determining that the configuration information is issued by the network management equipment;
if not, determining that the configuration information is from the opposite terminal equipment in the dual-computer hot-standby networking;
the obtaining the device ID of the peer device includes:
acquiring the value of the equipment ID field in the configuration information as the equipment ID of opposite-end equipment;
the acquiring the device ID of the home device includes:
and acquiring the equipment ID of the local equipment from a pre-stored equipment ID list.
In this embodiment of the application, the generating module 330 is specifically configured to:
when determining that the configuration information is from the opposite-end equipment in the dual-computer hot-standby networking, placing the equipment ID of the opposite-end equipment at the highest position of the pre-generated ID to generate a main key of the configuration information;
and when determining that the configuration information is not from the opposite-end equipment in the dual-computer hot-standby networking, placing the equipment ID of the local-end equipment at the highest position of the pre-generated ID, and generating a main key of the configuration information.
In the embodiment of the present application, the pre-generated ID is generated by the network management device according to the maximum ID recorded in the configuration information list of the configuration page.
In this embodiment, the device ID is determined by device negotiation in the dual-server hot-standby networking or configured by a user.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A method for generating a primary key is applied to any device in a dual-computer hot-standby networking, and comprises the following steps:
receiving configuration information, wherein the configuration information carries a pre-generated ID, and the ID is used for identifying the configuration information;
judging whether the configuration information is from opposite-end equipment in the dual-computer hot-standby networking;
if so, acquiring the equipment ID of the opposite-end equipment, and combining the equipment ID of the opposite-end equipment with the pre-generated ID to generate a primary key of the configuration information;
and if not, acquiring the equipment ID of the local equipment, and combining the equipment ID of the local equipment with the pre-generated ID to generate the main key of the configuration information.
2. The method of claim 1, wherein the configuration information further carries a device ID field identifying a source of the configuration information;
the determining whether the configuration information is from an opposite terminal device in the dual-computer hot-standby networking includes:
judging whether the value of the equipment ID field in the configuration information is null or not;
if yes, determining that the configuration information is issued by the network management equipment;
if not, determining that the configuration information is from the opposite terminal equipment in the dual-computer hot-standby networking;
the obtaining the device ID of the peer device includes:
acquiring the value of the equipment ID field in the configuration information as the equipment ID of opposite-end equipment;
the acquiring the device ID of the home device includes:
and acquiring the equipment ID of the local equipment from a pre-stored equipment ID list.
3. The method according to claim 1, wherein the generating the primary key of the configuration information by combining the device ID of the peer device with the pre-generated ID comprises:
placing the device ID of the opposite-end device at the highest position of the pre-generated ID to generate a main key of the configuration information;
the generating the primary key of the configuration information by combining the device ID of the home device with the pre-generated ID includes:
and placing the equipment ID of the local equipment at the highest position of the pre-generated ID to generate a main key of the configuration information.
4. The method according to claim 1, wherein the pre-generated ID is generated by the network management device according to the maximum ID recorded in the configuration information list of the configuration page.
5. The method of claim 1, wherein the device ID is determined by device negotiation in the dual-server hot-standby networking or configured by a user.
6. A device for generating a primary key, the device being applied to any device in a dual-device hot-standby networking, the device comprising:
a receiving module, configured to receive configuration information, where the configuration information carries a pre-generated ID, and the ID is used to identify the configuration information;
a judging module, configured to judge whether the configuration information is from an opposite-end device in the dual-computer hot-standby networking;
a generating module, configured to, when it is determined that the configuration information is from an opposite-end device in the dual-computer hot-standby networking, obtain a device ID of the opposite-end device, and combine the device ID of the opposite-end device with the pre-generated ID to generate a primary key of the configuration information;
and when determining that the configuration information is not from the opposite-end equipment in the dual-machine hot-standby networking, acquiring the equipment ID of the local-end equipment, and combining the equipment ID of the local-end equipment with the pre-generated ID to generate a main key of the configuration information.
7. The apparatus of claim 6, wherein the configuration information further carries a device ID field identifying a source of the configuration information;
the judgment module is specifically configured to:
judging whether the value of the equipment ID field in the configuration information is null or not;
if yes, determining that the configuration information is issued by the network management equipment;
if not, determining that the configuration information is from the opposite terminal equipment in the dual-computer hot-standby networking;
the obtaining the device ID of the peer device includes:
acquiring the value of the equipment ID field in the configuration information as the equipment ID of opposite-end equipment;
the acquiring the device ID of the home device includes:
and acquiring the equipment ID of the local equipment from a pre-stored equipment ID list.
8. The apparatus of claim 6, wherein the generating module is specifically configured to:
when determining that the configuration information is from the opposite-end equipment in the dual-computer hot-standby networking, placing the equipment ID of the opposite-end equipment at the highest position of the pre-generated ID to generate a main key of the configuration information;
and when determining that the configuration information is not from the opposite-end equipment in the dual-computer hot-standby networking, placing the equipment ID of the local-end equipment at the highest position of the pre-generated ID, and generating a main key of the configuration information.
9. The apparatus according to claim 6, wherein the pre-generated ID is generated by the network management device according to the maximum ID recorded in the configuration information list of the configuration page.
10. The apparatus of claim 6, wherein the device ID is determined by device negotiation in the dual-machine hot-standby networking or configured by a user.
CN201810091339.5A 2018-01-30 2018-01-30 Method and device for generating primary key Active CN108319679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810091339.5A CN108319679B (en) 2018-01-30 2018-01-30 Method and device for generating primary key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810091339.5A CN108319679B (en) 2018-01-30 2018-01-30 Method and device for generating primary key

Publications (2)

Publication Number Publication Date
CN108319679A CN108319679A (en) 2018-07-24
CN108319679B true CN108319679B (en) 2021-03-23

Family

ID=62887692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810091339.5A Active CN108319679B (en) 2018-01-30 2018-01-30 Method and device for generating primary key

Country Status (1)

Country Link
CN (1) CN108319679B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299076A (en) * 2018-11-13 2019-02-01 南方电网科学研究院有限责任公司 Major key generation method, device and the equipment of data collection point in redundant database

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710335A (en) * 2009-11-20 2010-05-19 杭州华三通信技术有限公司 Method and device for generating panel of equipment
CN102752126A (en) * 2011-04-22 2012-10-24 中兴通讯股份有限公司 Automatic protection switching method, main device and standby device
CN103092608A (en) * 2012-12-27 2013-05-08 广州杰赛科技股份有限公司 Generating and operation method, server and device of client for collecting device information
CN104125079A (en) * 2013-04-23 2014-10-29 华为技术有限公司 Method and device for determining double-device hot-backup configuration information

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268515A1 (en) * 2006-05-19 2007-11-22 Yun Freund System and method for automatic configuration of remote network switch and connected access point devices
CN101945010B (en) * 2010-09-19 2013-07-10 中国联合网络通信集团有限公司 Business license processing method, device and system
CN103714097B (en) * 2012-10-09 2017-08-08 阿里巴巴集团控股有限公司 A kind of method and apparatus for accessing database
US20140136648A1 (en) * 2012-11-13 2014-05-15 Hitachi, Ltd. Storage apparatus, network interface apparatus, and storage control method
CN105656647B (en) * 2014-11-12 2020-06-30 中兴通讯股份有限公司 Method, main equipment, standby equipment and system for realizing division of labor in stacking system
CN106230616B (en) * 2016-07-18 2019-09-17 新华三技术有限公司 A kind of service configuration information processing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710335A (en) * 2009-11-20 2010-05-19 杭州华三通信技术有限公司 Method and device for generating panel of equipment
CN102752126A (en) * 2011-04-22 2012-10-24 中兴通讯股份有限公司 Automatic protection switching method, main device and standby device
CN103092608A (en) * 2012-12-27 2013-05-08 广州杰赛科技股份有限公司 Generating and operation method, server and device of client for collecting device information
CN104125079A (en) * 2013-04-23 2014-10-29 华为技术有限公司 Method and device for determining double-device hot-backup configuration information

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于面向服务架构的分布式业务部署平台";段翰聪 等;《计算机应用》;20120801;第32卷(第8期);第2342-2345页 *
"电力物联网信息模型及通信协议的设计与实现";唐丽霞 等;《西安工程大学学报》;20101225;第799-804页 *

Also Published As

Publication number Publication date
CN108319679A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN105550229A (en) Method and device for repairing data of distributed storage system
CN105446827A (en) Data storage method and device for database at failure
CN108121804B (en) Cross-region distributed data storage method, device, terminal and storage medium
CN109308227B (en) Fault detection control method and related equipment
CN109428740B (en) Method and device for recovering equipment failure
CN108932295A (en) Primary database method for handover control, device, computer equipment and storage medium
CN103152390A (en) Method and device and nodes and system for node configuration of distributed storage system
CN110807064B (en) Data recovery device in RAC distributed database cluster system
CN105677673A (en) Business processing method, device and system
CN108376110A (en) A kind of automatic testing method, system and terminal device
CN106790378A (en) The full synchronous method of data of equipment room, apparatus and system
CN108319679B (en) Method and device for generating primary key
CN106605217A (en) Application transparent continuous availability using synchronous replication across data stores in failover cluster
CN109324549B (en) Dual-master control equipment configuration method and dual-master control equipment
CN109445988A (en) Isomery disaster recovery method, device, system, server and disaster recovery platform
CN107547605B (en) message reading and writing method based on node queue and node equipment
CN112015595B (en) Master-slave database switching method, computing device and storage medium
JP5868563B1 (en) Control device and unit for distributed control system
CN107341269A (en) A kind of file storage location management method, device and operation system
US20210209069A1 (en) Method, device, and system for processing distributed data, and machine readable medium
CN104572033B (en) system generation method and device
CN109446008A (en) A kind of failure cause detection method, failure cause detection device and terminal device
CN104615507A (en) Backup data batch reduction method and device
CN107851165B (en) Key system, key client and key management method
CN105653389A (en) Data diagnosis and recovery method and device

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
GR01 Patent grant
GR01 Patent grant