CN108566293B - Electronic device, zk node information notification method, and storage medium - Google Patents

Electronic device, zk node information notification method, and storage medium Download PDF

Info

Publication number
CN108566293B
CN108566293B CN201810183492.0A CN201810183492A CN108566293B CN 108566293 B CN108566293 B CN 108566293B CN 201810183492 A CN201810183492 A CN 201810183492A CN 108566293 B CN108566293 B CN 108566293B
Authority
CN
China
Prior art keywords
node information
node
information
determined
instance
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
CN201810183492.0A
Other languages
Chinese (zh)
Other versions
CN108566293A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810183492.0A priority Critical patent/CN108566293B/en
Priority to PCT/CN2018/089450 priority patent/WO2019169762A1/en
Publication of CN108566293A publication Critical patent/CN108566293A/en
Application granted granted Critical
Publication of CN108566293B publication Critical patent/CN108566293B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • 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/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Abstract

The invention discloses an electronic device, a zk node information notification method and a storage medium, which monitor the node information stored in each subdirectory node in a predetermined zk in real time or at regular time; if the first node information is monitored to be changed, determining the change type of the first node information correspondingly; determining a node analysis rule for analyzing the first node information according to a mapping relation between a predetermined change type and the node analysis rule; analyzing the first node information according to the determined node analysis rule to generate second node information; and sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk. The method and the device realize that zk actively sends the changed node information to other platforms, remove long connection between other management platforms and zk, save a large amount of resources and improve the notification efficiency of node change.

Description

