CN111510326B - Master-slave device configuration information synchronization method, system, terminal device and storage medium - Google Patents

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

Info

Publication number
CN111510326B
CN111510326B CN202010269489.8A CN202010269489A CN111510326B CN 111510326 B CN111510326 B CN 111510326B CN 202010269489 A CN202010269489 A CN 202010269489A CN 111510326 B CN111510326 B CN 111510326B
Authority
CN
China
Prior art keywords
configuration information
preset
configuration
slave
slave device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010269489.8A
Other languages
Chinese (zh)
Other versions
CN111510326A (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

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: networking is controlled between preset master equipment and slave equipment, and preset configuration information in the preset master equipment is obtained; controlling a preset master device and a slave device to perform configuration synchronization according to preset configuration information, and storing the preset configuration information into the slave device; 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; and controlling the new master device to perform configuration synchronization with the slave device according to the local configuration information, and storing the local configuration information into the slave device. 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 device configuration information synchronization method, system, terminal device and storage medium
Technical Field
The application belongs to the field of configuration information synchronization, and particularly relates to a master-slave device configuration information synchronization method, a master-slave device configuration information synchronization system, a terminal device and a storage medium.
Background
With the development of networks, network device updates are unavoidable. Taking a wireless router as an example, a user changes from a single frequency router to a dual or tri-frequency router, from a hundred mega router to a gigabit router, and so on. However, after the device is replaced, the configuration information in the device needs to be reset, the process is complex and cumbersome, and certain configuration information may be forgotten in the resetting process, so that the method is very unfriendly. Therefore, the master-slave device configuration information synchronization method is used for solving the problem that the updated device needs to be configured and set again in the device replacement process, so that user operation is reduced, and user experience is improved.
In the use process of the existing master-slave device configuration information synchronization method, the server searches the setting information stored in the master device, copies the searched setting information and generates a synchronous data packet, and sends the synchronous data packet to the slave device needing configuration setting so as to achieve the effect of automatically configuring and setting the device.
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 configuration information is lost because configuration setting can only be carried out on slave devices according to configuration information in new master devices after switching when role switching occurs in the master devices in the existing master-slave device configuration information synchronization process.
In a first aspect, an embodiment of the present application provides a master-slave device configuration information synchronization method, applied to a preset master device, where the method includes:
networking is carried out between the local configuration information and at least one slave device, and preset configuration information stored locally in advance is obtained;
performing configuration synchronization between the slave devices according to the preset configuration information, and respectively sending the preset configuration information to each slave device;
and when a role switching instruction is received, switching to the slave equipment.
Compared with the prior art, the embodiment of the application has the beneficial effects that: by means of the design that identity authentication is conducted between the preset master equipment and the slave equipment, the safety of configuration information synchronization is effectively improved, the risk of intercepting the configuration information is reduced, and the loss of the preset configuration information caused by role switching between the master equipment and the slave equipment is prevented by means of the design that the preset configuration information is respectively sent to each slave equipment.
Further, the performing configuration synchronization with the slave device according to the preset configuration information includes:
acquiring a configuration blacklist, and carrying out information filtering on the preset configuration information according to the configuration blacklist;
acquiring a main version number of a local functional configuration and a sub version number of the functional configuration in the slave device;
if the main version number is larger than the sub version number, converting the preset configuration information according to the functional configuration in the slave device, and sending the converted preset configuration information to each slave device;
and if the sub-version number is larger than the main version number, directly transmitting the preset configuration information to each slave device.
Further, after the step of networking with at least one slave device, the method further includes:
authenticating identity with the slave device;
and if the identity authentication with the slave equipment is not qualified, stopping configuration synchronization with the slave equipment.
In a second aspect, an embodiment of the present application provides a master-slave device configuration information synchronization method, applied to a slave device, where the method includes:
networking with preset master equipment, performing configuration synchronization according to preset configuration information in the preset master equipment, and storing the preset configuration information;
When a role switching instruction is received, switching to a new main device, and 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 the 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;
transmitting the broadcast message to the slave device according to a preset time interval;
and if the version number of the functional configuration in any one of the slave devices is not consistent with the current version number, carrying out configuration synchronization on the queried slave device according to the local configuration information.
Further, the method further comprises:
if the configuration update occurs 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;
the preset configuration information is subjected to information filtering according to the synchronous blacklist, a local function configuration table is obtained, and the function configuration table stores function configuration which can be executed by the corresponding slave equipment;
matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information;
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, where the method includes:
the method comprises the steps of controlling a preset master device and at least one slave device to carry out networking, and obtaining preset configuration information in the preset master device;
controlling the preset master equipment and the slave equipment to perform configuration synchronization according to the preset configuration information, and respectively sending the preset configuration information to each slave equipment;
inquiring the corresponding slave equipment according to the role switching instruction when a role switching instruction is received, and switching the inquired slave equipment into a 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 device to perform configuration synchronization with the slave devices according to the local configuration information, and respectively sending the local configuration information to each slave device.
Compared with the prior art, the embodiment of the application has the beneficial effects that: by means of the design of identity authentication between the preset master equipment and the slave equipment, the safety of configuration information synchronization is effectively improved, the risk of intercepting the configuration information is reduced, the preset configuration information is respectively stored into the design of each slave equipment, the loss of the preset configuration information caused by role switching between the master equipment and the slave equipment is prevented, and after the role switching between the master equipment and the slave equipment is completed, all the configuration information in the new master equipment is stored into the design of the slave equipment, so that the loss of the preset configuration information is further prevented.
In a fourth aspect, an embodiment of the present application provides a master-slave device configuration information synchronization system, applied to a preset master server, including:
the first information acquisition module is used for networking with at least one slave device and acquiring preset configuration information prestored locally;
The first configuration synchronization module is used for carrying out configuration synchronization between 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 a role switching instruction is received;
the master-slave device configuration information synchronization system is applied to a slave device and comprises:
the second networking module is used for networking with a preset main device and carrying out identity authentication with the preset main device;
the second configuration synchronization module is used for performing configuration synchronization according to preset configuration information in the preset master equipment and storing the preset configuration information if the identity authentication between the second configuration synchronization module and the preset master equipment is qualified;
the second role switching module is used for switching to a new main device when a role switching instruction is received, acquiring all locally stored configuration information, and obtaining local configuration information, wherein the preset configuration information is stored 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 network according to the local configuration information and respectively sending the local configuration information to each slave device.
In a fifth aspect, embodiments of the present application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements a method as described above when executing the computer program.
In a sixth aspect, embodiments of the present application provide a storage medium storing a computer program that when executed by a processor implements a method as described above.
In a seventh aspect, embodiments of the present application provide a computer program product, which when run on a terminal device, causes the terminal device to perform the master-slave device configuration information synchronization method of any one of the first aspects above.
It will be appreciated that the advantages of the second to seventh aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a master-slave device configuration information synchronization method provided in a first embodiment of the present application;
FIG. 2 is a flowchart of a master-slave configuration information synchronization method according to a second embodiment of the present application;
FIG. 3 is a flowchart of a master-slave configuration information synchronization method according to a third embodiment of the present application;
fig. 4 is a flowchart of a master-slave configuration information synchronization method provided in a fourth embodiment of the present application;
FIG. 5 is a flowchart of a master-slave configuration information synchronization method according to a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a master-slave configuration information synchronization system according to a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of a master-slave configuration information synchronization system according to a seventh embodiment of the present application;
fig. 8 is a schematic structural diagram of a master-slave configuration information synchronization system according to an eighth embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal device provided in 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 configurations, 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 should 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 any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the 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 application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Example 1
Referring to fig. 1, a flowchart of a master-slave configuration information synchronization method according to a first embodiment of the present application is applied to a preset master device, and includes the steps of:
step S1, networking is carried out between the slave equipment and at least one slave equipment, and identity authentication is carried out between the slave equipment and the slave equipment;
the preset master device and the 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 slave device in a WIFI, network hot spot or local area network mode, so that the preset master device and the slave device are in the same network, and synchronous transmission of subsequent configuration information is effectively guaranteed.
Step S2, judging whether the identity authentication with the slave equipment is qualified or not;
the identity authentication can be performed between the preset master device and the slave device in a password or authentication protocol mode, and whether the synchronization operation of the configuration information is performed between the preset master device and the slave device is judged according to an identity authentication result.
Specifically, in the step, through the design of identity authentication between the preset master device and the slave device, the synchronous configuration information between the preset master device and the 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 configuration information synchronization between the master device and the slave device is improved.
If the identity authentication with the slave device is qualified, executing a step S3;
step S3, obtaining locally pre-stored preset configuration information;
the configuration parameters in the locally pre-stored preset configuration information can be preset according to requirements, the preset configuration information is synchronous configuration information in the current networking, namely, the configuration synchronization operation between the master device and the slave device is performed according to the preset configuration information in the current networking, so that the configuration information in the slave device is synchronized to the preset configuration information.
Step S4, carrying out configuration synchronization between 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 the design 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.
Specifically, in this step, the performing configuration synchronization with the slave device according to the preset configuration information includes:
acquiring a configuration blacklist, and carrying out information filtering on the preset configuration information according to the configuration blacklist;
acquiring a main version number of a local functional configuration and a sub version number of the functional configuration in the slave device;
if the main version number is larger than the sub version number, performing format conversion on the preset configuration information according to the functional configuration in the slave device, and performing configuration update on the slave device according to the converted preset configuration information;
if the sub version number is larger than the main version number, format conversion is carried out on the preset configuration information according to the local function configuration, and configuration updating is carried out on the slave equipment according to the converted preset configuration information.
In addition, in this step, the sending the preset configuration information to each slave device includes:
acquiring a synchronous blacklist, and carrying out information filtering on the preset configuration information according to the synchronous blacklist;
acquiring a function configuration table of the slave device, wherein the function configuration table stores the function configuration which can be executed by the corresponding slave device;
matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information;
and sending the matched configuration information which passes 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 S5, switching to the slave equipment when a role switching instruction is received.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of synchronization of configuration information is effectively improved, the risk of interception of configuration information is reduced, through the design of respectively sending 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 through the design of sending 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
Referring to fig. 2, a flowchart of a master-slave configuration information synchronization method according to a second embodiment of the present application is applied to a slave device, and includes the steps of:
step S01, networking is carried out with a preset main device, and identity authentication is carried out with the preset main device;
step S02, judging whether the identity authentication with the preset main equipment is qualified or not;
if the identity authentication with the preset master device is qualified, executing step S03;
step S03, carrying out configuration synchronization according to preset configuration information in the preset master 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;
the preset configuration information is subjected to information filtering according to the synchronous blacklist, a local function configuration table is obtained, and the function configuration table stores function configuration which can be executed by the corresponding slave equipment;
matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information;
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 a role switching instruction is received, switching to a new main device, and acquiring all locally stored configuration information to obtain local configuration information;
wherein the preset configuration information is stored in the local configuration information;
step S05, 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;
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, the preset configuration information a needs to be configured and synchronized for all the slave devices, when the master device is switched to the slave device B, the slave devices which are subsequently added into 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 that subsequently join 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;
transmitting the broadcast message to the slave device according to a preset time interval;
if the version number of the functional configuration in any one of the slave devices is inconsistent with the current version number, carrying out configuration synchronization on the queried slave device according to the local configuration information;
and sending the broadcast message to the slave device according to a preset time interval to detect whether a new slave device is added or the configuration of an old slave device is reset, namely, when the version number of the functional configuration in any slave device is inquired to be inconsistent with the current version number, carrying out configuration information synchronization operation on the corresponding slave device so as to synchronize the configuration between all the slave devices and the new master device.
Further, in this embodiment, the method further includes:
if the configuration update occurs locally, updating the local configuration information according to the updated configuration information;
performing configuration synchronization on the slave device according to the updated local configuration information;
the local configuration information is updated according to the updated configuration information, so that the effect of timely updating the synchronous configuration information is achieved, the slave equipment is reconfigured and synchronized according to the updated synchronous configuration information, and the slave equipment is automatically synchronized after the configuration information of the new master equipment is modified, so that a user does not need to perform synchronization operation.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of synchronization of configuration information is effectively improved, the risk of interception of configuration information is reduced, through the design of storing the preset configuration information into each slave device respectively, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and through the design of storing all the configuration information in the new master device into 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 III
Referring to fig. 3, a flowchart of a master-slave device configuration information synchronization method according to a third embodiment of the present application is applied to a server, where the server may be any device having a networking function and supporting configuration synchronization, such as a mobile phone, a router, a computer, a gateway, etc., and includes the steps of:
step S10, networking is controlled between a preset master device and at least one slave device, and identity authentication is performed between the preset master device and the slave device;
the preset master device and the 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 slave device in a WIFI, network hot spot or local area network mode, so that the preset master device and the slave device are in the same network, and synchronous transmission of subsequent configuration information is effectively guaranteed.
Preferably, the number of the preset master devices in the whole network may be one or more, and when the number of the preset master devices is multiple, configuration information of each preset master device may be set according to requirements, so that configuration information between different preset master devices may be the same or different, and role switching may be performed between all preset master devices and slave devices.
Specifically, in the step, through the design of identity authentication between the preset master device and the slave device, the synchronous configuration information between the preset master device and the 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 configuration information synchronization between the master device and the slave device is improved.
Step S20, judging whether identity authentication between the preset master equipment and the slave equipment is qualified or not;
the identity authentication can be performed between the preset master device and the slave device in a password or authentication protocol mode, and whether the synchronization operation of the configuration information is performed between the preset master device and the slave device is judged according to an identity authentication result.
If the identity authentication between the preset master device and the slave device is not qualified, the slave device is kicked off in the current networking to prevent the leakage of the synchronous configuration information, and preferably, when the number of times of the identity authentication failure between the preset master device and the slave device in the current networking is greater than the preset number of times, the preset master device is kicked off, and networking operation between the master device and the slave device is carried out again;
specifically, the preset times may be set according to a user requirement, or based on the total number of the slave devices, when the preset times are 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, the preset percentage is 20%, the preset times are 20, and when it is determined that the number of identity authentication disqualification times between the preset master device and the slave devices is greater than 20, the preset master device is kicked off 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 equipment, controlling the preset master equipment and the slave equipment to perform configuration synchronization according to the preset configuration information, and respectively transmitting the preset configuration information to each slave equipment;
the configuration parameters in the preset configuration information can be preset according to requirements, the preset configuration information is synchronous configuration information in the current networking, namely, the configuration synchronization operation between the master device and the slave device is performed according to the preset configuration information in the current networking, 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 can be set as a slave device, so that the router is set based on the preset configuration information on the preset master device, the efficiency of configuration setting of the router is effectively improved, and the operation of a user is facilitated.
Preferably, in this step, the preset configuration information is stored in each slave device, so that loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.
Step S40, when a role switching instruction is received, inquiring the corresponding slave equipment according to the role switching instruction, and switching the inquired slave equipment into a new master equipment;
the role switching instruction stores a switching identifier, the switching identifier is used for pointing to the slave device needing to perform role switching so as to enable the pointed slave device to be switched to a new master device, and preferably, the switching identifier can be stored in a text, image or numbering mode.
When the switching identification is stored in a text mode, the text is the name of the equipment model corresponding to the slave equipment, when the switching identification is stored in an image mode, the image is the equipment image corresponding to the slave equipment, and when the switching identification is stored in a numbering mode, the numbering is the networking number corresponding to the slave equipment in the current networking.
Step S50, all configuration information stored in the new main equipment is obtained, and local configuration information is obtained;
the preset configuration information is stored in the local configuration information, so that the loss of the preset configuration information is effectively prevented.
Step S60, controlling the new master device to perform configuration synchronization with the slave devices according to the local configuration information, and respectively sending the local configuration information to each slave device;
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of synchronization of configuration information is effectively improved, the risk of interception of configuration information is reduced, through the design of storing the preset configuration information into each slave device respectively, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and through the design of storing all the configuration information in the new master device into 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 IV
Referring to fig. 4, a flowchart of a master-slave configuration information synchronization method according to a fourth embodiment of the present application is applied to a server, and includes the steps of:
step S11, networking is controlled between a preset master device and at least one slave device, and identity authentication is performed between the preset master device and the slave device;
step S21, judging whether identity authentication between the preset master equipment and the slave equipment is qualified or not;
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 master equipment, acquiring a configuration blacklist, and carrying out 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, the configuration quantity and parameters in the configuration blacklist can be set according to requirements.
Step S41, obtaining a main version number of the function configuration in the preset main device and obtaining a sub version number of the function configuration in the auxiliary device;
step S51, judging whether the main version number is larger than the sub version number;
because of the difference of the function versions in the preset master device and the slave device, the configuration data has the difference, and when the configuration synchronization is directly performed, the function abnormality or the synchronization failure between the master device and the slave device can be caused, therefore, in the step, whether the format conversion of the preset configuration information is required is determined by judging whether the master version number is larger than the slave version number.
If the main version number is equal to the sub version number, the configuration of the slave device is updated directly according to the preset configuration information;
if the major version number is greater than the minor version number, executing step S61;
step S61, format conversion is carried out on the preset configuration information according to the function configuration in the slave equipment, and configuration updating is carried out on the slave equipment according to the converted preset configuration information;
And when the main version number is judged to be larger than the sub version number, judging that the functional version of the preset main equipment is higher than the corresponding auxiliary equipment, inquiring a configuration conversion rule according to the main version number and the sub version number, and controlling the functional configuration in the auxiliary equipment to perform format conversion on the preset configuration information according to the inquired configuration conversion rule so as to obtain the configuration information meeting the functional configuration of the corresponding auxiliary equipment.
If the sub version number is greater than the main version number, executing step S71;
step S71, format conversion is carried out on the preset configuration information according to the function configuration in the master equipment, and configuration updating is carried out on the slave equipment according to the converted preset configuration information;
and when judging that the sub-version number is larger than the main version number, judging that the functional version of the corresponding slave device is higher than the preset master device, inquiring a configuration conversion rule according to the main version number and the sub-version number, and controlling the functional configuration in the preset master device to perform format conversion on the preset configuration information according to the inquired configuration conversion rule so as to obtain the configuration information meeting the functional configuration of the corresponding slave device.
Step S81, storing the preset configuration information into each slave device respectively, and inquiring the corresponding slave device according to the role switching instruction when the role switching instruction is received;
Preferably, in this step, the storing the preset configuration information in each slave device includes:
acquiring a synchronous blacklist, and carrying out information filtering on the preset configuration information according to the synchronous blacklist;
acquiring a function configuration table of the slave device, wherein the function configuration table stores the function configuration which can be executed by the corresponding slave device;
matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information;
storing the matched configuration information which passes 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 out configuration information which does not need to be synchronized for the corresponding slave equipment, and the synchronous blacklists corresponding to different slave equipment can be identical or different, preferably, when the validity check of the configuration information fails, the corresponding configuration information is corrected, and the corrected configuration information is stored;
specifically, the unmatched configuration information in the preset configuration information is a function configuration that cannot be executed by the slave device, for example, the master device is preset to support the function a, and the slave device does not support the function a, so that the configuration information of the function a in the preset configuration information cannot be successfully matched with the function configuration table, and therefore, the configuration information of the function a in the preset configuration information is directly stored to prevent the loss of the configuration information of the function a.
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 a function a, and the slave device B does not support the function a;
in the prior art, when the configuration information between the preset master device a and the slave device B is synchronized, the configuration information aiming at the function a is deleted in the slave device B, but when the slave device B is switched to the master device, the newly added slave device C supports the function a, but in the configuration information synchronization process between the slave device B and the slave device C, the configuration information aiming at the function a is not stored in the synchronization configuration information sent by the slave device B to the slave device C, so that the slave device C cannot execute the function a, and further the error of the configuration information synchronization is 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 configuration information for the function a is stored in the synchronization configuration information sent from the slave device B to the slave device C, so that the slave device C can execute the function a, and further, the accuracy of configuration information synchronization is improved.
Step S91, switching the queried slave equipment into new master equipment, and acquiring all configuration information stored in the new master equipment to obtain local configuration information;
Wherein the preset configuration information is stored in the local configuration information.
And step S101, controlling the new master device to perform configuration synchronization with the slave devices according to the local configuration information, and respectively sending the local configuration information to each slave device.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of synchronization of configuration information is effectively improved, the risk of interception of configuration information is reduced, through the design of storing the preset configuration information into each slave device respectively, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and through the design of storing all the configuration information in the new master device into 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 five
Referring to fig. 5, a flowchart of a master-slave configuration information synchronization method according to a fifth embodiment of the present application is applied to a server, and includes the steps of:
step S12, networking is controlled between a preset master device and at least one slave device, and identity authentication is performed between the preset master device and the slave device;
Step S22, controlling a preset master device and a slave device to generate random numbers, obtaining a first random number and a second random number, and obtaining a network identifier of networking between the preset master device and the slave device;
the network identifier may be a number identifier, where the number identifier is a number of a network formed between a preset master device and a preset slave device. Preferably, the preset master device and the slave device are both provided with random ranges, and when the generation of the random numbers is required, the preset master device and the slave device are controlled to perform the random selection of the numerical values in the corresponding random ranges so as to obtain the first random numbers and the second random numbers.
Further, the random ranges in the preset master device and the slave device may be the same or different, the random ranges may be set according to requirements, for example, the random ranges may be set to 0 to 100, 10 to 90 or 20 to 50, preferably, the first random number and the second random number may also be negative numbers, decimal numbers or irrational numbers, etc.
Step S32, networking keys in a preset master device and a preset slave device are calculated according to the first random number, the second random number and the network identifier respectively to obtain a first networking key and a second networking key, and check values are calculated 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 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, the preset master device and the slave device may use a symmetric encryption algorithm to calculate the networking key, where the networking key may use a DES triple DES algorithm, a 3DES algorithm, a TDEA algorithm, a Blowfish algorithm, an RC5 algorithm or an IDEA algorithm in the symmetric encryption algorithm to calculate, that is, use a DES triple DES algorithm, a 3DES algorithm, a TDEA algorithm, a Blowfish algorithm, an RC5 algorithm or an IDEA algorithm to calculate the first random number, the second random number and the network identifier, so as to obtain the networking key.
Step S42, checking and calculating the first networking key, the second networking key, the first check value and the second check value, and judging whether the checking and calculating results are the same or not;
the method comprises the steps of performing verification calculation on a first verification value and a second verification value according to a first networking key and a second networking key, and judging that identity authentication between preset master equipment and slave equipment is unqualified if verification solutions are different;
if the verification results are different, judging that the identity authentication between the preset master equipment and the slave equipment is not qualified, and kicking off the slave equipment from the current networking to prevent the leakage of the synchronous configuration information.
If the verification and solution results are the same, executing step S52;
step S52, judging that identity authentication between a preset master device and a slave device is qualified, and acquiring preset configuration information in the preset master device;
step S62, controlling the preset master equipment and the slave equipment to perform configuration synchronization according to the preset configuration information, encrypting the preset configuration information according to a networking key, and respectively storing the encrypted preset configuration information into each slave equipment;
when the preset master device sends preset configuration information to the slave device, the preset configuration information is encrypted according to the first networking key;
step S72, 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;
step S82, all configuration information stored in the new main equipment is obtained, and local configuration information is obtained;
wherein the preset configuration information is stored in the local configuration information;
step S92, controlling the new master device to perform configuration synchronization with the slave devices according to the local configuration information, and storing the local configuration information into each slave device respectively.
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;
transmitting the broadcast message to the slave device according to a preset time interval;
if the version number of the functional configuration in any one of the slave devices is inconsistent with the current version number, carrying out configuration synchronization on the queried slave device according to the local configuration information;
and sending the broadcast message to the slave device according to a preset time interval to detect whether a new slave device is added or the configuration of an old slave device is reset, namely, when the version number of the functional configuration in any slave device is inquired to be inconsistent with the current version number, carrying out configuration information synchronization operation on the corresponding slave device so as to synchronize the configuration between all the slave devices and the new master device.
In addition, in this embodiment, the method further includes:
if the new master device generates configuration update, updating the local configuration information according to the updated configuration information, and carrying out configuration synchronization on the slave device according to the updated local configuration information;
the local configuration information is updated according to the updated configuration information, so that the effect of timely updating the synchronous configuration information is achieved, the slave equipment is reconfigured and synchronized according to the updated synchronous configuration information, and the slave equipment is automatically synchronized after the configuration information of the new master equipment is modified, so that a user does not need to perform synchronization operation.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of synchronization of configuration information is effectively improved, the risk of interception of configuration information is reduced, through the design of storing the preset configuration information into each slave device respectively, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and through the design of storing all the configuration information in the new master device into 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 six
Corresponding to the master-slave device configuration information synchronization method described in the above embodiments, 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 explanation, only the portions 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 used for networking with at least one slave device and carrying out identity authentication with the slave device;
the first information obtaining module 11 is configured to obtain preset configuration information that is locally pre-stored if the identity authentication with the slave device 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 slave device respectively.
Wherein the first configuration synchronization module 12 is further configured to: acquiring a configuration blacklist, and carrying out information filtering on the preset configuration information according to the configuration blacklist;
acquiring a main version number of a local functional configuration and a sub version number of the functional configuration in the slave device;
if the main version number is larger than the sub version number, converting the preset configuration information according to the functional configuration in the slave device, and sending the converted preset configuration information to each slave device;
and if the sub-version number is larger than the main version number, directly transmitting the preset configuration information to each slave device.
And the first role switching module 13 is used for switching to the slave equipment when a role switching instruction is received.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of configuration information synchronization is effectively improved, the risk of intercepting the configuration information is reduced, and through the design of storing the preset configuration information into each slave device, 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 configuration information synchronization system 101 according to a seventh embodiment of the present application, corresponding to the master-slave configuration information synchronization method described in the above embodiments, and for convenience of explanation, only the portions 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, and acquire all locally stored configuration information to 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 synchronize with all the slave devices in the current network according to the local configuration information, and send the local configuration information to each slave device 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;
Transmitting the broadcast message to the slave device according to a preset time interval;
and if the version number of the functional configuration in any one of the slave devices is not consistent with the current version number, carrying out configuration synchronization on the queried slave device according to the local configuration information.
Furthermore, the second configuration synchronization module 15 is further configured to: if the configuration update occurs 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;
the preset configuration information is subjected to information filtering according to the synchronous blacklist, a local function configuration table is obtained, and the function configuration table stores function configuration which can be executed by the corresponding slave equipment;
matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information;
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:
a second networking module 14 for performing identity authentication with the slave device; and if the identity authentication with the slave equipment is not qualified, stopping configuration synchronization with the slave equipment.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of configuration information synchronization is effectively improved, the risk of intercepting the configuration information is reduced, and through the design of storing the preset configuration information into each slave device, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented.
Example eight
Corresponding to the master-slave device configuration information synchronization method described in the above embodiments, 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 explanation, only the portions related to the embodiments of the present application are shown.
Referring to fig. 8, the system is applied to a server, including: the identity authentication module 18, the second information acquisition module 19, the second configuration storage module 30, the third color switching module 31, the third information acquisition module 32, and the configuration information synchronization module 33, wherein:
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 obtaining network identifiers of networking between the preset master device and the slave device;
respectively calculating networking keys in preset master equipment and slave equipment 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;
checking and calculating the first networking key, the second networking key, the first check value and the second check value, and judging whether the checking and calculating results are the same or not;
if the verification and the solution are the same, judging that the identity authentication between the preset master equipment and the slave equipment is qualified;
if the verification and solution results are different, the identity authentication between the preset master device and the slave device is judged to be unqualified.
And 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 the preset master device and the slave devices to perform configuration synchronization according to the preset configuration information, and send the preset configuration information to each slave device respectively.
Wherein the second configuration storage module 30 is further configured to: acquiring a configuration blacklist, and carrying out information filtering on the preset configuration information according to the configuration blacklist;
acquiring a main version number of the functional configuration in the preset main equipment, and acquiring a sub version number of the functional configuration in the auxiliary equipment;
if the main version number is larger than the sub version number, performing format conversion on the preset configuration information according to the functional configuration in the slave device, and performing configuration update on the slave device according to the converted preset configuration information;
if the sub version number is larger than the main version number, format conversion is carried out on the preset configuration information according to the functional configuration in the main equipment, and configuration updating is carried out 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 carrying out information filtering on the preset configuration information according to the synchronous blacklist;
acquiring a function configuration table of the slave device, wherein the function configuration table stores the function configuration which can be executed by the corresponding slave device;
matching the preset configuration information with the function configuration table, and performing 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: encrypting the preset configuration information according to the networking key, and respectively storing the encrypted preset configuration information into each slave device.
And the third role switching module 31 is configured to query the corresponding slave device according to the role switching instruction when a role switching instruction is received, and switch the queried slave device to a new master device.
And a third information obtaining module 32, configured to obtain local configuration information by obtaining all the configuration information stored in the new master device, where the preset configuration information is stored in the local configuration information.
And the configuration information synchronization module 33 is configured to control the new master device to perform configuration synchronization with the slave devices according to the local configuration information, and send the local configuration information to each slave device respectively.
Wherein, the configuration information synchronization module 33 is further configured to: if the new main equipment generates configuration update, 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:
the broadcasting module 34 is configured to obtain a current version number of the function configuration in the new master device, and generate a broadcasting message according to the current version number;
transmitting the broadcast message to the slave device according to a preset time interval;
and if the version number of the functional configuration in any one of the slave devices is not consistent with the current version number, carrying out configuration synchronization on the queried slave device according to the local configuration information.
In this embodiment, through the design of identity authentication between the preset master device and the slave devices, the security of synchronization of configuration information is effectively improved, the risk of interception of configuration information is reduced, through the design of storing the preset configuration information into each slave device respectively, the loss of the preset configuration information caused by role switching between the master device and the slave device is prevented, and through the design of storing all the configuration information in the new master device into 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.
It should be noted that, because the content of information interaction and execution process between the above devices/modules is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
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 processor 20 implementing the steps in any of the various method embodiments described above when executing the computer program 22.
The terminal device 2 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 20, a memory 21. It will be appreciated by those skilled in the art 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 illustrated, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), and the processor 20 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, 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) or the like, which are provided on the terminal device 2. Further, the memory 21 may also include 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, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 21 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a 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 process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a network device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, 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 device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
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 solution. 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 manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A master-slave device configuration information synchronization method, which is applied to a preset master device, the method comprising:
networking is carried out between the local configuration information and at least one slave device, and preset configuration information stored locally in advance is obtained;
Performing configuration synchronization between the slave devices according to the preset configuration information, and respectively sending the preset configuration information to each slave device;
when a role switching instruction is received, switching to the slave device as a new master device, wherein the new master device sends all configuration information of the slave device to the slave device;
wherein the slave device is further configured to: converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist; the preset configuration information is subjected to information filtering according to the synchronous blacklist, a local function configuration table is obtained, and the function configuration table stores function configuration which can be executed by the corresponding slave equipment; matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information; storing the matched configuration information which passes the verification, and directly storing the configuration information which is not matched in the preset configuration information.
2. The master-slave device configuration information synchronization method 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 carrying out information filtering on the preset configuration information according to the configuration blacklist;
acquiring a main version number of a local functional configuration and a sub version number of the functional configuration in the slave device;
if the main version number is larger than the sub version number, converting the preset configuration information according to the functional configuration in the slave device, and sending the converted preset configuration information to each slave device;
and if the sub-version number is larger than the main version number, directly transmitting 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:
authenticating identity with the slave device;
and if the identity authentication with the slave equipment is not qualified, stopping configuration synchronization with the slave equipment.
4. A master-slave device configuration information synchronization method, characterized by being applied to a slave device, the method comprising:
networking with preset master equipment, performing configuration synchronization according to preset configuration information in the preset master equipment, and storing the preset configuration information;
When a role switching instruction is received, switching to a new main device, and acquiring all locally stored configuration information to obtain local configuration information, wherein the preset configuration information is stored in the local configuration information;
according to the local configuration information, carrying out configuration synchronization with all the slave devices in the current networking, and respectively sending the local configuration information to each slave device;
the storing the preset configuration information includes:
converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist;
the preset configuration information is subjected to information filtering according to the synchronous blacklist, a local function configuration table is obtained, and the function configuration table stores function configuration which can be executed by the corresponding slave equipment;
matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information;
storing the matched configuration information which passes the verification, and directly storing the configuration information which is not matched in the preset configuration information.
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;
transmitting the broadcast message to the slave device according to a preset time interval;
and if the version number of the functional configuration in any one of the slave devices is not consistent with the current version number, carrying out configuration synchronization on the queried slave device 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 update occurs 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. A master-slave device configuration information synchronization method, characterized by being applied to a server, the method comprising:
the method comprises the steps of controlling a preset master device and at least one slave device to carry out networking, and obtaining preset configuration information in the preset master device;
controlling the preset master equipment and the slave equipment to perform configuration synchronization according to the preset configuration information, and respectively sending the preset configuration information to each slave equipment;
Inquiring the corresponding slave equipment according to the role switching instruction when a role switching instruction is received, and switching the inquired slave equipment into a 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;
controlling the new master device to perform configuration synchronization with the slave devices according to the local configuration information, and respectively sending the local configuration information to each slave device;
wherein the slave device is further configured to: converting the preset configuration information according to local function configuration, and acquiring a synchronous blacklist; the preset configuration information is subjected to information filtering according to the synchronous blacklist, a local function configuration table is obtained, and the function configuration table stores function configuration which can be executed by the corresponding slave equipment; matching the preset configuration information with the function configuration table, and performing validity check on the matched configuration information; 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 system, applied to a preset master device, comprising:
the first information acquisition module is used for networking with at least one slave device and acquiring preset configuration information prestored locally;
the first configuration synchronization module is used for carrying out configuration synchronization between 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 to serve as a new master equipment when a role switching instruction is received, and the new master equipment sends all configuration information of the slave equipment to the slave equipment;
the master-slave device configuration information synchronization system is applied to a slave device and comprises:
the second networking module is used for networking with a preset main device and carrying out identity authentication with the preset main device;
the second configuration synchronization module is used for performing configuration synchronization according to preset configuration information in the preset master equipment and storing the preset configuration information if the identity authentication between the second configuration synchronization module and the preset master equipment is qualified;
the second role switching module is used for switching to a new main device when a role switching instruction is received, acquiring all locally stored configuration information, and obtaining local configuration information, wherein the preset configuration information is stored in the local configuration information;
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;
the second configuration synchronization module is further configured to: acquiring a synchronous blacklist, and carrying out information filtering on the preset configuration information according to the synchronous blacklist; acquiring a function configuration table of the slave device, wherein the function configuration table stores the function configuration which can be executed by the corresponding slave device; matching the preset configuration information with the function configuration table, and performing 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.
9. 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 7 when executing the computer program.
10. A storage medium storing a computer program which, when executed by a processor, implements the method of any one of claims 1 to 7.
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 CN111510326A (en) 2020-08-07
CN111510326B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486593B (en) * 2020-11-30 2023-06-23 重庆芯讯通无线科技有限公司 Method and system for synchronizing configuration information of master-slave module
CN114765573A (en) * 2020-12-31 2022-07-19 中兴通讯股份有限公司 Method and device for recovering connection of pipe-disconnecting equipment, computer equipment and readable medium
CN114356261A (en) * 2021-12-17 2022-04-15 西安诺瓦星云科技股份有限公司 Information synchronization system, method, device, electronic equipment and storage medium
CN115664746A (en) * 2022-10-18 2023-01-31 浪潮思科网络科技有限公司 Authentication synchronization method, device, equipment and medium of stacking system
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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038053B2 (en) * 2012-08-27 2015-05-19 Lenovo Enterprise Solutions (Singapore) Pte. Ltd Non-disruptive software updates for servers processing network traffic

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111510326A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN111510326B (en) Master-slave device configuration information synchronization method, system, terminal device and storage medium
CN107396360B (en) Block verification method and device
EP4024812A1 (en) Smart contract-based data processing method, and device and storage medium
US11868762B2 (en) Method for authenticating and updating eUICC firmware version and related apparatus
US10555163B2 (en) Handling of certificates for embedded universal integrated circuit cards
US20150038115A1 (en) Method and apparatus for authenticating access authority for specific resource in wireless communication system
CN112997447B (en) Timestamp-based access processing for wireless devices
EP3598333B1 (en) Electronic device update management
CN110597918A (en) Account management method and device and computer readable storage medium
CN110225017B (en) Identity authentication method, equipment and storage medium based on alliance block chain
US20240163119A1 (en) Device management method, system, and apparatus
CN111065090A (en) Method for establishing network connection and wireless routing equipment
CN114125812B (en) Data synchronization method, device, server and storage medium
CN113872951B (en) Hybrid cloud security policy issuing method and device, electronic equipment and storage medium
CN110417567B (en) Configuration method and device of Internet of things equipment
EP3972199A1 (en) Open interface management method, electronic device, and storage medium
CN113542022A (en) Networking management method and device of networking system, terminal equipment and storage medium
CN103501298B (en) A kind of non-interrupting service escalation process ensures the method and apparatus that link does not stop
CN112487470B (en) Information verification method, device, terminal equipment and computer readable storage medium
CN113099431B (en) Communication method and device based on LoRa channel and LoRa host
CN113207097B (en) Intelligent equipment networking method and device, electronic equipment and storage medium
CN111459899B (en) Log sharing method and device and terminal equipment
CN111311362B (en) Product attribute updating method and system
CN113055254B (en) Address configuration method, device, access server and storage medium
CN110930546B (en) Information processing method, device and system, storage medium and processor

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