Communication method and device for network management equipment
By generating batch files using interface tables and configuration tables, the limitation of northbound data from network management devices is resolved, enabling the acquisition of complete and diverse non-northbound data from network management devices, and supporting the development of automated tools and data import.
Patent Information
- Application Number
- CN202111588458.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-12-23
AI Technical Summary
The northbound data provided by existing network management equipment has limitations and cannot obtain some status data, such as the actual optical port speed and license status, making it difficult to meet the data requirements of automated network analysis and network optimization platforms.
By using the interface table and configuration table, a batch file is generated and transmitted to the network management device to execute the instructions. The result data is parsed into a table structure and stored in the target table, which solves the problems of numerous execution instruction codes and inconsistent data structures.
It enables the acquisition of various result data from network management devices, including non-northbound data, improving data integrity and diversity, supporting the development of automated tools, suitable for multi-threaded and multi-program calls, and simplifying the complexity of storing parsed data in the database.
Smart Images

Figure CN114328382B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology network, and particularly relates to a communication method and device of a network management device, a computing device and a computer readable storage medium. BACKGROUND
[0002] Existing third-party automatic optimization management tools of various non-main equipment manufacturers, such as various network optimization platforms, energy-saving systems, MR analysis systems, alarm analysis systems, capacity analysis systems, etc., are highly dependent on the northbound data provided by the network management device.
[0003] The northbound data refers to the data obtained through a northbound interface (NBI). The northbound interface is an interface defined for user access and management of the network. The northbound data includes some files generated by the network management device according to specific rules, such as Extensible Markup Language (XML) files. The data acquisition server will obtain these northbound data from the network management device through File Transfer Protocol (FTP) and the like at regular intervals, and store them in the database after parsing the data.
[0004] With the urgent needs of energy saving and emission reduction of operators, and the widespread use of automatic network analysis and network optimization platforms, a large amount of wireless network result data is needed. As described above, the existing various network optimization platforms and intelligent analysis platforms basically depend on the northbound data generated by the network management device. However, the northbound data provided by the network management device has obvious limitations, such as the inability to obtain some state data, such as the actual rate of the optical port, the license state, etc., the long data update period (such as daily update of general parameters and 15-minute update of performance parameters), the inability to obtain data in time and evaluate the network state in time, and the lack of a large number of private parameter data of manufacturers, etc.
[0005] Due to the limitations of the northbound data, such as the difficulty in obtaining some private data of manufacturers and some state data, it is difficult to meet the data needs of automatic network analysis and network optimization platforms by using only the northbound data. SUMMARY
[0006] To achieve the above purpose, the present application provides a communication scheme of a network management device, which can obtain various result data of the network management device from the network management device, including non-northbound data. The communication scheme of the network management device includes a communication method and device of the network management device, a computing device and a storage medium.
[0007] The first aspect of the application provides a communication method of a network management device, comprising: receiving a transferred parameter, wherein the parameter comprises a task serial number; obtaining a record corresponding to the task serial number by accessing an interface table, wherein the record comprises instruction content and a network management device identifier; generating a batch processing file according to the instruction content; transmitting the batch processing file to a network management device corresponding to the network management device identifier; and transmitting an instruction of activating the batch processing file to the network management device, so that the network management device executes the instruction content corresponding to the batch processing file.
[0008] According to the above, the instruction can be sent to the network management device in the above manner, so that the network management device executes the instruction content corresponding to the batch processing file. The interface table is used to obtain the instruction content, which solves the problem that the code characters of the instruction execution part are too numerous and are not suitable for being directly transmitted through a console program.
[0009] As a possible implementation manner of the first aspect, the method further comprises: obtaining result data generated by the network management device when executing the instruction content; parsing the result data into table structure data; and writing the parsed table structure data into a target table; and the target table is determined according to the record corresponding to the task serial number.
[0010] According to the above, various result data of the network management device, including non-northward data, can be obtained from the network management device, and the data is stored in the target table. Since the information of the target table is recorded in the interface table, the problem of how to accurately store the result data of different data structures output by the network management device into the corresponding target table is solved.
[0011] As a possible implementation manner of the first aspect, the target table is determined according to the record corresponding to the task serial number, comprising: the record corresponding to the task serial number comprises an index of the target table; and the target table is determined from a configuration table according to the instruction content and the index of the target table.
[0012] According to the above, a specific manner of determining the target table is provided. The configuration table and the target table are used together to determine the target table to be used.
[0013] As a possible implementation manner of the first aspect, the method further comprises: obtaining a username and a password required for accessing the network management device; and using the username and the password to realize authentication required for transmitting the batch processing file or the instruction of activating the batch processing file to the network management device, or to realize authentication required for obtaining the result data from the network management device.
[0014] According to the above, in the process of interacting with the network management device, the authentication required for obtaining the result data from the network management device can be solved.
[0015] As a possible implementation manner of the first aspect, the transmitting the batch file to the network device is implemented based on an FTP protocol; or the transmitting the instruction of activating the batch file to the network device is implemented based on a telnet protocol; or the obtaining the result data from the network device is implemented based on the FTP protocol.
[0016] As can be seen, the required protocol can be flexibly used as required. In the implementation manner of transmitting the instruction of activating the batch file to the network device based on the telnet protocol, a session with the network device can be implemented through the telnet protocol, and the session is used to require the network device to execute the transmitted batch file.
[0017] As a possible implementation manner of the first aspect, the record corresponding to the task serial number further comprises an execution mode parameter, and the execution mode parameter is used to indicate whether the result data of the network device running instruction content is obtained from the network device identified by the network device identifier.
[0018] As can be seen, the working mode can be determined accordingly, so as to implement the function of transmitting only the instruction to the network device or simultaneously collecting data. In an embodiment, the execution mode parameter can be represented by a GetLogFile parameter.
[0019] As a possible implementation manner of the first aspect, the transmitted parameter comprises a parameter transmitted by a database management system, the interface table comprises an interface table of the database management system, the configuration table comprises a configuration table of the database management system, or the target table comprises a target table of the database management system.
[0020] As can be seen, the implementation manner is applicable to the communication between the database management system and the network device. For example, a timing task is set in the database management system, and the timing task triggers the action of transmitting the parameter. For another example, the action of transmitting the parameter by the database management system can also be triggered by user access and operation of the database management system. The interface table and the configuration table can be obtained through the database management system, so as to obtain the required information for the communication with the network device, and the data in the table structure obtained from the network device is stored in the target table of the database management system.
[0021] The second aspect of the present application provides a communication device with a network device, comprising: a receiving module, configured to receive a transmitted parameter, and the parameter comprises a task serial number; a database accessing module, configured to obtain a record corresponding to the task serial number by accessing an interface table, and the record comprises instruction content and a network device identifier; a batch file generating module, configured to generate a batch file according to the instruction content; a transmitting module, configured to transmit the batch file to a network device corresponding to the network device identifier, and transmit an instruction of activating the batch file to the network device, so that the network device executes the instruction content corresponding to the batch file.
[0022] As a possible implementation manner of the second aspect, the transmission module is further configured to obtain result data generated by the network management device in executing the instruction content; the data analysis module is further configured to analyze the result data into data in a table structure; and the database access module is further configured to write the data in the table structure obtained by analysis into the target table, and the target table is determined according to the record corresponding to the task serial number.
[0023] The third aspect of the present application provides a computing device, comprising a processor and a memory having program instructions stored thereon, the program instructions causing the processor to execute any of the communication methods of the first aspect when executed by the processor.
[0024] The fourth aspect of the present application provides a computer readable storage medium having program instructions stored thereon, the program instructions causing the computer to execute any of the communication methods of the first aspect when executed by the computer.
[0025] In summary, the communication method with the network management device provided by the embodiments of the present application can realize automatic interaction with the network management device, for example, when called by other programs or database statements or stored procedures, the interaction with the network management device is realized.
[0026] The data obtained by the communication method of the embodiments of the present application can include non-northward data, which is a supplement to the northward data, and improves the data integrity and diversity of the data obtained from the network device (such as a wireless network device). When the communication method of the embodiments of the present application is applied to the communication between the database management system and the wireless base station network management system, it can serve as a bridge between the database management system and the wireless base station network management system, which makes it possible to easily obtain private data of manufacturers, and further makes up for the deficiency of northward interface data. Compared with the background technology in which only northward data can be obtained, the data obtained by the communication method of the embodiments of the present application is more comprehensive, and can cover state data, private data, etc.
[0027] In addition, the communication method of the embodiments of the present application can be called, so it can be connected to various automation programs, has high reliability, and supports multi-threading and simultaneous calling of multiple different programs. It provides strong support for the development of automation tools for operators. Based on the present application, a large number of other originally impossible software systems can be developed.
[0028] The communication method of the embodiment of the application can support batch execution of a large number of query type instructions based on the transmitted instruction, can execute a single query type instruction, can execute a modification type instruction, and can execute a query type instruction and obtain a data log after the query, and is suitable for wide application. It can be seen that the application can be used as an operation and maintenance center (OMC) alone and is only used for executing instructions, and can be used to provide a large number of private parameters without northbound data to a database management system.
[0029] The communication method of the embodiment of the application and the business logic of the specific execution instruction are not bound, and a design goal of high cohesion and low coupling is achieved. Other programs that call the communication method of the application only need to consider what needs to be obtained from the network management, and do not need to care about how to obtain it. The data is obtained by calling the communication method of the application.
[0030] A plurality of different formats of logs can be obtained corresponding to one instruction header, and log analysis and storage are relatively complex. However, after the communication method of the embodiment of the application analyzes the obtained result data of the network management device, the specified target table is determined according to the interface table and the configuration table, and it is ensured that the data structure of the analyzed result data can be saved into the matched target table, so that the complexity of the data storage after the analysis is simplified.
[0031] The core of the summary is that a program usable, BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1A A schematic diagram of a result of querying license information of each node by using an LST LICENSE instruction;
[0033] Figure 1B A schematic diagram of a result of querying a specific license file by using an LST LICENSE instruction;
[0034] Figure 2 A schematic diagram of a result of historical execution in the interface table;
[0035] Figure 3 A schematic diagram of an implementation architecture of the communication method with the network management device provided by the embodiment of the application;
[0036] Figure 4 A first embodiment flowchart of the communication method with the network management device provided by the application;
[0037] Figure 5A A second embodiment flowchart of the communication method with the network management device provided by the application;
[0038] Figure 5BA schematic diagram illustrating the principle of a second embodiment of the communication method with network management equipment provided in this application;
[0039] Figure 5C A schematic diagram of the structure of logs generated for network management devices;
[0040] Figure 6 A schematic diagram of a first embodiment of the communication device with network management equipment provided in this application;
[0041] Figure 7 A schematic diagram of a second embodiment of the communication device with network management equipment provided in this application;
[0042] Figure 8 A schematic diagram of a computing device provided in an embodiment of this application;
[0043] It should be understood that the dimensions and shapes of the block diagrams in the above structural diagrams are for reference only and should not constitute an exclusive interpretation of the embodiments of this application. The relative positions and inclusion relationships between the block diagrams presented in the structural diagrams are only schematic representations of the structural relationships between the block diagrams, and are not intended to limit the physical connection methods of the embodiments of this application. Detailed Implementation
[0044] The technical solutions provided in this application will be further described below with reference to the accompanying drawings and embodiments. It should be understood that the system architecture and business scenarios provided in the embodiments of this application are mainly for illustrating possible implementations of the technical solutions of this application and should not be construed as the sole limitation on the technical solutions of this application. Those skilled in the art will recognize that the technical solutions provided in this application are equally applicable to similar technical problems as system architectures evolve and new business scenarios emerge.
[0045] It should be understood that the communication solutions with network management devices provided in the embodiments of this application include communication methods and apparatus with network management devices, computing devices, computer-readable storage media, and computer program products. Since these technical solutions solve problems based on the same or similar principles, some repetitive details may not be repeated in the following descriptions of specific embodiments, but these specific embodiments should be considered as mutually referencing each other and can be combined with each other.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In case of any inconsistency, the meaning set forth in this specification or derived from the content described herein shall prevail. Furthermore, the terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application. To accurately describe the technical content of this application and to accurately understand the invention, the following explanations or definitions of the terms used in this specification are provided before describing specific embodiments:
[0047] 1) File Transfer Protocol (FTP): mainly used for file transfer between user terminal and remote terminal, including file uploading and downloading.
[0048] 2) Telnet: full name in English can also be written as Teletype Network: used for remote login of a user terminal (such as a computer) to a remote terminal. After remote login, the user can execute the instructions of the remote terminal.
[0049] 3) Console program: when the console program is executed, the communication method of the network management device described in the embodiments of the present application can be implemented, that is, the execution logic of the communication method of the network management device described in the embodiments of the present application. Specifically, the console program performs a series of actions by being called to access the network management device based on the configuration table and the interface table. The console program can be developed using C#, Java, etc.
[0050] 4) Configuration table: the configuration table indicates the target table name to be stored after the result data of the network management device is converted into table data. The configuration table reserves multiple target tables for the result data generated after each instruction is executed (as shown in the example of the following table, three index fields of the reserved target tables: TableName1, TableName2, TableName3 are shown). Different target tables have different table contents to adapt to the result data of different data structures generated after the network management device executes the corresponding instructions. Specifically, which target table to use will be written into the interface table together with the instruction to be transmitted to the network management device, and will be obtained by the console program. The console program can determine the target table according to the instruction name (the last column of the following table), the index of the table (TableName1, TableName2, TableName3 of the first row of the following table). The configuration table can be provided by a database management system (DBMS).
[0051] Log Head Table Name 1 Table Name 2 Table Name 3 Cmd Exaple License information query result Cmd2Table_LstLicense Cmd2Table_LstLicense2 LST LICENSE:; Query CA cell set cell Cmd2Table_LstCaGroupCell LST CAGROUPCELL:;
[0052] 5) Target table: after the result data obtained from the network management device is parsed and converted into table data, the table used to store these table data is the target table. For example, the name of the target table is recorded under the index TableNameX item in the configuration table as shown above, such as Cmd2Table_LstLicense and Cmd2Table_LstLicense2. Multiple target tables are provided through the configuration table because the network management device outputs result data of different data structures, even if the same instruction is executed, the result data of different data structures can be output, for example, the arrangement can be different (data arranged vertically or horizontally is output), the output quantity can be different (0 group, 1 group or multiple groups of data are output), the table item content can be different (one or more types of table items are output), therefore different target tables are set for corresponding storage. The target table can be provided by the DBMS.
[0053] As Figure 1A , Figure 1B Two examples of the execution result of the LST LICENSE instruction of the network management device are shown, Figure 1A The example is the result of querying the license information of each node using the instruction, Figure 1B The example is the result of querying a specific license file using the instruction, and the "license information query result" shown in the two examples can be seen that the data structure of the result data obtained by the network management device after being converted into table data is different, therefore different target tables are required for corresponding storage, for example, the table data converted using the Cmd2Table_LstLicense target table, and the other table data converted using the Cmd2Table_LstLicense2 target table.
[0054] 6) Interface table: the interface table is used to record the execution instruction of each network management device and related information, including the specific content of the instruction to be executed (such as the instruction body, the required parameters of the instruction), the identification of the network management device executing the instruction (such as the IP address, the MAC address or the device name, etc., in the embodiments of the present application, only the IP address can be used), whether the result data generated after the execution of the instruction needs to be retrieved (such as a log file), the index of the target table used when the result data is parsed and stored (the index is, for example, TableName2), and the like. Each record corresponds to a task identification (TaskID). The reason for setting the interface table is as follows: since the above-mentioned related information is relatively complicated, and the code characters of the execution instruction part are numerous, it is not suitable to directly pass through the console program, therefore, before each call of the console program, the above-mentioned instruction to be executed and related information need to be stored in the interface table, the interface table will automatically generate a TaskID, so that only the TaskID needs to be passed to the console program, and the console program will obtain the instruction and related information in the interface table according to the TaskID. The interface table can be provided by the DBMS.
[0055] As Figure 2 An example of the results of multiple historical executions stored in the interface table is shown, in which the CMD table item represents the specific content of the instruction, the OmcIP table item represents the IP of the network management device, the OmcSubnet table item represents the subnet identification, and the GetLogFile table item represents whether the result data generated after the execution of the instruction needs to be retrieved.
[0056] When the item in the interface table indicating whether the result data generated after the execution of the instruction needs to be retrieved (such as the GetLogFile item) is represented as no (for example, GetLogFile = 0), it can also be referred to as the working mode of the present application being "only execution" of the network management device, in which the network management device executes the received instruction. When it is represented as yes (for example, GetLogFile = 1), it can also be referred to as the working mode of the present application being "data collection" from the network management device, in which the network management device executes the received instruction, and the result data generated after the execution of the instruction is obtained from the network management device, and the result data can be processed and stored in the target table. Whether the present application is executed in the "only execution" or "data collection" working mode can be indicated by the parameter of the above-mentioned table item (such as GetLogFile).
[0057] Firstly, the application scenario of the present application is introduced, and the scheme of the present application can be applied to various application scenarios which need to obtain the result data of the network management device or need to interact with the network management device. When the present application is applied to the information interaction with the network management device, it can include the sending of the instruction, the acquisition of the result data, and the like. Figure 3An implementation architecture of the method for communicating with the network management device is shown, which includes a console program, an interface table and a configuration table. The console program can be deployed on a server supporting intercommunication with the network management device, for example, on a server in the same local area network as the network management device or on a server intercommunicating through a virtual local area network (VPN). The interface table and the configuration table can be deployed on a database server.
[0058] The following is an example of a specific application scenario: the console program implementing the method for communicating with the network management device is deployed on a server, which can interact with the network management device, obtain result data from the network management device, and store the data in the database after data cleaning. The server also provides WEB page access function, so that when a user needs to view the result data of the network management device, the user does not need to log in to the network management device, but only needs to access the server to obtain the result data of the network management device stored in the database. When the user accesses, the server can be accessed through the WEB page or through the mobile APP client.
[0059] The following is another example of a specific application scenario: the console program implementing the method for communicating with the network management device is deployed on a server, and a periodic automatic execution job is established on the database, which is used to periodically call the console program, thereby realizing periodic interaction with the network management device, periodic batch acquisition of result data of the network management device from the network management device, and storage of the result data in the database after cleaning. The result data can be some non-northbound data, such as wireless parameters, private configuration data, state data, etc. (for example, the base station license authorization information, which is non-northbound data), and the result data can be cleaned and stored in the database. The automatic execution job can be established at the early morning, and the execution period is set to daily, so that the update frequency of the non-northbound data is the same as that of the northbound data.
[0060] In some application scenarios, the embodiments of the present application can be applied to the process of obtaining result data from a wireless network management device of the fourth generation mobile communication technology or a wireless network management device of the fifth generation mobile communication technology. The obtained result data includes, for example, performance data generated by a base station, such as the amount of traffic generated by the base station in one hour; configuration data of the base station and network element, such as the power of the cell set in the base station and various wireless parameters; state data of the base station operation, such as the running state of the single board in the base station and the number of users served by the real-time service; measurement report (MR) data, such as the state record information of the air interface reported by the user equipment (UE) to the base station side and measured by the base station. The fourth generation mobile communication technology includes, for example, long term evolution (LTE) and the like, and the fifth generation mobile communication technology includes, for example, new radio (NR) and the like.
[0061] The communication scheme provided by the embodiments of the present application and the network management device will be described in detail below with reference to the various drawings.
[0062] Figure 4 The flowchart of the first embodiment of the communication method provided by the present application and the network management device is shown in FIG. 1. Figure 4 The communication method includes the following steps:
[0063] S10: Receive the parameters passed, which include the task serial number.
[0064] In some embodiments, the method provided by the embodiments of the present application starts to execute this step when invoked. In some embodiments, it can be invoked by the statement of the database, or it can be invoked by the statement in the execution process of other programs, such as a certain desktop application or a certain WEB application. When invoked, it will receive the task serial number and other parameters passed from the invoker.
[0065] In some embodiments, the task body corresponding to the task serial number, such as the execution instruction of the network management device and related information, has been maintained in the interface table before this step. The execution instruction and related information of the network management device stored in the interface table can include: the specific content of the instruction to be executed (such as the instruction body and the required parameters of the instruction), the identification of the network management device executing the instruction (such as the IP address, MAC address, device name, etc.), whether the result data generated after executing the instruction needs to be retrieved, the target table name used when analyzing and storing the result data, etc. Each record, i.e., each task body, corresponds to a task identification (TaskID). The result data can be a log file.
[0066] S20: Access the interface table to obtain the record corresponding to the task flow number, which at least includes instruction content and network management device identification.
[0067] In some embodiments, the TaskID in the interface table is matched to the record corresponding to the task flow number, i.e., the corresponding task body.
[0068] S30: Generate a batch file according to the instruction content.
[0069] In some embodiments, the instruction content in the interface table is encoded into a text format to generate a batch file in a text format. In other embodiments, a batch file in other formats can also be generated. Among them, the batch file in a text format is generated because this format is widely used, easy to identify and further process. The suffix of the batch file can be txt, bat, etc.
[0070] S40: Transmit the generated batch file to the network management device corresponding to the network management device identification.
[0071] In some embodiments, when the transmission of the batch file is performed, a transmission protocol can be used for transmission, such as File Transfer Protocol (FTP), FTP based on SSL (FTPS), SSH File Transfer Protocol (SFTP), Temporary File Transfer Protocol (TFTP), Odette File Transfer Protocol (OFTP), Accelerated File Transfer Protocol (AFTP), etc.
[0072] In some embodiments, the batch file can be transmitted to a specified directory of the network management device. In some embodiments, the specified directory can be pre-stored in the configuration table corresponding to the identification of the network management device.
[0073] In some embodiments, when the transmission of the batch file is performed, encrypted transmission can also be performed, such as encryption of the batch file in a text format.
[0074] S50: Transmit an instruction to activate the batch file to the network management device to make the network management device run the instruction content recorded in the batch file.
[0075] In some embodiments, when the instruction to activate the batch file is transmitted, the above transmission protocol can be used for transmission, or another transmission protocol can be used for transmission, such as Remote Login Protocol (Telnet), Remote Desktop Connection Protocol (RDP), Remote Interfaceless Connection Protocol (SSH), Graphical Remote Management Protocol (RFB), etc.
[0076] In some embodiments, the network management device runs the instruction content to generate corresponding result data, such as a log file. The result data is stored in a designated directory of the network management device.
[0077] In some embodiments, after step S50, the method further comprises a step of retrieving the result data of the network management device, such as steps S60-S80:
[0078] In some embodiments, the transmission of the instructions of the batch processing file can be encrypted.
[0079] S60: obtaining the result data generated by the network management device running the instructions from the network management device identified according to the corresponding network management device.
[0080] In some embodiments, the transmission of the result data from the network management device can be based on the transmission protocol mentioned above, such as the transmission protocols listed in step S30.
[0081] In some embodiments, the configuration table stores the designated directory of the network management device for storing the result data identified according to the corresponding network management device, so that the result data of the network management device can be obtained from the designated directory of the network management device.
[0082] In some embodiments, the transmission of the result data of the network management device can be encrypted.
[0083] S70: parsing the result data obtained from the network management device into table structure data.
[0084] In some embodiments, the received result data is generated according to a predetermined format, so that the log result body in the log file can be identified according to the predetermined format, and the part of the content can be parsed into table data.
[0085] In some embodiments, when the result data is in text format, special characters such as space, carriage return, and non-breaking space in the content are converted into table data.
[0086] In some embodiments, when the result data is in XML format, the corresponding fields in the XML file are identified and converted into table data.
[0087] In some embodiments, when the result data is in table format, the table contents can be directly identified and the required table data can be extracted.
[0088] S80: writing the parsed data into a designated target table; the target table is determined according to the record corresponding to the task serial number obtained from the access interface table.
[0089] In some embodiments, as described in step S10, the interface table records the relevant information of the target table, from which the specified target table can be determined, so that the parsed data can be stored in the matched target table in a correct format.
[0090] In some embodiments, the target table is determined according to the record corresponding to the task serial number obtained from the access interface table, including: obtaining the index of the target table (e.g., TableName2) in the record corresponding to the task serial number from the interface table, and then obtaining the name of the target table corresponding to the index from the instruction content in the configuration table, so as to determine the target table.
[0091] In some embodiments, when the above steps S40, S50 and S60 involve information interaction with the network management device, the method can further include: obtaining a username and a password of the network management device; using the username and the password to realize authentication for accessing the network device, so as to transmit the batch processing file, the instruction for activating the batch processing file, and the result data generated by the network management device running the instruction. The username and the password can be stored in a configuration file in correspondence with the identifier of the network management device.
[0092] In some embodiments, in the above step S10, the record corresponding to the task serial number of the interface table can include an execution mode parameter, which is used to indicate whether to obtain the result data of the network management device running the instruction content from the network management device corresponding to the identifier of the network management device, so as to determine whether to perform the above steps S60-S80. In some embodiments, the execution mode can be recorded by using GetLogFile.
[0093] In some embodiments, when the communication method of the present application is applied to the communication between the database management system and the network management device, the transmitted parameter includes the parameter transmitted by the database management system, the interface table includes the interface table of the database management system, the configuration table includes the configuration table of the database management system, or the target table includes the target table of the database management system. In some embodiments, the interface table, the configuration table and the target table are located in the database of the database management system. In some embodiments, a timing task is set in the database management system, which triggers the action of transmitting the parameter, and then starts to perform the above step S10. In some embodiments, the action of transmitting the parameter by the database management system can also be triggered by the user accessing and operating the database management system.
[0094] Below, taking the database management system collecting certain result data of the network management device as an example, the communication method with the network management device provided by the embodiments of the present application is further described in detail. Specifically, the example is that the database management system executes a certain timing task, the task is used to collect data from the network management device and retrieve the data stored in the database of the database management system. In the embodiment, the console program embodies the execution logic of the communication method with the network management device provided by the embodiments of the present application, as shown in Figure 5A The second embodiment of the communication method with the network management device provided by the embodiments of the present application is shown in FIG. 2, and the principle of the second embodiment of the communication method with the network management device provided by the embodiments of the present application is shown in FIG. 3. The communication method includes the following steps: Figure 5B The communication method includes the following steps:
[0095] S110: When the database management system executes the timing task, the calling instruction of the console program is executed to run the console program, and the console program receives the parameters passed by the database management system.
[0096] The task serial number is included in the calling instruction and will be passed to the console program.
[0097] In the embodiment, the calling instruction comes from the database calling statement of the database management system, and the calling statement indicates the calling position of the console program and carries the above-mentioned parameters. An example of indicating the calling position of the program is shown as follows: “E:\exe\getomtable2020\RunCmdOnOmcHW.exe”, and an example of indicating the above-mentioned two parameters carried is shown as follows: “-DataToTable-id 12345”. The two parameters can be located after the statement indicating the calling position of the program or can be indicated in another statement. In other embodiments, the calling instruction can also come from the calling statement of a certain desktop program or ASP.NET program.
[0098] S120: The console program communicates with the database management system to obtain the related information in the interface table and the configuration table in the database of the database management system.
[0099] According to the task serial number, the table entry of the TaskID matched with the task serial number in the interface table can be accessed. In the example, the record of the TaskID matched with the task serial number in the interface table includes the execution instruction (CMD), the IP address of the network management device (OmcIP), the parameter value of GetLogFile, the index number of the target table, etc.
[0100] According to the IP address of the network management device in the record in the interface table, the username and password corresponding to the IP address of the network management device are obtained from a configuration file, which are used for subsequent file transmission or remote login.
[0101] Wherein, the console program can determine the execution mode (RunCmd mode or DataToTable mode, wherein RunCmd mode corresponds to the aforementioned "only execution" mode, and DataToTable mode corresponds to the aforementioned "data collection" mode) according to the parameter value of GetLogFile. In this example, the value of GetLogFile is 1, indicating that the execution mode is DataToTable mode. When the value of GetLogFile is 0, it indicates that the execution mode is RunCmd mode.
[0102] Wherein, the corresponding target table can be determined in the configuration table according to the index number of the target table in the record in the interface table, combined with the execution instruction. The step of determining the target table can be completed before step S180. The target table is located in the database of the database management system.
[0103] S130: The console program generates a batch file in text format according to the execution instruction corresponding to the TaskID in the interface table.
[0104] In this embodiment, the batch file is: listomctxyz1234.txt.
[0105] S140: The console program uses the FTP protocol to transfer the batch file to the specified directory of the network management device.
[0106] Wherein, the IP address, username and password of the network management device required for FTP protocol transmission have been obtained from the configuration table through step S120.
[0107] In this embodiment, the following directory of the network management device is uploaded: / ftproot / xxxx / yyyy / script. The specified directory can also be recorded in the configuration table in advance and stored in the IP address of the network management device.
[0108] S150: After the batch file is transferred to the network directory, the console program uses the telnet protocol to log in to the network management device and transmits an instruction to activate the batch file, so that the instructions in the batch file are activated and executed by the network management device. In this example, the network management device executes the instructions and generates a corresponding log file, which is the result data.
[0109] Wherein, the IP address, username and password of the network management device required for telnet protocol login have been obtained from the configuration table through step S120.
[0110] In this embodiment, the instruction is the instruction for activating the telnet batch file: S_ACTIVATE:FILE="listomctxyz1234.txt".
[0111] In this embodiment, the log file generated by the network management device executing the instruction is stored in the following specified directory of the network management device: export / wwww / xxxx / yyyy / result. The specified directory can also be recorded in advance in the configuration table and stored corresponding to the IP address of the network management device.
[0112] S160: The console program uses the FTP protocol to retrieve the log file generated in the above specified directory of the network management device to the server where the console program is located.
[0113] In this embodiment, when retrieving the log file, the file name of the log file generated this time can be obtained first, and then the file names of all the log files generated this time are obtained, and then the log files are retrieved.
[0114] S170: The console program parses the content of the log file into table structure data.
[0115] In this embodiment, when parsing the content of the log file, the log result body in the log file is identified according to the predetermined format, and the content is parsed into table data. For example, as shown in the schematic diagram of the log file, different parts of the content of the log file are shown, including the object information part, the command header part, and the log result body part. The log result body part is the data to be converted into table structure, which is converted into table data according to special characters in the content, such as space, carriage return, and non-breaking space. Figure 5C
[0116] S180: The console program writes the parsed data as new data into the target table of the database management system database determined in step S120.
[0117] As shown in the schematic diagram of the log file, different parts of the content of the log file are shown, including the object information part, the command header part, and the log result body part. The log result body part is the data to be converted into table structure, which is converted into table data according to special characters in the content, such as space, carriage return, and non-breaking space. Figure 6 The application also provides a first embodiment of a communication device for a network management device. The beneficial effects or technical problems solved by the device can be referred to the description of the communication method corresponding to the communication device, or the related description in the summary. Here, only a brief description is given. The communication device for a network management device in this embodiment can be used to implement the communication method for a network management device and the optional embodiments thereof. The communication device for a network management device 10 comprises:
[0118] The receiving module 11 is configured to receive the parameters passed, and the parameters include the task serial number. In some embodiments, the module can be specifically used to implement the above step S10 or the optional embodiments corresponding to the step.
[0119] The database accessing module 12 is configured to obtain a record corresponding to the task serial number from the interface table, and the record includes instruction content and a network management device identifier. In some embodiments, the database accessing module 12 can be specifically configured to implement the step S20 or each optional embodiment corresponding to the step S20.
[0120] The batch file generating module 13 is configured to generate a batch file according to the instruction content. In some embodiments, the batch file generating module 13 can be specifically configured to implement the step S30 or each optional embodiment corresponding to the step S30.
[0121] The transmitting module 14 is configured to transmit the batch file to a network management device corresponding to the network management device identifier, and transmit an instruction of activating the batch file to the network management device, so that the network management device executes the instruction content corresponding to the batch file. In some embodiments, the transmitting module 14 can be specifically configured to implement the steps S40-S50 or each optional embodiment corresponding to the steps S40-S50.
[0122] In some embodiments, the transmitting module 14 is further configured to obtain result data generated by the network management device when executing the instruction content. In some embodiments, the transmitting module 14 can be specifically configured to implement the step S60 or each optional embodiment corresponding to the step S60.
[0123] The data analyzing module 15 is further configured to analyze the result data into table-structured data. In some embodiments, the data analyzing module 15 can be specifically configured to implement the step S70 or each optional embodiment corresponding to the step S70.
[0124] The database accessing module 12 is further configured to write the table-structured data obtained by the analysis into a target table, and the target table is determined according to the record corresponding to the task serial number. In some embodiments, the database accessing module 12 can be specifically configured to implement the step S80 or each optional embodiment corresponding to the step S80.
[0125] In some embodiments, the target table is determined according to the record corresponding to the task serial number, including that the record corresponding to the task serial number includes an index of the target table, and the target table is determined from a configuration table according to the instruction content and the index of the target table.
[0126] In some embodiments, the database accessing module 12 is further configured to obtain a username and a password required for accessing the network management device. The transmitting module 14 uses the username and the password to implement authentication required for transmitting the batch file or the instruction of activating the batch file to the network management device, or to implement authentication required for obtaining the result data from the network management device.
[0127] In some embodiments, the transmission module 14 is implemented based on an ftp protocol when the batch processing file is transmitted to the network management device; or is implemented based on a telnet protocol when the instruction for activating the batch processing file is transmitted to the network management device; or is implemented based on an ftp protocol when the result data is obtained from the network management device.
[0128] The record corresponding to the task flow number further comprises an execution mode parameter, which is used to indicate whether the result data of executing the instruction content by the network management device is obtained from the corresponding network management device.
[0129] As shown in Figure 7 The second embodiment of the application further provides a communication device for a network management device, which comprises Figure 6 The various modules and the Telnet command execution module 16 are shown.
[0130] The database access module 12 comprises a database reading module 121 and a database writing module 122, which are used to read the relevant information of the interface table and the configuration table of the database and write the parsed result data into the target table of the database.
[0131] The transmission module 14 comprises an FTP file sending module 141 and an FTP file retrieving module 142, which are used to send the batch processing file to the specified directory of the network management device and retrieve the above result data from the specified directory.
[0132] The Telnet command execution module 16 is used to make the network management device execute the instruction content corresponding to the batch processing file.
[0133] The embodiment of the application further provides a computing device, which comprises a processor and a memory having program instructions stored thereon, the program instructions being executed by the processor to make the processor execute the method of the above embodiment or each optional embodiment. Figure 8 FIG. 1 is a structural schematic diagram of a computing device 900 provided by the embodiment of the application. The computing device 900 comprises a processor 910 and a memory 920.
[0134] It should be understood that Figure 8 The computing device 900 shown in FIG. 1 further comprises a communication interface 930, which can be used for communication with other devices.
[0135] The processor 910 can be connected with the memory 920. The memory 920 can be used to store the program code and data. Therefore, the memory 920 can be a storage unit inside the processor 910, or an external storage unit independent of the processor 910, or a component including the storage unit inside the processor 910 and the external storage unit independent of the processor 910.
[0136] Optionally, the computing device 900 can further include a bus. The memory 920 and the communication interface 930 can be connected with the processor 910 through the bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0137] It should be understood that, in the embodiments of the present application, the processor 910 can be a central processing unit (CPU). The processor 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, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. Alternatively, the processor 910 can be one or more integrated circuits for executing relevant programs to implement the technical solutions provided by the embodiments of the present application.
[0138] The memory 920 can include read-only memory and random access memory, and provide instructions and data for the processor 910. A part of the processor 910 can also include a non-volatile random access memory. For example, the processor 910 can also store device type information.
[0139] When the computing device 900 is running, the processor 910 executes the computer execution instructions in the memory 920 to implement the operation steps of the method of each embodiment described above, or each optional embodiment.
[0140] It should be understood that the computing device 900 according to the embodiments of the present application can correspond to the respective subject performing the method according to the embodiments of the present application, and the above and other operations and / or functions of the respective modules in the computing device 900 are respectively for realizing the respective processes of the method according to the embodiments of the present application, and for brevity, will not be repeated here.
[0141] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0143] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0144] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0145] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0146] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts of the prior art that make contributions or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various program code storage media.
[0147] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The program is executed by a processor to perform the method of the above embodiments, and the method includes at least one of the schemes described in the above embodiments.
[0148] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.
[0149] The computer readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer readable program code is carried. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus.
[0150] The program code embodied on the computer readable media can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0151] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0152] Where a term is introduced in the singular tense, the contended plural is also contemplated unless otherwise indicated. Furthermore, the grading of terms such as "first", "second", "third" or "module A", "module B", "module C" and the like are used for differentiating like objects only and do not imply a particular chronological order or sequence, unless otherwise indicated. It is to be understood that the specific order or hierarchy of steps in processes represented and described herein are illustrative only and can be performed in many other orders or sequences not depicted or otherwise described herein without departing from the application.
[0153] In the description above, reference has been made to a number of means, such as means for performing a step, means for performing a function, etc. Such means are merely devices that are used to perform the associated functions and can be implemented by hardware components, software components, and / or combinations thereof, as would be understood by a person skilled in the art. In the description above, reference has been made to a number of steps, such as S110, S120, etc. Such steps are merely representative of the operations to be performed and can be performed in any order, simultaneously, or in any combination, unless otherwise indicated.
[0154] The term "comprising", used in the description and in the claims, should not be interpreted as being restricted to the means listed thereafter; it does not exclude other elements or steps. It needs to be interpreted in a manner that it specifies the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps, components or groups thereof. It should be interpreted in accordance with the accepted usage of the term "comprising" in the field of patent claims.
[0155] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but can refer to different embodiments. Furthermore, the particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0156] It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the application. The word "comprising" does not exclude the presence of elements or steps other than those listed in a claim. In addition, the word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. It is further noted that some of the embodiments described herein can be implemented by way of machine (for example, computer processor) executable instructions, code modules, or the like, which cause a processor to implement the disclosed functionality of a hardware implementation, or to cooperate with functional hardware to implement such functionality. Such software can be stored on various computer-readable media, including storage devices and communication links.
Claims
1. A method of communicating with a network management device, characterized by, The method comprises: receiving a parameter passed, wherein the parameter comprises a task serial number; obtaining a record corresponding to the task serial number by accessing an interface table, wherein the record comprises instruction content and a network management device identifier; generating a batch file according to the instruction content; transmitting the batch file to a network management device corresponding to the network management device identifier; transmitting an instruction for activating the batch file to the network management device, so that the network management device executes the instruction content corresponding to the batch file; the record corresponding to the task serial number further comprises an execution mode parameter, wherein the execution mode parameter is used to indicate whether to obtain result data of the network management device running the instruction content from a network management device corresponding to the network management device identifier, and when the result is yes, further comprising: obtaining the result data generated by the network management device executing the instruction content from the network management device; parsing the result data into table structure data; and writing the parsed table structure data into a target table; the target table is determined according to the record corresponding to the task serial number; wherein the target table is determined according to the record corresponding to the task serial number, comprising: the record corresponding to the task serial number comprises an index of the target table; and the target table is determined from a configuration table according to the instruction content and the index of the target table.
2. The communication method according to claim 1, characterized by, The method further comprises: obtaining a username and a password required for accessing the network management device; using the username and the password to realize authentication required for transmitting the batch file or the instruction for activating the batch file to the network management device, or to realize authentication required for obtaining the result data from the network management device.
3. The communication method according to claim 1, wherein, The method comprises: transmitting the batch file to the network management device based on an ftp protocol; or transmitting the instruction for activating the batch file to the network management device based on a telnet protocol; or obtaining the result data from the network management device based on an ftp protocol.
4. The communication method according to claim 1, wherein, The passed parameter comprises a parameter passed by a database management system, the interface table comprises an interface table of the database management system, the configuration table comprises a configuration table of the database management system, or the target table comprises a target table of the database management system.
5. A communication device with a network management device, characterized in that The method comprises: a receiving module configured to receive a parameter passed, wherein the parameter comprises a task serial number; a database accessing module configured to obtain a record corresponding to the task serial number by accessing an interface table, wherein the record comprises instruction content and a network management device identifier; a batch file generating module configured to generate a batch file according to the instruction content; a transmitting module configured to transmit the batch file to a network management device corresponding to the network management device identifier, and transmit an instruction for activating the batch file to the network management device, so that the network management device executes the instruction content corresponding to the batch file; The record corresponding to the task serial number also includes an execution mode parameter. The execution mode parameter is used to indicate whether to obtain the result data of the network management device running the instruction content from the network management device corresponding to the network management device identifier. When yes, it also includes: the transmission module is further used to obtain the result data generated by the network management device executing the instruction content from the network management device. The data parsing module is used to parse the result data into tabular data; The database access module is also used to write the data of the parsed table structure into the target table; the target table is determined according to the record corresponding to the task serial number, wherein the determination of the target table according to the record corresponding to the task serial number includes: the record corresponding to the task serial number includes the index of the target table; the target table is determined from the configuration table according to the instruction content and the index of the target table.
6. A computing device, comprising: include: processor, and A memory having program instructions stored thereon, which, when executed by the processor, cause the processor to perform the communication method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, It stores program instructions that, when executed by a computer, cause the computer to perform the communication method according to any one of claims 1-4.
Citation Information
Patent Citations
Data request processing method and device, computer equipment and storage medium
CN112818021A
Batch file transmission method and device between heterogeneous systems
CN113067866A