Electronic device, zk node information notification method, and storage medium
Technical Field
The present invention relates to the field of data interaction services, and in particular, to an electronic device, a zk node information notification method, and a storage medium.
Background
With the development of internet communication technology, enterprises generally work in a cluster mode to improve service efficiency and performance, and manage clusters by means of zookeeper (abbreviated as "zk"). zk is a distributed, open source distributed application coordination service system, which is the manager of the cluster. If the enterprise needs to share the node change data monitored by zk to other management platforms, such as a service administration management platform (ESG-ADMIN), long connections between the other management platforms and the subdirectory nodes corresponding to the file systems of zk need to be established, and the changed node information is obtained by continuously sending requests for obtaining the node information change to the subdirectory nodes of zk. Because an enterprise usually has a huge number of service systems, and each service system includes a plurality of service nodes, a large number of sub-directory nodes need to be correspondingly established in zk, and because the time for all the sub-directory nodes to change is not fixed, a large amount of resources are wasted by establishing a long connection, and the notification efficiency of node change is low.
Disclosure of Invention
In view of the above, the present invention provides an electronic device, an internet service system risk early warning method and a storage medium, which can accurately and effectively control the operation risk of the internet service system.
To achieve the above object, the present invention provides an electronic device, which includes a memory and a processor connected to the memory, wherein the processor is configured to execute a zk node information notification program stored in the memory, and when the zk node information notification program is executed by the processor, the electronic device implements the following steps:
an analysis step, wherein if the first node information is monitored to change, a change type corresponding to the first node information is determined, and the change type comprises node creation, node deletion and node data updating;
a node analysis rule determining step of determining a node analysis rule for analyzing the first node information according to a mapping relationship between a predetermined change type and the node analysis rule;
a node information generating step of analyzing the first node information according to a determined node analysis rule to generate second node information;
and a sending step, sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk.
Further, the node analysis rule determining step includes:
if the change type corresponding to the first node information is determined to be node creation, determining whether the created first node information is complete node information according to a corresponding node information processing rule;
if the created first node information is complete node information, acquiring example data node information from the first node information to generate second node information; wherein the complete node information comprises instance data node information.
Further, the node analysis rule determining step includes:
if the change type corresponding to the first node information is determined to be node deletion, the corresponding node information processing rule is that whether the deleted first node information is an instance node is determined;
and if the deleted first node information is the instance node, obtaining the instance data node information in the deleted first node information, and generating second node information.
Further, the node analysis rule determining step includes:
if the change type corresponding to the first node information is determined to be node updating, determining whether the updating of the first node information is based on a predetermined updating protocol to update the node information according to a corresponding node information processing rule;
if the node information is determined to be updated based on a predetermined update protocol, acquiring first time for updating the first node information;
acquiring all third node information generated after the first time from a predetermined database;
and traversing the third node information to inquire complete instance node information, acquiring instance data node information from the inquired complete instance node information, and generating second node information.
Further, if it is determined that the first node information is not node information updated based on a predetermined update protocol, determining whether the first node information is an instance node, and determining whether the first node information is complete node information;
and after the first node information is determined to be the example node and the complete node information, obtaining example data node information from the first node information to generate second node information.
In addition, in order to achieve the above object, the present invention further provides a zk node information notification method, including the following steps:
an analysis step, wherein if the first node information is monitored to change, a change type corresponding to the first node information is determined, and the change type comprises node creation, node deletion and node data updating;
a node analysis rule determining step of determining a node analysis rule for analyzing the first node information according to a mapping relationship between a predetermined change type and the node analysis rule;
a node information generating step of analyzing the first node information according to a determined node analysis rule to generate second node information;
and a sending step, sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk.
Further, the node analysis rule determining step includes:
if the change type corresponding to the first node information is determined to be node creation, the corresponding node information processing rule is to determine whether the created first node information is complete node information;
if the created first node information is complete node information, acquiring example data node information from the first node information to generate second node information; wherein the complete node information comprises instance data node information.
Further, the node analysis rule determining step includes:
if the change type corresponding to the first node information is determined to be node deletion, the corresponding node information processing rule is that whether the deleted first node information is an instance node is determined;
and if the deleted first node information is the instance node, obtaining the instance data node information in the deleted first node information, and generating second node information.
Further, if it is determined that the first node information is not node information updated based on a predetermined update protocol, determining whether the first node information is an instance node, and determining whether the first node information is complete node information;
and after the first node information is determined to be the example node and the complete node information, obtaining example data node information from the first node information to generate second node information.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing a zk node information notification program executable by at least one processor to cause the at least one processor to perform the steps of the zk node information notification method as described above.
Compared with the prior art, the electronic device, the zk node information notification method and the storage medium provided by the invention monitor the node information stored in each subdirectory node in the predetermined zk in real time or at regular time; if the first node information is monitored to be changed, determining the change type of the first node information correspondingly; determining a node analysis rule for analyzing the first node information according to a mapping relation between a predetermined change type and the node analysis rule; analyzing the first node information according to the determined node analysis rule to generate second node information; and sending an instruction for executing and sending second node information to a predetermined management platform to a leader in the zk. The method and the device realize that zk actively sends the changed node information to other platforms, remove long connection between other management platforms and zk, save a large amount of resources and improve the notification efficiency of node change.
Drawings
FIG. 1 is a diagram of an alternative hardware architecture of an electronic device according to the present invention;
FIG. 2 is a schematic diagram of program modules of a zk node information notification procedure in an embodiment of an electronic apparatus according to the invention;
fig. 3 is a flowchart of a zk node information notification method according to a preferred embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an alternative hardware architecture of the electronic device according to the present invention. In this embodiment, the electronic device 10 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which may be communicatively connected to each other through a communication bus 14. It is noted that fig. 1 only shows the electronic device 10 with components 11-14, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 11 includes at least one type of computer-readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 11 may be an internal storage unit of the electronic device 10, such as a hard disk or a memory of the electronic device 10. In other embodiments, the memory 11 may also be an external storage device of the electronic apparatus 10, 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, provided on the electronic apparatus 10. Of course, the memory 11 may also include both internal and external storage devices of the electronic apparatus 10. In this embodiment, the memory 11 is generally used for storing an operating system and various types of application software installed in the electronic device 10, such as a zk node information notification program. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally used to control the overall operation of the electronic device 10. In this embodiment, the processor 12 is configured to execute the program code stored in the memory 11 or process data, such as an executed zk node information notifying program.
The network interface 13 may include a wireless network interface or a wired network interface, and the network interface 13 is generally used to establish a communication connection between the electronic apparatus 10 and other electronic devices.
The communication bus 14 is used to enable communication connections between the components 11-13.
Fig. 1 only shows the electronic device 10 with components 11-14 and a zk node information notification program, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the electronic device 10 may further comprise a user interface (not shown in fig. 1), which may comprise a display, an input unit such as a keyboard, wherein the user interface may further comprise a standard wired interface, a wireless interface, etc.
Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED touch, and the like. Further, the display may also be referred to as a display screen or display unit for displaying user interfaces for processing information in the electronic device 10 and for displaying visualizations.
In one embodiment, the zk node information notifier stored in the memory 11, when executed by the processor 12, implements the following operations:
monitoring node information stored in each subdirectory node in the predetermined zk in real time or at regular time, and if the first node information is monitored to be changed, determining the change type corresponding to the first node information;
a node analysis rule determining step of determining a node analysis rule for analyzing the first node information according to a mapping relationship between a predetermined change type and the node analysis rule;
a node information generating step of analyzing the first node information according to a determined node analysis rule to generate second node information;
and a sending step, sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk.
In this embodiment, the change types include node creation, node deletion, and node update;
if it is determined that the change type corresponding to the first node information is node creation, the corresponding node information processing rule may be, for example, to determine whether the created first node information is complete node information, where in this embodiment, the complete node information includes: professional company name, system coding information, service coding information, instance node coding information, and instance data node information; if the created information of the first node is complete node information, acquiring example data node information from the information of the first node to generate second node information;
if it is determined that the change type corresponding to the first node information is node deletion, the corresponding node information processing rule may be, for example, to determine whether the deleted first node is an instance node, and in this embodiment, if the deleted first node information includes instance node encoding information, determine that the deleted first node information is an instance node; if the deleted first node information is an instance node, obtaining instance data node information in the deleted first node information to generate second node information;
if it is determined that the change type corresponding to the first node information is a node update, the corresponding node information processing rule may be, for example, to determine whether the first node information is updated based on a predetermined update protocol (e.g., RELOAD protocol), and if it is determined that the first node information is updated based on the predetermined update protocol, obtain a first time for updating the first node information; acquiring all third node information generated after the first time from a predetermined database (such as zkdatabase database); and traversing the third node information to inquire complete instance node information, acquiring instance data node information from the inquired complete instance node information, and generating second node information.
Further, in this embodiment, if it is determined that the first node information is not updated based on a predetermined update protocol (e.g., RELOAD protocol), it is determined whether the first node information is an instance node and whether the first node information is complete node information; and after the first node information is determined to be the example node and the complete node information, obtaining the example data node information from the first node information to generate second node information.
For example, in an embodiment of the present application, it is assumed that it is determined that the change type corresponding to the first node information is created for a child directory node, and information of the correspondingly created child directory node includes: [ claim 1 ]/PA 003/EPCIS _ UPC/PA003-EPCIS _ UPC-QUERY _ POLICY/PA003-EPCIS _ UPC-QUERY _ POLICY-IQCD-D0014:81/instance/date, wherein: PA003 represents a professional company name, EPCIS _ UPC represents system coding information, PA003-EPCIS _ UPC-QUERY _ POLICY represents service coding information, PA003-EPCIS _ UPC-QUERY _ POLICY-IQCD-D0014:81 represents example node coding information, and Instance represents example data node information. Determining that the created first node information is complete node information, acquiring instance data node information recorded under instance from the first node information, generating second node information, putting the generated second node information into a predetermined notification queue, and sending an instruction for sending the second node information to a predetermined management platform to a leader in a predetermined zk.
It should be noted that, a zk system usually has 3 roles, which are client, follower, and leader, respectively, in the zk system, leader election is an important function, and the election process usually includes assigning a process as an organizer and distributing tasks to each node; before a task starts, all nodes do not know who the leader is, after an election algorithm starts to execute, each node finally obtains a unique unified node as the leader for executing the task, and the leader is responsible for coordination of transactions of all nodes in a zk system and has the right of reading and writing data.
As can be seen from the foregoing embodiments, the electronic device provided by the present invention monitors node information stored in each subdirectory node in zk in real time or at regular time; if the first node information is monitored to be changed, determining the change type of the first node information correspondingly; determining a node analysis rule for analyzing the first node information according to a mapping relation between a predetermined change type and the node analysis rule; analyzing the first node information according to the determined node analysis rule to generate second node information; and sending an instruction for executing and sending second node information to a predetermined management platform to a leader in the zk. The method and the device realize that zk actively sends the changed node information to other platforms, remove long connection between other management platforms and zk, save a large amount of resources and improve the notification efficiency of node change.
It should be further noted that, the zk node information notification program of the present invention may be described by program modules having the same function according to the different functions implemented by each part of the zk node information notification program. Fig. 2 is a schematic diagram of program modules of a zk node information notification procedure in an embodiment of an electronic apparatus according to the invention. In this embodiment, the zk node information notification program may be divided into a monitoring module 201, a determining module 202, a generating module 203, and a sending module 204 according to different functions implemented by each part of the zk node information notification program. As apparent from the above description, the program modules referred to in the present invention refer to a series of computer program instruction segments capable of performing specific functions, and are more suitable than programs for describing the execution process of the zk node information notification program in the electronic device 10. The functions or operation steps implemented by the module 201-204 are similar to those described above, and are not detailed here, for example, where:
the monitoring module 201 is configured to monitor node information stored in each subdirectory node in zk in real time or at regular time, and if it is monitored that first node information changes, determine a change type corresponding to the first node information;
the determining module 202 is configured to determine a node analysis rule for analyzing the first node information according to a mapping relationship between a predetermined change type and the node analysis rule;
the generating module 203 is configured to analyze the first node information according to the determined node analysis rule to generate second node information;
the sending module 204 is configured to send an instruction to a leader in the zk to execute sending of the second node information to a predetermined management platform.
In addition, the present invention further provides a zk node information notification method, please refer to fig. 3, where the zk node information notification method includes the following steps:
step S301, monitoring node information stored in each subdirectory node in zk in real time or at regular time, and if the first node information is monitored to be changed, determining the change type corresponding to the first node information;
step S302, determining a node analysis rule for analyzing the first node information according to a mapping relation between a predetermined change type and the node analysis rule;
step S303, analyzing the first node information according to the determined node analysis rule to generate second node information;
step S304, an instruction for sending the second node information to a predetermined management platform is sent to the leader in zk.
In this embodiment, the change types include node creation, node deletion, and node update;
if it is determined that the change type corresponding to the first node information is node creation, the corresponding node information processing rule may be, for example, to determine whether the created first node information is complete node information, where in this embodiment, the complete node information includes: professional company name, system coding information, service coding information, instance node coding information, and instance data node information; if the created information of the first node is complete node information, acquiring example data node information from the information of the first node to generate second node information;
if it is determined that the change type corresponding to the first node information is node deletion, the corresponding node information processing rule may be, for example, to determine whether the deleted first node information is an instance node, and in this embodiment, if the deleted first node information includes instance node encoding information, determine that the deleted first node information is an instance node; if the deleted first node is an instance node, obtaining instance data node information in the deleted first node information, and generating second node information;
if it is determined that the change type corresponding to the first node information is a node update, the corresponding node information processing rule may be, for example, to determine whether the first node information is updated based on a predetermined update protocol (e.g., RELOAD protocol), and if it is determined that the first node information is updated based on the predetermined update protocol, obtain a first time for updating the first node information; acquiring all third node information generated after the first time from a predetermined database (such as zkdatabase database); and traversing the third node information to inquire complete instance node information, acquiring instance data node information from the inquired complete instance node information, and generating second node information.
Further, in this embodiment, if it is determined that the first node information is not updated based on a predetermined update protocol (e.g., RELOAD protocol), it is determined whether the first node information is an instance node and whether the first node information is complete node information; and after the first node information is determined to be the example node and the complete node information, obtaining the example data node information from the first node information to generate second node information.
For example, in an embodiment of the present application, it is assumed that it is determined that the change type corresponding to the first node information is created for a child directory node, and information of the correspondingly created child directory node includes: [ claim 1 ]/PA 003/EPCIS _ UPC/PA003-EPCIS _ UPC-QUERY _ POLICY/PA003-EPCIS _ UPC-QUERY _ POLICY-IQCD-D0014:81/instance/date, wherein: PA003 represents a professional company name, EPCIS _ UPC represents system coding information, PA003-EPCIS _ UPC-QUERY _ POLICY represents service coding information, PA003-EPCIS _ UPC-QUERY _ POLICY-IQCD-D0014:81 represents example node coding information, and Instance represents example data node information. Determining that the created first node information is complete node information, acquiring instance data node information recorded under instance from the first node information, generating second node information, putting the generated second node information into a predetermined notification queue, and sending an instruction for sending the second node information to a predetermined management platform to a leader in a predetermined zk.
It should be noted that, a zk system usually has 3 roles, which are client, follower, and leader, respectively, in the zk system, leader election is an important function, and the election process usually includes assigning a process as an organizer and distributing tasks to each node; before a task starts, all nodes do not know who the leader is, after an election algorithm starts to execute, each node finally obtains a unique unified node as the leader for executing the task, and the leader is responsible for coordination of transactions of all nodes in a zk system and has the right of reading and writing data.
As can be seen from the foregoing embodiments, the zk node information notification provided by the present invention monitors node information stored in each subdirectory node in the predetermined zk in real time or at regular time; if the first node information is monitored to be changed, determining the change type of the first node information correspondingly; determining a node analysis rule for analyzing the first node information according to a mapping relation between a predetermined change type and the node analysis rule; analyzing the first node information according to the determined node analysis rule to generate second node information; and sending an instruction for executing and sending second node information to a predetermined management platform to a leader in the zk. The method and the device realize that zk actively sends the changed node information to other platforms, remove long connection between other management platforms and zk, save a large amount of resources and improve the notification efficiency of node change.
Furthermore, the present invention also provides a computer-readable storage medium having stored thereon a zk node information notification program, which when executed by a processor, implements the following operations:
monitoring node information stored in each subdirectory node in the predetermined zk in real time or at regular time, and if the first node information is monitored to be changed, determining the change type corresponding to the first node information;
determining a node analysis rule for analyzing the first node information according to a mapping relation between a predetermined change type and the node analysis rule;
analyzing the first node information according to the determined node analysis rule to generate second node information;
and sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the electronic device and the zk node information notification method, and will not be described in detail herein.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An electronic device, comprising a memory, and a processor coupled to the memory, the processor configured to execute a zk node information notification program stored on the memory, wherein when executed by the processor, the zk node information notification program implements the following steps:
monitoring node information stored in each subdirectory node in the predetermined zk, and if the first node information is monitored to be changed, analyzing the change type corresponding to the first node information, wherein the change type comprises node creation, node deletion and node updating;
a node analysis rule determining step of determining a node analysis rule for analyzing the first node information according to a mapping relationship between a predetermined change type and the node analysis rule;
a node information generating step of analyzing the first node information according to a determined node analysis rule, and acquiring instance data node information in the first node information to generate second node information;
and a sending step, sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk.
2. The electronic apparatus of claim 1, wherein the node analysis rule determining step comprises:
if the change type corresponding to the first node information is determined to be node creation, determining whether the created first node information is complete node information according to a corresponding node information processing rule;
if the created first node information is complete node information, acquiring instance data node information from the first node information to generate second node information; wherein the complete node information comprises instance data node information.
3. The electronic apparatus of claim 1, wherein the node analysis rule determining step comprises:
if the change type corresponding to the first node information is determined to be node deletion, the corresponding node information processing rule is that whether the deleted first node information is an instance node is determined;
and if the deleted first node information is the instance node, obtaining the instance data node information in the deleted first node information, and generating second node information.
4. The electronic apparatus of claim 1, wherein the node analysis rule determining step comprises:
if the change type corresponding to the first node information is determined to be node updating, determining whether the updating of the first node information is based on a predetermined updating protocol to update the node information according to a corresponding node information processing rule;
if the node information is determined to be updated based on a predetermined update protocol, acquiring first time for updating the first node information;
acquiring all third node information generated after the first time from a predetermined database;
and traversing the third node information to inquire complete instance node information, acquiring instance data node information from the inquired complete instance node information, and generating second node information.
5. The electronic apparatus of claim 4, wherein if it is determined that the first node information is not a node information update based on a predetermined update protocol, determining whether the first node information is an instance node and determining whether the first node information is complete node information;
and after the first node information is determined to be the example node and the complete node information, obtaining example data node information from the first node information to generate second node information.
6. A zk node information notification method, characterized by comprising the steps of:
monitoring node information stored in each subdirectory node in the predetermined zk in real time or at regular time, and if the first node information is monitored to change, analyzing the change type corresponding to the first node information, wherein the change type comprises node creation, node deletion and node updating;
a node analysis rule determining step of determining a node analysis rule for analyzing the first node information according to a mapping relationship between a predetermined change type and the node analysis rule;
a node information generating step of analyzing the first node information according to a determined node analysis rule, and acquiring instance data node information in the first node information to generate second node information;
and a sending step, sending an instruction for sending the second node information to a predetermined management platform to a leader in the zk.
7. The zk node information notification method according to claim 6, wherein the node analysis rule determination step includes:
if the change type corresponding to the first node information is determined to be node creation, determining whether the created first node information is complete node information according to a corresponding node information processing rule;
if the created first node information is complete node information, acquiring example data node information from the first node information to generate second node information; wherein the complete node information comprises instance data node information.
8. The zk node information notification method according to claim 6, wherein the node analysis rule determination step includes:
if the change type corresponding to the first node information is determined to be node deletion, the corresponding node information processing rule is to determine whether the deleted first node information is an instance node;
and if the deleted first node information is the instance node, obtaining the instance data node information in the deleted first node information, and generating second node information.
9. The zk node information notifying method according to claim 6, wherein if it is determined that the first node information is not node information updated based on a predetermined update protocol, it is determined whether the first node information is an instance node and whether the first node information is complete node information;
and after the first node information is determined to be the example node and the complete node information, obtaining example data node information from the first node information to generate second node information.
10. A computer-readable storage medium storing a zk node information notification program executable by at least one processor to cause the at least one processor to perform the steps of the zk node information notification method according to any one of claims 6 to 9.
CN201810183492.0A 2018-03-06 2018-03-06 Electronic device, zk node information notification method, and storage medium Active CN108566293B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810183492.0A CN108566293B (en) 2018-03-06 2018-03-06 Electronic device, zk node information notification method, and storage medium
PCT/CN2018/089450 WO2019169762A1 (en) 2018-03-06 2018-06-01 Electronic device, zk node information notification method, system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810183492.0A CN108566293B (en) 2018-03-06 2018-03-06 Electronic device, zk node information notification method, and storage medium

