CN110784340A - Configuration information updating method and device - Google Patents

Configuration information updating method and device Download PDF

Info

Publication number
CN110784340A
CN110784340A CN201910955686.2A CN201910955686A CN110784340A CN 110784340 A CN110784340 A CN 110784340A CN 201910955686 A CN201910955686 A CN 201910955686A CN 110784340 A CN110784340 A CN 110784340A
Authority
CN
China
Prior art keywords
configuration information
time
configuration
nodes
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910955686.2A
Other languages
Chinese (zh)
Other versions
CN110784340B (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.)
Wireless Life (beijing) Information Technology Co Ltd
Original Assignee
Wireless Life (beijing) Information Technology 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 Wireless Life (beijing) Information Technology Co Ltd filed Critical Wireless Life (beijing) Information Technology Co Ltd
Priority to CN201910955686.2A priority Critical patent/CN110784340B/en
Publication of CN110784340A publication Critical patent/CN110784340A/en
Application granted granted Critical
Publication of CN110784340B publication Critical patent/CN110784340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation

Abstract

The invention relates to a configuration information updating method and device. The method comprises the following steps: calibrating machine clocks of a plurality of nodes by adopting a clock calibration script; generating new configuration information according to the rule content; sending a notification message to the plurality of nodes, wherein the notification message is used for instructing the plurality of nodes to acquire the new configuration information; the new configuration information comprises configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace the original configuration information when the machine clock reaches preset time. According to the technical scheme, after the plurality of nodes obtain the new configuration information, the new configuration information of all the nodes takes effect at the same time, so that the occurrence of an intermediate state is avoided, the consistency of the states of the plurality of nodes is ensured when the configuration information is updated, and meanwhile, the reliability of the configuration information is also ensured when the configuration information is updated.

Description

