A resource automatic pushing method and system
By monitoring the Kafka message queue to receive and process device configuration change information from the network management system, the problem of inaccurate data in the resource system was solved, enabling automated updates of resource push data and rapid activation of business circuits.
Patent Information
- Application Number
- CN202411839489.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In existing technologies, the device configuration data of the network management system changes frequently and cannot be automatically updated to the resource system, resulting in inaccurate device configuration data in the resource system and failing to meet the requirements for rapid activation of service circuits.
By monitoring the Kafka message queue, receiving device configuration change information based on the target network management list, performing event type filtering, deduplication, merging, hierarchical sorting, and cascading masking, generating resource push events, and automatically calling the resource push interface to update data, while manually handling failure cases.
This improved the accuracy of resource push data and the ability to automatically activate service circuits, ensuring data consistency between the resource system and the network management system.
Smart Images

Figure CN119652964B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing, and particularly relates to a resource automatic pushing method and system. BACKGROUND
[0002] In the related art, the conventional method for synchronizing resource system device configuration data and network management system is to periodically write back to the resource system through full or incremental file mode. However, the network device configuration data changes frequently and cannot be automatically updated to the resource system, resulting in inaccurate resource system device configuration data and inability to meet the demand for rapid opening of business circuits. SUMMARY
[0003] In view of the above deficiencies of the prior art, the purpose of the present application is to provide a resource automatic pushing method and system. The method realizes resource automatic pushing, improves the accuracy of resource pushing data, and improves the automatic opening capability of business circuits.
[0004] In a first aspect, the present application provides a resource automatic pushing method, comprising: S1, based on a target network management list, receiving device configuration change information of a target network management under the condition of monitoring a Kafka message queue; S2, filtering the device configuration change information based on an event type and a configuration change attribute of the event type to obtain a message original table, the message original table comprising an object and an object attribute of a device; S3, performing de-duplication rule processing, merging rule processing, hierarchical sorting rule processing, and cascading shielding rule processing on the messages in the message original table to generate a resource pushing event of the object, and storing the resource pushing event to a pushing event table, and simultaneously associating the resource pushing event with an object table to generate a pushing message; and S4, automatically calling a resource pushing interface based on a preset period to automatically push the pushing message, updating a pushing result to a pushing result table, and performing manual processing in the case that the pushing result is a failure.
[0005] Further, the event type comprises an addition type, a deletion type, and a modification type, wherein filtering the device configuration change information based on the event type and the configuration change attribute of the event type to obtain the message original table comprises: in the case that the event type is determined to be the modification type, filtering the device configuration change information based on the configuration change attribute of the modification type, and storing the filtered device configuration change information to the message original table to obtain the message original table; and in the case that the event type is determined to be the addition type or the deletion type, not performing filtering on the device configuration change information, and storing the device configuration change information to the message original table.
[0006] Further, the object attribute includes an attribute name and an attribute type, a source and an explanation of the attribute name, wherein the message in the message original table is processed by a deduplication rule, a merging rule, a hierarchical sorting rule and a cascading shielding rule to generate the resource push event of the object, including: classifying the object in the message original table to obtain a plurality of objects and the event type of the object; processing the plurality of objects and the event type of the object by the deduplication rule to obtain the message of the same event type of each object, wherein the number of the message of the same event type of each object is one; processing the message of different event types of each object by the merging rule based on the device type and the preset merging rule to obtain the merging information of each object; processing the merging information of each object by the hierarchical sorting rule and the cascading shielding rule to generate the resource push event of the object.
[0007] Further, processing the merging information of each object by the hierarchical sorting rule and the cascading shielding rule to generate the resource push event of the object includes: processing the merging information of each object by the hierarchical sorting rule according to the device hierarchy of network element / chassis / board / card / port to obtain the merging information of each object after hierarchical sorting; setting the cascading shielding rule for the merging information of each object after hierarchical sorting to generate the resource push event of the object, the cascading shielding rule including executing cascading processing of the lower object in the case of adding or deleting the object, and executing shielding of the message of the same event type of the lower object in the case of the message of the lower object with the membership relationship in the automatic push process.
[0008] Further, the object table includes a network element table, a chassis table, a board card table and a port table, wherein the resource push event is associated with the object table to generate a push message, including: the object tables are associated by resource coding or object ID field to form a device object tree; the push message is generated according to the event type and the structure of the device object tree.
[0009] Further, the resource automatic pushing system comprises a pushing data auditing module, wherein, object data with different resource codes in the pushing result table and the object table are checked; data in a non-success state in the pushing event table is checked; object with affiliation in the pushing event table is checked, and data of the resource pushing event is added or deleted; it is checked whether there are multiple pieces of data of the same event type in the message merging table; it is checked whether there are objects with an insertion time within a preset period in the object table and whether there are records of added events of the object or a superior object in the pushing event table; it is checked whether there are objects with a deletion time within the preset period in the object history table and whether there are records of deleted events of the object or a superior object in the pushing event table.
[0010] Further, the resource automatic pushing system comprises a pushing data auditing module, wherein, object data with different resource codes in the pushing result table and the object table are checked; data in a non-success state in the pushing event table is checked; object with affiliation in the pushing event table is checked, and data of the resource pushing event is added or deleted; it is checked whether there are multiple pieces of data of the same event type in the message merging table; it is checked whether there are objects with an insertion time within a preset period in the object table and whether there are records of added events of the object or a superior object in the pushing event table; it is checked whether there are objects with a deletion time within the preset period in the object history table and whether there are records of deleted events of the object or a superior object in the pushing event table.
[0011] In a second aspect, the application provides a resource automatic pushing system, which comprises: a receiving module, configured to receive device configuration change information of a target network management device based on a target network management list under the condition of monitoring a Kafka message queue; a filtering module, configured to filter the device configuration change information based on an event type and a configuration change attribute of the event type to obtain a message original table, wherein the message original table comprises an object and an object attribute of a device; a generating module, configured to perform de-duplication rule processing, merging rule processing, hierarchical sorting rule processing and cascading shielding rule processing on messages in the message original table to generate a resource pushing event of the object, and store the resource pushing event into a pushing event table, and associate the resource pushing event with an object table to generate a pushing message; a pushing and manual processing module, configured to automatically call a resource pushing interface to automatically push the pushing message based on a preset period, update a pushing result to a pushing result table, and perform manual processing in the case that the pushing result is a failure.
[0012] In a third aspect, the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of the first aspect.
[0013] In a fourth aspect, the present application provides a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method of any one of the first aspect.
[0014] The present application has the following advantages:
[0015] The resource automatic pushing method and system according to the present application, under the condition of monitoring the Kafka message queue, based on the target network management list, receives the device configuration change information of the target network management; based on the event type and the configuration change attribute of the event type, the device configuration change information is filtered to obtain a message original table, the message original table including the object and the object attribute of the device; the message in the message original table is processed by the de-duplication rule, the merging rule, the hierarchical sorting rule and the cascading shielding rule to generate the resource pushing event of the object, and the resource pushing event is stored to the pushing event table, and the resource pushing event and the object table are associated to generate the pushing message; based on the preset period, the resource pushing interface is automatically called to automatically push the pushing message, and the pushing result is updated to the pushing result table, and in the case that the pushing result is failed, the manual processing is performed. The method realizes the resource automatic pushing, improves the accuracy of the resource pushing data, and improves the automatic opening ability of the business circuit. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings are included to provide a further understanding of embodiments of the application, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the application and, together with the description, serve to explain the principles of the application. In the drawings:
[0017] Figure 1 is a flowchart of a resource automatic pushing method according to an embodiment of the present application;
[0018] Figure 2 is a flowchart of a resource automatic pushing method according to a specific embodiment of the present application;
[0019] Figure 3 is a schematic diagram of a resource automatic pushing system according to an embodiment of the present application;
[0020] Figure 4is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the personnel in the art better understand the technical solutions in the embodiments of the present application, the technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. It should be understood that these descriptions are only exemplary and are not used to limit the scope of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should belong to the scope of protection of the present application.
[0022] In addition, in the following description, the description of well-known structures and techniques is omitted to avoid unnecessary confusion of the concepts disclosed in the present application.
[0023] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for description purposes and cannot be understood as indicating or implying relative importance. The terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication between two elements. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0024] The exemplary embodiments will be described in detail hereinbelow with reference to the drawings. In the following description, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples that are consistent with some aspects of the present application, as detailed in the appended claims.
[0025] The present application proposes a resource automatic pushing method, system and related equipment, specifically, the resource automatic pushing method, system and related equipment of the embodiments of the present application are described below with reference to the drawings.
[0026] Figure 1is a flow chart of a resource automatic pushing method according to an embodiment of the present application. It should be noted that the resource automatic pushing method of the embodiment of the present application can be applied to the resource automatic pushing system of the embodiment of the present application. The resource automatic pushing system can be configured on an electronic device or in a server. The embodiment of the present application does not limit this.
[0027] As shown in Figure 1 , the resource automatic pushing method comprises the following steps.
[0028] S110, based on a target network management list, receiving device configuration change information of a target network management in a case of monitoring a Kafka message queue.
[0029] That is, the device configuration change information of the target network management can be received according to the target network management list set in advance by monitoring the Kafka message queue, that is, the device configuration change information of the designated network management is received, and other non-designated network management and non-device configuration change messages are ignored.
[0030] S120, filtering the device configuration change information based on an event type and a configuration change attribute of the event type to obtain a message original table, the message original table comprising an object and an object attribute of a device.
[0031] In the embodiment of the present application, the event type comprises an addition type, a deletion type and a modification type.
[0032] In the embodiment of the present application, in a case where the event type is determined to be the modification type, the device configuration change information is filtered based on the configuration change attribute of the modification type, and the filtered device configuration change information is stored into the message original table to obtain the message original table; wherein in a case where the event type is determined to be the addition type or the deletion type, the filtering of the device configuration change information is not performed, and the device configuration change information is stored into the message original table.
[0033] That is, the device configuration change information can be filtered based on the event type and the configuration change attribute corresponding to the event type, and the filtered device configuration change information is stored into the message original table, wherein in a case where the event type is the modification type, the device configuration change information is filtered, and in a case where the event type is the addition type or the deletion type, the device configuration change information is not filtered and is directly stored into the message original table.
[0034] S130, performing a deduplication rule processing, a merging rule processing, a hierarchical sorting rule processing and a cascading shielding rule processing on the messages in the message original table to generate a resource pushing event of an object, and storing the resource pushing event into a pushing event table, and simultaneously associating the resource pushing event with an object table to generate a pushing message.
[0035] In the embodiments of the present application, the object attribute includes the attribute name, the attribute type of the attribute name, the source and the description.
[0036] That is, in the case of obtaining the message original table, the messages in the message original table can be subjected to the rule processing of deduplication, merging, hierarchical sorting and cascading shielding, that is, rule processing, to generate a resource push event of an object, and store the resource push event to a push event table, and meanwhile, associate the resource push event with an object table to generate a push message. The specific implementation manner can refer to subsequent embodiments.
[0037] S140, automatically calling the resource push interface based on a preset period to automatically push the push message, updating the push result to a push result table, and performing manual processing in the case that the push result is a failure.
[0038] According to the resource automatic push method, in the case of monitoring the Kafka message queue, the device configuration change information of the target network management is received based on the target network management list; the device configuration change information is filtered based on the event type and the configuration change attribute of the event type to obtain a message original table, the message original table including an object and an object attribute of a device; the messages in the message original table are subjected to the rule processing of deduplication, merging, hierarchical sorting and cascading shielding to generate a resource push event of an object, and the resource push event is stored to a push event table, and meanwhile, the resource push event is associated with an object table to generate a push message; the resource push interface is automatically called based on a preset period to automatically push the push message, the push result is updated to a push result table, and manual processing is performed in the case that the push result is a failure. The method realizes resource automatic push, improves the accuracy of resource push data, and improves the automatic opening ability of a business circuit.
[0039] In order for those skilled in the art to more easily understand the present application, Figure 2 is a resource automatic push method according to one specific embodiment of the present application, as Figure 2 shown, the resource automatic push method comprises the following steps:
[0040] S210, in the case of monitoring the Kafka message queue, receiving device configuration change information of a target network management based on a target network management list.
[0041] S220, filtering the device configuration change information based on the event type and the configuration change attribute of the event type to obtain a message original table, the message original table including an object and an object attribute of a device.
[0042] For example, the message original table includes objects and object attributes of the device, as shown in Table 1. Taking the message original table including one object as an example, the object has a name T_CONFIG_ALTER_MSG, and the object attributes include attribute names and attribute types, sources, and descriptions of the attribute names.
[0043]
[0044] Table 1
[0045] In the embodiments of the present application, the implementation of steps S210-S220 can refer to the above steps S110-S120, and the present application will not be repeated here.
[0046] S230, classifying the objects in the message original table to obtain a plurality of objects and event types of the objects.
[0047] In the embodiments of the present application, after obtaining the message original table, the objects in the message original table can be classified to obtain a plurality of objects and event types of the objects.
[0048] S240, performing a deduplication rule processing on the plurality of objects and the event types of the objects to obtain a message of a same event type of each object, wherein the number of the message of the same event type of each object is one.
[0049] That is, after obtaining a plurality of objects and event types of the objects, a deduplication rule processing is performed on the plurality of objects and the event types of the objects to obtain a message of a same event type of each object. That is, the message is uniquely processed according to the event type, and at most one message of the same object and the same event type is retained. The same object will generate a plurality of messages of the same event type in a certain time period, such as repeated insertion and removal of a board card, which will trigger a plurality of messages of adding and deleting the board card. Through the message deduplication rule, only one message of adding and one message of deleting are retained, and the number of messages of the same event type, the earliest occurrence time, and the latest occurrence time are recorded.
[0050] S250, performing a merging rule processing on the messages of different event types of each object based on a device type and a preset merging rule to obtain merging information of each object.
[0051] In the embodiments of the present application, the messages of the same object are merged into at most one message, which is then stored in a message merging table. For example, messages of adding, modifying before deleting, and adding after deleting are merged into messages of adding, deleting, and modifying, respectively. Based on the last push state of the resource system, the merging result is analyzed.
[0052] For example, for different types of device objects such as network element, chassis, board, and port, merging rules in different message combination cases are respectively defined. For a port object, if there is only an adding message, it does not matter whether there is a deleting message or a modifying message, and the merging result is the latest adding message; if there are both adding and deleting messages, further comprehensive judgment is needed according to the number of adding messages, the number of deleting messages, and the type of the earliest message to determine whether to merge into the latest adding message, the latest deleting message, or a virtual modifying message or directly merge into nothing (in the case of no valid pushing message). Through such detailed merging rules, the messages of the same object are more concise and can reflect the real state change, which is convenient for subsequent unified processing.
[0053] Specific preset merging rules are shown in Table 2, which defines the messages of the same object.
[0054]
[0055] Table 2
[0056] S260, the merging information of each object is processed according to the hierarchical sorting rule and the cascading shielding rule to generate a resource pushing event of the object.
[0057] In the embodiment of the application, the merging information of each object is processed according to the hierarchical sorting rule according to the device hierarchy of network element / chassis / board / port to obtain the merging information of each object after hierarchical sorting; the cascading shielding rule is set for the merging information of each object after hierarchical sorting to generate a resource pushing event of the object, and the cascading shielding rule includes executing cascading processing of lower-level objects in the case of adding or deleting objects, and executing shielding of the messages of the same event type of lower-level objects in the case of messages of objects having a membership relationship in the automatic pushing process.
[0058] That is, after obtaining the merging information of each object, the merging information of each object is sorted according to the hierarchy of network element / chassis / board / port, and the objects of the same level do not need to be sorted, the messages of upper-level device objects are processed first, and the purpose is to discover whether there is a message of the same event type of upper-level device objects in advance when processing the messages of lower-level device objects having a membership relationship, so as to trigger the subsequent cascading shielding rule, so that the message processing order is more reasonable and conforms to the hierarchical association logic between devices. In the cascading shielding rule, considering the characteristics of the resource system in cascading processing of lower-level objects when adding and deleting device objects (and only processing the attributes of the current object when modifying, without cascading), in order to avoid repeated pushing and other problems, the cascading shielding rule is needed to shield the messages of lower-level objects having a membership relationship, and only the messages of the uppermost device object are pushed.
[0059] For example, when the messages of adding a network element and adding a board card to which the network element belongs exist simultaneously, the message of adding the board card is shielded according to the rule, and only the message of adding the network element is generated to call the resource interface to push, otherwise, if the pushing is repeated, the resource interface will return a failure, and the rule guarantees the accuracy and efficiency of pushing the resource operation, and avoids invalid repeated pushing behavior.
[0060] S270, the resource pushing event is associated with the object table to generate a pushing message.
[0061] In the embodiment of the application, the object table includes a network element table, a frame table, a board card table and a port table.
[0062] In the embodiment of the application, the object tables are associated through resource codes or object ID fields to form a device object tree, and the pushing message is generated according to the event type and the structure of the device object tree.
[0063] That is, in the case of generating the resource pushing event of the object, the resource pushing event is associated with the corresponding device object table to form a complete pushing message. For example, when adding a network element, the information related to the network element tree is obtained from the associated network element table, frame table, board card table and port table, which includes the sub-object ID and various attribute information, and the obtained data is checked for integrity, such as checking whether the site to which the network element belongs exists, ensuring that the resource code of the upper object exists when the sub-object is pushed alone, and only when the generated pushing event and message meet the requirements and can accurately reflect the real situation of the device resource, the pushing event and message can enter the subsequent pushing link.
[0064] The network element table includes the name of the object and the object attribute, for example, taking one object in the network element table as an example, as shown in Table 3, the name of the object is T_TRANS_NE, and the object attribute includes the attribute name, the attribute type of the attribute name, the source and the description.
[0065]
[0066] Table 3
[0067] S280, the resource pushing interface is automatically called based on a preset period to automatically push the pushing message, and the pushing result is updated to the pushing result table.
[0068] In the embodiment of the present application, in the case that the push message corresponding object is a new push operation, it is judged whether the resource code of the push message corresponding object exists in the push result table; in the case that it is determined that the resource code of the push message corresponding object exists, the pushed information is returned, and in the case that it is determined that the resource code of the push message corresponding object does not exist, the new push interface is called to automatically push the push message; in the case that the push message corresponding object is a delete or modify push operation, it is judged whether the resource code of the push message corresponding object exists in the push result table; in the case that it is determined that the resource code of the push message corresponding object does not exist, the not pushed information is returned, and in the case that it is determined that the resource code of the push message corresponding object exists, the delete or modify push interface is called to automatically push the push message.
[0069] That is, in the case that the push message corresponding object is a new push operation, and in the case that it is determined that the resource code of the push message corresponding object exists, it is indicated that the push message corresponding object has been pushed before or has a related record, and thus the pushed information is returned; otherwise, in the case that the resource code of the push message corresponding object does not exist, the new push interface needs to be called to perform the actual push operation, so as to ensure that the resource information of the new object can be accurately entered into the resource system; in the case that the push message corresponding object is a delete or modify push operation, and in the case that it is determined that the resource code of the push message corresponding object does not exist, it is indicated that the object has no corresponding record in the resource system or has been deleted, and thus the not pushed information is returned; and if the resource code of the push message corresponding object exists, the corresponding delete or modify push interface is called to complete the corresponding push task, so that the device resource information in the resource system can be updated in time according to the actual situation.
[0070] The push result table includes the name of the object and the object attribute. For example, as shown in Table 4, the name of an object in the push result table is T_PUSH_RESULT, and the object attribute includes the attribute name, the attribute type of the attribute name, the source and the description.
[0071]
[0072] Table 4
[0073] S290, in the case that the push result is a failure, manual processing is performed.
[0074] In the embodiments of the present application, after automatic pushing, callback operation is performed, and the push result related data is updated according to the callback, mainly involving the push state of the push event table, the push result table and the resource code of the device object table, and specifically: new object push resource callback success: at this time, the resource code returned by the callback is written into the push event table, the push result table and the device object table respectively, so that the related data in these tables can be consistent and accurately reflect the latest situation of the new object in the resource system, and the complete update process of the new object resource information is completed; delete object push resource callback success: on the one hand, the data of the corresponding object in the push result table is deleted and moved into the push result history table for archiving; on the other hand, if the data of the object still exists in the device object table (such as in the manual push and other special scenarios), the resource code of the object needs to be empty, so as to reflect the actual state that the object has been deleted, and ensure that the data in each table is consistent with the actual situation of the resource system, and the accurate update and record keeping of the resource data is realized.
[0075] Among them, the push event table includes table name and attribute, for example, as shown in table 5, the table name is T_PUSH_EVENT, and the attribute includes attribute name and attribute type, source and description of attribute name.
[0076]
[0077] Table 5
[0078] In the embodiments of the present application, the resource codes of the object data in the push result table and the object table are checked; the data in the push event table with non-success state is checked; the data of the object in the push event table containing the membership relationship is checked, and the data of the newly added or deleted resource push event is checked; the data of the same object in the message merging table with multiple same or different event types is checked; the object with the insertion time within the preset period in the object table is checked, and the record of the newly added event of the object or the superior object in the push event table is checked; the object with the deletion time within the preset period in the object history table is checked, and the record of the deleted event of the object or the superior object in the push event table is checked. Further, the push data is audited.
[0079] In the embodiment of the present application, after analyzing the audit result, if it is found that there is an object that has not performed the push operation in the preset period due to missing associated data or missing messages, etc., manual intervention is required to complete the corresponding push task by manually calling the resource push interface, so as to maintain the consistency of the device data in the resource system and the network management system. For example, due to missing associated data, a new network element push event of the check failure is added: for example, the site information of the network element is missing, in which case the site information needs to be completed first, and then the new network element push interface is manually called to ensure that the resource information of the new network element can be accurately pushed to the resource system; due to missing messages caused by the producer or consumer network or other reasons: for example, the network management adds a device object, but the corresponding new message is missing, at this time, in order to ensure that the resource system can update the information of the device object in time, the resource push interface needs to be manually called to complete the push task, so as to avoid the data difference between the resource system and the network management system caused by missing messages.
[0080] In the resource automatic push method of the embodiment of the present application:
[0081] By receiving the device configuration change information based on the target network management list and filtering according to the event type and the configuration change attribute, the configuration change data related to the business and valuable can be accurately screened out, irrelevant data is avoided from being mixed into the subsequent processing process, the data entering the subsequent link has high pertinence and accuracy from the source, and a reliable data basis is provided for the resource push operation. For example, only the modification message meeting the key attribute change requirement and all the new and deleted messages are retained, and irrelevant messages such as non-key self-defined attribute modification are excluded.
[0082] The message deduplication rule ensures that at most one message of the same object and the same event type is retained, avoids the data confusion and redundancy caused by repeated messages of the same event (such as the redundant new and delete messages generated by repeated plugging and unplugging of the board card), and can more concisely reflect the actual state change of the device. The message merging rule reasonably merges multiple messages of the same object into at most one message according to different device types and message combination conditions, further simplifies the message quantity, accurately reflects the state change trend of the object, and comprehensively makes the entire message data more accurately reflect the real situation of the device, which is convenient for subsequent unified and efficient processing.
[0083] The hierarchical ordering rule orders messages according to a device hierarchy of network elements / chassis / boards / ports, processes upper device object messages first, meets the hierarchical association logic between devices, and facilitates early triggering of cascading shielding rules according to upper layer same event type messages when processing lower device object messages. The cascading shielding rule avoids repeated pushing of messages to lower objects having a membership relationship when adding or deleting device objects, such as shielding repeated addition messages of board cards belonging to network elements, pushing only the uppermost device object message, reducing unnecessary pushing operations, improving the overall efficiency of resource pushing, avoiding problems such as resource interface return failure caused by repeated pushing, and ensuring that the pushing process is smoother and more efficient.
[0084] Based on the preset period, the resource pushing interface is automatically called to push the pushing message. According to different operation types (add, delete, modify) of the pushing message corresponding object and whether the resource code exists in the pushing result table, the corresponding interface is intelligently judged and called to execute the pushing task, without frequent manual intervention, realizing the automatic process of resource pushing, updating the device data in the resource system in time according to the established rhythm, greatly improving the pushing efficiency, and ensuring that the resource information can be timely transferred and updated between systems.
[0085] After the resource pushing callback is successful, whether the object is added or deleted, the resource code and other key data in the related data tables such as the pushing event table, the pushing result table and the device object table can be accurately updated, the data consistency between tables is ensured, the actual situation of the device object in the resource system can be accurately reflected, the problem of inconsistent data caused by pushing operation is avoided, and the stability and accuracy of the entire data environment are maintained.
[0086] Through multi-dimensional data auditing, all kinds of abnormal data situations that may occur in the pushing process are comprehensively checked, such as inconsistent resource codes in the pushing result table and the object table, non-successful state data in the pushing event table, abnormal pushing of membership relationship objects, message merging exception, and mismatch between object insertion or deletion and pushing event. Once it is found that the object is not executed due to missing associated data or missing messages, etc., the resource pushing interface is called in time through manual intervention for remediation, effectively making up for the possible loopholes in the automatic process, ensuring that the device data in the resource system and the network management system always remain consistent, and ensuring the integrity and accuracy of the entire system data.
[0087] From device configuration change data collection to final resource pushing and subsequent processing, the whole process design is normative, and each link cooperates and connects closely. Through a series of rules and operations such as deduplication, merging, sorting, shielding, automatic pushing, callback updating and auditing, the data circulation in the system is orderly, the adverse effects of data confusion and pushing conflict on the system are reduced, and the stability of the whole system in processing device configuration change and resource pushing business is enhanced.
[0088] With the help of data auditing link, various abnormal data situations in the pushing process can be found in time, and potential problems such as data inconsistency can be prevented in advance. Through manual intervention and other means, the problems that have already appeared can be handled in time, the problem accumulation is avoided to cause greater damage to the stability of the system, and the system can be ensured to run stably for a long time and reliably complete the management and updating tasks related to device resources.
[0089] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can 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 a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server or network device) execute the method of each embodiment of the present application.
[0090] According to an aspect of an embodiment of the present application, a resource automatic pushing system is also provided, Figure 3 is a schematic diagram of the resource automatic pushing system according to the embodiment of the present application; as Figure 3 shown, comprising:
[0091] The receiving module 310 is configured to receive device configuration change information of a target network management device based on a target network management list while monitoring a Kafka message queue.
[0092] The filtering module 320 is configured to filter the device configuration change information based on an event type and a configuration change attribute of the event type to obtain a message original table, wherein the message original table includes an object and an object attribute of a device.
[0093] The generating module 330 is configured to perform deduplication rule processing, merging rule processing, hierarchical sorting rule processing and cascading shielding rule processing on messages in the message original table, generate a resource pushing event of the object, store the resource pushing event to a pushing event table, and associate the resource pushing event with an object table to generate a pushing message.
[0094] The push and manual processing module 340 is configured to automatically call a resource push interface based on a preset period to automatically push the push message, update the push result to the push result table, and perform manual processing in the case that the push result is a failure.
[0095] According to the resource automatic push system provided in the embodiments of the present application, in the case of monitoring a Kafka message queue, device configuration change information of a target network management device is received based on a target network management list; the device configuration change information is filtered based on an event type and a configuration change attribute of the event type to obtain a message original table, the message original table including an object and an object attribute of a device; a message in the message original table is processed by a deduplication rule, a merging rule, a hierarchical sorting rule, and a cascading shielding rule to generate a resource push event of the object, and the resource push event is stored in a push event table and associated with an object table to generate a push message; the push message is automatically pushed based on a preset period by automatically calling a resource push interface, the push result is updated to a push result table, and manual processing is performed in the case that the push result is a failure. Thus, resource automatic push is realized, the accuracy of resource push data is improved, and the automatic opening capability of a business circuit is improved.
[0096] Optionally, the event type includes an addition type, a deletion type, and a modification type, wherein the filtering module 320 is specifically configured to, in the case that the event type is determined to be the modification type, filter the device configuration change information based on a configuration change attribute of the modification type, and store the filtered device configuration change information in the message original table to obtain the message original table; and in the case that the event type is determined to be the addition type or the deletion type, not perform filtering on the device configuration change information, and store the device configuration change information in the message original table.
[0097] Optionally, the object attribute includes an attribute name, an attribute type of the attribute name, a source, and an explanation, wherein the generating module 330 is specifically configured to classify the object in the message original table, obtain a plurality of objects and the event type of the object; perform the deduplication rule processing on the plurality of objects and the event type of the object to obtain a message of a same event type of each object, wherein the number of the message of the same event type of each object is one; perform the merging rule processing on a message of a different event type of each object based on a device type and a preset merging rule to obtain merging information of each object; and perform the hierarchical sorting rule processing and the cascading shielding rule processing on the merging information of each object to generate the resource push event of the object.
[0098] Optionally, the generating module 330 is specifically configured to perform the hierarchical ordering rule processing on the merging information of each object according to a device hierarchy of network element / chassis / board / card / port, to obtain the merging information of each object after hierarchical ordering; and set the cascading shielding rule on the merging information of each object after hierarchical ordering, to generate the resource pushing event of the object, wherein the cascading shielding rule comprises performing cascading processing on a lower layer object in the case of adding or deleting the object, and performing shielding on a message of the same event type of a lower layer object in the case of existing a message of a subordinate relationship in an automatic pushing process.
[0099] Optionally, the object table comprises a network element table, a chassis table, a board table and a port table, wherein the generating module 330 is specifically configured to associate the object tables through resource encoding or object ID fields to form a device object tree; and generate the pushing message according to the event type and the structure of the device object tree.
[0100] Optionally, the pushing and manual processing module 340 is specifically configured to, in the case of adding pushing operation of the object corresponding to the pushing message, judge whether the resource encoding of the object corresponding to the pushing message exists in the pushing result table; in the case of determining that the resource encoding of the object corresponding to the pushing message exists, return pushed information; in the case of determining that the resource encoding of the object corresponding to the pushing message does not exist, call an adding pushing interface to automatically push the pushing message; in the case of deleting or modifying pushing operation of the object corresponding to the pushing message, judge whether the resource encoding of the object corresponding to the pushing message exists in the pushing result table; in the case of determining that the resource encoding of the object corresponding to the pushing message does not exist, return unpushed information; in the case of determining that the resource encoding of the object corresponding to the pushing message exists, call a deleting or modifying pushing interface to automatically push the pushing message.
[0101] Optionally, it further comprises a pushing data auditing module configured to check object data with different resource encodings in the pushing result table and the object table; check data in a non-success state in the pushing event table; check data of an object with a subordinate relationship in the pushing event table, which is simultaneously added or deleted in the resource pushing event; check multiple pieces of data of the same or different event types of the same object in the message merging table; check objects with an insertion time within a preset period in the object table, and missing records of added events of the object or a superior object in the pushing event table; and check objects with a deletion time within the preset period in the history table of the object, and missing records of deleted events of the object or a superior object in the pushing event table.
[0102] According to one aspect of the present invention, an electronic device is provided.
[0103] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 4 As shown, an electronic device may include one or more ( Figure 4 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor unit (MPU) or a programmable logic device (PLD)) and a memory 104 for storing data are also shown. In one exemplary embodiment, the electronic device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 4 The structure shown is for illustrative purposes only and does not limit the structure of the terminal device described above. For example, the terminal device may also include components that are more... Figure 4 The more or fewer components shown, or having the same Figure 4 Equivalent functions or ratios shown Figure 4 The functions shown have more different configurations.
[0104] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the automatic resource push method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to terminal devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0105] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the switching device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0106] The application provides a non-transient computer readable storage medium storing computer instructions for causing a computer to execute a resource automatic pushing method.
[0107] The applicant of the present application has made detailed description and illustration on the embodiments of the present application in combination with the drawings of the specification, but those skilled in the art should understand that the above embodiments are only preferred embodiments of the present application, and the detailed description is only for helping readers to better understand the spirit of the present application, and does not limit the protection scope of the present application, on the contrary, any improvement or modification based on the spirit of the present application should fall within the protection scope of the present application.
[0108] In addition, each functional unit in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0109] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.
[0110] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, and not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered within the protection scope of the present application.
Claims
1. A resource automatic pushing method, characterized in that, The method comprises the following steps: S1, receiving device configuration change information of a target network management device based on a target network management list while monitoring a Kafka message queue; S2, filtering the device configuration change information based on an event type and a configuration change attribute of the event type to obtain a message original table, wherein the message original table comprises an object of a device and an object attribute; S3, performing deduplication rule processing, merging rule processing, hierarchical sorting rule processing, and cascading shielding rule processing on the messages in the message original table to generate a resource push event of the object, and storing the resource push event into a push event table, and associating the resource push event with an object table to generate a push message; S4, automatically calling a resource push interface based on a preset period to automatically push the push message, updating a push result to a push result table, and performing manual processing in the case that the push result is a failure; wherein the object attribute comprises an attribute name, an attribute type of the attribute name, a source, and an explanation, and wherein the deduplication rule processing, the merging rule processing, the hierarchical sorting rule processing, and the cascading shielding rule processing on the messages in the message original table to generate the resource push event of the object comprise: classifying the objects in the message original table to obtain a plurality of the objects and the event type of the objects; performing the deduplication rule processing on the plurality of the objects and the event type of the objects to obtain a message of a same event type of each of the objects, wherein the number of the message of the same event type of each of the objects is one; performing the merging rule processing on the messages of different event types of each of the objects based on a device type and a preset merging rule to obtain merging information of each of the objects; performing the hierarchical sorting rule processing and the cascading shielding rule processing on the merging information of each of the objects to generate the resource push event of the object; wherein the hierarchical sorting rule processing and the cascading shielding rule processing on the merging information of each of the objects to generate the resource push event of the object comprise: performing the hierarchical sorting rule processing on the merging information of each of the objects according to a device hierarchy of a network element / chassis / board / card / port to obtain the merging information of each of the objects after hierarchical sorting; setting the cascading shielding rule on the merging information of each of the objects after hierarchical sorting to generate the resource push event of the object, wherein the cascading shielding rule comprises executing cascading processing on a lower layer object in the case that there is an addition or deletion of the object, and executing shielding of a message of a same event type of a lower layer object in the case that there is a membership relationship between the lower layer object and the object during the automatic push process.
2. The resource automatic pushing method of claim 1, wherein, The event type comprises an addition type, a deletion type, and a modification type, and wherein the filtering of the device configuration change information based on the event type and the configuration change attribute of the event type to obtain the message original table comprises: In a case where the event type is determined to be the modification type, the device configuration change information is filtered based on a configuration change attribute of the modification type, and the filtered device configuration change information is stored into the message original table, to obtain the message original table; In a case where the event type is determined to be the addition type or the deletion type, the device configuration change information is not filtered, and the device configuration change information is stored into the message original table.
3. The method of claim 1, wherein, The object table includes a network element table, a frame table, a board card table and a port table, and the resource pushing event is associated with the object table to generate a pushing message, including: The object tables are associated through resource codes or object ID fields to form a device object tree; According to the event type and the structure of the device object tree, the pushing message is generated.
4. The method of claim 3, wherein, The pushing message is automatically pushed based on a preset period through automatic calling of a resource pushing interface, including: In a case where the pushing message corresponds to an addition pushing operation of the object, it is judged whether the resource code of the object corresponding to the pushing message exists in the pushing result table; In a case where the resource code of the object corresponding to the pushing message is determined to exist, returned is pushed information, and in a case where the resource code of the object corresponding to the pushing message is determined to not exist, an addition pushing interface is called to automatically push the pushing message; In a case where the pushing message corresponds to a deletion or modification pushing operation of the object, it is judged whether the resource code of the object corresponding to the pushing message exists in the pushing result table; In a case where the resource code of the object corresponding to the pushing message is determined to not exist, returned is not pushed information, and in a case where the resource code of the object corresponding to the pushing message is determined to exist, a deletion or modification pushing interface is called to automatically push the pushing message.
5. The method of claim 3, wherein, Further including: Pushing data auditing, wherein, Object data with different resource codes in the pushing result table and the object table are checked; Data in a non-success state in the pushing event table is checked; Objects with membership in the pushing event table are checked, and data of addition or deletion of the resource pushing event is checked; In the message merging table, it is checked whether there are multiple pieces of data of the same object or different event types; Objects with insertion time within a preset period in the object table are checked, and records of addition events of the object or a superior object missing in the pushing event table are checked; Objects with deletion time within the preset period in the history table of the object are checked, and records of deletion events of the object or a superior object missing in the pushing event table are checked.
6. A resource automatic pushing system, characterized in that, Including: A receiving module is configured to receive device configuration change information of a target network management device based on a target network management list in a case of monitoring a Kafka message queue; A filtering module is configured to filter the device configuration change information based on an event type and a configuration change attribute of the event type, to obtain a message original table, the message original table including objects and object attributes of a device; The generating module is configured to perform deduplication rule processing, merging rule processing, hierarchical sorting rule processing, and cascading shielding rule processing on the messages in the message original table, generate a resource push event of the object, and store the resource push event into a push event table while associating the resource push event with an object table to generate a push message; The pushing and manual processing module is configured to automatically call a resource push interface based on a preset period to automatically push the push message, update a push result into a push result table, and perform manual processing in a case where the push result is a failure; The object attribute includes an attribute name, an attribute type of the attribute name, a source, and an explanation. The generating module is configured to classify the object in the message original table, and obtain a plurality of objects and the event type of the object. The deduplication rule processing is performed on the plurality of objects and the event type of the object to obtain one message of the same event type of each object. The merging rule processing is performed on the messages of different event types of each object based on a device type and a preset merging rule to obtain merging information of each object. The hierarchical sorting rule processing and the cascading shielding rule processing are performed on the merging information of each object to generate a resource push event of the object. The generating module is configured to perform the hierarchical sorting rule processing on the merging information of each object according to a device hierarchy of a network element / chassis / board / card / port to obtain the merging information of each object after hierarchical sorting.
7. An electronic device, comprising: The cascading shielding rule is set for the merging information of each object after hierarchical sorting to generate the resource push event of the object. The cascading shielding rule includes performing cascading processing on a lower object in a case where the object is newly added or deleted, and performing shielding on a message of the same event type of a lower object in a case where there is a message of the lower object in an automatic push process. The computer program product comprises a computer readable storage medium, and the computer readable storage medium stores the computer program. The computer program product is used to make the computer execute the method according to any one of claims 1 to 5. The computer program is used to make the computer execute the method according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein,
Citation Information
Patent Citations
Network change monitoring method and device, computer equipment and storage medium
CN114338435A
IT operation and maintenance configuration resource management system
CN114510390A