Publications (2)

Publication Number Publication Date
CN108566293A CN108566293A (en) 2018-09-21
CN108566293B true CN108566293B (en) 2021-05-18

Family

ID=63532130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810183492.0A Active CN108566293B (en) 2018-03-06 2018-03-06 Electronic device, zk node information notification method, and storage medium

Country Status (2)

Country Link
CN (1) CN108566293B (en)
WO (1) WO2019169762A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569056B (en) * 2019-09-11 2023-05-05 北京奇艺世纪科技有限公司 Rule service information updating method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932210A (en) * 2012-11-23 2013-02-13 北京搜狐新媒体信息技术有限公司 Method and system for monitoring node in PaaS cloud platform
CN106815053A (en) * 2017-01-18 2017-06-09 努比亚技术有限公司 A kind of data-updating method, device, data call end and data update system
CN107276795A (en) * 2017-06-06 2017-10-20 北京小米移动软件有限公司 Information processing method and device and server and terminal based on container

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864053B (en) * 2017-10-31 2022-02-22 北京小米移动软件有限公司 Zookeeper-based dynamic configuration method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932210A (en) * 2012-11-23 2013-02-13 北京搜狐新媒体信息技术有限公司 Method and system for monitoring node in PaaS cloud platform
CN106815053A (en) * 2017-01-18 2017-06-09 努比亚技术有限公司 A kind of data-updating method, device, data call end and data update system
CN107276795A (en) * 2017-06-06 2017-10-20 北京小米移动软件有限公司 Information processing method and device and server and terminal based on container