Configuration information updating method and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for updating configuration information.
Background
In a distributed system cluster, configuration contents such as routing rules and fragmentation rules change frequently, and therefore modification of configuration information and update of configuration information in nodes need to be performed frequently. The existing configuration information updating method generally comprises the following steps: after the configuration center modifies the configuration information, the node obtains new configuration information from the configuration center and immediately executes the new configuration information.
However, because there are many nodes in the cluster, when the node configuration information is updated by using the updating method, a problem that a part of nodes are new configuration information and the other part of nodes are still old configuration information, i.e., an intermediate state, easily occurs, and the intermediate state causes inconsistency of information of the nodes, resulting in serious system problems such as data errors and the like, thereby affecting the use of users.
Disclosure of Invention
The embodiment of the invention provides a configuration information updating method and device. The technical scheme is as follows:
according to a first aspect of the embodiments of the present invention, there is provided a configuration information updating method, including: calibrating machine clocks of a plurality of nodes by adopting a clock calibration script; generating new configuration information according to the rule content; sending a notification message to the plurality of nodes, wherein the notification message is used for instructing the plurality of nodes to acquire the new configuration information; the new configuration information includes configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace original configuration information when the machine clock reaches preset time.
Preferably, the method further comprises: judging whether the rule content has a historical configuration record or not; when the rule content does not have a historical configuration record, the generating new configuration information according to the rule content includes: generating configuration information according to the rule content; setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length; when the rule content has a historical configuration record, the generating new configuration information according to the rule content includes: generating configuration information according to the rule content; according to the historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated; setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information
Preferably, the method further comprises: selecting N nodes from the plurality of nodes, and counting the time length required from the generation of the new configuration information to the acquisition of the new configuration information by the node for each node of the N nodes to obtain N time length values, wherein N is an integer greater than or equal to 2; calculating an average value T0 of the N time length values; calculating the optimal configuration effective time T of the new configuration information by adopting a formula T ═ Ts + T0X, wherein Ts is the generation time of the new configuration information, X is a time coefficient, and X is more than or equal to 2.5 and less than or equal to 3.5; calculating the difference value between the configuration effective time and the optimal configuration effective time; and when the difference value is larger than or equal to a preset threshold value, replacing the configuration effective time with the optimal configuration effective time.
Preferably, the estimating of the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes includes: dividing Y times from the historical configuration record and acquiring M nodes each time; for each node in the M nodes, calculating the time length required from generation of historical configuration information to acquisition of the historical configuration information by the node according to the historical configuration record, and acquiring M time length values, wherein Y and M are integers greater than or equal to 2; selecting the maximum time length value of the M time length values obtained each time; and calculating the average value of the selected Y maximum time length values, and taking the average value as the estimated time length value required by the node for acquiring the configuration information from the configuration information generation.
Preferably, the calibrating the machine clocks of the plurality of nodes by using the clock calibration script includes: acquiring physical addresses of the plurality of nodes; storing the physical address into a memory list of a management node; for each node in the memory list, connecting a network for the node; and enabling the time of the machine clock of the node to be consistent with the network time through a preset Linux command.
According to a second aspect of the embodiments of the present invention, there is provided a configuration information updating apparatus, including: the calibration module is used for calibrating the machine clocks of the nodes by adopting the clock calibration script; the generating module is used for generating new configuration information according to the rule content; a sending module, configured to send a notification message to the multiple nodes, where the notification message is used to instruct the multiple nodes to acquire the new configuration information; the new configuration information includes configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace original configuration information when the machine clock reaches preset time.
Preferably, the apparatus further comprises: the judging module is used for judging whether the rule content has a historical configuration record or not; the generation module comprises: the first generation submodule is used for generating configuration information according to the rule content when the rule content does not have a historical configuration record; setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length; the second generation submodule is used for generating configuration information according to the rule content when the rule content has a historical configuration record; according to the historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated; and setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information.
Preferably, the apparatus further comprises: a counting module, configured to select N nodes from the multiple nodes, and for each node of the N nodes, count a duration required from generation of the new configuration information to acquisition of the new configuration information by the node, to obtain N duration values, where N is an integer greater than or equal to 2; a first calculating module, configured to calculate an average value T0 of the N duration values; a second calculating module, configured to calculate an optimal configuration validation time T of the new configuration information by using a formula T ═ Ts + T0 ×, where Ts is a generation time of the new configuration information, X is a time coefficient, and X is greater than or equal to 2.5 and less than or equal to 3.5; the third calculation module is used for calculating the difference value between the configuration effective time and the optimal configuration effective time; and the replacing module is used for replacing the configuration effective time with the optimal configuration effective time when the difference value is larger than or equal to a preset threshold value.
Preferably, the calibration module comprises: an obtaining submodule, configured to obtain physical addresses of the plurality of nodes; the storage submodule is used for storing the physical address into a memory list of the main node; a networking submodule for connecting a network for each node in the memory list; and the setting submodule is used for enabling the time of the machine clock of the node to be consistent with the network time through a preset Linux command.
According to a third aspect of the embodiments of the present invention, there is provided a configuration information updating apparatus including: a processor; a memory for storing the processor-executable instructions; the processor is configured to perform the configuration information updating method provided by the first aspect.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects: calibrating machine clocks of a plurality of nodes by using a clock calibration script, generating new configuration information according to rule contents, and sending notification messages to the plurality of nodes, wherein the notification messages are used for indicating the plurality of nodes to acquire the new configuration information, the new configuration information comprises configuration effective time, and the configuration effective time is used for indicating the plurality of nodes to replace original configuration information by using the new configuration information when the machine clocks reach preset time; after the nodes in the cluster obtain the new configuration information, the new configuration information of all the nodes takes effect at the same time, so that the occurrence of an intermediate state is avoided, the consistency of the states of all the nodes during the updating of the configuration information is ensured, and meanwhile, the reliability during the updating of the configuration information is also ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart illustrating a configuration information updating method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a configuration information updating method according to an example embodiment.
Fig. 3 is a flow chart illustrating a configuration information updating method according to an example embodiment.
Fig. 4 is a flowchart illustrating a configuration information updating method according to an example embodiment.
Fig. 5 is a flowchart illustrating a configuration information updating method according to an example embodiment.
Fig. 6 is a block diagram illustrating a configuration information updating apparatus according to an example embodiment.
Fig. 7 is a block diagram illustrating a configuration information updating apparatus according to an example embodiment.
Fig. 8 is a block diagram illustrating a configuration information updating apparatus according to an example embodiment.
Fig. 9 is a block diagram illustrating a configuration information updating apparatus according to an example embodiment.
Fig. 10 is a block diagram illustrating a configuration information updating apparatus according to an example embodiment.
FIG. 11 is a block diagram illustrating a configuration information update apparatus according to an example embodiment
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The configuration information updating method can be applied to a configuration center in a distributed system cluster, wherein the distributed system cluster comprises at least one configuration center, at least one management node and two or more than two nodes connected with the management node.
Fig. 1 is a flowchart illustrating a configuration information updating method according to an exemplary embodiment, where, as shown in fig. 1, the configuration information updating method includes the following steps 100 and 104:
in step 100, a clock calibration script is used to calibrate the machine clocks of a plurality of nodes.
Here, the configuration center may calibrate its own machine clock first, and then calibrate the machine clock for all nodes under the management node by using the clock calibration script. For example, to ensure time accuracy, the machine clock of a node may be calibrated to the millisecond level. Compared with the common calibration method, the method has the advantages that the clock calibration script is adopted to calibrate the machine clocks of all the nodes in the distributed system cluster, so that the calibration efficiency and the calibration precision can be improved, and the updating efficiency of the configuration information can be improved.
Here, after the calibration of the machine clock is finished, all nodes send registration information to the configuration center to establish connection with the configuration center respectively, and the registration information may include a physical address, a port address, service information, and the like of the node.
In step 102, new configuration information is generated according to rule content, where the new configuration information includes configuration effective time, and the configuration effective time is used to indicate that the plurality of nodes replace original configuration information with the new configuration information when the machine clock reaches a preset time.
Here, since rule contents often need to be added or modified, when new rule contents need to be added or existing rule contents need to be partially modified, new configuration information needs to be generated for the addition or modification of the rule contents. Here, the configuration validation time is a time that can guarantee that all nodes acquire the new configuration information, and for example, the configuration validation time may be a specific time point, and may be, for example, "11 hours, 23 minutes, 50 seconds, 23 milliseconds", that is, when the time of the machine clock of the node reaches 11 hours, 23 minutes, 50 seconds, 23 milliseconds, the original configuration information is replaced with the new configuration information.
In step 104, a notification message is sent to the plurality of nodes, where the notification message is used to instruct the plurality of nodes to acquire the new configuration information.
For example, when the configuration center generates the configuration information with the configuration validation time, the notification information is sent to the node, and the node receives the notification information and then pulls the generated new configuration information from the configuration center.
In this embodiment, a clock calibration script is used to calibrate machine clocks of multiple nodes, new configuration information is generated according to rule contents, and a notification message is sent to the multiple nodes, where the notification message is used to instruct the multiple nodes to acquire the new configuration information, the new configuration information includes configuration effective time, and the configuration effective time is used to instruct the multiple nodes to replace original configuration information with the new configuration information when the machine clocks reach preset time; the new configuration information of all the nodes can take effect at the same time after all the nodes obtain the new configuration information, so that the occurrence of an intermediate state is avoided, the consistency of the states of all the nodes during the updating of the configuration information is ensured, and meanwhile, the reliability during the updating of the configuration information is also ensured.
Fig. 2 is a flowchart illustrating a configuration information updating method according to an exemplary embodiment, as shown in fig. 2, in the configuration information updating method, before step 102, step 101 is further included, and step 102 may be executed as steps 1021 and 1022 and steps 1023 and 1025:
in step 101, it is determined whether the rule content has a historical configuration record.
Here, the historical configuration record refers to a record that the configuration center generates the historical configuration information according to the content of the historical rule and updates the generated historical configuration information to each node before the configuration information is updated, and specifically includes a time point when the configuration information starts to be generated and a time point when the configuration information is successfully generated, a time point when each node successfully pulls the historical configuration information from the configuration center, and the like. Here, the historical rule content refers to a rule content that can obtain the current rule content through modification of partial content, for example, when the configuration center has generated first configuration information according to the first rule content and has successfully updated the first configuration information to each node, and after that, when a certain parameter in the first rule content is changed, the configuration center takes the first rule content with the changed certain parameter as the current rule content, the first rule content is the historical rule content, and the first configuration information is the historical configuration information. Before generating new configuration information according to the current rule content, the configuration center needs to judge whether a historical configuration record of the first rule content exists, so that the historical configuration record of the first rule content is used as a data reference.
In step 1021, when there is no historical configuration record in the rule content, generating configuration information according to the rule content;
in step 1022, a first configuration validation time is set for the configuration information, where the first configuration validation time is a time generated by a sum of a generation time of the configuration information and a preset time duration.
Here, for the newly added rule content, since there is no historical configuration record, the configuration validation time may be directly set as the time generated by the sum of the generation time of the configuration information and the preset time duration, for example, according to the service statistics, the first preset time may be set to 500 milliseconds; thus, when the generation time of the configuration information is "11 hours 23 minutes 50 seconds 23 milliseconds", the first configuration validation time is "11 hours 23 minutes 50 seconds 523 milliseconds"
In step 1023, configuration information is generated according to the rule content when the rule content has a history configuration record.
In step 1024, according to the historical configuration record, the time required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated.
Here, when there is a corresponding historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes of this time may be estimated according to the generation time of the historical configuration information recorded by the historical configuration record and the time points at which the respective nodes respectively acquire the historical configuration information
In step 1025, a second configuration validation time is set for the configuration information, where the second configuration validation time is a time generated by a sum of a generation time and an estimated duration of the configuration information.
For example, when the generation time of the configuration information is "11 hours, 23 minutes, 50 seconds, 23 milliseconds", and the estimated time length is 300 milliseconds, the second configuration validation time is "11 hours, 23 minutes, 50 seconds, 323 milliseconds". For example, a buffer duration, for example, 10 ms, may be set, and the generation time of the configuration information, the estimated duration, and the buffer duration, and the sum of these three times, may be used as the second configuration validation time.
In this embodiment, when a corresponding historical configuration record exists in the rule content, according to the historical configuration record, a time required from generation of the configuration information to acquisition of the configuration information by the plurality of nodes is estimated, and a second configuration validation time is set for the generated configuration information, where the second configuration validation time is a time generated by a sum of a generation time of the configuration information and the estimated time, and the set configuration validation time can be more accurate, so that consistency of node states in a cluster and reliability of node data are further ensured.
Fig. 3 is a flowchart illustrating a configuration information updating method according to an exemplary embodiment, where as shown in fig. 3, the configuration information updating method further includes steps 106 and 114:
in step 106, N nodes are selected from the plurality of nodes, and for each node of the N nodes, a time required from the generation of the new configuration information to the acquisition of the new configuration information by the node is counted to obtain N time values, where N is an integer greater than or equal to 2.
Here, in the process of updating the configuration information, the configuration center records the generation time of the new configuration information, and respectively records the time point of receiving the new configuration information pull success message fed back by each node. Here, when the configuration center records that N nodes feed back a message that new configuration information is successfully pulled, according to the recorded generation time of the new configuration information and each time point when the N nodes successfully pull the new configuration information, the time duration required from the generation of the new configuration information to each node to acquire the new configuration information is respectively calculated, and N time duration values are obtained. Illustratively, N is a minimum of one-third the number of nodes in the distributed system cluster.
In step 108, the average value T of the N duration values is calculated 0
Here, a minimum duration and a maximum duration may be removed and then an average value may be calculated to ensure the accuracy of the data.
In step 110, the formula T ═ T is adopted s+T 0X, calculating the effective time T, T of the optimal configuration of the new configuration information sAnd the time is the generation time of the new configuration information, X is a time coefficient, and X is more than or equal to 2.5 and less than or equal to 3.5.
Here, the time coefficient X is obtained from traffic statistics, and both timeliness and stability can be achieved. Compared with the estimation according to the historical configuration record, the estimation is performed according to the time length required by the partial nodes to acquire the configuration information, and the more accurate configuration effective time can be acquired. For example, when the configuration information is generated at time T sIs "11 hours, 23 minutes, 50 seconds, 23 milliseconds", and the average value T 0200 ms, X is 3, and the second configuration effective time is "11 hours, 23 minutes, 50 seconds, 623 ms".
In step 112, the difference between the configuration effective time and the optimal configuration effective time is calculated.
In step 114, when the difference is greater than or equal to a preset threshold, replacing the configuration effective time with the optimal configuration effective time.
Here, if the optimal configuration time is very close to the configuration effective time preset previously, it indicates that the preset configuration effective time is very accurate and does not need to be corrected by using the optimal configuration effective time. For example, the preset threshold may be 5 milliseconds.
In this embodiment, the accuracy of the configuration effective time and the timeliness of the effective of the new configuration information can be ensured by calculating the optimal configuration effective time and correcting the preset configuration effective time by using the optimal configuration effective time.
Fig. 4 is a flowchart illustrating a configuration information updating method according to an exemplary embodiment, and as shown in fig. 4, the step 100 in the configuration information updating method further includes steps 201 and 204:
in step 201, physical addresses of the plurality of nodes are obtained.
In step 202, the physical address is saved in a memory list of the management node.
In step 203, for each node in the in-memory list, a network is connected to the node.
In step 204, the time of the machine clock of the node is made to be consistent with the network time through a preset Linux command.
Here, the clock calibration script may be stored in a user directory of the management node, all nodes under the management node are scanned by the clock calibration script, a physical address of each node is obtained, the obtained physical address of the node is stored in a memory list of the management node, a mechanical clock is calibrated for each node in the memory list, and a calibration result is returned after the calibration is completed, so as to generate subsequent new configuration information. For example, the clock calibration script may be used to perform multiple calibrations to ensure that all nodes are successfully calibrated.
FIG. 5 is a flow diagram illustrating a method for updating configuration information, such as
As shown in fig. 5, the step 204 of the configuration information updating method further includes steps 301-304:
in step 301, the historical configuration records are divided into Y times and M nodes are obtained each time.
In step 302, for each node in the M nodes, according to the historical configuration record, calculating a time length required from generation of historical configuration information to acquisition of the historical configuration information by the node, and obtaining M time length values, where Y and M are integers greater than or equal to 2.
In step 303, for each of the M duration values obtained, the maximum duration value is selected.
In step 304, an average value of the selected Y maximum duration values is calculated, and the average value is used as an estimated duration value required from the generation of the configuration information to the acquisition of the configuration information by the node.
Fig. 6 is a block diagram illustrating a web address converting apparatus, which may be implemented as part or all of an electronic device through software, hardware, or a combination of both, according to an example embodiment. As shown in fig. 6, the configuration information updating apparatus includes:
the calibration module 601 is configured to calibrate machine clocks of multiple nodes by using a clock calibration script; a generating module 602, configured to generate new configuration information according to rule content, where the new configuration information includes configuration effective time, and the configuration effective time is used to indicate that the plurality of nodes replace original configuration information with the new configuration information when the machine clock reaches preset time; a sending module 603, configured to send a notification message to the multiple nodes, where the notification message is used to instruct the multiple nodes to acquire the new configuration information.
Fig. 7 is a block diagram illustrating, as one possible embodiment, a web site converting apparatus according to an exemplary embodiment. As shown in fig. 7, the configuration information updating apparatus may be further configured to include a determining module 604, and the generating module 602 is further configured to include a first generating sub-module 6021 and a first generating sub-module 6022, wherein:
the judging module 604 is configured to judge whether the rule content has a historical configuration record; a first generation submodule 6021, configured to generate configuration information according to the rule content when there is no historical configuration record in the rule content; setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length; a second generation submodule 6022, configured to generate configuration information according to the rule content when the rule content has a historical configuration record; according to the historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated; and setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information.
As one possible embodiment, fig. 8 is a block diagram illustrating a configuration information updating apparatus according to an exemplary embodiment. As shown in fig. 8, the configuration information updating apparatus may be further configured to include: a statistics module 605, a first calculation module 606, a second calculation module 607, a third calculation module 608 and a replacement module 609, wherein:
a counting module 605, configured to select N nodes from the multiple nodes, and for each node of the N nodes, count a duration required from the generation of the new configuration information to the acquisition of the new configuration information by the node, to obtain N duration values, where N is an integer greater than or equal to 2; a first calculating module 606, configured to calculate an average value T0 of the N duration values; a second calculating module 607, configured to calculate an optimal configuration validation time T of the new configuration information by using a formula T ═ Ts + T0 × X, where Ts is a generation time of the new configuration information, X is a time coefficient, and X is greater than or equal to 2.5 and less than or equal to 3.5; a third calculating module 608, configured to calculate a difference between the configuration effective time and the optimal configuration effective time; a replacing module 609, configured to replace the configuration effective time with the optimal configuration effective time when the difference is greater than or equal to a preset threshold.
As one possible embodiment, fig. 9 is a block diagram illustrating a configuration information updating apparatus according to an exemplary embodiment. As shown in fig. 9, the calibration module 601 may be further configured to include: an acquisition submodule 6011, a storage submodule 6012, a networking submodule 6013, and a setting submodule 6014, where:
an obtaining submodule 6011 configured to obtain physical addresses of the plurality of nodes; a storage submodule 6012, configured to store the physical address in a memory list of the master node; a networking submodule 6013, configured to connect a network to each node in the memory list for the node; setting a submodule 6014, configured to enable time of a machine clock of the node to be consistent with network time through a preset Linux command.
As one possible embodiment, fig. 10 is a block diagram illustrating a configuration information updating apparatus according to an exemplary embodiment. As shown in fig. 10, the second generation submodule 6022 may be further configured to include: a first calculating subunit 6122, a second selecting subunit 6222 and a second calculating subunit 6322, wherein:
a first calculating subunit 6122, configured to calculate, according to the historical configuration record, a time length required from generation of historical configuration information to acquisition of the historical configuration information by the node for each node of the M nodes, to obtain M time length values, where Y and M are both integers greater than or equal to 2; a second selecting subunit 6222, configured to select the maximum duration value among the M duration values obtained each time; a second calculating subunit 6322, configured to calculate an average value of the Y maximum duration values, and use the average value as an estimated duration value required from the generation of the configuration information to the acquisition of the configuration information by the node.
With regard to the apparatus in the above-described embodiment, the specific manner in which the plurality of modules perform operations has been described in detail in the embodiment related to the method, and will not be elaborated upon here.
The following are examples of apparatus provided by the present invention that may be used to perform the above-described method embodiments of the present invention.
Fig. 11 is a block diagram illustrating a configuration information updating apparatus, which is applicable to a terminal device, according to an exemplary embodiment. For example, the apparatus 1100 may be a computer device.
The apparatus 1100 may include one or more of the following components: processing component 1102, memory 1104, power component 1106, multimedia component 1108, audio component 1110, input/output (I/O) interface 1112, sensor component 1114, and communications component 1116.
The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1102 may include one or more processors 1120 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1102 may include one or more modules that facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
The memory 1104 is configured to store various types of data to support operations at the apparatus 1100. Examples of such data include instructions for any application or method operating on device 1100, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1104 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power component 1106 provides power to the various components of the device 1100. The power components 1106 may include a power management device, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1100.
The multimedia component 1108 includes a screen that provides an output interface between the device 1100 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1100 is in an operating mode, such as a shooting mode or a video mode. Each of the front camera and the rear camera may be a fixed optical lens arrangement or have a focal length and optical zoom capability.
The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 1100 is in operating modes, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio assembly 1110 further includes a speaker for outputting audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1114 includes one or more sensors for providing various aspects of state assessment for the apparatus 1100. For example, the sensor assembly 1114 may detect an open/closed state of the apparatus 1100, the relative positioning of components, such as a display and keypad of the apparatus 1100, the sensor assembly 1114 may also detect a change in position of the apparatus 1100 or a component of the apparatus 1100, the presence or absence of user contact with the apparatus 1100, orientation or acceleration/deceleration of the apparatus 1100, and a change in temperature of the apparatus 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate wired or wireless communication between the apparatus 1100 and other devices. The apparatus 1100 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives broadcast signals or broadcast related information from an external broadcast management device via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 1104 comprising instructions, executable by the processor 1120 of the apparatus 1100 to perform the method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present embodiment provides a computer readable storage medium, the instructions in which when executed by the processor of the apparatus 1100 implement the steps of: calibrating machine clocks of a plurality of nodes by adopting a clock calibration script; generating new configuration information according to the rule content; sending a notification message to the plurality of nodes, wherein the notification message is used for instructing the plurality of nodes to acquire the new configuration information; the new configuration information includes configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace original configuration information when the machine clock reaches preset time.
The instructions in the storage medium when executed by the processor may further implement the steps of: judging whether the rule content has a historical configuration record or not; when the rule content does not have a historical configuration record, setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length; when the rule content has a historical configuration record, according to the historical configuration record, estimating the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes; and setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information.
The instructions in the storage medium when executed by the processor may further implement the steps of: selecting N nodes from the plurality of nodes, and counting the time length required from the generation of the new configuration information to the acquisition of the new configuration information by the node for each node of the N nodes to obtain N time length values, wherein N is an integer greater than or equal to 2; calculating an average value T0 of the N time length values; calculating the optimal configuration effective time T of the new configuration information by adopting a formula T ═ Ts + T0X, wherein Ts is the generation time of the new configuration information, X is a time coefficient, and X is more than or equal to 2.5 and less than or equal to 3.5; calculating the difference value between the configuration effective time and the optimal configuration effective time; and when the difference value is larger than or equal to a preset threshold value, replacing the configuration effective time with the optimal configuration effective time.
The instructions in the storage medium when executed by the processor may further implement the steps of: dividing Y times from the historical configuration record and acquiring M nodes each time; for each node in the M nodes, calculating the time length required from generation of historical configuration information to acquisition of the historical configuration information by the node according to the historical configuration record, and acquiring M time length values, wherein Y and M are integers greater than or equal to 2; selecting the maximum time length value of the M time length values obtained each time; and calculating the average value of the selected Y maximum time length values, and taking the average value as the estimated time length value required by the node for acquiring the configuration information from the configuration information generation.
The instructions in the storage medium when executed by the processor may further implement the steps of: acquiring physical addresses of the plurality of nodes; storing the physical address into a memory list of a management node; for each node in the memory list, connecting a network for the node; and enabling the time of the machine clock of the node to be consistent with the network time through a preset Linux command.
The present embodiment further provides a device for updating configuration information, including: a processor; a memory for storing processor-executable instructions; the processor is configured to: calibrating machine clocks of a plurality of nodes by adopting a clock calibration script; generating new configuration information according to the rule content; sending a notification message to the plurality of nodes, wherein the notification message is used for instructing the plurality of nodes to acquire the new configuration information; the new configuration information includes configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace original configuration information when the machine clock reaches preset time. .
In one embodiment, the processor may be further configured to: judging whether the rule content has a historical configuration record or not; when the rule content does not have a historical configuration record, generating configuration information according to the rule content; setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length; generating configuration information according to the rule content when the rule content has a historical configuration record; according to the historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated; and setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information.
In one embodiment, the processor may be further configured to: selecting N nodes from the plurality of nodes, and counting the time length required from the generation of the new configuration information to the acquisition of the new configuration information by the node for each node of the N nodes to obtain N time length values, wherein N is an integer greater than or equal to 2; calculating an average value T0 of the N time length values; calculating the optimal configuration effective time T of the new configuration information by adopting a formula T ═ Ts + T0X, wherein Ts is the generation time of the new configuration information, X is a time coefficient, and X is more than or equal to 2.5 and less than or equal to 3.5; calculating the difference value between the configuration effective time and the optimal configuration effective time; and when the difference value is larger than or equal to a preset threshold value, replacing the configuration effective time with the optimal configuration effective time.
In one embodiment, the processor may be further configured to: dividing Y times from the historical configuration record and acquiring M nodes each time; for each node in the M nodes, calculating the time length required from generation of historical configuration information to acquisition of the historical configuration information by the node according to the historical configuration record, and acquiring M time length values, wherein Y and M are integers greater than or equal to 2; selecting the maximum time length value of the M time length values obtained each time; and calculating the average value of the selected Y maximum time length values, and taking the average value as the estimated time length value required by the node for acquiring the configuration information from the configuration information generation.
In one embodiment, the processor may be further configured to: acquiring physical addresses of the plurality of nodes; storing the physical address into a memory list of a management node; for each node in the memory list, connecting a network for the node; and enabling the time of the machine clock of the node to be consistent with the network time through a preset Linux command.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for updating configuration information, comprising:
calibrating machine clocks of a plurality of nodes by adopting a clock calibration script;
generating new configuration information according to the rule content;
sending a notification message to the plurality of nodes, wherein the notification message is used for instructing the plurality of nodes to acquire the new configuration information;
the new configuration information includes configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace original configuration information when the machine clock reaches preset time.
2. The configuration information updating method according to claim 1, further comprising:
judging whether the rule content has a historical configuration record or not;
when the rule content does not have a historical configuration record, the generating new configuration information according to the rule content includes:
generating configuration information according to the rule content;
setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length;
when the rule content has a historical configuration record, the generating new configuration information according to the rule content includes:
generating configuration information according to the rule content;
according to the historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated;
and setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information.
3. The configuration information updating method according to claim 1, further comprising:
selecting N nodes from the plurality of nodes, and counting the time length required from the generation of the new configuration information to the acquisition of the new configuration information by the node for each node of the N nodes to obtain N time length values, wherein N is an integer greater than or equal to 2;
calculating the average value T of the N time length values 0
Adopting the formula T ═ T s+T 0X, calculating the effective time T, T of the optimal configuration of the new configuration information sThe time for generating the new configuration information is X which is a time coefficient and is more than or equal to 2.5 and less than or equal to 3.5;
calculating the difference value between the configuration effective time and the optimal configuration effective time;
and when the difference value is larger than or equal to a preset threshold value, replacing the configuration effective time with the optimal configuration effective time.
4. The method for updating configuration information according to claim 2, wherein the estimating of the time period required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes comprises:
dividing Y times from the historical configuration record and acquiring M nodes each time;
for each node in the M nodes, calculating the time length required from generation of historical configuration information to acquisition of the historical configuration information by the node according to the historical configuration record, and acquiring M time length values, wherein Y and M are integers greater than or equal to 2;
selecting the maximum time length value of the M time length values obtained each time;
and calculating the average value of the selected Y maximum time length values, and taking the average value as the estimated time length value required by the node for acquiring the configuration information from the configuration information generation.
5. The configuration information updating method according to any one of claims 1 to 4, wherein the calibrating the machine clocks of the plurality of nodes using the clock calibration script comprises:
acquiring physical addresses of the plurality of nodes;
storing the physical address into a memory list of a management node;
for each node in the memory list, connecting a network for the node;
and enabling the time of the machine clock of the node to be consistent with the network time through a preset Linux command.
6. A configuration information updating apparatus, comprising:
the calibration module is used for calibrating the machine clocks of the nodes by adopting the clock calibration script;
the generating module is used for generating new configuration information according to the rule content;
a sending module, configured to send a notification message to the multiple nodes, where the notification message is used to instruct the multiple nodes to acquire the new configuration information;
the new configuration information includes configuration effective time, and the configuration effective time is used for indicating that the plurality of nodes adopt the new configuration information to replace original configuration information when the machine clock reaches preset time.
7. The configuration information updating apparatus according to claim 6, further comprising:
the judging module is used for judging whether the rule content has a historical configuration record or not;
the generation module comprises: the first generation submodule is used for generating configuration information according to the rule content when the rule content does not have a historical configuration record; setting a first configuration effective time for the configuration information, wherein the first configuration effective time is the time generated by the sum of the generation time of the configuration information and a preset time length;
the second generation submodule is used for generating configuration information according to the rule content when the rule content has a historical configuration record; according to the historical configuration record, the time length required from the generation of the configuration information to the acquisition of the configuration information by the plurality of nodes is estimated; and setting a second configuration effective time for the configuration information, wherein the second configuration effective time is the time generated by the sum of the generation time and the estimated duration of the configuration information.
8. The configuration information updating apparatus according to claim 6, further comprising:
a counting module, configured to select N nodes from the multiple nodes, and for each node of the N nodes, count a duration required from generation of the new configuration information to acquisition of the new configuration information by the node, to obtain N duration values, where N is an integer greater than or equal to 2;
a first calculating module for calculating the average value T of the N time length values 0
A second calculation module for using the formula T ═ T s+T 0Calculating the optimal configuration effective time T of the new configuration information, wherein Ts is the generation time of the new configuration information, X is a time coefficient, and X is more than or equal to 2.5 and less than or equal to 3.5;
the third calculation module is used for calculating the difference value between the configuration effective time and the optimal configuration effective time;
and the replacing module is used for replacing the configuration effective time with the optimal configuration effective time when the difference value is larger than or equal to a preset threshold value.
9. The configuration information updating apparatus according to any one of claims 6 to 8, wherein the calibration module comprises:
an obtaining submodule, configured to obtain physical addresses of the plurality of nodes;
the storage submodule is used for storing the physical address into a memory list of the management node;
a networking submodule for connecting a network for each node in the memory list;
and the setting submodule is used for enabling the time of the machine clock of the node to be consistent with the network time through a preset Linux command.
10. A configuration information updating apparatus, comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to perform the configuration information updating method of any of the above claims 1-5.
CN201910955686.2A 2019-10-09 2019-10-09 Configuration information updating method and device Active CN110784340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910955686.2A CN110784340B (en) 2019-10-09 2019-10-09 Configuration information updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910955686.2A CN110784340B (en) 2019-10-09 2019-10-09 Configuration information updating method and device

