Message processing method and device, network management equipment and storage medium
By matching and loading message processing scripts with preset message processing scripts, the problem of customized development of network management equipment when facing changes in different network element equipment and business is solved, and the high scalability of network management equipment and the reduction of development workload is achieved.
Patent Information
- Application Number
- CN202310760552.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2025-01-03
AI Technical Summary
When faced with different types of network element equipment and business changes, existing network management equipment needs to frequently re-customize software function codes, resulting in large development workload and poor scalability.
Using a preset message processing script library, matching the corresponding message processing scripts based on the data packets sent by the network element device, loading and running in memory, generating target messages in preset formats, thereby reducing the workload of customized development and improving network management devices. scalability.
You can respond to new types of network element equipment and business changes without re-customizing the software function code of the network management equipment, significantly reducing development workload and improving the scalability of network management equipment.
Smart Images

Figure CN119254628A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a message processing method, device, network management equipment and storage medium. Background Art
[0002] In recent years, with the development of communication technology, communication networks are also growing and developing. Whether it is a wireless communication network or a wired communication network, its coverage and complexity have been greatly expanded and improved, and the information that network management equipment needs to maintain is also increasing. At present, there are many types of network element devices managed by network management equipment, and the data objects reported by different types of network element devices to the network management equipment are quite different. Developers need to customize the software function code of network management equipment for different types of network element devices so that the network management equipment can process the messages reported by different types of network element devices and use them. However, when there are new types of network element devices that need to be managed by the network management equipment or the messages used by the network element devices to report change due to business changes, developers need to customize the software function code of the network management equipment again. The workload of customized development is large, and the scalability of the network management equipment is poor. Summary of the invention
[0003] The embodiment of the present invention provides a message processing method, device, network management equipment and storage medium, aiming to reduce the workload of custom development and improve the scalability of the network management equipment.
[0004] In a first aspect, an embodiment of the present invention provides a message processing method, which is applied to a network management device, and the method includes:
[0005] Obtain data packets sent by network element devices;
[0006] Acquire a message processing script matching the data message from a preset message processing script library, wherein the message processing script library includes message processing scripts corresponding to network element devices of different device types;
[0007] The message processing script is loaded into the memory, and the message processing script is run to process the message carried by the data message to obtain a target message in a preset format.
[0008] In a second aspect, an embodiment of the present invention further provides a message processing device, including:
[0009] An acquisition module, configured to acquire data packets sent by a network element device;
[0010] The acquisition module is further configured to acquire a message processing script matching the data message from a preset message processing script library, wherein the message processing script library includes message processing scripts corresponding to network element devices of different device types;
[0011] A loading module, configured to load the message processing script in a memory;
[0012] The message processing module is configured to run the message processing script to process the message carried by the data message to obtain a target message in a preset format.
[0013] In a third aspect, an embodiment of the present invention further provides a network management device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the message processing method described in the first aspect is implemented.
[0014] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the message processing method as described in the first aspect.
[0015] The embodiment of the present invention provides a message processing method, device, network management equipment and storage medium. The embodiment of the present invention processes the message carried by the data message by using a message processing script matching the data message sent by the network element device, and can obtain a target message in a preset format, so that the network management device can process the message reported by the network element device and then use it. In this way, whether there is a new type of network element device that needs to be managed by the network management device, or when the message reported by the network element device changes due to a change in the business, there is no need to re-customize and develop the software function code of the network management device. Only the message processing script independent of the network management device needs to be updated, which can greatly reduce the workload of customized development and greatly improve the scalability of the network management device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a schematic block diagram of the structure of a network management device provided by an embodiment of the present invention;
[0018] Figure 2 It is a flowchart of a message processing method provided by an embodiment of the present invention;
[0019] Figure 3 yes Figure 2A schematic diagram of the sub-step flow of the message processing method in FIG.
[0020] Figure 4 This is a schematic diagram of a scenario for implementing the message processing method provided by an embodiment of the present invention;
[0021] Figure 5 It is a schematic block diagram of the structure of a message processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0024] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0025] At present, there are many kinds of network element devices managed by network management devices, and the data objects reported by different types of network element devices to the network management devices are quite different. Developers need to customize and develop the software function codes of the network management devices for different types of network element devices, so that the network management devices can process the messages reported by different types of network element devices and use them. However, when new types of network element devices need to be managed by the network management devices or the messages reported by the network element devices change due to business changes, the developers need to customize and develop the software function codes of the network management devices again. The workload of customized development is large, and the scalability of the network management devices is poor.
[0026] To solve the above problems, the embodiments of the present invention provide a message processing method, device, network management equipment and storage medium. The message processing method processes the message carried by the data message by using a message processing script that matches the data message sent by the network element device, and can obtain a target message in a preset format, so that the network management device can process the message reported by the network element device and use it. In this way, whether there is a new type of network element device that needs to be managed by the network management device, or the message used in the network element device report changes due to a change in the service, there is no need to re-customize and develop the software function code of the network management device, and only the message processing script independent of the network management device needs to be updated, thereby greatly reducing the workload of customized development and greatly improving the scalability of the network management device.
[0027] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0028] See also Figure 1 , Figure 1 The present invention provides a schematic structural diagram of a network management device.
[0029] like Figure 1 As shown, the network management device 100 includes a processor 101 and a memory 102 , and the processor 101 and the memory 102 are connected via a bus 103 , such as an I2C (Inter-integrated Circuit) bus.
[0030] Specifically, the processor 101 is used to provide computing and control capabilities to support the operation of the entire network management device. The processor 101 can be a central processing unit (CPU), and the processor 101 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0031] Specifically, the memory 102 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0032] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the network management device to which the embodiment of the present invention is applied. The specific network management device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0033] The processor 101 is used to run the computer program stored in the memory 102, and implement any one of the message processing methods provided by the embodiments of the present invention when executing the computer program.
[0034] In some embodiments, the processor 101 is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:
[0035] Obtain data packets sent by network element devices;
[0036] Acquire a message processing script matching the data message from a preset message processing script library, wherein the message processing script library includes message processing scripts corresponding to network element devices of different device types;
[0037] The message processing script is loaded into the memory, and the message processing script is run to process the message carried by the data message to obtain a target message in a preset format.
[0038] In some embodiments, the message processing script includes a format conversion function, and the processor 101 is used to implement the following when running the message processing script to process the message carried by the data message and obtain a target message in a preset format:
[0039] Run the message processing script to obtain a calling object of the message processing script;
[0040] The message carried by the data message is passed as an input parameter to the format conversion function through the calling object, and the format conversion function is executed to convert the format of the message to obtain a target message in a preset format.
[0041] In some embodiments, the message processing script further includes a message processing function, the message processing function includes at least one of a message dimension expansion function, a value calculation function, a value mapping function, a value transparent transmission function, and an aggregation operation function. The processor 101 is used to implement the following when implementing the calling object to pass the message carried by the data message as an input parameter to the format conversion function, and executing the format conversion function to convert the format of the message to obtain a target message in a preset format:
[0042] The message carried by the data message is passed as an input parameter to the message processing function through the calling object, and the message processing function is executed to process the message to obtain a message processing result;
[0043] The message processing result is passed as an input parameter to the format conversion function through the calling object, and the format conversion function is executed to perform format conversion on the message processing result to obtain a target message in a preset format.
[0044] In some embodiments, when the processor 101 obtains the message processing script matching the data message from the preset message processing script library, it is used to implement:
[0045] Parsing the message header of the data message to obtain device information of the network element device, the device information including at least one of a device type and a device identifier;
[0046] A message processing script matching the device information is obtained from the message processing script library, and the message processing script matching the device information is determined as a message processing script matching the data message.
[0047] In some embodiments, the processor 101 is further configured to implement:
[0048] Get script update instructions;
[0049] The message processing script library is updated according to the script update instruction.
[0050] In some embodiments, the script update instruction includes at least one of a script deletion instruction, a script addition instruction, and a script modification instruction. When the processor 101 updates the message processing script library according to the script update instruction, it is used to implement at least one of the following:
[0051] Deleting the message processing script corresponding to the script deletion instruction from the message processing script library;
[0052] Obtaining a message processing script corresponding to the script adding instruction, and adding the message processing script corresponding to the script adding instruction to the message processing script library;
[0053] According to the script modification instruction, the corresponding message processing script in the message processing script library is modified.
[0054] In some embodiments, after obtaining the data message sent by the network element device, the processor 101 is further configured to implement:
[0055] In the case that there is no message processing script matching the data message in the message processing script library, script update prompt information is output, where the script update prompt information is used to prompt a user that the message processing script library needs to be updated.
[0056] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the network management device described above can refer to the corresponding process in the following message processing method embodiment, and will not be repeated here.
[0057] The following will be combined Figure 1 The network management device in the embodiment of the present invention provides a detailed introduction to the message processing method. It should be noted that Figure 1 The network management device is only used to explain the message processing method provided in the embodiment of the present invention, but does not constitute a limitation on the application scenario of the message processing method provided in the embodiment of the present invention.
[0058] See also Figure 2 , Figure 2 The present invention provides a flow chart of a message processing method provided by an embodiment of the present invention. The message processing method can be applied to network management equipment to reduce the workload of customized development and improve the scalability of network management equipment.
[0059] like Figure 2 As shown, the message processing method includes steps S101 to S103.
[0060] Step S101: Acquire a data message sent by a network element device.
[0061] In this embodiment, the network management device and one or more network element devices form a network management system, the network management device is connected to one or more network element devices in communication, and each network element device reports a message to the network management device through the communication connection with the network management device. Among them, the network element device may include a host, a bridge, a router, a hub, etc., and the network management device may be a server. The communication connection between the network management device and one or more network element devices may be a wired connection or a wireless connection. The server may be an independent server or a server cluster composed of multiple servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0062] In some embodiments, when each network element device in the network management device collects a message to be reported, it generates a data message according to its own device information and the message to be reported, and sends the data message to the network management device. The data message includes a message header and a message body, the message header carries the device information of the network element device, the message body carries the message to be reported, the message is encapsulated in a data object, the data message can be a TCP (Transmission Control Protocol, transmission control protocol) message, or a UDP (User Datagram Protocol, user datagram protocol) message, and of course, it can also be other types of messages, which are not specifically limited in the embodiments of the present invention.
[0063] Step S102: Obtain a message processing script matching the data message from a preset message processing script library.
[0064] In this embodiment, the message processing script library includes message processing scripts corresponding to network element devices of different device types. The message processing script can be a script written in a scripting language such as javascript, groovy or Ruby, or a script written in the Lua scripting language. The embodiment of the present invention does not make specific limitations on this.
[0065] For example, the network management system includes network management equipment S, network element equipment A, network element equipment B, network element equipment C and network element equipment D. The device types of network element equipment A, network element equipment B, network element equipment C and network element equipment D are all different. Then, corresponding message processing scripts can be pre-generated for the device types of network element equipment A, network element equipment B, network element equipment C and network element equipment D using javascript scripting language to obtain message processing scripts corresponding to the device types of network element equipment A, network element equipment B, network element equipment C and network element equipment D, thereby forming a message processing script library.
[0066] In some embodiments, the message processing script library is stored in a storage device that is communicatively connected to the network management device, and the storage device includes at least one of a memory inside the network management device and a mobile storage device external to the network management device. The memory inside the network management device may be a Flash chip and a read-only memory (ROM), etc., and the mobile storage device may be a USB flash drive or a mobile hard disk, etc., which is not specifically limited in the embodiments of the present invention.
[0067] In some embodiments, Figure 3 As shown, step S102 includes: sub-step S1021 to sub-step S1022.
[0068] Sub-step S1021, parse the message header of the data message to obtain device information of the network element device.
[0069] In this embodiment, the device information of the network element device includes at least one of the device type and device identification of the network element device. The device type of the network element device is used to describe the type of the network element device, and the device identification of the network element device is used to uniquely identify the network element device in the network management system. The device identification of the network element device may include at least one of the product serial code, IP address, and MAC (Medium Access Control) of the network element device.
[0070] Sub-step S1022: Acquire a message processing script that matches the device information from a message processing script library, and determine the message processing script that matches the device information as a message processing script that matches the data message.
[0071] This embodiment can adaptively obtain a message processing script matching the network element device through at least one of the device type and device identifier of the network element device carried in the data message, so that the network management device can subsequently run the matching message processing script to accurately process the message.
[0072] In some embodiments, a script identifier corresponding to the device information of the network element device is obtained from a preset mapping relationship table as a target script identifier; a message processing script corresponding to the target script identifier is obtained from a preset message processing script library, and the message processing script corresponding to the target script identifier is determined as a message processing script that matches the data message. Among them, the script identifier is used to uniquely identify the message processing script, and the mapping relationship table is used to describe the mapping relationship between the device information of the network element device and the script identifier of the message processing script. The mapping relationship between the device information of the network element device and the script identifier of the message processing script can be set based on actual conditions, and the embodiments of the present invention do not specifically limit this.
[0073] In some embodiments, the message header of the data message is parsed to obtain the device information of the network element device; when the device information of the network element device is in the device trust list of the network management device, a message processing script matching the device information is obtained from the message processing script library, and the message processing script matching the device information is determined as the message processing script matching the data message; when the device information of the network element device is not in the device trust list of the network management device, the data message is discarded. The device trust list of the network management device stores the device information of one or more network element devices that are mutually trusted with the network management device. This embodiment can improve the security of message processing by obtaining a message processing script matching the device information from the message processing script library when the device information of the network element device is in the device trust list of the network management device, and discarding the data message when the device information of the network element device is not in the device trust list of the network management device.
[0074] In some embodiments, before step S102, it also includes: determining whether there is a message processing script matching the data message in the preset message processing script library; if there is a message processing script matching the data message in the preset message processing script library, executing step S102 to obtain the message processing script matching the data message from the preset message processing script library; if there is no message processing script matching the data message in the preset message processing script library, outputting script update prompt information, and the script update prompt information is used to prompt the user to update the message processing script library. In this embodiment, by outputting script update prompt information when there is no message processing script matching the data message in the message processing script library, the user can be prompted to update the message processing script library, so that the user can update the message processing script library in a timely manner.
[0075] In some embodiments, the script update prompt information may be outputted in a manner of: controlling a display device that is in communication connection with the network management device to display the script update prompt information. Or sending the script update prompt information to at least one of a user terminal, an email address, and a mobile phone number bound to the network management device. The display device that is in communication connection with the network management device may be a display screen of the network management device itself, or may be a display external to the network management device, which is not specifically limited in the embodiments of the present invention.
[0076] Step S103: Load a message processing script into the memory, and run the message processing script to process the message carried by the data message to obtain a target message in a preset format.
[0077] For example, Figure 4As shown, the network management device 100 is communicatively connected with the first network element device 11 and the second network element device 12. The device type of the first network element device 11 is different from the device type of the second network element device 12. When the network management device 100 obtains the first data message sent by the first network element device 11, it obtains a message processing script matching the first data message from the message processing script library, recorded as the first message processing script, loads the first message processing script in the memory, and runs the first message processing script to process the first message carried by the first data message to obtain a first target message in JSON format. When the network management device 100 obtains the second data message sent by the second network element device 12, it obtains a message processing script matching the second data message from the message processing script library, recorded as the second message processing script, loads the second message processing script in the memory, and runs the second message processing script to process the second message carried by the second data message to obtain a second target message in JSON format.
[0078] In some embodiments, the message processing script supports hot loading. Hot loading means that the message processing script can be loaded into the memory without restarting the service. The preset format can be JSON (JavaScript Object Notation, JS object notation) format, or YAML (YAML Ain't a Markup Language) format, of course, it can also be other formats, and the embodiments of the present invention do not specifically limit this.
[0079] In some embodiments, before running a message processing script to process the message carried by the data message to obtain a target message in a preset format, it also includes: determining whether the device information of the network element device is located in the device trust list of the network management device; if the device information of the network element device is located in the device trust list of the network management device, parsing the message body of the data message to obtain the message carried by the data message; running the message processing script to process the message carried by the data message to obtain the target message in a preset format; if the device information of the network element device is not located in the device trust list of the network management device, discarding the data message. This embodiment can greatly improve the security of message transmission by running a message processing script to process the message carried by the data message when the device information of the network element device is located in the device trust list of the network management device, and discarding the data message when the device information of the network element device is not located in the device trust list of the network management device.
[0080] In some embodiments, before step S103, it also includes: determining whether a message processing script matching the data message has been loaded in the memory; if the message processing script matching the data message has not been loaded in the memory, executing step S103, loading the message processing script in the memory, and running the message processing script to process the message carried by the data message to obtain a target message in a preset format; if the message processing script matching the data message has been loaded in the memory, running the message processing script to process the message carried by the data message to obtain a target message in a preset format. This embodiment can directly run the message processing script when the corresponding message processing script has been loaded in the memory, thereby avoiding repeated loading of the message processing script and improving the message processing efficiency.
[0081] In some embodiments, the message processing script includes a format conversion function, and the method of running the message processing script to process the message carried by the data message to obtain the target message in the preset format can be: running the message processing script to obtain the calling object of the message processing script; passing the message carried by the data message as an input parameter to the format conversion function through the calling object, and executing the format conversion function to convert the format of the message to obtain the target message in the preset format. In this embodiment, the format conversion function in the message processing script can quickly and accurately convert the message carried by the data message into the target message in the preset format.
[0082] In some embodiments, the message processing script also includes a message processing function, and the message processing function includes at least one of a message dimension expansion function, a value calculation function, a value mapping function, a value transparent transmission function, and an aggregation operation function. By calling an object, the message carried by the data message is passed as an input parameter to the format conversion function, and the format conversion function is executed to convert the message format, and the target message of the preset format is obtained. It may include: by calling an object, the message carried by the data message is passed as an input parameter to the message processing function, and the message processing function is executed to process the message to obtain a message processing result; by calling an object, the message processing result is passed as an input parameter to the format conversion function, and the format conversion function is executed to convert the message processing result format to obtain a target message of the preset format. The message processing script of this embodiment can not only convert the format of the message, but also perform calculation operations such as dimension expansion, value calculation, value mapping, value transparent transmission, and aggregation operation on the message, so that the target message obtained by the message processing script can meet the different requirements of the network management device.
[0083] In some embodiments, the message processing method further includes: obtaining a script update instruction; and updating the message processing script library according to the script update instruction. The script update instruction may be manually triggered by a user, automatically triggered by a network management device, or issued by a server, which is not specifically limited in the embodiment of the present invention. In this embodiment, by updating the message processing script library, the updated message processing script library can meet the message processing requirements of the network element device accessing the network management device, thereby greatly reducing the workload of customized development and greatly improving the scalability of the network management device.
[0084] In some embodiments, the script update instruction includes at least one of a script deletion instruction, a script addition instruction, and a script modification instruction. The method for updating the message processing script library according to the script update instruction includes at least one of the following: deleting the message processing script corresponding to the script deletion instruction from the message processing script library; obtaining the message processing script corresponding to the script addition instruction, and adding the message processing script corresponding to the script addition instruction to the message processing script library; modifying the corresponding message processing script in the message processing script library according to the script modification instruction. Among them, the method for obtaining the message processing script corresponding to the script addition instruction can be: downloading the message processing script corresponding to the script identifier carried by the script addition instruction from the server.
[0085] See also Figure 5 , Figure 5 It is a schematic block diagram of the structure of a message processing device provided by an embodiment of the present invention.
[0086] like Figure 5 As shown, the message processing device 200 includes:
[0087] The acquisition module 210 is configured to acquire a data message sent by a network element device;
[0088] The acquisition module 210 is further configured to acquire a message processing script matching the data message from a preset message processing script library, wherein the message processing script library includes message processing scripts corresponding to network element devices of different device types;
[0089] A loading module 220, configured to load the message processing script into a memory;
[0090] The message processing module 230 is configured to run the message processing script to process the message carried by the data message to obtain a target message in a preset format.
[0091] In some embodiments, the message processing script includes a format conversion function, and the message processing module 230 is further configured to:
[0092] Run the message processing script to obtain a calling object of the message processing script;
[0093] The message carried by the data message is passed as an input parameter to the format conversion function through the calling object, and the format conversion function is executed to convert the format of the message to obtain a target message in a preset format.
[0094] In some embodiments, the message processing script further includes a message processing function, the message processing function includes at least one of a message dimension expansion function, a value calculation function, a value mapping function, a value transparent transmission function and an aggregation operation function, and the message processing module 230 is further configured to:
[0095] The message carried by the data message is passed as an input parameter to the message processing function through the calling object, and the message processing function is executed to process the message to obtain a message processing result;
[0096] The message processing result is passed as an input parameter to the format conversion function through the calling object, and the format conversion function is executed to perform format conversion on the message processing result to obtain a target message in a preset format.
[0097] In some embodiments, the acquisition module 210 is further configured to:
[0098] Parsing the message header of the data message to obtain device information of the network element device, the device information including at least one of a device type and a device identifier;
[0099] A message processing script matching the device information is obtained from the message processing script library, and the message processing script matching the device information is determined as a message processing script matching the data message.
[0100] In some embodiments, the message processing apparatus 200 further includes:
[0101] The acquisition module 210 is further configured to acquire a script update instruction;
[0102] The script updating module is configured to update the message processing script library according to the script updating instruction.
[0103] In some embodiments, the script update instruction includes at least one of a script deletion instruction, a script addition instruction, and a script modification instruction, and the script update module is further configured to execute at least one of the following:
[0104] Deleting the message processing script corresponding to the script deletion instruction from the message processing script library;
[0105] Obtaining a message processing script corresponding to the script adding instruction, and adding the message processing script corresponding to the script adding instruction to the message processing script library;
[0106] According to the script modification instruction, the corresponding message processing script in the message processing script library is modified.
[0107] In some embodiments, the message processing apparatus 200 further includes:
[0108] The output module is configured to output script update prompt information when there is no message processing script matching the data packet in the message processing script library, wherein the script update prompt information is used to prompt a user to update the message processing script library.
[0109] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the message processing device described above can refer to the corresponding process in the aforementioned message processing method embodiment, and will not be repeated here.
[0110] An embodiment of the present invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any message processing method provided in the description of the embodiment of the present invention.
[0111] The storage medium may be an internal storage unit of the network management device described in the above embodiment, such as a hard disk or memory of the network management device. The storage medium may also be an external storage device of the network management device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the network management device.
[0112] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0113] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0114] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A message processing method, characterized in that: Applied to a network management device, the method comprises: Obtain data packets sent by network element devices; Acquire a message processing script matching the data message from a preset message processing script library, wherein the message processing script library includes message processing scripts corresponding to network element devices of different device types; The message processing script is loaded into the memory, and the message processing script is run to process the message carried by the data message to obtain a target message in a preset format.
2. The message processing method according to claim 1, characterized in that: The message processing script includes a format conversion function, and the running of the message processing script processes the message carried by the data message to obtain a target message in a preset format, including: Run the message processing script to obtain a calling object of the message processing script; The message carried by the data message is passed as an input parameter to the format conversion function through the calling object, and the format conversion function is executed to convert the format of the message to obtain a target message in a preset format.
3. The message processing method according to claim 2, characterized in that: The message processing script also includes a message processing function, which includes at least one of a message dimension expansion function, a value calculation function, a value mapping function, a value transparent transmission function, and an aggregation operation function. The calling object passes the message carried by the data message as an input parameter to the format conversion function, executes the format conversion function, and converts the format of the message to obtain a target message in a preset format, including: The message carried by the data message is passed as an input parameter to the message processing function through the calling object, and the message processing function is executed to process the message to obtain a message processing result; The message processing result is passed as an input parameter to the format conversion function through the calling object, and the format conversion function is executed to perform format conversion on the message processing result to obtain a target message in a preset format.
4. The message processing method according to claim 1, characterized in that: The acquiring a message processing script matching the data message from a preset message processing script library includes: Parsing the message header of the data message to obtain device information of the network element device, the device information including at least one of a device type and a device identifier; A message processing script matching the device information is obtained from the message processing script library, and the message processing script matching the device information is determined as a message processing script matching the data message.
5. The message processing method according to any one of claims 1 to 4, characterized in that: The method further comprises: Get script update instructions; The message processing script library is updated according to the script update instruction.
6. The message processing method according to claim 5, characterized in that: The script update instruction includes at least one of a script deletion instruction, a script addition instruction, and a script modification instruction, and the updating of the message processing script library according to the script update instruction includes at least one of the following: Deleting the message processing script corresponding to the script deletion instruction from the message processing script library; Obtaining a message processing script corresponding to the script adding instruction, and adding the message processing script corresponding to the script adding instruction to the message processing script library; According to the script modification instruction, the corresponding message processing script in the message processing script library is modified.
7. The message processing method according to claim 1, characterized in that: After obtaining the data message sent by the network element device, the method further includes: In the case that there is no message processing script matching the data message in the message processing script library, script update prompt information is output, where the script update prompt information is used to prompt a user that the message processing script library needs to be updated.
8. A message processing device, characterized in that: include: An acquisition module, configured to acquire a data message sent by a network element device; The acquisition module is further configured to acquire a message processing script matching the data message from a preset message processing script library, wherein the message processing script library includes message processing scripts corresponding to network element devices of different device types; A loading module, configured to load the message processing script in a memory; The message processing module is configured to run the message processing script to process the message carried by the data message to obtain a target message in a preset format.
9. A network management device, characterized in that: The network management device includes a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the message processing method according to any one of claims 1 to 7 is implemented.
10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the message processing method according to any one of claims 1 to 7.