Also Published As

Publication number Publication date
CN108566293A (en) 2018-09-21
WO2019169762A1 (en) 2019-09-12

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN108388599B (en) Electronic device, data migration and calling method and storage medium
CN111708749B (en) Operation log recording method and device, computer equipment and storage medium
CN108494771B (en) Electronic device, firewall opening verification method and storage medium
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
WO2019148727A1 (en) Electronic device, redis-based exception warning method and storage medium
WO2019127864A1 (en) Electronic device, springmvc-based data interface and automatic description generation method therefor, and storage medium
CN108446171B (en) Electronic device, distributed system execution task allocation method and storage medium
WO2019136812A1 (en) Electronic device, data calling log generation and query method, and storage medium
CN110278143B (en) E-mail data processing method and device, computer equipment and storage medium
WO2019148721A1 (en) Electronic device, risk early warning method for internet service system, and storage medium
CN111414391A (en) Method and system for accessing multiple data sources
CN112328448A (en) Zookeeper-based monitoring method, monitoring device, equipment and storage medium
CN108491304B (en) electronic device, business system risk control method and storage medium
WO2019140829A1 (en) Electronic device, method for releasing application update version, and storage medium
CN111343267B (en) Configuration management method and system
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN112416957A (en) Data increment updating method and device based on data model layer and computer equipment
CN114398397A (en) Data processing method, device, storage medium and system
CN108566293B (en) Electronic device, zk node information notification method, and storage medium
CN113220342A (en) Centralized configuration method and device, electronic equipment and storage medium
CN112001707A (en) Business workflow generation method and system based on business data
JP5884566B2 (en) Batch processing system, progress confirmation device, progress confirmation method, and program
CN113595762B (en) Network card configuration storage method and device
CN113656378A (en) Server management method, device and 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