Publications (2)

Publication Number Publication Date
CN110784340A true CN110784340A (en) 2020-02-11
CN110784340B CN110784340B (en) 2022-07-12

Family

ID=69385611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910955686.2A Active CN110784340B (en) 2019-10-09 2019-10-09 Configuration information updating method and device

Country Status (1)

Country Link
CN (1) CN110784340B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254730A (en) * 2021-04-23 2021-08-13 北京车智赢科技有限公司 Data searching method, computing device and readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118422A (en) * 2010-01-05 2011-07-06 中兴通讯股份有限公司 Peer node of RELOAD peer network as well as method and system for updating configuration of peer node
CN104902017A (en) * 2015-05-20 2015-09-09 四川敬天爱人科技有限公司 Remote interaction method of multi-screen synchronous display supporting QoS
CN105450384A (en) * 2015-12-10 2016-03-30 中国能源建设集团广东省电力设计研究院有限公司 Synchronous clock time synchronization apparatus for communication module
US20190215231A1 (en) * 2016-06-23 2019-07-11 Nec Corporation Log information generation apparatus, information processing system, log information generation method, and non-transitory recording medium storing a log information generation program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118422A (en) * 2010-01-05 2011-07-06 中兴通讯股份有限公司 Peer node of RELOAD peer network as well as method and system for updating configuration of peer node
CN104902017A (en) * 2015-05-20 2015-09-09 四川敬天爱人科技有限公司 Remote interaction method of multi-screen synchronous display supporting QoS
CN105450384A (en) * 2015-12-10 2016-03-30 中国能源建设集团广东省电力设计研究院有限公司 Synchronous clock time synchronization apparatus for communication module
US20190215231A1 (en) * 2016-06-23 2019-07-11 Nec Corporation Log information generation apparatus, information processing system, log information generation method, and non-transitory recording medium storing a log information generation program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254730A (en) * 2021-04-23 2021-08-13 北京车智赢科技有限公司 Data searching method, computing device and readable medium
CN113254730B (en) * 2021-04-23 2024-03-15 北京车智赢科技有限公司 Data searching method, computing device and readable medium

