CN111510326A - Master-slave equipment configuration information synchronization method, system, terminal equipment and storage medium - Google Patents

Master-slave equipment configuration information synchronization method, system, terminal equipment and storage medium Download PDF

Info

Publication number
CN111510326A
CN111510326A CN202010269489.8A CN202010269489A CN111510326A CN 111510326 A CN111510326 A CN 111510326A CN 202010269489 A CN202010269489 A CN 202010269489A CN 111510326 A CN111510326 A CN 111510326A
Authority
CN
China
Prior art keywords
configuration information
preset
slave
configuration
equipment
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.)
Granted
Application number
CN202010269489.8A
Other languages
Chinese (zh)
Other versions
CN111510326B (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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN202010269489.8A priority Critical patent/CN111510326B/en
Publication of CN111510326A publication Critical patent/CN111510326A/en
Application granted granted Critical
Publication of CN111510326B publication Critical patent/CN111510326B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a master-slave device configuration information synchronization method, a system, a terminal device and a storage medium, wherein the method comprises the following steps: the method comprises the steps of controlling networking between preset master equipment and slave equipment, and obtaining preset configuration information in the preset master equipment; controlling the preset master equipment and the slave equipment to carry out configuration synchronization according to the preset configuration information, and storing the preset configuration information into the slave equipment; when receiving a role switching instruction, inquiring corresponding slave equipment according to the role switching instruction, and switching the inquired slave equipment into new master equipment; acquiring all configuration information stored in the new main equipment to obtain local configuration information; and controlling the new master equipment and the slave equipment to carry out configuration synchronization according to the local configuration information, and storing the local configuration information into the slave equipment. According to the method and the device, the preset configuration information is stored in the slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.

Description

Master-slave equipment configuration information synchronization method, system, terminal equipment and storage medium
Technical Field
The present application relates to the field of configuration information synchronization, and in particular, to a method, a system, a terminal device, and a storage medium for synchronizing configuration information of a master device and a slave device.
Background
With the development of networks, the network equipment is inevitably updated. Taking a wireless router as an example, a user changes a single-frequency router to a dual-frequency or tri-frequency router, or changes a hundred-megabyte router to a gigabit router, and the like. However, after the device is replaced, the configuration information in the device needs to be reset, the flow is complex and troublesome, and some configuration information may be forgotten in the resetting process, which is very unfriendly. Therefore, a master-slave device configuration information synchronization method arises, and the master-slave device configuration information synchronization method is used for solving the problem that the updated device needs to be configured again in the device replacement process, so that the user operation is reduced, and the user experience is improved.
In the use process of the existing master-slave device configuration information synchronization method, a server searches setting information stored in master equipment, copies the searched setting information and generates a synchronization data packet, and sends the synchronization data packet to slave equipment needing to be configured and set, so as to achieve the effect of automatically configuring and setting the equipment.
Disclosure of Invention
The embodiment of the application provides a master-slave device configuration information synchronization method, a master-slave device configuration information synchronization system, a terminal device and a storage medium, and aims to solve the problem that in the existing master-slave device configuration information synchronization process, when a master device is switched in roles, configuration information is lost due to the fact that the slave device can only be configured and set according to configuration information in a new master device after switching.
In a first aspect, an embodiment of the present application provides a master-slave device configuration information synchronization method, which is applied to a preset master device, and the method includes:
networking with at least one slave device, and acquiring preset configuration information prestored locally;
carrying out configuration synchronization with the slave equipment according to the preset configuration information, and respectively sending the preset configuration information to each slave equipment;
and when receiving a role switching instruction, switching to the slave equipment.
Compared with the prior art, the embodiment of the application has the advantages that: through the design of carrying out identity authentication between the preset master equipment and the preset slave equipment, the safety of configuration information synchronization is effectively improved, the risk of intercepting the configuration information is reduced, and through the design of respectively sending the preset configuration information to each slave equipment, the loss of the preset configuration information caused by role switching between the master equipment and the slave equipment is prevented.
Further, the performing configuration synchronization with the slave device according to the preset configuration information includes:
acquiring a configuration blacklist, and filtering the information of the preset configuration information according to the configuration blacklist;
acquiring a main version number of local function configuration and acquiring a sub-version number of function configuration in the slave equipment;
if the main version number is greater than the sub-version number, converting the preset configuration information according to the function configuration in the slave equipment, and sending the converted preset configuration information to each slave equipment;
and if the sub-version number is greater than the main version number, directly sending the preset configuration information to each slave device.
Further, after the step of networking with at least one slave device, the method further comprises:
performing identity authentication with the slave device;
and if the identity authentication between the slave equipment and the slave equipment is unqualified, stopping the configuration synchronization between the slave equipment and the slave equipment.
In a second aspect, an embodiment of the present application provides a master-slave device configuration information synchronization method, which is applied to a slave device, and the method includes:
networking with a preset main device, carrying out configuration synchronization according to preset configuration information in the preset main device, and storing the preset configuration information;
when a role switching instruction is received, switching to a new master device, acquiring all locally stored configuration information to obtain local configuration information, wherein the preset configuration information is stored in the local configuration information;
and carrying out configuration synchronization with all slave devices in the current networking according to the local configuration information, and respectively sending the local configuration information to each slave device.
Further, the method further comprises:
acquiring a current version number of local function configuration, and generating a broadcast message according to the current version number;
sending the broadcast message to the slave equipment according to a preset time interval;
and if the queried version number of the functional configuration in any slave equipment is not consistent with the current version number, performing configuration synchronization on the queried slave equipment according to the local configuration information.
Further, the method further comprises:
if the configuration is updated locally, updating the local configuration information according to the updated configuration information;
and carrying out configuration synchronization on the slave equipment according to the updated local configuration information.
Further, the storing the preset configuration information includes:
converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist;
performing information filtering on the preset configuration information according to the synchronous blacklist, and acquiring a local function configuration table, wherein function configurations which can be executed corresponding to the slave equipment are stored in the function configuration table;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
and storing the matched configuration information which passes the verification, and directly storing the configuration information which is not matched in the preset configuration information.
In a third aspect, an embodiment of the present application provides a master-slave device configuration information synchronization method, which is applied to a server, and the method includes:
the method comprises the steps of controlling networking between preset master equipment and at least one slave equipment, and obtaining preset configuration information in the preset master equipment;
controlling the preset master equipment and the slave equipment to carry out configuration synchronization according to the preset configuration information, and respectively sending the preset configuration information to each slave equipment;
when a role switching instruction is received, inquiring corresponding slave equipment according to the role switching instruction, and switching the inquired slave equipment into new master equipment;
acquiring all configuration information stored in the new main equipment to obtain local configuration information, wherein the preset configuration information is stored in the local configuration information;
and controlling the new master equipment and the slave equipment to carry out configuration synchronization according to the local configuration information, and respectively sending the local configuration information to each slave equipment.
Compared with the prior art, the embodiment of the application has the advantages that: the design of identity authentication between the preset master device and the preset slave devices effectively improves the safety of configuration information synchronization, reduces the risk of intercepting the configuration information, prevents the loss of the preset configuration information caused by role switching between the master device and the slave devices by respectively storing the preset configuration information into the design of each slave device, and further prevents the loss of the preset configuration information by storing all the configuration information in the new master device into the design of the slave devices after the role switching between the master device and the slave devices is completed.
In a fourth aspect, an embodiment of the present application provides a master-slave device configuration information synchronization system, which is applied to a preset master server, and includes:
the first information acquisition module is used for networking with at least one slave device and acquiring locally pre-stored preset configuration information;
the first configuration synchronization module is used for performing configuration synchronization with the slave devices according to the preset configuration information and respectively sending the preset configuration information to each slave device;
the first role switching module is used for switching to the slave equipment when receiving a role switching instruction;
the master-slave device configuration information synchronization system is applied to slave devices and comprises:
the second networking module is used for networking with a preset main device and authenticating the identity of the preset main device;
the second configuration synchronization module is used for carrying out configuration synchronization according to preset configuration information in the preset main equipment and storing the preset configuration information if the identity authentication between the second configuration synchronization module and the preset main equipment is qualified;
the second role switching module is used for switching to a new master device when receiving a role switching instruction, acquiring all locally stored configuration information to obtain local configuration information, and storing the preset configuration information in the local configuration information;
and the first configuration storage module is used for carrying out configuration synchronization with all the slave devices in the current networking according to the local configuration information and respectively sending the local configuration information to each slave device.
In a fifth aspect, the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method described above.
In a sixth aspect, the present application provides a storage medium storing a computer program, and the computer program realizes the method as described above when being executed by a processor.
In a seventh aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the master-slave device configuration information synchronization method described in any one of the above first aspects.
It is to be understood that, the beneficial effects of the second to seventh aspects may be referred to the relevant description of the first aspect, and are not repeated herein.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below.
Fig. 1 is a flowchart of a master-slave device configuration information synchronization method according to a first embodiment of the present application;
fig. 2 is a flowchart of a master-slave device configuration information synchronization method according to a second embodiment of the present application;
fig. 3 is a flowchart of a master-slave device configuration information synchronization method according to a third embodiment of the present application;
fig. 4 is a flowchart of a master-slave device configuration information synchronization method according to a fourth embodiment of the present application;
fig. 5 is a flowchart of a master-slave device configuration information synchronization method according to a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a master-slave device configuration information synchronization system according to a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of a master-slave device configuration information synchronization system according to a seventh embodiment of the present application;
fig. 8 is a schematic structural diagram of a master-slave device configuration information synchronization system according to an eighth embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal device according to a ninth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Example one
Please refer to fig. 1, which is a flowchart of a master-slave device configuration information synchronization method according to a first embodiment of the present application, applied to a preset master device, including the steps of:
step S1, networking with at least one slave device, and authenticating identity with the slave device;
the preset master device and the preset slave device can be any device with networking function, such as a mobile phone, a tablet, a router or a wearable intelligent device, and networking operation can be performed between the preset master device and the preset slave device in a WIFI, network hotspot or local area network mode, so that the preset master device and the preset slave device are in the same network, and synchronous propagation of subsequent configuration information is effectively guaranteed.
Step S2, judging whether the identity authentication between the slave device and the slave device is qualified;
the identity authentication can be performed between the preset master device and the slave device by adopting a password or authentication protocol, and whether the synchronous operation of the configuration information is performed between the preset master device and the slave device is judged according to the identity authentication result.
Specifically, in this step, by designing the identity authentication between the preset master device and the preset slave device, the synchronous configuration information between the preset master device and the preset slave device is not sent to any third-party device, so that the risk of intercepting the synchronous configuration information is reduced, and the safety of the synchronization of the configuration information between the master device and the slave device is improved.
If the identity authentication between the slave device and the slave device is qualified, executing step S3;
step S3, acquiring locally pre-stored preset configuration information;
the configuration parameters in the locally pre-stored preset configuration information may be preset according to requirements, and the preset configuration information is synchronization configuration information in the current networking, that is, the configuration synchronization operation between the master device and the slave device is performed in the current networking according to the preset configuration information, so that the configuration information in the slave device is synchronized to the preset configuration information.
Step S4, carrying out configuration synchronization with the slave devices according to the preset configuration information, and respectively sending the preset configuration information to each slave device;
and the preset configuration information is respectively sent to each slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.
Specifically, in this step, the performing configuration synchronization with the slave device according to the preset configuration information includes:
acquiring a configuration blacklist, and filtering the information of the preset configuration information according to the configuration blacklist;
acquiring a main version number of local function configuration and acquiring a sub-version number of function configuration in the slave equipment;
if the main version number is greater than the sub-version number, performing format conversion on the preset configuration information according to the function configuration in the slave equipment, and performing configuration updating on the slave equipment according to the converted preset configuration information;
and if the sub-version number is greater than the main version number, performing format conversion on the preset configuration information according to the local function configuration, and performing configuration updating on the slave equipment according to the converted preset configuration information.
In addition, in this step, the sending the preset configuration information to each of the slave devices respectively includes:
acquiring a synchronous blacklist, and filtering the preset configuration information according to the synchronous blacklist;
acquiring a function configuration table of the slave device, wherein the function configuration table stores function configurations which can be executed corresponding to the slave device;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
and sending the matched configuration information which passes the verification to the corresponding slave equipment, and directly sending the configuration information which is not matched in the preset configuration information to the corresponding slave equipment.
And step S5, when receiving the role switching instruction, switching to the slave device.
In this embodiment, by designing the identity authentication between the preset master device and the slave device, the security of the synchronization of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, by designing to send the preset configuration information to each slave device, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and by designing to send all the configuration information in the new master device to the slave device after the role switching between the master device and the slave device is completed, the loss of the preset configuration information is further prevented.
Example two
Please refer to fig. 2, which is a flowchart of a master-slave device configuration information synchronization method according to a second embodiment of the present application, applied to a slave device, including the steps of:
step S01, networking with a preset master device, and authenticating identity with the preset master device;
step S02, judging whether the identity authentication between the preset main device and the user is qualified;
if the identity authentication between the preset master device and the preset master device is qualified, executing step S03;
step S03, carrying out configuration synchronization according to the preset configuration information in the preset main equipment, and storing the preset configuration information;
specifically, in this step, the storing the preset configuration information includes:
converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist;
performing information filtering on the preset configuration information according to the synchronous blacklist, and acquiring a local function configuration table, wherein function configurations which can be executed corresponding to the slave equipment are stored in the function configuration table;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
and storing the matched configuration information which passes the verification, and directly storing the configuration information which is not matched in the preset configuration information.
Step S04, when receiving the role switching instruction, switching to a new master device, and acquiring all the configuration information stored locally to obtain local configuration information;
wherein the preset configuration information is stored in the local configuration information;
step S05, performing configuration synchronization with all the slave devices in the current networking according to the local configuration information, and sending the local configuration information to each of the slave devices respectively;
when the current networking comprises a preset master device A, a slave device B and a slave device C, the preset configuration information a stored in the preset master device A is synchronous configuration information;
in the prior art, all slave devices need to be configured and synchronized by the preset configuration information a, when the master device is switched to the slave device B, the slave devices subsequently added to the networking can only perform configuration and synchronization based on the configuration information in the slave device B, so that the preset configuration information a in the preset master device a is lost, and the synchronization of the configuration information between the master device and the slave device is wrong;
in this embodiment, by storing the preset configuration information a in the slave device B and the slave device C, when the master device is switched to the slave device B or the slave device C, the slave devices subsequently joined in the networking can still perform configuration synchronization according to the local configuration information carrying the preset configuration information a, thereby preventing a synchronization error of the configuration information between the master device and the slave device.
Preferably, in this embodiment, the method further includes:
acquiring a current version number of local function configuration, and generating a broadcast message according to the current version number;
sending the broadcast message to the slave equipment according to a preset time interval;
if the version number of the function configuration in any slave equipment is not consistent with the current version number, performing configuration synchronization on the inquired slave equipment according to the local configuration information;
the broadcast message is sent to the slave devices according to a preset time interval, so as to detect whether a new slave device joins or an old slave device is reset in configuration, that is, when the version number of the function configuration in any slave device is not consistent with the current version number, the corresponding slave devices are subjected to configuration information synchronization operation, so that the configuration synchronization between all the slave devices and the new master device is realized.
Further, in this embodiment, the method further includes:
if the configuration is updated locally, updating the local configuration information according to the updated configuration information;
carrying out configuration synchronization on the slave equipment according to the updated local configuration information;
the effect of timely updating the synchronous configuration information is achieved by designing to update the local configuration information according to the updated configuration information, and the slave equipment is reconfigured and synchronized according to the updated synchronous configuration information, so that the configuration information of the new master equipment can be automatically synchronized to the slave equipment after being modified, and a user does not need to perform synchronization operation.
In this embodiment, by designing the identity authentication between the preset master device and the slave device, the security of the synchronization of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, the preset configuration information is stored in each slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and after the role switching between the master device and the slave device is completed, all the configuration information in the new master device is stored in the slave device, so that the loss of the preset configuration information is further prevented.
EXAMPLE III
Please refer to fig. 3, which is a flowchart of a master-slave device configuration information synchronization method according to a third embodiment of the present application, and is applied to a server, where the server may be any device having networking function and supporting configuration synchronization, such as a mobile phone, a router, a computer, a gateway, and the like, and the method includes the following steps:
step S10, controlling the networking between the preset master device and at least one slave device, and performing identity authentication between the preset master device and the slave device;
the preset master device and the preset slave device can be any device with networking function, such as a mobile phone, a tablet, a router or a wearable intelligent device, and networking operation can be performed between the preset master device and the preset slave device in a WIFI, network hotspot or local area network mode, so that the preset master device and the preset slave device are in the same network, and synchronous propagation of subsequent configuration information is effectively guaranteed.
Preferably, the number of the preset master devices in the whole networking may be one or more, and when the number of the preset master devices is multiple, the configuration information of each preset master device may be set according to requirements, so that the configuration information between different preset master devices may be the same or different, and role switching may be performed between all the preset master devices and the slave devices.
Specifically, in this step, by designing the identity authentication between the preset master device and the preset slave device, the synchronous configuration information between the preset master device and the preset slave device is not sent to any third-party device, so that the risk of intercepting the synchronous configuration information is reduced, and the safety of the synchronization of the configuration information between the master device and the slave device is improved.
Step S20, judging whether the identity authentication between the preset master device and the slave device is qualified;
the identity authentication can be performed between the preset master device and the slave device by adopting a password or authentication protocol, and whether the synchronous operation of the configuration information is performed between the preset master device and the slave device is judged according to the identity authentication result.
If the identity authentication between the preset master device and the slave device is unqualified, kicking off the slave device in the current networking to prevent the leakage of synchronous configuration information, preferably, when the unqualified number of the identity authentication between the preset master device and the slave device in the current networking is greater than the preset number, kicking off the preset master device, and performing networking operation between the master device and the slave device again;
specifically, the preset times can be set according to user requirements, or the preset times is set based on the total number of the slave devices, when the preset times is set based on the total number of the slave devices, the product between the total number and the preset percentage is calculated to obtain the preset times, for example, when the total number of the slave devices is 100 and the preset percentage is 20%, the set preset times is 20, and when the unqualified times of the identity authentication between the preset master device and the slave device is judged to be more than 20, the preset master device is kicked, removed and replaced, and networking operation between the master device and the slave device is performed again.
If the identity authentication between the preset master device and the slave device is qualified, executing step S30;
step S30, acquiring preset configuration information in the preset master device, controlling the preset master device and the slave devices to perform configuration synchronization according to the preset configuration information, and sending the preset configuration information to each slave device respectively;
the configuration parameters in the preset configuration information may be preset according to requirements, and the preset configuration information is synchronous configuration information in the current networking, that is, the configuration synchronization operation between the master device and the slave device is performed in the current networking according to the preset configuration information, so that the configuration information in the slave device is synchronized to the preset configuration information.
For example, after the router is replaced, the configuration information in the router needs to be reset, and at this time, the router may be set as a slave device, so that the router is set based on the preset configuration information on the preset master device, which effectively improves the efficiency of setting the router configuration and facilitates the operation of the user.
Preferably, in this step, through the design that the preset configuration information is respectively stored in each slave device, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.
Step S40, when receiving a role switching instruction, inquiring the corresponding slave device according to the role switching instruction, and switching the inquired slave device to a new master device;
preferably, the switching identifier may be stored in a form of a text, an image, or a number.
When the switching identifier is stored in a text mode, the text is the name of the model of the device corresponding to the slave device, when the switching identifier is stored in an image mode, the image is the image of the device corresponding to the slave device, and when the switching identifier is stored in a numbering mode, the number is the networking number of the slave device corresponding to the current networking.
Step S50, acquiring all configuration information stored in the new main device to obtain local configuration information;
the preset configuration information is stored in the local configuration information, so that the preset configuration information is effectively prevented from being lost.
Step S60, controlling the new master device and the slave devices to perform configuration synchronization according to the local configuration information, and sending the local configuration information to each of the slave devices respectively;
in this embodiment, by designing the identity authentication between the preset master device and the slave device, the security of the synchronization of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, the preset configuration information is stored in each slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and after the role switching between the master device and the slave device is completed, all the configuration information in the new master device is stored in the slave device, so that the loss of the preset configuration information is further prevented.
Example four
Please refer to fig. 4, which is a flowchart of a master-slave device configuration information synchronization method according to a fourth embodiment of the present application, applied to a server, including the steps of:
step S11, controlling the networking between the preset master device and at least one slave device, and performing identity authentication between the preset master device and the slave device;
step S21, judging whether the identity authentication between the preset master device and the slave device is qualified;
if the identity authentication between the preset master device and the slave device is qualified, executing step S30;
step S31, acquiring preset configuration information in the preset main equipment, acquiring a configuration blacklist, and performing information filtering on the preset configuration information according to the configuration blacklist;
the configuration blacklist is used for filtering configuration information which is not allowed to be synchronized in the preset configuration information, so that leakage of secret configuration is effectively prevented, and preferably, both the configuration quantity and parameters in the configuration blacklist can be set according to requirements.
Step S41, acquiring a major version number of the function configuration in the preset master device and acquiring a minor version number of the function configuration in the slave device;
step S51, judging whether the main version number is larger than the sub-version number;
in the step, whether format conversion needs to be performed on the preset configuration information is determined by judging whether the major version number is greater than the minor version number or not.
If the main version number is equal to the sub-version number, configuration updating is directly carried out on the slave equipment according to the preset configuration information;
if the major version number is greater than the minor version number, executing step S61;
step S61, performing format conversion on the preset configuration information according to the function configuration in the slave device, and performing configuration update on the slave device according to the converted preset configuration information;
and when the main version number is judged to be greater than the sub-version number, judging that the function version of the preset main equipment is higher than that of the corresponding slave equipment, inquiring a configuration conversion rule according to the main version number and the sub-version number, and controlling the function configuration in the slave equipment according to the inquired configuration conversion rule to perform format conversion on the preset configuration information so as to obtain the configuration information meeting the function configuration of the corresponding slave equipment.
If the sub-version number is greater than the main version number, executing step S71;
step S71, performing format conversion on the preset configuration information according to the function configuration in the master device, and performing configuration update on the slave device according to the converted preset configuration information;
and when the sub-version number is larger than the main version number, judging that the function version of the corresponding slave equipment is higher than that of the preset master equipment, inquiring a configuration conversion rule according to the main version number and the sub-version number, and controlling the function configuration in the preset master equipment according to the inquired configuration conversion rule to perform format conversion on the preset configuration information so as to obtain the configuration information meeting the function configuration of the corresponding slave equipment.
Step S81, storing the preset configuration information into each slave device, and querying the corresponding slave device according to the role switching instruction when receiving the role switching instruction;
preferably, in this step, the storing the preset configuration information into each slave device respectively includes:
acquiring a synchronous blacklist, and filtering the preset configuration information according to the synchronous blacklist;
acquiring a function configuration table of the slave device, wherein the function configuration table stores function configurations which can be executed corresponding to the slave device;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
storing the matched configuration information which passes the verification into the corresponding slave equipment, and directly storing the configuration information which is not matched in the preset configuration information into the corresponding slave equipment;
the synchronous blacklist is used for filtering configuration information which does not need to be synchronized with corresponding slave equipment, the synchronous blacklists corresponding to different slave equipment can be the same or different, preferably, when the validity check of the configuration information does not pass, the corresponding configuration information is corrected, and the corrected configuration information is stored;
specifically, the configuration information that is not matched in the preset configuration information is a function configuration that cannot be executed by the slave device, for example, the preset master device supports the function a, and the slave device does not support the function a, the configuration information for the function a in the preset configuration information cannot be successfully matched with the function configuration table, so that the configuration information for the function a in the preset configuration information is directly stored to prevent the configuration information for the function a from being lost.
For example, when the current network includes a preset master device a, a slave device B and a slave device C, the preset master device a supports the function a, and the slave device B does not support the function a;
in the prior art, when configuration information synchronization between a preset master device a and a slave device B is performed, in the slave device B, configuration information for a function a is deleted, but when the slave device B is switched to a master device, a newly added slave device C supports the function a, but in the configuration information synchronization between the slave device B and the slave device C, the configuration information for the function a is not stored in synchronization configuration information sent from the slave device B to the slave device C, so that the slave device C cannot execute the function a, and further configuration information synchronization errors are caused;
in this embodiment, the configuration information for the function a in the preset configuration information is directly stored in the slave device B, so that the synchronization configuration information sent from the slave device B to the slave device C stores the configuration information for the function a, so that the slave device C can execute the function a, and the accuracy of configuration information synchronization is further improved.
Step S91, the inquired slave equipment is switched to new master equipment, and all configuration information stored in the new master equipment is obtained to obtain local configuration information;
wherein the preset configuration information is stored in the local configuration information.
And S101, controlling the new master device and the slave devices to perform configuration synchronization according to the local configuration information, and respectively sending the local configuration information to each slave device.
In this embodiment, by designing the identity authentication between the preset master device and the slave device, the security of the synchronization of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, the preset configuration information is stored in each slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and after the role switching between the master device and the slave device is completed, all the configuration information in the new master device is stored in the slave device, so that the loss of the preset configuration information is further prevented.
EXAMPLE five
Please refer to fig. 5, which is a flowchart of a master-slave device configuration information synchronization method according to a fifth embodiment of the present application, applied to a server, including the steps of:
step S12, controlling the preset master device and at least one slave device to perform networking, and performing identity authentication between the preset master device and the slave device;
step S22, controlling the preset master device and the slave device to generate random numbers, obtaining a first random number and a second random number, and obtaining a networking network identifier between the preset master device and the slave device;
the network identifier may be a serial number identifier, and the serial number identifier is a serial number of a network formed between the preset master device and the preset slave device. Preferably, random ranges are set in both the preset master device and the preset slave device, and when random numbers need to be generated, the preset master device and the preset slave device are controlled to randomly select numerical values in the corresponding random ranges to obtain the first random number and the second random number.
Further, it is preset that the random ranges in the master device and the slave device may be the same or different, and the random ranges may be set according to requirements, for example, the random range may be set to 0 to 100, 10 to 90, or 20 to 50, and preferably, the first random number and the second random number may also be negative numbers, small numbers, irrational numbers, and the like.
Step S32, respectively calculating networking keys in the preset master device and the preset slave device according to the first random number, the second random number and the network identifier to obtain a first networking key and a second networking key, and calculating a check value according to the first networking key and the second networking key to obtain a first check value and a second check value;
the calculation formula of the networking secret key can be selected or set according to requirements, and the check values stored in the preset master device and the preset slave device are different.
Specifically, a symmetric encryption algorithm may be adopted between the preset master device and the slave device to calculate the networking key, and the networking key may be calculated in a manner of a DES TripleDES algorithm, a 3DES algorithm, a TDEA algorithm, a Blowfish algorithm, an RC5 algorithm or an IDEA algorithm in the symmetric encryption algorithm, that is, a DES TripleDES algorithm, a 3DES algorithm, a TDEA algorithm, a Blowfish algorithm, an RC5 algorithm or an IDEA algorithm is adopted to calculate the first random number, the second random number and the network identifier, so as to obtain the networking key.
Step S42, carrying out check calculation on the first networking secret key and the second networking secret key, the first check value and the second check value, and judging whether the check calculation results are the same;
the method comprises the steps that a first check value and a second check value are subjected to check calculation according to a first networking secret key and a second networking secret key, and if check results are different, it is judged that the identity authentication between preset master equipment and slave equipment is unqualified;
if the verification results are different, the fact that the identity authentication between the preset master device and the preset slave device is unqualified is judged, and the slave device is kicked out from the current networking, so that the leakage of synchronous configuration information is prevented.
If the verification result is the same, go to step S52;
step S52, judging whether the identity authentication between the preset master device and the slave device is qualified, and acquiring the preset configuration information in the preset master device;
step S62, controlling the preset master device and the slave device to carry out configuration synchronization according to the preset configuration information, encrypting the preset configuration information according to the networking secret key, and respectively storing the encrypted preset configuration information into each slave device;
when the preset master device sends preset configuration information to the slave device, encrypting the preset configuration information according to the first networking key;
step S72, when receiving the role switching instruction, inquiring the corresponding slave device according to the role switching instruction, and switching the inquired slave device to a new master device;
step S82, acquiring all configuration information stored in the new main device to obtain local configuration information;
wherein the preset configuration information is stored in the local configuration information;
and step S92, controlling the new master device and the slave device to perform configuration synchronization according to the local configuration information, and respectively storing the local configuration information into each slave device.
Preferably, in this embodiment, the method further includes:
acquiring a current version number of the function configuration in the new main equipment, and generating a broadcast message according to the current version number;
sending the broadcast message to the slave equipment according to a preset time interval;
if the version number of the function configuration in any slave equipment is not consistent with the current version number, performing configuration synchronization on the inquired slave equipment according to the local configuration information;
the broadcast message is sent to the slave devices according to a preset time interval, so as to detect whether a new slave device joins or an old slave device is reset in configuration, that is, when the version number of the function configuration in any slave device is not consistent with the current version number, the corresponding slave devices are subjected to configuration information synchronization operation, so that the configuration synchronization between all the slave devices and the new master device is realized.
In addition, in this embodiment, the method further includes:
if the new master device is updated in configuration, updating the local configuration information according to the updated configuration information, and synchronizing the configuration of the slave device according to the updated local configuration information;
the effect of timely updating the synchronous configuration information is achieved by designing to update the local configuration information according to the updated configuration information, and the slave equipment is reconfigured and synchronized according to the updated synchronous configuration information, so that the configuration information of the new master equipment can be automatically synchronized to the slave equipment after being modified, and a user does not need to perform synchronization operation.
In this embodiment, by designing the identity authentication between the preset master device and the slave device, the security of the synchronization of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, the preset configuration information is stored in each slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and after the role switching between the master device and the slave device is completed, all the configuration information in the new master device is stored in the slave device, so that the loss of the preset configuration information is further prevented.
EXAMPLE six
Fig. 6 shows a schematic structural diagram of a master-slave device configuration information synchronization system 100 provided in a sixth embodiment of the present application, and for convenience of description, only the parts related to the embodiments of the present application are shown.
Referring to fig. 6, the system is applied to a preset master device, and includes:
the first networking module 10 is configured to perform networking with at least one slave device, and perform identity authentication with the slave device;
the first information obtaining module 11 is configured to obtain locally pre-stored preset configuration information if the identity authentication between the slave device and the first information obtaining module is qualified.
The first configuration synchronization module 12 is configured to perform configuration synchronization with the slave devices according to the preset configuration information, and send the preset configuration information to each of the slave devices respectively.
Wherein the first configuration synchronization module 12 is further configured to: acquiring a configuration blacklist, and filtering the information of the preset configuration information according to the configuration blacklist;
acquiring a main version number of local function configuration and acquiring a sub-version number of function configuration in the slave equipment;
if the main version number is greater than the sub-version number, converting the preset configuration information according to the function configuration in the slave equipment, and sending the converted preset configuration information to each slave equipment;
and if the sub-version number is greater than the main version number, directly sending the preset configuration information to each slave device.
And the first role switching module 13 is configured to switch to the slave device when receiving the role switching instruction.
In the embodiment, through the design of identity authentication between the preset master device and the preset slave devices, the synchronization safety of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, and the preset configuration information is stored in each slave device respectively, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.
EXAMPLE seven
Fig. 7 shows a schematic structural diagram of a master-slave device configuration information synchronization system 101 provided in a seventh embodiment of the present application, and for convenience of description, only the parts related to the embodiments of the present application are shown.
Referring to fig. 7, the system is applied to a slave device, including:
the second configuration synchronization module 15 is configured to perform networking with a preset master device and store the preset configuration information;
the second role switching module 16 is configured to switch to a new master device when a role switching instruction is received, acquire all locally stored configuration information, and obtain local configuration information, where the preset configuration information is stored in the local configuration information;
and the first configuration storage module 17 is configured to perform configuration synchronization with all the slave devices in the current networking according to the local configuration information, and send the local configuration information to each of the slave devices respectively.
Preferably, in this embodiment, the second configuration synchronization module 15 is further configured to: acquiring a current version number of local function configuration, and generating a broadcast message according to the current version number;
sending the broadcast message to the slave equipment according to a preset time interval;
and if the queried version number of the functional configuration in any slave equipment is not consistent with the current version number, performing configuration synchronization on the queried slave equipment according to the local configuration information.
Furthermore, the second configuration synchronization module 15 is further configured to: if the configuration is updated locally, updating the local configuration information according to the updated configuration information;
and carrying out configuration synchronization on the slave equipment according to the updated local configuration information.
Further, the second configuration synchronization module 15 is further configured to: converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist;
performing information filtering on the preset configuration information according to the synchronous blacklist, and acquiring a local function configuration table, wherein function configurations which can be executed corresponding to the slave equipment are stored in the function configuration table;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
and storing the matched configuration information which passes the verification, and directly storing the configuration information which is not matched in the preset configuration information.
In addition, the master-slave device configuration information synchronization system 101 further includes:
the second networking module 14, which performs identity authentication with the slave device; and if the identity authentication between the slave equipment and the slave equipment is unqualified, stopping the configuration synchronization between the slave equipment and the slave equipment.
In the embodiment, through the design of identity authentication between the preset master device and the preset slave devices, the synchronization safety of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, and the preset configuration information is stored in each slave device respectively, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.
Example eight
Fig. 8 shows a schematic structural diagram of a master-slave device configuration information synchronization system 102 provided in an eighth embodiment of the present application, and for convenience of description, only the parts related to the embodiments of the present application are shown.
Referring to fig. 8, the system is applied to a server, and includes: the identity authentication module 18, the second information acquisition module 19, the second configuration storage module 30, the third role switching module 31, the third information acquisition module 32, and the configuration information synchronization module 33, wherein:
and the identity authentication module 18 is configured to control networking between a preset master device and at least one slave device, and perform identity authentication between the preset master device and the slave device.
Wherein the identity authentication module 18 is further configured to: controlling the preset master device and the slave device to generate random numbers to obtain a first random number and a second random number, and acquiring a networking network identifier between the preset master device and the slave device;
respectively calculating networking keys in the preset master equipment and the preset slave equipment according to the first random number, the second random number and the network identification to obtain a first networking key and a second networking key, and calculating a check value according to the first networking key and the second networking key to obtain a first check value and a second check value;
carrying out check calculation on the first networking secret key and the second networking secret key, the first check value and the second check value, and judging whether check calculation results are the same or not;
if the verification results are the same, judging that the identity authentication between the preset master equipment and the slave equipment is qualified;
and if the checking and solving results are different, judging that the identity authentication between the preset main equipment and the slave equipment is unqualified.
The second information obtaining module 19 is configured to obtain preset configuration information in the preset master device if the identity authentication between the preset master device and the slave device is qualified.
And the second configuration storage module 30 is configured to control configuration synchronization between the preset master device and the slave devices according to the preset configuration information, and send the preset configuration information to each of the slave devices respectively.
Wherein the second configuration storage module 30 is further configured to: acquiring a configuration blacklist, and filtering the information of the preset configuration information according to the configuration blacklist;
acquiring a main version number of the function configuration in the preset main equipment and acquiring a sub-version number of the function configuration in the slave equipment;
if the main version number is greater than the sub-version number, performing format conversion on the preset configuration information according to the function configuration in the slave equipment, and performing configuration updating on the slave equipment according to the converted preset configuration information;
and if the sub-version number is greater than the main version number, performing format conversion on the preset configuration information according to the function configuration in the main equipment, and performing configuration updating on the slave equipment according to the converted preset configuration information.
Preferably, the second configuration storage module 30 is further configured to: acquiring a synchronous blacklist, and filtering the preset configuration information according to the synchronous blacklist;
acquiring a function configuration table of the slave device, wherein the function configuration table stores function configurations which can be executed corresponding to the slave device;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
and storing the matched configuration information which passes the verification into the corresponding slave equipment, and directly storing the configuration information which is not matched in the preset configuration information into the corresponding slave equipment.
Further, the second configuration storage module 30 is further configured to: and encrypting the preset configuration information according to the networking secret key, and respectively storing the encrypted preset configuration information into each slave device.
And the third role switching module 31 is configured to, when receiving a role switching instruction, query the corresponding slave device according to the role switching instruction, and switch the queried slave device to a new master device.
A third information obtaining module 32, configured to obtain all configuration information stored in the new master device to obtain local configuration information, where the preset configuration information is stored in the local configuration information.
And a configuration information synchronization module 33, configured to control, according to the local configuration information, configuration synchronization between the new master device and the slave devices, and send the local configuration information to each of the slave devices respectively.
Wherein the configuration information synchronization module 33 is further configured to: if the new master device is updated in configuration, updating the local configuration information according to the updated configuration information;
and carrying out configuration synchronization on the slave equipment according to the updated local configuration information.
In addition, in this embodiment, the master-slave device configuration information synchronization system 102 further includes:
a broadcast module 34, configured to obtain a current version number of the function configuration in the new master device, and generate a broadcast packet according to the current version number;
sending the broadcast message to the slave equipment according to a preset time interval;
and if the queried version number of the functional configuration in any slave equipment is not consistent with the current version number, performing configuration synchronization on the queried slave equipment according to the local configuration information.
In this embodiment, by designing the identity authentication between the preset master device and the slave device, the security of the synchronization of the configuration information is effectively improved, the risk of intercepting the configuration information is reduced, the preset configuration information is stored in each slave device, so that the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and after the role switching between the master device and the slave device is completed, all the configuration information in the new master device is stored in the slave device, so that the loss of the preset configuration information is further prevented.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/modules, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and reference may be made to the part of the embodiment of the method specifically, and details are not described here.
Fig. 9 is a schematic structural diagram of a terminal device 2 according to a ninth embodiment of the present application. As shown in fig. 9, the terminal device 2 of this embodiment includes: at least one processor 20 (only one processor is shown in fig. 9), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, the steps of any of the various method embodiments described above being implemented when the computer program 22 is executed by the processor 20.
The terminal device 2 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 20, a memory 21. Those skilled in the art will appreciate that fig. 9 is merely an example of the terminal device 2, and does not constitute a limitation of the terminal device 2, and may include more or less components than those shown, or combine some components, or different components, such as an input/output device, a network access device, and the like.
The Processor 20 may be a Central Processing Unit (CPU), and the Processor 20 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 21 may in some embodiments be an internal storage unit of the terminal device 2, such as a hard disk or a memory of the terminal device 2, the memory 21 may in other embodiments also be an external storage device of the terminal device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. further, the memory 21 may also comprise both an internal storage unit and an external storage device of the terminal device 2, the memory 21 is used for storing an operating system, applications, a Boot loader (Boot L loader), data and other programs, such as program codes of the computer program, etc. the memory 21 may also be used for temporarily storing data that has been or will be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (11)

1. A master-slave device configuration information synchronization method is applied to a preset master device, and comprises the following steps:
networking with at least one slave device, and acquiring preset configuration information prestored locally;
carrying out configuration synchronization with the slave equipment according to the preset configuration information, and respectively sending the preset configuration information to each slave equipment;
and when receiving a role switching instruction, switching to the slave equipment.
2. The method for synchronizing configuration information of a master device and a slave device according to claim 1, wherein the performing configuration synchronization with the slave device according to the preset configuration information comprises:
acquiring a configuration blacklist, and filtering the information of the preset configuration information according to the configuration blacklist;
acquiring a main version number of local function configuration and acquiring a sub-version number of function configuration in the slave equipment;
if the main version number is greater than the sub-version number, converting the preset configuration information according to the function configuration in the slave equipment, and sending the converted preset configuration information to each slave equipment;
and if the sub-version number is greater than the main version number, directly sending the preset configuration information to each slave device.
3. The master-slave device configuration information synchronization method of claim 1, wherein after the step of networking with at least one slave device, the method further comprises:
performing identity authentication with the slave device;
and if the identity authentication between the slave equipment and the slave equipment is unqualified, stopping the configuration synchronization between the slave equipment and the slave equipment.
4. A master-slave device configuration information synchronization method is applied to slave devices, and comprises the following steps:
networking with a preset main device, carrying out configuration synchronization according to preset configuration information in the preset main device, and storing the preset configuration information;
when a role switching instruction is received, switching to a new master device, acquiring all locally stored configuration information to obtain local configuration information, wherein the preset configuration information is stored in the local configuration information;
and carrying out configuration synchronization with all slave devices in the current networking according to the local configuration information, and respectively sending the local configuration information to each slave device.
5. The master-slave device configuration information synchronization method of claim 4, wherein the method further comprises:
acquiring a current version number of local function configuration, and generating a broadcast message according to the current version number;
sending the broadcast message to the slave equipment according to a preset time interval;
and if the queried version number of the functional configuration in any slave equipment is not consistent with the current version number, performing configuration synchronization on the queried slave equipment according to the local configuration information.
6. The master-slave device configuration information synchronization method of claim 4, wherein the method further comprises:
if the configuration is updated locally, updating the local configuration information according to the updated configuration information;
and carrying out configuration synchronization on the slave equipment according to the updated local configuration information.
7. The master-slave device configuration information synchronization method according to claim 4, wherein the storing the preset configuration information includes:
converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist;
performing information filtering on the preset configuration information according to the synchronous blacklist, and acquiring a local function configuration table, wherein function configurations which can be executed corresponding to the slave equipment are stored in the function configuration table;
matching the preset configuration information with the function configuration table, and carrying out validity check on the matched configuration information;
and storing the matched configuration information which passes the verification, and directly storing the configuration information which is not matched in the preset configuration information.
8. A master-slave device configuration information synchronization method is applied to a server, and comprises the following steps:
the method comprises the steps of controlling networking between preset master equipment and at least one slave equipment, and obtaining preset configuration information in the preset master equipment;
controlling the preset master equipment and the slave equipment to carry out configuration synchronization according to the preset configuration information, and respectively sending the preset configuration information to each slave equipment;
when a role switching instruction is received, inquiring corresponding slave equipment according to the role switching instruction, and switching the inquired slave equipment into new master equipment;
acquiring all configuration information stored in the new main equipment to obtain local configuration information, wherein the preset configuration information is stored in the local configuration information;
and controlling the new master equipment and the slave equipment to carry out configuration synchronization according to the local configuration information, and respectively sending the local configuration information to each slave equipment.
9. A master-slave device configuration information synchronization system is applied to a preset master device, and comprises:
the first information acquisition module is used for networking with at least one slave device and acquiring locally pre-stored preset configuration information;
the first configuration synchronization module is used for performing configuration synchronization with the slave devices according to the preset configuration information and respectively sending the preset configuration information to each slave device;
the first role switching module is used for switching to the slave equipment when receiving a role switching instruction;
the master-slave device configuration information synchronization system is applied to slave devices and comprises:
the second networking module is used for networking with a preset main device and authenticating the identity of the preset main device;
the second configuration synchronization module is used for carrying out configuration synchronization according to preset configuration information in the preset main equipment and storing the preset configuration information if the identity authentication between the second configuration synchronization module and the preset main equipment is qualified;
the second role switching module is used for switching to a new master device when receiving a role switching instruction, acquiring all locally stored configuration information to obtain local configuration information, and storing the preset configuration information in the local configuration information;
and the first configuration storage module is used for carrying out configuration synchronization with all the slave devices in the current networking according to the local configuration information and respectively sending the local configuration information to each slave device.
10. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 8 when executing the computer program.
11. A storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1 to 8.
CN202010269489.8A 2020-04-08 2020-04-08 Master-slave device configuration information synchronization method, system, terminal device and storage medium Active CN111510326B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010269489.8A CN111510326B (en) 2020-04-08 2020-04-08 Master-slave device configuration information synchronization method, system, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010269489.8A CN111510326B (en) 2020-04-08 2020-04-08 Master-slave device configuration information synchronization method, system, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN111510326A true CN111510326A (en) 2020-08-07
CN111510326B CN111510326B (en) 2023-08-08

Family

ID=71864040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010269489.8A Active CN111510326B (en) 2020-04-08 2020-04-08 Master-slave device configuration information synchronization method, system, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN111510326B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486593A (en) * 2020-11-30 2021-03-12 重庆芯讯通无线科技有限公司 Method and system for synchronizing configuration information of master module and slave module
WO2022143490A1 (en) * 2020-12-31 2022-07-07 中兴通讯股份有限公司 Connection recovery method and apparatus for detached device, computer device, and readable medium
CN115664746A (en) * 2022-10-18 2023-01-31 浪潮思科网络科技有限公司 Authentication synchronization method, device, equipment and medium of stacking system
CN117857223A (en) * 2024-03-07 2024-04-09 四川天邑康和通信股份有限公司 Black-white list realization method, device, equipment and medium based on FTTR master-slave management
CN117857223B (en) * 2024-03-07 2024-05-28 四川天邑康和通信股份有限公司 Method, device, equipment and medium for realizing black-and-white list based on FTTR master-slave management

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140059529A1 (en) * 2012-08-27 2014-02-27 International Business Machines Corporation Non-disruptive software updates for servers processing network traffic
CN104063353A (en) * 2014-07-08 2014-09-24 上海华勤通讯技术有限公司 Information synchronization method for master device and slave device
CN109376039A (en) * 2018-12-17 2019-02-22 郑州云海信息技术有限公司 Storage device data synchronous method, device, equipment and medium based on dual control
CN109698757A (en) * 2017-10-20 2019-04-30 中兴通讯股份有限公司 Switch master/slave device, the method for restoring user data, server and the network equipment
CN109842508A (en) * 2017-11-27 2019-06-04 华为技术有限公司 The method that multiple terminals cooperates, terminal device and multiple terminals cooperative system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140059529A1 (en) * 2012-08-27 2014-02-27 International Business Machines Corporation Non-disruptive software updates for servers processing network traffic
CN104063353A (en) * 2014-07-08 2014-09-24 上海华勤通讯技术有限公司 Information synchronization method for master device and slave device
CN109698757A (en) * 2017-10-20 2019-04-30 中兴通讯股份有限公司 Switch master/slave device, the method for restoring user data, server and the network equipment
CN109842508A (en) * 2017-11-27 2019-06-04 华为技术有限公司 The method that multiple terminals cooperates, terminal device and multiple terminals cooperative system
CN109376039A (en) * 2018-12-17 2019-02-22 郑州云海信息技术有限公司 Storage device data synchronous method, device, equipment and medium based on dual control

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486593A (en) * 2020-11-30 2021-03-12 重庆芯讯通无线科技有限公司 Method and system for synchronizing configuration information of master module and slave module
CN112486593B (en) * 2020-11-30 2023-06-23 重庆芯讯通无线科技有限公司 Method and system for synchronizing configuration information of master-slave module
WO2022143490A1 (en) * 2020-12-31 2022-07-07 中兴通讯股份有限公司 Connection recovery method and apparatus for detached device, computer device, and readable medium
CN115664746A (en) * 2022-10-18 2023-01-31 浪潮思科网络科技有限公司 Authentication synchronization method, device, equipment and medium of stacking system
CN117857223A (en) * 2024-03-07 2024-04-09 四川天邑康和通信股份有限公司 Black-white list realization method, device, equipment and medium based on FTTR master-slave management
CN117857223B (en) * 2024-03-07 2024-05-28 四川天邑康和通信股份有限公司 Method, device, equipment and medium for realizing black-and-white list based on FTTR master-slave management

Also Published As

Publication number Publication date
CN111510326B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
EP3800909B1 (en) Remote management method, and device
CN111510326A (en) Master-slave equipment configuration information synchronization method, system, terminal equipment and storage medium
US20200089488A1 (en) Method for Authenticating and Updating EUICC Firmware Version and Related Apparatus
EP3598333B1 (en) Electronic device update management
WO2018010480A1 (en) Network locking method for esim card, terminal, and network locking authentication server
CN111008211A (en) Visual interface creating method and device, readable storage medium and electronic equipment
US20150127831A1 (en) Method and device for enabling or disabling server in wireless communication system
CN111065090A (en) Method for establishing network connection and wireless routing equipment
CN113872951B (en) Hybrid cloud security policy issuing method and device, electronic equipment and storage medium
EP3972199A1 (en) Open interface management method, electronic device, and storage medium
WO2014169802A1 (en) Terminal, network side device, terminal application control method, and system
CN113434766A (en) Subscription information pushing method and device, storage medium and electronic device
CN106685914B (en) Information verification method, server and client
US11231920B2 (en) Electronic device management
CN106487637B (en) Application message processing system and method and application device
US20180107840A1 (en) Method of restoring a secure element to a factory state
CN114125812B (en) Data synchronization method, device, server and storage medium
CN113660645B (en) Device configuration method and device, electronic device and storage medium
CN113312669B (en) Password synchronization method, device and storage medium
CN112788551B (en) Message processing method and device, terminal equipment and storage medium
CN113055254B (en) Address configuration method, device, access server and storage medium
US11171786B1 (en) Chained trusted platform modules (TPMs) as a secure bus for pre-placement of device capabilities
CN113207097A (en) Networking method and device for intelligent equipment, electronic equipment and storage medium
CN112637151A (en) Data message transmission method, terminal device, server and storage medium
CN111917575B (en) Gateway offline configuration method, system, terminal equipment and storage medium

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