Also Published As

Publication number Publication date
CN110784340B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN108401526B (en) Information configuration method and device, time-frequency position determination method and device and base station
CN109565451B (en) Method and device for using network slice
US11457437B2 (en) Method and apparatus for configuring information, base station and user equipment
CN109451867B (en) Random access time configuration method and device, and random access method and device
CN109388625B (en) Method and device for processing configuration file in multi-distributed file system
CN107635074B (en) Method, apparatus and computer-readable storage medium for controlling alarm
CN107666660B (en) Interphone configuration method and device
CN110784340B (en) Configuration information updating method and device
CN109565650B (en) Method and device for broadcasting and receiving configuration information of synchronous signal block
EP3982249B1 (en) Delay adjustment method and device, electronic device and storage medium
CN114721710A (en) Version control method, version control device and storage medium
US11375403B2 (en) Method and apparatus for detecting maximum transmission unit value
CN114402666B (en) Processing capability request, processing capability sending and processing capability receiving methods and devices
CN107168731B (en) System update control method and device
CN106161808B (en) Method and device for updating information of telephone number, terminal equipment and server
CN114430370B (en) Method, device, equipment and storage medium for determining network slice
CN115002007A (en) Network delay judging method and device, electronic equipment and storage medium
CN110677470B (en) Service information pushing method and device and computer readable storage medium
CN109246322B (en) Information processing method and system
CN109948012B (en) Serial number generation method and device and storage medium
US20220322071A1 (en) Method and device for determining support information
CN111064669A (en) Route storage method, device, equipment and storage medium
CN111836356A (en) Method, device, storage medium and mobile terminal for requesting data
CN115412533B (en) Terminal device, control method and device thereof, and storage medium
CN115361352B (en) Message updating method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant